From dbd489730b0c5920e89492bc741a4d2186e66a39 Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Thu, 13 May 2021 23:19:00 +0000 Subject: [PATCH] Update API Clients to Latest Models (#1259) * Add Customization for REST-JSON Content-Type Customization * update models * Regenerated API Clients --- .../41575353444b40ffbf474f4155544f00.json | 11 + .../49daf64e599c4e4f810e21ed07de2f05.json | 29 + .../aws-models/codeartifact.2018-09-22.json | 38 +- .../aws-models/commander.2018-05-10.json | 4044 ++++++++++ .../aws-models/configservice.2014-11-12.json | 256 +- .../aws-models/connect.2017-08-08.json | 66 +- .../aws-models/ec2.2016-11-15.json | 20 +- .../aws-models/ecs.2014-11-13.json | 16 +- .../aws-models/eks.2017-11-01.json | 133 +- .../aws-models/finspace.2021-03-12.json | 1059 +++ .../aws-models/finspacedata.2020-07-13.json | 712 ++ .../aws-models/iotwireless.2020-11-22.json | 109 +- .../kinesisanalyticsv2.2018-05-23.json | 184 +- .../aws-models/lakeformation.2017-03-31.json | 1769 ++++- .../aws-models/lookoutmetrics.2017-07-25.json | 22 +- .../aws-models/mediaconvert.2017-08-29.json | 234 +- .../aws-models/route53.2013-04-01.json | 25 +- .../aws-models/s3control.2018-08-20.json | 102 +- .../aws-models/ssm.2014-11-06.json | 523 +- .../aws-models/ssmcontacts.2021-05-03.json | 3114 ++++++++ .../go/codegen/AssembleMiddlewareStack.java | 11 + .../AdjustAwsRestJsonContentType.java | 119 + ...mithy.go.codegen.integration.GoIntegration | 1 + .../aws/go/codegen/endpoint-prefix.json | 2 + .../repotools/cmd/updatemodulemeta/main.go | 4 +- .../api_op_DisposePackageVersions.go | 2 +- service/commander/LICENSE.txt | 202 + service/commander/api_client.go | 278 + .../commander/api_op_CreateReplicationSet.go | 161 + .../commander/api_op_CreateResponsePlan.go | 182 + .../commander/api_op_CreateTimelineEvent.go | 185 + .../commander/api_op_DeleteIncidentRecord.go | 112 + .../commander/api_op_DeleteReplicationSet.go | 113 + .../commander/api_op_DeleteResourcePolicy.go | 118 + .../commander/api_op_DeleteResponsePlan.go | 114 + .../commander/api_op_DeleteTimelineEvent.go | 118 + service/commander/api_op_GetIncidentRecord.go | 119 + service/commander/api_op_GetReplicationSet.go | 518 ++ .../commander/api_op_GetResourcePolicies.go | 217 + service/commander/api_op_GetResponsePlan.go | 142 + service/commander/api_op_GetTimelineEvent.go | 126 + .../commander/api_op_ListIncidentRecords.go | 224 + service/commander/api_op_ListRelatedItems.go | 216 + .../commander/api_op_ListReplicationSets.go | 207 + service/commander/api_op_ListResponsePlans.go | 207 + .../commander/api_op_ListTagsForResource.go | 118 + .../commander/api_op_ListTimelineEvents.go | 230 + service/commander/api_op_PutResourcePolicy.go | 124 + service/commander/api_op_StartIncident.go | 192 + service/commander/api_op_TagResource.go | 117 + service/commander/api_op_UntagResource.go | 117 + .../api_op_UpdateDeletionProtection.go | 158 + .../commander/api_op_UpdateIncidentRecord.go | 194 + .../commander/api_op_UpdateRelatedItems.go | 159 + .../commander/api_op_UpdateReplicationSet.go | 158 + .../commander/api_op_UpdateResponsePlan.go | 195 + .../commander/api_op_UpdateTimelineEvent.go | 171 + service/commander/deserializers.go | 6365 ++++++++++++++++ service/commander/doc.go | 14 + service/commander/endpoints.go | 160 + service/commander/generated.json | 55 + service/commander/go.mod | 11 + service/commander/go.sum | 19 + service/commander/go_module_metadata.go | 6 + .../commander/internal/endpoints/endpoints.go | 106 + .../internal/endpoints/endpoints_test.go | 11 + service/commander/protocol_test.go | 3 + service/commander/serializers.go | 2812 +++++++ service/commander/types/enums.go | 195 + service/commander/types/errors.go | 142 + service/commander/types/types.go | 690 ++ .../commander/types/types_exported_test.go | 202 + service/commander/validators.go | 1425 ++++ ...escribeAggregateComplianceByConfigRules.go | 87 + ...beAggregateComplianceByConformancePacks.go | 87 + ...pi_op_DescribeAggregationAuthorizations.go | 87 + .../api_op_DescribeComplianceByConfigRule.go | 78 + .../api_op_DescribeComplianceByResource.go | 88 + ...i_op_DescribeConfigRuleEvaluationStatus.go | 91 + .../api_op_DescribeConfigRules.go | 76 + ...ibeConfigurationAggregatorSourcesStatus.go | 87 + ...api_op_DescribeConfigurationAggregators.go | 87 + ...pi_op_DescribeConformancePackCompliance.go | 87 + .../api_op_DescribeConformancePackStatus.go | 86 + .../api_op_DescribeConformancePacks.go | 85 + ..._DescribeOrganizationConfigRuleStatuses.go | 87 + .../api_op_DescribeOrganizationConfigRules.go | 87 + ...ribeOrganizationConformancePackStatuses.go | 87 + ...op_DescribeOrganizationConformancePacks.go | 87 + ...i_op_DescribePendingAggregationRequests.go | 87 + .../api_op_DescribeRetentionConfigurations.go | 78 + ...tAggregateComplianceDetailsByConfigRule.go | 88 + ...GetAggregateConfigRuleComplianceSummary.go | 88 + ...gregateConformancePackComplianceSummary.go | 87 + ...op_GetAggregateDiscoveredResourceCounts.go | 88 + ...api_op_GetComplianceDetailsByConfigRule.go | 88 + .../api_op_GetComplianceDetailsByResource.go | 78 + ..._op_GetConformancePackComplianceDetails.go | 87 + ..._op_GetConformancePackComplianceSummary.go | 86 + .../api_op_GetDiscoveredResourceCounts.go | 88 + ...GetOrganizationConfigRuleDetailedStatus.go | 88 + ...ganizationConformancePackDetailedStatus.go | 88 + ...api_op_ListAggregateDiscoveredResources.go | 88 + .../api_op_ListDiscoveredResources.go | 87 + .../api_op_ListTagsForResource.go | 86 + .../api_op_SelectAggregateResourceConfig.go | 9 +- .../api_op_SelectResourceConfig.go | 84 + service/connect/api_op_CreateInstance.go | 6 +- .../api_op_CreateIntegrationAssociation.go | 4 +- service/connect/api_op_CreateUseCase.go | 4 +- service/connect/api_op_DeleteInstance.go | 6 +- .../api_op_DeleteIntegrationAssociation.go | 1 - service/connect/api_op_DeleteUseCase.go | 1 - service/connect/api_op_GetFederationToken.go | 5 +- service/connect/api_op_GetMetricData.go | 15 +- .../api_op_ListIntegrationAssociations.go | 1 - service/connect/api_op_ListQueues.go | 3 + service/connect/api_op_ListUseCases.go | 1 - service/connect/api_op_StartChatContact.go | 5 +- .../connect/api_op_UpdateContactAttributes.go | 35 +- service/connect/serializers.go | 14 + service/connect/types/types.go | 5 +- .../ec2/api_op_DescribeReservedInstances.go | 42 +- ...i_op_DescribeReservedInstancesOfferings.go | 21 +- service/ec2/types/enums.go | 804 +- service/ecs/api_op_CreateCluster.go | 2 +- service/ecs/api_op_CreateService.go | 6 +- service/ecs/api_op_ExecuteCommand.go | 2 + service/ecs/api_op_RegisterTaskDefinition.go | 4 +- service/ecs/types/types.go | 18 +- service/eks/api_op_CreateNodegroup.go | 7 +- service/eks/api_op_UpdateClusterConfig.go | 10 +- service/eks/api_op_UpdateNodegroupConfig.go | 4 + service/eks/deserializers.go | 97 + service/eks/serializers.go | 70 + service/eks/types/enums.go | 24 + service/eks/types/types.go | 54 +- service/finspace/LICENSE.txt | 202 + service/finspace/api_client.go | 291 + service/finspace/api_op_CreateEnvironment.go | 147 + service/finspace/api_op_DeleteEnvironment.go | 115 + service/finspace/api_op_GetEnvironment.go | 120 + service/finspace/api_op_ListEnvironments.go | 124 + .../finspace/api_op_ListTagsForResource.go | 119 + service/finspace/api_op_TagResource.go | 120 + service/finspace/api_op_UntagResource.go | 121 + service/finspace/api_op_UpdateEnvironment.go | 138 + service/finspace/deserializers.go | 1953 +++++ service/finspace/doc.go | 8 + service/finspace/endpoints.go | 160 + service/finspace/generated.json | 32 + service/finspace/go.mod | 10 + service/finspace/go.sum | 13 + service/finspace/go_module_metadata.go | 6 + .../finspace/internal/endpoints/endpoints.go | 106 + .../internal/endpoints/endpoints_test.go | 11 + service/finspace/protocol_test.go | 3 + service/finspace/serializers.go | 649 ++ service/finspace/types/enums.go | 55 + service/finspace/types/errors.go | 147 + service/finspace/types/types.go | 72 + service/finspace/validators.go | 289 + service/finspacedata/LICENSE.txt | 202 + service/finspacedata/api_client.go | 290 + .../finspacedata/api_op_CreateChangeset.go | 155 + ...api_op_GetProgrammaticAccessCredentials.go | 126 + .../finspacedata/api_op_GetWorkingLocation.go | 130 + service/finspacedata/deserializers.go | 1151 +++ service/finspacedata/doc.go | 7 + service/finspacedata/endpoints.go | 160 + service/finspacedata/generated.json | 27 + service/finspacedata/go.mod | 10 + service/finspacedata/go.sum | 13 + service/finspacedata/go_module_metadata.go | 6 + .../internal/endpoints/endpoints.go | 106 + .../internal/endpoints/endpoints_test.go | 11 + service/finspacedata/protocol_test.go | 3 + service/finspacedata/serializers.go | 262 + service/finspacedata/types/enums.go | 133 + service/finspacedata/types/errors.go | 94 + service/finspacedata/types/types.go | 111 + service/finspacedata/validators.go | 97 + .../api_op_UpdateWirelessGateway.go | 7 + service/iotwireless/deserializers.go | 159 + service/iotwireless/serializers.go | 84 + service/iotwireless/types/types.go | 10 + .../api_op_DescribeApplicationVersion.go | 126 + .../api_op_ListApplicationVersions.go | 140 + ...dateApplicationMaintenanceConfiguration.go | 23 +- service/kinesisanalyticsv2/deserializers.go | 415 ++ service/kinesisanalyticsv2/generated.json | 2 + service/kinesisanalyticsv2/serializers.go | 133 + service/kinesisanalyticsv2/types/enums.go | 2 + service/kinesisanalyticsv2/types/types.go | 30 +- service/kinesisanalyticsv2/validators.go | 81 + .../api_op_AddLFTagsToResource.go | 128 + service/lakeformation/api_op_CreateLFTag.go | 123 + service/lakeformation/api_op_DeleteLFTag.go | 123 + service/lakeformation/api_op_GetLFTag.go | 131 + .../lakeformation/api_op_GetResourceLFTags.go | 132 + service/lakeformation/api_op_ListLFTags.go | 130 + .../api_op_RemoveLFTagsFromResource.go | 130 + .../api_op_SearchDatabasesByLFTags.go | 136 + .../api_op_SearchTablesByLFTags.go | 135 + service/lakeformation/api_op_UpdateLFTag.go | 129 + service/lakeformation/deserializers.go | 4161 ++++++++--- service/lakeformation/generated.json | 10 + service/lakeformation/serializers.go | 1050 ++- service/lakeformation/types/enums.go | 62 +- service/lakeformation/types/errors.go | 55 + service/lakeformation/types/types.go | 137 +- service/lakeformation/validators.go | 508 ++ .../lookoutmetrics/api_op_DescribeAlert.go | 4 +- .../api_op_DescribeAnomalyDetector.go | 4 +- .../api_op_DescribeMetricSet.go | 4 +- service/lookoutmetrics/api_op_ListAlerts.go | 5 +- .../api_op_ListAnomalyDetectors.go | 5 +- .../lookoutmetrics/api_op_ListMetricSets.go | 5 +- service/lookoutmetrics/types/types.go | 4 +- service/mediaconvert/deserializers.go | 249 + service/mediaconvert/serializers.go | 121 + service/mediaconvert/types/enums.go | 40 + service/mediaconvert/types/types.go | 151 + service/route53/api_op_CreateHostedZone.go | 3 +- service/route53/api_op_CreateKeySigningKey.go | 6 +- service/route53/api_op_DeleteKeySigningKey.go | 4 +- service/route53/api_op_GetChange.go | 166 + service/route53/api_op_TestDNSAnswer.go | 3 +- service/route53/generated.json | 3 +- service/route53/go.mod | 1 + service/route53/go.sum | 6 + service/s3control/api_op_CreateAccessPoint.go | 18 +- ...api_op_CreateAccessPointForObjectLambda.go | 4 +- service/s3control/api_op_CreateBucket.go | 11 +- service/s3control/api_op_CreateJob.go | 6 +- service/s3control/api_op_DeleteBucket.go | 20 +- ...i_op_DeleteBucketLifecycleConfiguration.go | 30 +- .../s3control/api_op_DeleteBucketPolicy.go | 24 +- .../s3control/api_op_DeleteBucketTagging.go | 20 +- service/s3control/api_op_DeleteJobTagging.go | 5 +- .../api_op_DeleteStorageLensConfiguration.go | 8 +- ...p_DeleteStorageLensConfigurationTagging.go | 8 +- service/s3control/api_op_DescribeJob.go | 2 +- service/s3control/api_op_GetAccessPoint.go | 6 +- .../api_op_GetAccessPointPolicyStatus.go | 4 +- ...tAccessPointPolicyStatusForObjectLambda.go | 2 +- service/s3control/api_op_GetBucket.go | 28 +- .../api_op_GetBucketLifecycleConfiguration.go | 16 +- service/s3control/api_op_GetBucketPolicy.go | 27 +- service/s3control/api_op_GetBucketTagging.go | 28 +- service/s3control/api_op_GetJobTagging.go | 5 +- .../api_op_GetStorageLensConfiguration.go | 8 +- ...i_op_GetStorageLensConfigurationTagging.go | 8 +- service/s3control/api_op_ListJobs.go | 2 +- .../s3control/api_op_ListRegionalBuckets.go | 6 +- .../api_op_ListStorageLensConfigurations.go | 8 +- .../s3control/api_op_PutAccessPointPolicy.go | 4 +- ..._op_PutAccessPointPolicyForObjectLambda.go | 7 +- .../api_op_PutBucketLifecycleConfiguration.go | 19 +- service/s3control/api_op_PutBucketPolicy.go | 26 +- service/s3control/api_op_PutBucketTagging.go | 19 +- service/s3control/api_op_PutJobTagging.go | 15 +- .../api_op_PutStorageLensConfiguration.go | 8 +- ...i_op_PutStorageLensConfigurationTagging.go | 8 +- service/s3control/api_op_UpdateJobPriority.go | 2 +- service/s3control/api_op_UpdateJobStatus.go | 2 +- service/s3control/types/types.go | 30 +- .../ssm/api_op_AssociateOpsItemRelatedItem.go | 139 + service/ssm/api_op_CreateDocument.go | 5 + ...api_op_DescribeAutomationStepExecutions.go | 4 +- .../api_op_DisassociateOpsItemRelatedItem.go | 121 + service/ssm/api_op_GetDocument.go | 9 + service/ssm/api_op_ListOpsItemRelatedItems.go | 221 + service/ssm/api_op_UpdateDocument.go | 8 +- service/ssm/deserializers.go | 2279 ++++-- service/ssm/doc.go | 26 +- service/ssm/generated.json | 3 + service/ssm/serializers.go | 272 + service/ssm/types/enums.go | 41 + service/ssm/types/errors.go | 46 + service/ssm/types/types.go | 72 +- service/ssm/validators.go | 169 + service/ssmcontacts/LICENSE.txt | 202 + service/ssmcontacts/api_client.go | 279 + service/ssmcontacts/api_op_AcceptPage.go | 129 + .../api_op_ActivateContactChannel.go | 118 + service/ssmcontacts/api_op_CreateContact.go | 181 + .../api_op_CreateContactChannel.go | 197 + .../api_op_DeactivateContactChannel.go | 113 + service/ssmcontacts/api_op_DeleteContact.go | 116 + .../api_op_DeleteContactChannel.go | 115 + .../ssmcontacts/api_op_DescribeEngagement.go | 160 + service/ssmcontacts/api_op_DescribePage.go | 166 + service/ssmcontacts/api_op_GetContact.go | 139 + .../ssmcontacts/api_op_GetContactChannel.go | 144 + .../ssmcontacts/api_op_GetContactPolicy.go | 120 + .../ssmcontacts/api_op_ListContactChannels.go | 216 + service/ssmcontacts/api_op_ListContacts.go | 211 + service/ssmcontacts/api_op_ListEngagements.go | 214 + .../ssmcontacts/api_op_ListPageReceipts.go | 213 + .../ssmcontacts/api_op_ListPagesByContact.go | 219 + .../api_op_ListPagesByEngagement.go | 218 + .../ssmcontacts/api_op_ListTagsForResource.go | 117 + .../ssmcontacts/api_op_PutContactPolicy.go | 117 + .../ssmcontacts/api_op_SendActivationCode.go | 114 + service/ssmcontacts/api_op_StartEngagement.go | 187 + service/ssmcontacts/api_op_StopEngagement.go | 116 + service/ssmcontacts/api_op_TagResource.go | 119 + service/ssmcontacts/api_op_UntagResource.go | 117 + service/ssmcontacts/api_op_UpdateContact.go | 122 + .../api_op_UpdateContactChannel.go | 120 + service/ssmcontacts/deserializers.go | 6486 +++++++++++++++++ service/ssmcontacts/doc.go | 7 + service/ssmcontacts/endpoints.go | 160 + service/ssmcontacts/generated.json | 51 + service/ssmcontacts/go.mod | 10 + service/ssmcontacts/go.sum | 13 + service/ssmcontacts/go_module_metadata.go | 6 + .../internal/endpoints/endpoints.go | 106 + .../internal/endpoints/endpoints_test.go | 11 + service/ssmcontacts/protocol_test.go | 3 + service/ssmcontacts/serializers.go | 2028 ++++++ service/ssmcontacts/types/enums.go | 123 + service/ssmcontacts/types/errors.go | 164 + service/ssmcontacts/types/types.go | 273 + service/ssmcontacts/validators.go | 1164 +++ 326 files changed, 67930 insertions(+), 2945 deletions(-) create mode 100644 .changelog/41575353444b40ffbf474f4155544f00.json create mode 100644 .changelog/49daf64e599c4e4f810e21ed07de2f05.json create mode 100644 codegen/sdk-codegen/aws-models/commander.2018-05-10.json create mode 100644 codegen/sdk-codegen/aws-models/finspace.2021-03-12.json create mode 100644 codegen/sdk-codegen/aws-models/finspacedata.2020-07-13.json create mode 100644 codegen/sdk-codegen/aws-models/ssmcontacts.2021-05-03.json create mode 100644 codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/AdjustAwsRestJsonContentType.java create mode 100644 service/commander/LICENSE.txt create mode 100644 service/commander/api_client.go create mode 100644 service/commander/api_op_CreateReplicationSet.go create mode 100644 service/commander/api_op_CreateResponsePlan.go create mode 100644 service/commander/api_op_CreateTimelineEvent.go create mode 100644 service/commander/api_op_DeleteIncidentRecord.go create mode 100644 service/commander/api_op_DeleteReplicationSet.go create mode 100644 service/commander/api_op_DeleteResourcePolicy.go create mode 100644 service/commander/api_op_DeleteResponsePlan.go create mode 100644 service/commander/api_op_DeleteTimelineEvent.go create mode 100644 service/commander/api_op_GetIncidentRecord.go create mode 100644 service/commander/api_op_GetReplicationSet.go create mode 100644 service/commander/api_op_GetResourcePolicies.go create mode 100644 service/commander/api_op_GetResponsePlan.go create mode 100644 service/commander/api_op_GetTimelineEvent.go create mode 100644 service/commander/api_op_ListIncidentRecords.go create mode 100644 service/commander/api_op_ListRelatedItems.go create mode 100644 service/commander/api_op_ListReplicationSets.go create mode 100644 service/commander/api_op_ListResponsePlans.go create mode 100644 service/commander/api_op_ListTagsForResource.go create mode 100644 service/commander/api_op_ListTimelineEvents.go create mode 100644 service/commander/api_op_PutResourcePolicy.go create mode 100644 service/commander/api_op_StartIncident.go create mode 100644 service/commander/api_op_TagResource.go create mode 100644 service/commander/api_op_UntagResource.go create mode 100644 service/commander/api_op_UpdateDeletionProtection.go create mode 100644 service/commander/api_op_UpdateIncidentRecord.go create mode 100644 service/commander/api_op_UpdateRelatedItems.go create mode 100644 service/commander/api_op_UpdateReplicationSet.go create mode 100644 service/commander/api_op_UpdateResponsePlan.go create mode 100644 service/commander/api_op_UpdateTimelineEvent.go create mode 100644 service/commander/deserializers.go create mode 100644 service/commander/doc.go create mode 100644 service/commander/endpoints.go create mode 100644 service/commander/generated.json create mode 100644 service/commander/go.mod create mode 100644 service/commander/go.sum create mode 100644 service/commander/go_module_metadata.go create mode 100644 service/commander/internal/endpoints/endpoints.go create mode 100644 service/commander/internal/endpoints/endpoints_test.go create mode 100644 service/commander/protocol_test.go create mode 100644 service/commander/serializers.go create mode 100644 service/commander/types/enums.go create mode 100644 service/commander/types/errors.go create mode 100644 service/commander/types/types.go create mode 100644 service/commander/types/types_exported_test.go create mode 100644 service/commander/validators.go create mode 100644 service/finspace/LICENSE.txt create mode 100644 service/finspace/api_client.go create mode 100644 service/finspace/api_op_CreateEnvironment.go create mode 100644 service/finspace/api_op_DeleteEnvironment.go create mode 100644 service/finspace/api_op_GetEnvironment.go create mode 100644 service/finspace/api_op_ListEnvironments.go create mode 100644 service/finspace/api_op_ListTagsForResource.go create mode 100644 service/finspace/api_op_TagResource.go create mode 100644 service/finspace/api_op_UntagResource.go create mode 100644 service/finspace/api_op_UpdateEnvironment.go create mode 100644 service/finspace/deserializers.go create mode 100644 service/finspace/doc.go create mode 100644 service/finspace/endpoints.go create mode 100644 service/finspace/generated.json create mode 100644 service/finspace/go.mod create mode 100644 service/finspace/go.sum create mode 100644 service/finspace/go_module_metadata.go create mode 100644 service/finspace/internal/endpoints/endpoints.go create mode 100644 service/finspace/internal/endpoints/endpoints_test.go create mode 100644 service/finspace/protocol_test.go create mode 100644 service/finspace/serializers.go create mode 100644 service/finspace/types/enums.go create mode 100644 service/finspace/types/errors.go create mode 100644 service/finspace/types/types.go create mode 100644 service/finspace/validators.go create mode 100644 service/finspacedata/LICENSE.txt create mode 100644 service/finspacedata/api_client.go create mode 100644 service/finspacedata/api_op_CreateChangeset.go create mode 100644 service/finspacedata/api_op_GetProgrammaticAccessCredentials.go create mode 100644 service/finspacedata/api_op_GetWorkingLocation.go create mode 100644 service/finspacedata/deserializers.go create mode 100644 service/finspacedata/doc.go create mode 100644 service/finspacedata/endpoints.go create mode 100644 service/finspacedata/generated.json create mode 100644 service/finspacedata/go.mod create mode 100644 service/finspacedata/go.sum create mode 100644 service/finspacedata/go_module_metadata.go create mode 100644 service/finspacedata/internal/endpoints/endpoints.go create mode 100644 service/finspacedata/internal/endpoints/endpoints_test.go create mode 100644 service/finspacedata/protocol_test.go create mode 100644 service/finspacedata/serializers.go create mode 100644 service/finspacedata/types/enums.go create mode 100644 service/finspacedata/types/errors.go create mode 100644 service/finspacedata/types/types.go create mode 100644 service/finspacedata/validators.go create mode 100644 service/kinesisanalyticsv2/api_op_DescribeApplicationVersion.go create mode 100644 service/kinesisanalyticsv2/api_op_ListApplicationVersions.go create mode 100644 service/lakeformation/api_op_AddLFTagsToResource.go create mode 100644 service/lakeformation/api_op_CreateLFTag.go create mode 100644 service/lakeformation/api_op_DeleteLFTag.go create mode 100644 service/lakeformation/api_op_GetLFTag.go create mode 100644 service/lakeformation/api_op_GetResourceLFTags.go create mode 100644 service/lakeformation/api_op_ListLFTags.go create mode 100644 service/lakeformation/api_op_RemoveLFTagsFromResource.go create mode 100644 service/lakeformation/api_op_SearchDatabasesByLFTags.go create mode 100644 service/lakeformation/api_op_SearchTablesByLFTags.go create mode 100644 service/lakeformation/api_op_UpdateLFTag.go create mode 100644 service/ssm/api_op_AssociateOpsItemRelatedItem.go create mode 100644 service/ssm/api_op_DisassociateOpsItemRelatedItem.go create mode 100644 service/ssm/api_op_ListOpsItemRelatedItems.go create mode 100644 service/ssmcontacts/LICENSE.txt create mode 100644 service/ssmcontacts/api_client.go create mode 100644 service/ssmcontacts/api_op_AcceptPage.go create mode 100644 service/ssmcontacts/api_op_ActivateContactChannel.go create mode 100644 service/ssmcontacts/api_op_CreateContact.go create mode 100644 service/ssmcontacts/api_op_CreateContactChannel.go create mode 100644 service/ssmcontacts/api_op_DeactivateContactChannel.go create mode 100644 service/ssmcontacts/api_op_DeleteContact.go create mode 100644 service/ssmcontacts/api_op_DeleteContactChannel.go create mode 100644 service/ssmcontacts/api_op_DescribeEngagement.go create mode 100644 service/ssmcontacts/api_op_DescribePage.go create mode 100644 service/ssmcontacts/api_op_GetContact.go create mode 100644 service/ssmcontacts/api_op_GetContactChannel.go create mode 100644 service/ssmcontacts/api_op_GetContactPolicy.go create mode 100644 service/ssmcontacts/api_op_ListContactChannels.go create mode 100644 service/ssmcontacts/api_op_ListContacts.go create mode 100644 service/ssmcontacts/api_op_ListEngagements.go create mode 100644 service/ssmcontacts/api_op_ListPageReceipts.go create mode 100644 service/ssmcontacts/api_op_ListPagesByContact.go create mode 100644 service/ssmcontacts/api_op_ListPagesByEngagement.go create mode 100644 service/ssmcontacts/api_op_ListTagsForResource.go create mode 100644 service/ssmcontacts/api_op_PutContactPolicy.go create mode 100644 service/ssmcontacts/api_op_SendActivationCode.go create mode 100644 service/ssmcontacts/api_op_StartEngagement.go create mode 100644 service/ssmcontacts/api_op_StopEngagement.go create mode 100644 service/ssmcontacts/api_op_TagResource.go create mode 100644 service/ssmcontacts/api_op_UntagResource.go create mode 100644 service/ssmcontacts/api_op_UpdateContact.go create mode 100644 service/ssmcontacts/api_op_UpdateContactChannel.go create mode 100644 service/ssmcontacts/deserializers.go create mode 100644 service/ssmcontacts/doc.go create mode 100644 service/ssmcontacts/endpoints.go create mode 100644 service/ssmcontacts/generated.json create mode 100644 service/ssmcontacts/go.mod create mode 100644 service/ssmcontacts/go.sum create mode 100644 service/ssmcontacts/go_module_metadata.go create mode 100644 service/ssmcontacts/internal/endpoints/endpoints.go create mode 100644 service/ssmcontacts/internal/endpoints/endpoints_test.go create mode 100644 service/ssmcontacts/protocol_test.go create mode 100644 service/ssmcontacts/serializers.go create mode 100644 service/ssmcontacts/types/enums.go create mode 100644 service/ssmcontacts/types/errors.go create mode 100644 service/ssmcontacts/types/types.go create mode 100644 service/ssmcontacts/validators.go diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json new file mode 100644 index 00000000000..b749b7c5b69 --- /dev/null +++ b/.changelog/41575353444b40ffbf474f4155544f00.json @@ -0,0 +1,11 @@ +{ + "id": "41575353-444b-40ff-bf47-4f4155544f00", + "type": "release", + "description": "New AWS service client module", + "modules": [ + "service/commander", + "service/finspace", + "service/finspacedata", + "service/ssmcontacts" + ] +} \ No newline at end of file diff --git a/.changelog/49daf64e599c4e4f810e21ed07de2f05.json b/.changelog/49daf64e599c4e4f810e21ed07de2f05.json new file mode 100644 index 00000000000..268440124e9 --- /dev/null +++ b/.changelog/49daf64e599c4e4f810e21ed07de2f05.json @@ -0,0 +1,29 @@ +{ + "id": "49daf64e-599c-4e4f-810e-21ed07de2f05", + "type": "feature", + "description": "Updated to latest service API model.", + "modules": [ + "service/codeartifact", + "service/commander", + "service/configservice", + "service/connect", + "service/ec2", + "service/ecs", + "service/eks", + "service/finspace", + "service/finspacedata", + "service/iot", + "service/iotwireless", + "service/kinesis", + "service/kinesisanalytics", + "service/kinesisanalyticsv2", + "service/lakeformation", + "service/lookoutmetrics", + "service/mediaconvert", + "service/route53", + "service/s3", + "service/s3control", + "service/ssm", + "service/ssmcontacts" + ] +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/codeartifact.2018-09-22.json b/codegen/sdk-codegen/aws-models/codeartifact.2018-09-22.json index 31c9366e7ef..53ad19a8cc0 100644 --- a/codegen/sdk-codegen/aws-models/codeartifact.2018-09-22.json +++ b/codegen/sdk-codegen/aws-models/codeartifact.2018-09-22.json @@ -1133,7 +1133,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n Returns a \n \n DomainDescription\n \n object that contains information about the requested domain.\n

", + "smithy.api#documentation": "

\n Returns a \n DomainDescription \n object that contains information about the requested domain.\n

", "smithy.api#http": { "method": "GET", "uri": "/v1/domain", @@ -1198,7 +1198,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n Returns a \n \n PackageVersionDescription\n \n object that contains information about the requested package version.\n

", + "smithy.api#documentation": "

\n Returns a \n PackageVersionDescription \n object that contains information about the requested package version.\n

", "smithy.api#http": { "method": "GET", "uri": "/v1/package/version", @@ -1476,7 +1476,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n Deletes the assets in package versions and sets the package versions' status to Disposed.\n A disposed package version cannot be restored in your repository because its assets are deleted.\n

\n \n

\n To view all disposed package versions in a repository, use \n ListPackageVersions\n and set the \n \n status\n parameter \n to Disposed.\n

\n \n

\n To view information about a disposed package version, use \n DescribePackageVersion\n ..\n

", + "smithy.api#documentation": "

\n Deletes the assets in package versions and sets the package versions' status to Disposed.\n A disposed package version cannot be restored in your repository because its assets are deleted.\n

\n \n

\n To view all disposed package versions in a repository, use ListPackageVersions and set the \n status parameter \n to Disposed.\n

\n \n

\n To view information about a disposed package version, use DescribePackageVersion.\n

", "smithy.api#http": { "method": "POST", "uri": "/v1/package/versions/dispose", @@ -1699,7 +1699,7 @@ } }, "traits": { - "smithy.api#documentation": "

Information about a domain, including its name, Amazon Resource Name (ARN), and status.\n The \n ListDomains\n operation returns a list of DomainSummary\n objects.

" + "smithy.api#documentation": "

Information about a domain, including its name, Amazon Resource Name (ARN), and status.\n The ListDomains operation returns a list of DomainSummary\n objects.

" } }, "com.amazonaws.codeartifact#DomainSummaryList": { @@ -2487,7 +2487,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n Returns a list of \n \n AssetSummary\n \n objects for assets in a package version.\n

", + "smithy.api#documentation": "

\n Returns a list of \n AssetSummary \n objects for assets in a package version.\n

", "smithy.api#http": { "method": "POST", "uri": "/v1/package/version/assets", @@ -2625,7 +2625,7 @@ "assets": { "target": "com.amazonaws.codeartifact#AssetSummaryList", "traits": { - "smithy.api#documentation": "

\n The returned list of \n AssetSummary\n objects.\n

" + "smithy.api#documentation": "

\n The returned list of AssetSummary objects.\n

" } } } @@ -2656,7 +2656,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n Returns the direct dependencies for a package version. The dependencies are returned as \n \n PackageDependency\n \n objects. CodeArtifact extracts the dependencies for a package version from the metadata file for the package \n format (for example, the package.json file for npm packages and the pom.xml file \n for Maven). Any package version dependencies that are not listed in the configuration file are not returned.\n

", + "smithy.api#documentation": "

\n Returns the direct dependencies for a package version. The dependencies are returned as \n PackageDependency \n objects. CodeArtifact extracts the dependencies for a package version from the metadata file for the package \n format (for example, the package.json file for npm packages and the pom.xml file \n for Maven). Any package version dependencies that are not listed in the configuration file are not returned.\n

", "smithy.api#http": { "method": "POST", "uri": "/v1/package/version/dependencies", @@ -2772,7 +2772,7 @@ "dependencies": { "target": "com.amazonaws.codeartifact#PackageDependencyList", "traits": { - "smithy.api#documentation": "

\n The returned list of \n PackageDependency\n objects.\n

" + "smithy.api#documentation": "

\n The returned list of PackageDependency objects.\n

" } } } @@ -2803,7 +2803,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n Returns a list of \n \n PackageVersionSummary\n \n objects for package versions in a repository that match the request parameters.\n

", + "smithy.api#documentation": "

\n Returns a list of \n PackageVersionSummary \n objects for package versions in a repository that match the request parameters.\n

", "smithy.api#http": { "method": "POST", "uri": "/v1/package/versions", @@ -2935,7 +2935,7 @@ "versions": { "target": "com.amazonaws.codeartifact#PackageVersionSummaryList", "traits": { - "smithy.api#documentation": "

\n The returned list of \n \n PackageVersionSummary\n \n objects.\n

" + "smithy.api#documentation": "

\n The returned list of \n PackageVersionSummary \n objects.\n

" } }, "nextToken": { @@ -2972,7 +2972,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n Returns a list of \n \n PackageSummary\n \n objects for packages in a repository that match the request parameters.\n

", + "smithy.api#documentation": "

\n Returns a list of \n PackageSummary \n objects for packages in a repository that match the request parameters.\n

", "smithy.api#http": { "method": "POST", "uri": "/v1/packages", @@ -3064,7 +3064,7 @@ "packages": { "target": "com.amazonaws.codeartifact#PackageSummaryList", "traits": { - "smithy.api#documentation": "

\n The list of returned \n PackageSummary\n \n objects.\n

" + "smithy.api#documentation": "

\n The list of returned PackageSummary \n objects.\n

" } }, "nextToken": { @@ -3098,7 +3098,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n Returns a list of \n \n RepositorySummary\n \n objects. Each RepositorySummary contains information about a repository in the specified AWS account and that matches the input \n parameters.\n

", + "smithy.api#documentation": "

\n Returns a list of \n RepositorySummary \n objects. Each RepositorySummary contains information about a repository in the specified AWS account and that matches the input \n parameters.\n

", "smithy.api#http": { "method": "POST", "uri": "/v1/repositories", @@ -3137,7 +3137,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n Returns a list of \n \n RepositorySummary\n \n objects. Each RepositorySummary contains information about a repository in the specified domain and that matches the input \n parameters.\n

", + "smithy.api#documentation": "

\n Returns a list of \n RepositorySummary \n objects. Each RepositorySummary contains information about a repository in the specified domain and that matches the input \n parameters.\n

", "smithy.api#http": { "method": "POST", "uri": "/v1/domain/repositories", @@ -3267,7 +3267,7 @@ "repositories": { "target": "com.amazonaws.codeartifact#RepositorySummaryList", "traits": { - "smithy.api#documentation": "

\n The returned list of \n RepositorySummary\n \n objects.\n

" + "smithy.api#documentation": "

\n The returned list of RepositorySummary \n objects.\n

" } }, "nextToken": { @@ -3446,7 +3446,7 @@ } }, "traits": { - "smithy.api#documentation": "

\n Details about a package, including its format, namespace, and name. The \n \n ListPackages\n \n operation returns a list of PackageSummary objects.\n

" + "smithy.api#documentation": "

\n Details about a package, including its format, namespace, and name. The \n ListPackages \n operation returns a list of PackageSummary objects.\n

" } }, "com.amazonaws.codeartifact#PackageSummaryList": { @@ -3703,7 +3703,7 @@ } }, "traits": { - "smithy.api#documentation": "

\n Details about a package version, including its status, version, and revision. The \n \n ListPackageVersions\n \n operation returns a list of PackageVersionSummary objects.\n

" + "smithy.api#documentation": "

\n Details about a package version, including its status, version, and revision. The \n ListPackageVersions \n operation returns a list of PackageVersionSummary objects.\n

" } }, "com.amazonaws.codeartifact#PackageVersionSummaryList": { @@ -4054,7 +4054,7 @@ } }, "traits": { - "smithy.api#documentation": "

Details about a repository, including its Amazon Resource Name (ARN), description, and\n domain information. The \n ListRepositories\n operation returns a list of\n RepositorySummary objects.

" + "smithy.api#documentation": "

Details about a repository, including its Amazon Resource Name (ARN), description, and\n domain information. The ListRepositories operation returns a list of\n RepositorySummary objects.

" } }, "com.amazonaws.codeartifact#RepositorySummaryList": { @@ -4656,7 +4656,7 @@ } }, "traits": { - "smithy.api#documentation": "

\n Information about an upstream repository. A list of UpstreamRepository objects is an input parameter to\n \n CreateRepository\n \n and \n UpdateRepository\n .\n

" + "smithy.api#documentation": "

\n Information about an upstream repository. A list of UpstreamRepository objects is an input parameter to\n CreateRepository\n and UpdateRepository.\n

" } }, "com.amazonaws.codeartifact#UpstreamRepositoryInfo": { diff --git a/codegen/sdk-codegen/aws-models/commander.2018-05-10.json b/codegen/sdk-codegen/aws-models/commander.2018-05-10.json new file mode 100644 index 00000000000..27f8a3fcd7b --- /dev/null +++ b/codegen/sdk-codegen/aws-models/commander.2018-05-10.json @@ -0,0 +1,4044 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.commander#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.commander#ExceptionMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

You don't have sufficient access to perform this action.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.commander#Action": { + "type": "union", + "members": { + "ssmAutomation": { + "target": "com.amazonaws.commander#SsmAutomation", + "traits": { + "smithy.api#documentation": "

The Systems Manager automation document to start as the runbook at the beginning of the\n incident.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The action that starts at the beginning of an incident. The response plan defines the\n action.

" + } + }, + "com.amazonaws.commander#ActionsList": { + "type": "list", + "member": { + "target": "com.amazonaws.commander#Action" + }, + "traits": { + "smithy.api#length": { + "max": 1 + } + } + }, + "com.amazonaws.commander#AddRegionAction": { + "type": "structure", + "members": { + "regionName": { + "target": "com.amazonaws.commander#RegionName", + "traits": { + "smithy.api#documentation": "

The Region name to add to the replication set.

", + "smithy.api#required": {} + } + }, + "sseKmsKeyId": { + "target": "com.amazonaws.commander#SseKmsKey", + "traits": { + "smithy.api#documentation": "

The KMS key ID to use to encrypt your replication set.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Defines the Region and KMS key to add to the replication set.

" + } + }, + "com.amazonaws.commander#Arn": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1000 + }, + "smithy.api#pattern": "^arn:aws(-cn|-us-gov)?:[a-z0-9-]*:[a-z0-9-]*:([0-9]{12})?:.+$" + } + }, + "com.amazonaws.commander#AttributeValueList": { + "type": "union", + "members": { + "stringValues": { + "target": "com.amazonaws.commander#StringList", + "traits": { + "smithy.api#documentation": "

The list of string values that the filter matches.

" + } + }, + "integerValues": { + "target": "com.amazonaws.commander#IntegerList", + "traits": { + "smithy.api#documentation": "

The list of integer values that the filter matches.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Use the AttributeValueList to filter by string or integer values.

" + } + }, + "com.amazonaws.commander#AutomationExecution": { + "type": "union", + "members": { + "ssmExecutionArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the automation process.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Systems Manager automation document\n process\n to start as the runbook at the beginning of the incident.

" + } + }, + "com.amazonaws.commander#AutomationExecutionSet": { + "type": "set", + "member": { + "target": "com.amazonaws.commander#AutomationExecution" + }, + "traits": { + "smithy.api#length": { + "max": 100 + } + } + }, + "com.amazonaws.commander#ChatChannel": { + "type": "union", + "members": { + "empty": { + "target": "com.amazonaws.commander#EmptyChatChannel", + "traits": { + "smithy.api#documentation": "

Used to remove the chat channel from an incident record or response plan.

" + } + }, + "chatbotSns": { + "target": "com.amazonaws.commander#ChatbotSnsConfigurationSet", + "traits": { + "smithy.api#documentation": "

The SNS targets that AWS Chatbot uses to notify the chat channel of updates to an\n incident. You can also make updates to the incident through the chat channel\n by\n using the SNS topics.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The AWS Chatbot chat channel used for collaboration during an incident.

" + } + }, + "com.amazonaws.commander#ChatbotSnsConfigurationSet": { + "type": "set", + "member": { + "target": "com.amazonaws.commander#SnsArn" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + } + } + }, + "com.amazonaws.commander#ClientToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 128 + } + } + }, + "com.amazonaws.commander#Commander": { + "type": "service", + "version": "2018-05-10", + "operations": [ + { + "target": "com.amazonaws.commander#CreateReplicationSet" + }, + { + "target": "com.amazonaws.commander#CreateResponsePlan" + }, + { + "target": "com.amazonaws.commander#CreateTimelineEvent" + }, + { + "target": "com.amazonaws.commander#DeleteIncidentRecord" + }, + { + "target": "com.amazonaws.commander#DeleteReplicationSet" + }, + { + "target": "com.amazonaws.commander#DeleteResourcePolicy" + }, + { + "target": "com.amazonaws.commander#DeleteResponsePlan" + }, + { + "target": "com.amazonaws.commander#DeleteTimelineEvent" + }, + { + "target": "com.amazonaws.commander#GetIncidentRecord" + }, + { + "target": "com.amazonaws.commander#GetReplicationSet" + }, + { + "target": "com.amazonaws.commander#GetResourcePolicies" + }, + { + "target": "com.amazonaws.commander#GetResponsePlan" + }, + { + "target": "com.amazonaws.commander#GetTimelineEvent" + }, + { + "target": "com.amazonaws.commander#ListIncidentRecords" + }, + { + "target": "com.amazonaws.commander#ListRelatedItems" + }, + { + "target": "com.amazonaws.commander#ListReplicationSets" + }, + { + "target": "com.amazonaws.commander#ListResponsePlans" + }, + { + "target": "com.amazonaws.commander#ListTagsForResource" + }, + { + "target": "com.amazonaws.commander#ListTimelineEvents" + }, + { + "target": "com.amazonaws.commander#PutResourcePolicy" + }, + { + "target": "com.amazonaws.commander#StartIncident" + }, + { + "target": "com.amazonaws.commander#TagResource" + }, + { + "target": "com.amazonaws.commander#UntagResource" + }, + { + "target": "com.amazonaws.commander#UpdateDeletionProtection" + }, + { + "target": "com.amazonaws.commander#UpdateIncidentRecord" + }, + { + "target": "com.amazonaws.commander#UpdateRelatedItems" + }, + { + "target": "com.amazonaws.commander#UpdateReplicationSet" + }, + { + "target": "com.amazonaws.commander#UpdateResponsePlan" + }, + { + "target": "com.amazonaws.commander#UpdateTimelineEvent" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Commander", + "arnNamespace": "ssm-incidents", + "cloudFormationName": "Commander", + "cloudTrailEventSource": "ssm-incidents.amazonaws.com", + "endpointPrefix": "ssm-incidents" + }, + "aws.auth#sigv4": { + "name": "ssm-incidents" + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "additionalAllowedHeaders": [ + "x-amz-content-sha256", + "x-amz-user-agent", + "content-type", + "x-amzn-platform-id" + ] + }, + "smithy.api#documentation": "

AWS Systems Manager Incident Manager is an incident management console designed to help\n users mitigate and recover from incidents affecting their AWS-hosted applications. An incident\n is any unplanned interruption or reduction in quality of services.

\n

Incident Manager increases incident resolution by notifying responders of impact,\n highlighting relevant troubleshooting data, and providing collaboration tools to get services\n back up and running. To achieve the primary goal of reducing the time-to-resolution of\n critical incidents, Incident Manager automates response plans and enables responder team\n escalation.

", + "smithy.api#title": "Incident Manager" + } + }, + "com.amazonaws.commander#Condition": { + "type": "union", + "members": { + "before": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

Before the specified timestamp

" + } + }, + "after": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

After the specified timestamp.

" + } + }, + "equals": { + "target": "com.amazonaws.commander#AttributeValueList", + "traits": { + "smithy.api#documentation": "

The value is equal to the provided string or integer.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A conditional statement with which to compare a value, after a timestamp, before a\n timestamp, or equal to a string or integer. If multiple conditions are specified, the\n conditionals become an ANDed statement. If multiple values are specified for a\n conditional, the values are ORd.

" + } + }, + "com.amazonaws.commander#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.commander#ExceptionMessage", + "traits": { + "smithy.api#required": {} + } + }, + "resourceIdentifier": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier of the requested resource" + } + }, + "resourceType": { + "target": "com.amazonaws.commander#ResourceType", + "traits": { + "smithy.api#documentation": "The resource type" + } + } + }, + "traits": { + "smithy.api#documentation": "

Updating or deleting a resource causes an inconsistent state.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.commander#CreateReplicationSet": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#CreateReplicationSetInput" + }, + "output": { + "target": "com.amazonaws.commander#CreateReplicationSetOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#ConflictException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

A replication set replicates and encrypts your data to the provided Regions with the\n provided KMS key.

", + "smithy.api#http": { + "method": "POST", + "uri": "/createReplicationSet", + "code": 201 + } + } + }, + "com.amazonaws.commander#CreateReplicationSetInput": { + "type": "structure", + "members": { + "regions": { + "target": "com.amazonaws.commander#RegionMapInput", + "traits": { + "smithy.api#documentation": "

The Regions that Incident Manager replicates your data to. You can have up to three Regions\n in your replication set.

", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.commander#ClientToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.commander#CreateReplicationSetOutput": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the replication set.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#CreateResponsePlan": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#CreateResponsePlanInput" + }, + "output": { + "target": "com.amazonaws.commander#CreateResponsePlanOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#ConflictException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a response plan that automates the initial response to incidents. A response\n plan engages contacts, starts chat channel collaboration, and\n initiates\n runbooks at the beginning of an incident.

", + "smithy.api#http": { + "method": "POST", + "uri": "/createResponsePlan", + "code": 201 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.commander#CreateResponsePlanInput": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.commander#ClientToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {} + } + }, + "name": { + "target": "com.amazonaws.commander#ResponsePlanName", + "traits": { + "smithy.api#documentation": "

The short format name of the response plan. Can't include spaces.

", + "smithy.api#required": {} + } + }, + "displayName": { + "target": "com.amazonaws.commander#ResponsePlanDisplayName", + "traits": { + "smithy.api#documentation": "

The long format of the response plan name. This field can contain spaces.

" + } + }, + "incidentTemplate": { + "target": "com.amazonaws.commander#IncidentTemplate", + "traits": { + "smithy.api#documentation": "

Details used to create an incident when using this response plan.

", + "smithy.api#required": {} + } + }, + "chatChannel": { + "target": "com.amazonaws.commander#ChatChannel", + "traits": { + "smithy.api#documentation": "

The\n AWS Chatbot\n chat channel used for collaboration during an incident.

" + } + }, + "engagements": { + "target": "com.amazonaws.commander#EngagementSet", + "traits": { + "smithy.api#documentation": "

The contacts and escalation plans that the response plan engages during an\n incident.

" + } + }, + "actions": { + "target": "com.amazonaws.commander#ActionsList", + "traits": { + "smithy.api#documentation": "

The actions that the response plan starts at the beginning of an incident.

" + } + }, + "tags": { + "target": "com.amazonaws.commander#TagMap", + "traits": { + "smithy.api#documentation": "

A list of tags that you are adding to the response plan.

" + } + } + } + }, + "com.amazonaws.commander#CreateResponsePlanOutput": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the response plan.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#CreateTimelineEvent": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#CreateTimelineEventInput" + }, + "output": { + "target": "com.amazonaws.commander#CreateTimelineEventOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#ConflictException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a custom timeline event on the incident details page of an incident record.\n Timeline events are automatically created by Incident Manager, marking key moment during an\n incident. You can create custom timeline events to mark important events that are\n automatically detected by Incident Manager.

", + "smithy.api#http": { + "method": "POST", + "uri": "/createTimelineEvent", + "code": 201 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.commander#CreateTimelineEventInput": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.commander#ClientToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "incidentRecordArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident record you are adding the event\n to.

", + "smithy.api#required": {} + } + }, + "eventTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the event occurred.

", + "smithy.api#required": {} + } + }, + "eventType": { + "target": "com.amazonaws.commander#TimelineEventType", + "traits": { + "smithy.api#documentation": "

The type of the event. You can create timeline events of type Custom\n Event.

", + "smithy.api#required": {} + } + }, + "eventData": { + "target": "com.amazonaws.commander#EventData", + "traits": { + "smithy.api#documentation": "

A short description of the event.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#CreateTimelineEventOutput": { + "type": "structure", + "members": { + "incidentRecordArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The ARN of the incident record that you added the event to.

", + "smithy.api#required": {} + } + }, + "eventId": { + "target": "com.amazonaws.commander#UUID", + "traits": { + "smithy.api#documentation": "

The ID of the event for easy reference later.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#DedupeString": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1000 + } + } + }, + "com.amazonaws.commander#DeleteIncidentRecord": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#DeleteIncidentRecordInput" + }, + "output": { + "target": "com.amazonaws.commander#DeleteIncidentRecordOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Delete an incident record from Incident Manager.

", + "smithy.api#http": { + "method": "POST", + "uri": "/deleteIncidentRecord", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.commander#DeleteIncidentRecordInput": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident record you are deleting.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#DeleteIncidentRecordOutput": { + "type": "structure", + "members": {} + }, + "com.amazonaws.commander#DeleteRegionAction": { + "type": "structure", + "members": { + "regionName": { + "target": "com.amazonaws.commander#RegionName", + "traits": { + "smithy.api#documentation": "

The name of the Region you're deleting from the replication set.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Defines the information about the Region you're deleting from your replication\n set.

" + } + }, + "com.amazonaws.commander#DeleteReplicationSet": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#DeleteReplicationSetInput" + }, + "output": { + "target": "com.amazonaws.commander#DeleteReplicationSetOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes all Regions in your replication set. Deleting the replication set deletes all\n Incident Manager data.

", + "smithy.api#http": { + "method": "POST", + "uri": "/deleteReplicationSet", + "code": 204 + } + } + }, + "com.amazonaws.commander#DeleteReplicationSetInput": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the replication set you're deleting.

", + "smithy.api#httpQuery": "arn", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#DeleteReplicationSetOutput": { + "type": "structure", + "members": {} + }, + "com.amazonaws.commander#DeleteResourcePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#DeleteResourcePolicyInput" + }, + "output": { + "target": "com.amazonaws.commander#DeleteResourcePolicyOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the resource policy that\n AWS\n Resource Access Manager uses to share your Incident Manager resource.

", + "smithy.api#http": { + "method": "POST", + "uri": "/deleteResourcePolicy", + "code": 200 + } + } + }, + "com.amazonaws.commander#DeleteResourcePolicyInput": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource you're deleting the policy from.

", + "smithy.api#required": {} + } + }, + "policyId": { + "target": "com.amazonaws.commander#PolicyId", + "traits": { + "smithy.api#documentation": "

The ID of the resource policy you're deleting.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#DeleteResourcePolicyOutput": { + "type": "structure", + "members": {} + }, + "com.amazonaws.commander#DeleteResponsePlan": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#DeleteResponsePlanInput" + }, + "output": { + "target": "com.amazonaws.commander#DeleteResponsePlanOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the specified response plan. Deleting a response plan stops all linked\n CloudWatch alarms and EventBridge events from creating an incident with this response\n plan.

", + "smithy.api#http": { + "method": "POST", + "uri": "/deleteResponsePlan", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.commander#DeleteResponsePlanInput": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the response plan.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#DeleteResponsePlanOutput": { + "type": "structure", + "members": {} + }, + "com.amazonaws.commander#DeleteTimelineEvent": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#DeleteTimelineEventInput" + }, + "output": { + "target": "com.amazonaws.commander#DeleteTimelineEventOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a timeline event from an incident.

", + "smithy.api#http": { + "method": "POST", + "uri": "/deleteTimelineEvent", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.commander#DeleteTimelineEventInput": { + "type": "structure", + "members": { + "incidentRecordArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident that the event is part of.

", + "smithy.api#required": {} + } + }, + "eventId": { + "target": "com.amazonaws.commander#UUID", + "traits": { + "smithy.api#documentation": "

The ID of the event you are updating. You can find this by using ListTimelineEvents.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#DeleteTimelineEventOutput": { + "type": "structure", + "members": {} + }, + "com.amazonaws.commander#EmptyChatChannel": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

Used to remove the chat channel from an incident record or response plan.

" + } + }, + "com.amazonaws.commander#EngagementSet": { + "type": "set", + "member": { + "target": "com.amazonaws.commander#SsmContactsArn" + }, + "traits": { + "smithy.api#length": { + "max": 5 + } + } + }, + "com.amazonaws.commander#EventData": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 6000 + } + } + }, + "com.amazonaws.commander#EventSummary": { + "type": "structure", + "members": { + "incidentRecordArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident that the event happened during.

", + "smithy.api#required": {} + } + }, + "eventId": { + "target": "com.amazonaws.commander#UUID", + "traits": { + "smithy.api#documentation": "

The timeline event ID.

", + "smithy.api#required": {} + } + }, + "eventTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the event occurred.

", + "smithy.api#required": {} + } + }, + "eventUpdatedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the timeline event was last updated.

", + "smithy.api#required": {} + } + }, + "eventType": { + "target": "com.amazonaws.commander#TimelineEventType", + "traits": { + "smithy.api#documentation": "

The type of event. The timeline event must be Custom Event.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about a timeline event during an incident.

" + } + }, + "com.amazonaws.commander#EventSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.commander#EventSummary" + }, + "traits": { + "smithy.api#length": { + "max": 100 + } + } + }, + "com.amazonaws.commander#ExceptionMessage": { + "type": "string" + }, + "com.amazonaws.commander#Filter": { + "type": "structure", + "members": { + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The key that you're filtering on.

", + "smithy.api#length": { + "max": 50 + }, + "smithy.api#required": {} + } + }, + "condition": { + "target": "com.amazonaws.commander#Condition", + "traits": { + "smithy.api#documentation": "

The condition accepts before or after a specified time, equal to a string, or equal to an integer.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Filter the selection by using a condition.

" + } + }, + "com.amazonaws.commander#FilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.commander#Filter" + }, + "traits": { + "smithy.api#length": { + "max": 5 + } + } + }, + "com.amazonaws.commander#GetIncidentRecord": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#GetIncidentRecordInput" + }, + "output": { + "target": "com.amazonaws.commander#GetIncidentRecordOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the details of the specified incident record.

", + "smithy.api#http": { + "method": "GET", + "uri": "/getIncidentRecord", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.commander#GetIncidentRecordInput": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident record.

", + "smithy.api#httpQuery": "arn", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#GetIncidentRecordOutput": { + "type": "structure", + "members": { + "incidentRecord": { + "target": "com.amazonaws.commander#IncidentRecord", + "traits": { + "smithy.api#documentation": "

Details structure of the incident record.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#GetReplicationSet": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#GetReplicationSetInput" + }, + "output": { + "target": "com.amazonaws.commander#GetReplicationSetOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieve your Incident Manager replication set.

", + "smithy.api#http": { + "method": "GET", + "uri": "/getReplicationSet", + "code": 200 + }, + "smithy.api#readonly": {}, + "smithy.waiters#waitable": { + "WaitForReplicationSetActive": { + "documentation": "Wait for a replication set to become ACTIVE", + "acceptors": [ + { + "state": "success", + "matcher": { + "output": { + "path": "replicationSet.status", + "expected": "ACTIVE", + "comparator": "stringEquals" + } + } + }, + { + "state": "retry", + "matcher": { + "output": { + "path": "replicationSet.status", + "expected": "CREATING", + "comparator": "stringEquals" + } + } + }, + { + "state": "retry", + "matcher": { + "output": { + "path": "replicationSet.status", + "expected": "UPDATING", + "comparator": "stringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "replicationSet.status", + "expected": "FAILED", + "comparator": "stringEquals" + } + } + } + ], + "minDelay": 30, + "maxDelay": 30 + }, + "WaitForReplicationSetDeleted": { + "documentation": "Wait for a replication set to be deleted", + "acceptors": [ + { + "state": "success", + "matcher": { + "errorType": "ResourceNotFoundException" + } + }, + { + "state": "retry", + "matcher": { + "output": { + "path": "replicationSet.status", + "expected": "DELETING", + "comparator": "stringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "replicationSet.status", + "expected": "FAILED", + "comparator": "stringEquals" + } + } + } + ], + "minDelay": 30, + "maxDelay": 30 + } + } + } + }, + "com.amazonaws.commander#GetReplicationSetInput": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the replication set you want to retrieve.

", + "smithy.api#httpQuery": "arn", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#GetReplicationSetOutput": { + "type": "structure", + "members": { + "replicationSet": { + "target": "com.amazonaws.commander#ReplicationSet", + "traits": { + "smithy.api#documentation": "

Details of the replication set.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#GetResourcePolicies": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#GetResourcePoliciesInput" + }, + "output": { + "target": "com.amazonaws.commander#GetResourcePoliciesOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the resource policies attached to the specified response plan.

", + "smithy.api#http": { + "method": "POST", + "uri": "/getResourcePolicies", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "resourcePolicies", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.commander#GetResourcePoliciesInput": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the response plan with the attached resource policy.

", + "smithy.api#httpQuery": "resourceArn", + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.commander#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of resource policies to display per page of results.

" + } + }, + "nextToken": { + "target": "com.amazonaws.commander#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + } + } + }, + "com.amazonaws.commander#GetResourcePoliciesOutput": { + "type": "structure", + "members": { + "resourcePolicies": { + "target": "com.amazonaws.commander#ResourcePolicyList", + "traits": { + "smithy.api#documentation": "

Details about the resource policy attached to the response plan.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.commander#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + } + } + }, + "com.amazonaws.commander#GetResponsePlan": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#GetResponsePlanInput" + }, + "output": { + "target": "com.amazonaws.commander#GetResponsePlanOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the details of the specified response plan.

", + "smithy.api#http": { + "method": "GET", + "uri": "/getResponsePlan", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.commander#GetResponsePlanInput": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the response plan.

", + "smithy.api#httpQuery": "arn", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#GetResponsePlanOutput": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The ARN of the response plan.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.commander#ResponsePlanName", + "traits": { + "smithy.api#documentation": "

The short format name of the response plan. Can't contain spaces.

", + "smithy.api#required": {} + } + }, + "displayName": { + "target": "com.amazonaws.commander#ResponsePlanDisplayName", + "traits": { + "smithy.api#documentation": "

The long format name of the response plan. Can contain spaces.

" + } + }, + "incidentTemplate": { + "target": "com.amazonaws.commander#IncidentTemplate", + "traits": { + "smithy.api#documentation": "

Details used to create the incident when using this response plan.

", + "smithy.api#required": {} + } + }, + "chatChannel": { + "target": "com.amazonaws.commander#ChatChannel", + "traits": { + "smithy.api#documentation": "

The\n AWS\n Chatbot chat channel used for collaboration during an\n incident.

" + } + }, + "engagements": { + "target": "com.amazonaws.commander#EngagementSet", + "traits": { + "smithy.api#documentation": "

The contacts and escalation plans that the response plan engages during an\n incident.

" + } + }, + "actions": { + "target": "com.amazonaws.commander#ActionsList", + "traits": { + "smithy.api#documentation": "

The actions that this response plan takes at the beginning of the incident.

" + } + } + } + }, + "com.amazonaws.commander#GetTimelineEvent": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#GetTimelineEventInput" + }, + "output": { + "target": "com.amazonaws.commander#GetTimelineEventOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves a timeline event based on its ID and incident record.

", + "smithy.api#http": { + "method": "GET", + "uri": "/getTimelineEvent", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.commander#GetTimelineEventInput": { + "type": "structure", + "members": { + "incidentRecordArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident that the timeline event is part of.

", + "smithy.api#httpQuery": "incidentRecordArn", + "smithy.api#required": {} + } + }, + "eventId": { + "target": "com.amazonaws.commander#UUID", + "traits": { + "smithy.api#documentation": "

The ID of the event. You can get an event's ID when you create it or by using ListTimelineEvents.

", + "smithy.api#httpQuery": "eventId", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#GetTimelineEventOutput": { + "type": "structure", + "members": { + "event": { + "target": "com.amazonaws.commander#TimelineEvent", + "traits": { + "smithy.api#documentation": "

Details about the timeline event.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#Impact": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 5 + } + } + }, + "com.amazonaws.commander#IncidentRecord": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident record.

", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.commander#IncidentTitle", + "traits": { + "smithy.api#documentation": "

The title of the incident.

", + "smithy.api#required": {} + } + }, + "summary": { + "target": "com.amazonaws.commander#IncidentSummary", + "traits": { + "smithy.api#documentation": "

The summary of the incident. The summary is a brief synopsis of what occurred, what is currently happening, and context.

" + } + }, + "status": { + "target": "com.amazonaws.commander#IncidentRecordStatus", + "traits": { + "smithy.api#documentation": "

The current status of the incident.

", + "smithy.api#required": {} + } + }, + "impact": { + "target": "com.amazonaws.commander#Impact", + "traits": { + "smithy.api#documentation": "

The impact of the incident on customers and applications.

", + "smithy.api#required": {} + } + }, + "creationTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that Incident Manager created the incident record.

", + "smithy.api#required": {} + } + }, + "resolvedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which the incident was resolved. This appears as a timeline event.

" + } + }, + "lastModifiedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time at which the incident was most recently modified.

", + "smithy.api#required": {} + } + }, + "lastModifiedBy": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

Who modified the incident most recently.

", + "smithy.api#required": {} + } + }, + "automationExecutions": { + "target": "com.amazonaws.commander#AutomationExecutionSet", + "traits": { + "smithy.api#documentation": "

The runbook, or automation document, that's run at the beginning of the incident.

" + } + }, + "incidentRecordSource": { + "target": "com.amazonaws.commander#IncidentRecordSource", + "traits": { + "smithy.api#documentation": "

Details about the action that started the incident.

", + "smithy.api#required": {} + } + }, + "dedupeString": { + "target": "com.amazonaws.commander#DedupeString", + "traits": { + "smithy.api#documentation": "

The string Incident Manager uses to prevent duplicate incidents from being created by the same incident.

", + "smithy.api#required": {} + } + }, + "chatChannel": { + "target": "com.amazonaws.commander#ChatChannel", + "traits": { + "smithy.api#documentation": "

The chat channel used for collaboration during an incident.

" + } + }, + "notificationTargets": { + "target": "com.amazonaws.commander#NotificationTargetSet", + "traits": { + "smithy.api#documentation": "

The SNS targets that\n AWS Chatbot uses\n to notify the chat channels and perform actions on the incident record.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The record of the incident that's created when an incident occurs.

" + } + }, + "com.amazonaws.commander#IncidentRecordSource": { + "type": "structure", + "members": { + "createdBy": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The principal that started the incident.

", + "smithy.api#required": {} + } + }, + "invokedBy": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The principal the assumed the role specified of the createdBy.

" + } + }, + "resourceArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The resource that caused the incident to be created.

" + } + }, + "source": { + "target": "com.amazonaws.commander#IncidentSource", + "traits": { + "smithy.api#documentation": "

The service that started the incident. This can be manually created from Incident Manager,\n automatically created using an\n AWS\n CloudWatch alarm, or\n Amazon\n EventBridge event.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about how the incident record was created and when.

" + } + }, + "com.amazonaws.commander#IncidentRecordStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "OPEN", + "name": "OPEN" + }, + { + "value": "RESOLVED", + "name": "RESOLVED" + } + ] + } + }, + "com.amazonaws.commander#IncidentRecordSummary": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident.

", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.commander#IncidentTitle", + "traits": { + "smithy.api#documentation": "

The title of the incident. This value is either provided by the response plan or\n overwritten on creation.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.commander#IncidentRecordStatus", + "traits": { + "smithy.api#documentation": "

The current status of the incident.

", + "smithy.api#required": {} + } + }, + "impact": { + "target": "com.amazonaws.commander#Impact", + "traits": { + "smithy.api#documentation": "

Defines the impact to customers and applications.

", + "smithy.api#required": {} + } + }, + "creationTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time the incident was created.

", + "smithy.api#required": {} + } + }, + "resolvedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time the incident was resolved.

" + } + }, + "incidentRecordSource": { + "target": "com.amazonaws.commander#IncidentRecordSource", + "traits": { + "smithy.api#documentation": "

What caused Incident Manager to create the incident.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Details describing an incident record.

" + } + }, + "com.amazonaws.commander#IncidentRecordSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.commander#IncidentRecordSummary" + }, + "traits": { + "smithy.api#length": { + "max": 100 + } + } + }, + "com.amazonaws.commander#IncidentSource": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 50 + } + } + }, + "com.amazonaws.commander#IncidentSummary": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 4000 + } + } + }, + "com.amazonaws.commander#IncidentTemplate": { + "type": "structure", + "members": { + "title": { + "target": "com.amazonaws.commander#IncidentTitle", + "traits": { + "smithy.api#documentation": "

The title of the incident.

", + "smithy.api#required": {} + } + }, + "impact": { + "target": "com.amazonaws.commander#Impact", + "traits": { + "smithy.api#documentation": "

The impact of the incident on your customers and applications.

", + "smithy.api#required": {} + } + }, + "summary": { + "target": "com.amazonaws.commander#IncidentSummary", + "traits": { + "smithy.api#documentation": "

The summary of the incident. The summary is a brief synopsis of what occurred, what's\n currently happening, and context.

" + } + }, + "dedupeString": { + "target": "com.amazonaws.commander#DedupeString", + "traits": { + "smithy.api#documentation": "

Used to stop Incident Manager from creating multiple incident records for the same incident.

" + } + }, + "notificationTargets": { + "target": "com.amazonaws.commander#NotificationTargetSet", + "traits": { + "smithy.api#documentation": "

The SNS targets that AWS Chatbot uses to notify the chat channel of updates to an\n incident. You can also make updates to the incident through the chat channel using the SNS\n topics.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Basic details used in creating a response plan. The response plan is then used to create an incident record.

" + } + }, + "com.amazonaws.commander#IncidentTitle": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 200 + } + } + }, + "com.amazonaws.commander#IntegerList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#length": { + "max": 100 + } + } + }, + "com.amazonaws.commander#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.commander#ExceptionMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "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.commander#ItemIdentifier": { + "type": "structure", + "members": { + "value": { + "target": "com.amazonaws.commander#ItemValue", + "traits": { + "smithy.api#documentation": "

Details about the related item.

", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.amazonaws.commander#ItemType", + "traits": { + "smithy.api#documentation": "

The type of related item. Incident Manager supports the following types:

\n ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Details and type of a related item.

" + } + }, + "com.amazonaws.commander#ItemType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ANALYSIS", + "name": "ANALYSIS" + }, + { + "value": "INCIDENT", + "name": "INCIDENT" + }, + { + "value": "METRIC", + "name": "METRIC" + }, + { + "value": "PARENT", + "name": "PARENT" + }, + { + "value": "ATTACHMENT", + "name": "ATTACHMENT" + }, + { + "value": "OTHER", + "name": "OTHER" + } + ] + } + }, + "com.amazonaws.commander#ItemValue": { + "type": "union", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the related item, if the related item is an Amazon\n resource.

" + } + }, + "url": { + "target": "com.amazonaws.commander#Url", + "traits": { + "smithy.api#documentation": "

The URL, if the related item is a non-AWS resource.

" + } + }, + "metricDefinition": { + "target": "com.amazonaws.commander#MetricDefinition", + "traits": { + "smithy.api#documentation": "

The metric definition, if the related item is a metric in CloudWatch.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a related item.

" + } + }, + "com.amazonaws.commander#ListIncidentRecords": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#ListIncidentRecordsInput" + }, + "output": { + "target": "com.amazonaws.commander#ListIncidentRecordsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all incident records in your account. Use this command to retrieve the Amazon\n Resource Name (ARN) of the incident record you want to update.

", + "smithy.api#http": { + "method": "POST", + "uri": "/listIncidentRecords", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "incidentRecordSummaries", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.commander#ListIncidentRecordsInput": { + "type": "structure", + "members": { + "filters": { + "target": "com.amazonaws.commander#FilterList", + "traits": { + "smithy.api#documentation": "

Filter the list of incident records you are searching through. You can filter on the\n following keys:

\n " + } + }, + "maxResults": { + "target": "com.amazonaws.commander#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results per page.

" + } + }, + "nextToken": { + "target": "com.amazonaws.commander#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + } + } + }, + "com.amazonaws.commander#ListIncidentRecordsOutput": { + "type": "structure", + "members": { + "incidentRecordSummaries": { + "target": "com.amazonaws.commander#IncidentRecordSummaryList", + "traits": { + "smithy.api#documentation": "

The details of each listed incident record.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.commander#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + } + } + }, + "com.amazonaws.commander#ListRelatedItems": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#ListRelatedItemsInput" + }, + "output": { + "target": "com.amazonaws.commander#ListRelatedItemsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

List all related items for an incident record.

", + "smithy.api#http": { + "method": "POST", + "uri": "/listRelatedItems", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "relatedItems", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.commander#ListRelatedItemsInput": { + "type": "structure", + "members": { + "incidentRecordArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident record that you are listing related items for.

", + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.commander#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of related items per page.

" + } + }, + "nextToken": { + "target": "com.amazonaws.commander#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + } + } + }, + "com.amazonaws.commander#ListRelatedItemsOutput": { + "type": "structure", + "members": { + "relatedItems": { + "target": "com.amazonaws.commander#RelatedItemList", + "traits": { + "smithy.api#documentation": "

Details about each related item.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.commander#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + } + } + }, + "com.amazonaws.commander#ListReplicationSets": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#ListReplicationSetsInput" + }, + "output": { + "target": "com.amazonaws.commander#ListReplicationSetsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists details about the replication set configured in your account.

", + "smithy.api#http": { + "method": "POST", + "uri": "/listReplicationSets", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "replicationSetArns", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.commander#ListReplicationSetsInput": { + "type": "structure", + "members": { + "maxResults": { + "target": "com.amazonaws.commander#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results per page.

" + } + }, + "nextToken": { + "target": "com.amazonaws.commander#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + } + } + }, + "com.amazonaws.commander#ListReplicationSetsOutput": { + "type": "structure", + "members": { + "replicationSetArns": { + "target": "com.amazonaws.commander#ReplicationSetArnList", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the list replication set.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.commander#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + } + } + }, + "com.amazonaws.commander#ListResponsePlans": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#ListResponsePlansInput" + }, + "output": { + "target": "com.amazonaws.commander#ListResponsePlansOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all response plans in your account.

", + "smithy.api#http": { + "method": "POST", + "uri": "/listResponsePlans", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "responsePlanSummaries", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.commander#ListResponsePlansInput": { + "type": "structure", + "members": { + "maxResults": { + "target": "com.amazonaws.commander#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of response plans per page.

" + } + }, + "nextToken": { + "target": "com.amazonaws.commander#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + } + } + }, + "com.amazonaws.commander#ListResponsePlansOutput": { + "type": "structure", + "members": { + "responsePlanSummaries": { + "target": "com.amazonaws.commander#ResponsePlanSummaryList", + "traits": { + "smithy.api#documentation": "

Details of each response plan.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.commander#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + } + } + }, + "com.amazonaws.commander#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.commander#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the tags that are attached to the specified response plan.

", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.commander#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the response plan.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.commander#TagMap", + "traits": { + "smithy.api#documentation": "

A list of tags for the response plan.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#ListTimelineEvents": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#ListTimelineEventsInput" + }, + "output": { + "target": "com.amazonaws.commander#ListTimelineEventsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists timeline events of the specified incident record.

", + "smithy.api#http": { + "method": "POST", + "uri": "/listTimelineEvents", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "eventSummaries", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.commander#ListTimelineEventsInput": { + "type": "structure", + "members": { + "incidentRecordArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident that the event is part of.

", + "smithy.api#required": {} + } + }, + "filters": { + "target": "com.amazonaws.commander#FilterList", + "traits": { + "smithy.api#documentation": "

Filters the timeline events based on the provided conditional values. You can filter\n timeline events using the following keys:

\n " + } + }, + "sortBy": { + "target": "com.amazonaws.commander#TimelineEventSort", + "traits": { + "smithy.api#documentation": "

Sort by the specified key value pair.

" + } + }, + "sortOrder": { + "target": "com.amazonaws.commander#SortOrder", + "traits": { + "smithy.api#documentation": "

Sorts the order of timeline events by the value specified in the sortBy\n field.

" + } + }, + "maxResults": { + "target": "com.amazonaws.commander#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results per page.

" + } + }, + "nextToken": { + "target": "com.amazonaws.commander#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + } + } + }, + "com.amazonaws.commander#ListTimelineEventsOutput": { + "type": "structure", + "members": { + "eventSummaries": { + "target": "com.amazonaws.commander#EventSummaryList", + "traits": { + "smithy.api#documentation": "

Details about each event that occurred during the incident.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.commander#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + } + } + }, + "com.amazonaws.commander#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.commander#MetricDefinition": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 4000 + } + } + }, + "com.amazonaws.commander#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1000 + } + } + }, + "com.amazonaws.commander#NotificationTargetItem": { + "type": "union", + "members": { + "snsTopicArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the SNS topic.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The SNS topic that's used by\n AWS\n Chatbot to notify the incidents chat channel.

" + } + }, + "com.amazonaws.commander#NotificationTargetSet": { + "type": "set", + "member": { + "target": "com.amazonaws.commander#NotificationTargetItem" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10 + } + } + }, + "com.amazonaws.commander#Policy": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 4000 + } + } + }, + "com.amazonaws.commander#PolicyId": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 256 + } + } + }, + "com.amazonaws.commander#PutResourcePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#PutResourcePolicyInput" + }, + "output": { + "target": "com.amazonaws.commander#PutResourcePolicyOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Adds a resource policy to the specified response plan.

", + "smithy.api#http": { + "method": "POST", + "uri": "/putResourcePolicy", + "code": 200 + } + } + }, + "com.amazonaws.commander#PutResourcePolicyInput": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the response plan you're adding the resource policy\n to.

", + "smithy.api#required": {} + } + }, + "policy": { + "target": "com.amazonaws.commander#Policy", + "traits": { + "smithy.api#documentation": "

Details of the resource policy.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#PutResourcePolicyOutput": { + "type": "structure", + "members": { + "policyId": { + "target": "com.amazonaws.commander#PolicyId", + "traits": { + "smithy.api#documentation": "

The ID of the resource policy.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#RawData": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 4000 + } + } + }, + "com.amazonaws.commander#RegionInfo": { + "type": "structure", + "members": { + "sseKmsKeyId": { + "target": "com.amazonaws.commander#SseKmsKey", + "traits": { + "smithy.api#documentation": "

The ID of the KMS key used to encrypt the data in this Region.

" + } + }, + "status": { + "target": "com.amazonaws.commander#RegionStatus", + "traits": { + "smithy.api#documentation": "

The status of the Region in the replication set.

", + "smithy.api#required": {} + } + }, + "statusMessage": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

Information displayed about the status of the Region.

" + } + }, + "statusUpdateDateTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The most recent date and time that the Region's status was updated.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about a Region in your replication set.

" + } + }, + "com.amazonaws.commander#RegionInfoMap": { + "type": "map", + "key": { + "target": "com.amazonaws.commander#RegionName" + }, + "value": { + "target": "com.amazonaws.commander#RegionInfo" + } + }, + "com.amazonaws.commander#RegionMapInput": { + "type": "map", + "key": { + "target": "com.amazonaws.commander#RegionName" + }, + "value": { + "target": "com.amazonaws.commander#RegionMapInputValue" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 3 + } + } + }, + "com.amazonaws.commander#RegionMapInputValue": { + "type": "structure", + "members": { + "sseKmsKeyId": { + "target": "com.amazonaws.commander#SseKmsKey", + "traits": { + "smithy.api#documentation": "

The KMS key used to encrypt the data in your replication set.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The mapping between a Region and the key that's used to encrypt the data.

" + } + }, + "com.amazonaws.commander#RegionName": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 20 + } + } + }, + "com.amazonaws.commander#RegionStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVE", + "name": "ACTIVE", + "documentation": "All operations have completed successfully and the region is ready to use" + }, + { + "value": "CREATING", + "name": "CREATING", + "documentation": "The region is in the process of being created." + }, + { + "value": "DELETING", + "name": "DELETING", + "documentation": "The region is in the process of being deleted." + }, + { + "value": "FAILED", + "name": "FAILED", + "documentation": "The region is not healthy and we cannot automatically fix it." + } + ] + } + }, + "com.amazonaws.commander#RelatedItem": { + "type": "structure", + "members": { + "identifier": { + "target": "com.amazonaws.commander#ItemIdentifier", + "traits": { + "smithy.api#documentation": "

Details about the related item.

", + "smithy.api#required": {} + } + }, + "title": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The title of the related item.

", + "smithy.api#length": { + "max": 200 + } + } + } + }, + "traits": { + "smithy.api#documentation": "

Resources that responders use to triage and mitigate the incident.

" + } + }, + "com.amazonaws.commander#RelatedItemList": { + "type": "list", + "member": { + "target": "com.amazonaws.commander#RelatedItem" + }, + "traits": { + "smithy.api#length": { + "max": 100 + } + } + }, + "com.amazonaws.commander#RelatedItemsUpdate": { + "type": "union", + "members": { + "itemToAdd": { + "target": "com.amazonaws.commander#RelatedItem", + "traits": { + "smithy.api#documentation": "

Details about the related item you're adding.

" + } + }, + "itemToRemove": { + "target": "com.amazonaws.commander#ItemIdentifier", + "traits": { + "smithy.api#documentation": "

Details about the related item you're deleting.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about the related item you're adding.

" + } + }, + "com.amazonaws.commander#ReplicationSet": { + "type": "structure", + "members": { + "regionMap": { + "target": "com.amazonaws.commander#RegionInfoMap", + "traits": { + "smithy.api#documentation": "

The map between each Region in your replication set and the KMS key that is used to\n encrypt the data in that Region.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.commander#ReplicationSetStatus", + "traits": { + "smithy.api#documentation": "

The status of the replication set. If the replication set is still pending, you can't\n use Incident Manager functionality.

", + "smithy.api#required": {} + } + }, + "deletionProtected": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Determines if the replication set deletion protection is enabled or not. If deletion\n protection is enabled, you can't delete the last Region in the replication set.

", + "smithy.api#required": {} + } + }, + "createdTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

When the replication set was created.

", + "smithy.api#required": {} + } + }, + "createdBy": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

Details about who created the replication set.

", + "smithy.api#required": {} + } + }, + "lastModifiedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

When the replication set was last updated.

", + "smithy.api#required": {} + } + }, + "lastModifiedBy": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

Who last modified the replication set.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The set of Regions that your Incident Manager data will be replicated to and the KMS key used\n to encrypt the data.

" + } + }, + "com.amazonaws.commander#ReplicationSetArnList": { + "type": "list", + "member": { + "target": "com.amazonaws.commander#Arn" + } + }, + "com.amazonaws.commander#ReplicationSetStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVE", + "name": "ACTIVE", + "documentation": "All operations have completed successfully and the replication set is ready to use" + }, + { + "value": "CREATING", + "name": "CREATING", + "documentation": "Replication set is in the process of being created." + }, + { + "value": "UPDATING", + "name": "UPDATING", + "documentation": "Replication set is in the process of being updated." + }, + { + "value": "DELETING", + "name": "DELETING", + "documentation": "Replication set is in the process of being deleted." + }, + { + "value": "FAILED", + "name": "FAILED", + "documentation": "Replication set is not healthy and we cannot fix it." + } + ] + } + }, + "com.amazonaws.commander#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.commander#ExceptionMessage", + "traits": { + "smithy.api#required": {} + } + }, + "resourceIdentifier": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier for the requested resource" + } + }, + "resourceType": { + "target": "com.amazonaws.commander#ResourceType", + "traits": { + "smithy.api#documentation": "The resource type" + } + } + }, + "traits": { + "smithy.api#documentation": "

Request references a resource which does not exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.commander#ResourcePolicy": { + "type": "structure", + "members": { + "policyDocument": { + "target": "com.amazonaws.commander#Policy", + "traits": { + "smithy.api#documentation": "

The JSON blob that describes the policy.

", + "smithy.api#required": {} + } + }, + "policyId": { + "target": "com.amazonaws.commander#PolicyId", + "traits": { + "smithy.api#documentation": "

The ID of the resource policy.

", + "smithy.api#required": {} + } + }, + "ramResourceShareRegion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Region that policy allows resources to be used in.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The resource policy that allows Incident Manager to perform actions on resources on your behalf.

" + } + }, + "com.amazonaws.commander#ResourcePolicyList": { + "type": "list", + "member": { + "target": "com.amazonaws.commander#ResourcePolicy" + }, + "traits": { + "smithy.api#length": { + "max": 100 + } + } + }, + "com.amazonaws.commander#ResourceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "RESPONSE_PLAN", + "name": "RESPONSE_PLAN" + }, + { + "value": "INCIDENT_RECORD", + "name": "INCIDENT_RECORD" + }, + { + "value": "TIMELINE_EVENT", + "name": "TIMELINE_EVENT" + }, + { + "value": "REPLICATION_SET", + "name": "REPLICATION_SET" + }, + { + "value": "RESOURCE_POLICY", + "name": "RESOURCE_POLICY" + } + ] + } + }, + "com.amazonaws.commander#ResponsePlanDisplayName": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 200 + } + } + }, + "com.amazonaws.commander#ResponsePlanName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#pattern": "^[a-zA-Z0-9-_]*$" + } + }, + "com.amazonaws.commander#ResponsePlanSummary": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the response plan.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.commander#ResponsePlanName", + "traits": { + "smithy.api#documentation": "

The name of the response plan. This can't include spaces.

", + "smithy.api#required": {} + } + }, + "displayName": { + "target": "com.amazonaws.commander#ResponsePlanDisplayName", + "traits": { + "smithy.api#documentation": "

The human readable name of the response plan. This can include spaces.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details of the response plan that are used when creating an incident.

" + } + }, + "com.amazonaws.commander#ResponsePlanSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.commander#ResponsePlanSummary" + }, + "traits": { + "smithy.api#length": { + "max": 100 + } + } + }, + "com.amazonaws.commander#RoleArn": { + "type": "string", + "traits": { + "aws.api#arnReference": { + "type": "AWS::IAM::Role" + }, + "smithy.api#length": { + "max": 1000 + }, + "smithy.api#pattern": "^arn:aws(-cn|-us-gov)?:iam::([0-9]{12})?:role/.+$" + } + }, + "com.amazonaws.commander#ServiceCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ssm-incidents", + "name": "SSM_INCIDENTS" + } + ] + } + }, + "com.amazonaws.commander#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.commander#ExceptionMessage", + "traits": { + "smithy.api#required": {} + } + }, + "resourceIdentifier": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The identifier for the requested resource" + } + }, + "resourceType": { + "target": "com.amazonaws.commander#ResourceType", + "traits": { + "smithy.api#documentation": "The resource type" + } + }, + "serviceCode": { + "target": "com.amazonaws.commander#ServiceCode", + "traits": { + "smithy.api#documentation": "Originating service code", + "smithy.api#required": {} + } + }, + "quotaCode": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Originating quota code", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Request would cause a service quota to be exceeded.

", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.commander#SnsArn": { + "type": "string", + "traits": { + "aws.api#arnReference": { + "type": "AWS::SNS::Topic" + }, + "smithy.api#length": { + "max": 1000 + } + } + }, + "com.amazonaws.commander#SortOrder": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ASCENDING", + "name": "ASCENDING" + }, + { + "value": "DESCENDING", + "name": "DESCENDING" + } + ] + } + }, + "com.amazonaws.commander#SseKmsKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 2048 + } + } + }, + "com.amazonaws.commander#SsmAutomation": { + "type": "structure", + "members": { + "roleArn": { + "target": "com.amazonaws.commander#RoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role that the automation document will assume when running commands.

", + "smithy.api#required": {} + } + }, + "documentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The automation document's name.

", + "smithy.api#pattern": "^[a-zA-Z0-9_\\-.:/]{3,128}$", + "smithy.api#required": {} + } + }, + "documentVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The automation document's version to use when running.

", + "smithy.api#length": { + "max": 128 + } + } + }, + "targetAccount": { + "target": "com.amazonaws.commander#SsmTargetAccount", + "traits": { + "smithy.api#documentation": "

The account that the automation document will be run in. This can be in either the management account or an application account.

" + } + }, + "parameters": { + "target": "com.amazonaws.commander#SsmParameters", + "traits": { + "smithy.api#documentation": "

The key-value pair parameters to use when running the automation document.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about the Systems Manager automation document that will be used as a runbook during an incident.

" + } + }, + "com.amazonaws.commander#SsmContactsArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 2048 + }, + "smithy.api#pattern": "^arn:[-\\w+=/,.@]+:ssm-contacts:[-\\w+=/,.@]*:[0-9]+:([\\w+=/,.@:-]+)*$" + } + }, + "com.amazonaws.commander#SsmParameterValues": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 512 + } + } + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.commander#SsmParameters": { + "type": "map", + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "value": { + "target": "com.amazonaws.commander#SsmParameterValues" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.commander#SsmTargetAccount": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "RESPONSE_PLAN_OWNER_ACCOUNT", + "name": "RESPONSE_PLAN_OWNER_ACCOUNT" + }, + { + "value": "IMPACTED_ACCOUNT", + "name": "IMPACTED_ACCOUNT" + } + ] + } + }, + "com.amazonaws.commander#StartIncident": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#StartIncidentInput" + }, + "output": { + "target": "com.amazonaws.commander#StartIncidentOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#ConflictException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Used to start an incident from CloudWatch alarms, EventBridge events, or manually.

", + "smithy.api#http": { + "method": "POST", + "uri": "/startIncident", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.commander#StartIncidentInput": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.commander#ClientToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {} + } + }, + "responsePlanArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the response plan that pre-defines summary, chat\n channels, SNS topics, runbooks, title, and impact of the incident.

", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.commander#IncidentTitle", + "traits": { + "smithy.api#documentation": "

Provide a title for the incident. Providing a title overwrites the title provided by\n the response plan.

" + } + }, + "impact": { + "target": "com.amazonaws.commander#Impact", + "traits": { + "smithy.api#documentation": "

Defines the impact to the customers. Providing an impact overwrites the impact\n provided by a response plan.

\n

\n Possible impacts:\n

\n " + } + }, + "triggerDetails": { + "target": "com.amazonaws.commander#TriggerDetails", + "traits": { + "smithy.api#documentation": "

Details of what created the incident record in Incident Manager.

" + } + }, + "relatedItems": { + "target": "com.amazonaws.commander#RelatedItemList", + "traits": { + "smithy.api#documentation": "

Add related items to the incident for other responders to use. Related items are AWS\n resources, external links, or files uploaded to an S3 bucket.

" + } + } + } + }, + "com.amazonaws.commander#StartIncidentOutput": { + "type": "structure", + "members": { + "incidentRecordArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The ARN of the newly created incident record.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String", + "traits": { + "smithy.api#length": { + "max": 1000 + } + } + }, + "traits": { + "smithy.api#length": { + "max": 100 + } + } + }, + "com.amazonaws.commander#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^(?!aws:)[A-Za-z0-9 _=@:.+-/]+$" + } + }, + "com.amazonaws.commander#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.commander#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.commander#TagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.commander#TagKey" + }, + "value": { + "target": "com.amazonaws.commander#TagValue" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.commander#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.commander#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#ConflictException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Adds a tag to a response plan.

", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{resourceArn}", + "code": 204 + } + } + }, + "com.amazonaws.commander#TagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the response plan you're adding the tags to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.commander#TagMap", + "traits": { + "smithy.api#documentation": "

A list of tags that you are adding to the response plan.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.commander#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 256 + }, + "smithy.api#pattern": "^[A-Za-z0-9 _=@:.+-/]*$" + } + }, + "com.amazonaws.commander#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.commander#ExceptionMessage", + "traits": { + "smithy.api#required": {} + } + }, + "serviceCode": { + "target": "com.amazonaws.commander#ServiceCode", + "traits": { + "smithy.api#documentation": "Originating service code", + "smithy.api#required": {} + } + }, + "quotaCode": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Originating quota code", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The request was denied due to request throttling.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.commander#TimelineEvent": { + "type": "structure", + "members": { + "incidentRecordArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident that the event occurred during.

", + "smithy.api#required": {} + } + }, + "eventId": { + "target": "com.amazonaws.commander#UUID", + "traits": { + "smithy.api#documentation": "

The ID of the timeline event.

", + "smithy.api#required": {} + } + }, + "eventTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the event occurred.

", + "smithy.api#required": {} + } + }, + "eventUpdatedTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the timeline event was last updated.

", + "smithy.api#required": {} + } + }, + "eventType": { + "target": "com.amazonaws.commander#TimelineEventType", + "traits": { + "smithy.api#documentation": "

The type of event that occurred. Currently Incident Manager supports only the Custom\n Event type.

", + "smithy.api#required": {} + } + }, + "eventData": { + "target": "com.amazonaws.commander#EventData", + "traits": { + "smithy.api#documentation": "

A short description of the event.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A significant event that happened during the incident.

" + } + }, + "com.amazonaws.commander#TimelineEventSort": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EVENT_TIME", + "name": "EVENT_TIME" + } + ] + } + }, + "com.amazonaws.commander#TimelineEventType": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 100 + } + } + }, + "com.amazonaws.commander#TriggerDetails": { + "type": "structure", + "members": { + "source": { + "target": "com.amazonaws.commander#IncidentSource", + "traits": { + "smithy.api#documentation": "

Identifies the service that sourced the event. All events sourced from within AWS begin\n with \"aws.\" Customer-generated events can have any value here, as long as it doesn't begin\n with \"aws.\" We recommend the use of Java package-name style reverse domain-name strings.

", + "smithy.api#required": {} + } + }, + "triggerArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The ARN of the source that detected the incident.

" + } + }, + "timestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the incident was detected.

", + "smithy.api#required": {} + } + }, + "rawData": { + "target": "com.amazonaws.commander#RawData", + "traits": { + "smithy.api#documentation": "

Raw data passed from either EventBridge, CloudWatch, or Incident Manager when an\n incident is created.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about what caused the incident to be created in Incident Manager.

" + } + }, + "com.amazonaws.commander#UUID": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 50 + } + } + }, + "com.amazonaws.commander#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.commander#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#ConflictException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes a tag from a resource.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{resourceArn}", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.commander#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the response plan you're removing a tag from.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.commander#TagKeyList", + "traits": { + "smithy.api#documentation": "

The name of the tag you're removing from the response plan.

", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#UntagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.commander#UpdateActionList": { + "type": "list", + "member": { + "target": "com.amazonaws.commander#UpdateReplicationSetAction" + } + }, + "com.amazonaws.commander#UpdateDeletionProtection": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#UpdateDeletionProtectionInput" + }, + "output": { + "target": "com.amazonaws.commander#UpdateDeletionProtectionOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Update deletion protection to either allow or deny deletion of the final Region in a\n replication set.

", + "smithy.api#http": { + "method": "POST", + "uri": "/updateDeletionProtection", + "code": 204 + } + } + }, + "com.amazonaws.commander#UpdateDeletionProtectionInput": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the replication set you're updating.

", + "smithy.api#required": {} + } + }, + "deletionProtected": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Details if deletion protection is enabled or disabled in your account.

", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.commander#ClientToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.commander#UpdateDeletionProtectionOutput": { + "type": "structure", + "members": {} + }, + "com.amazonaws.commander#UpdateIncidentRecord": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#UpdateIncidentRecordInput" + }, + "output": { + "target": "com.amazonaws.commander#UpdateIncidentRecordOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#ConflictException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Update the details of an incident record. You can use this action to update an\n incident record from the defined chat channel. For more information about using actions\n in chat channels, see Interacting through chat.

", + "smithy.api#http": { + "method": "POST", + "uri": "/updateIncidentRecord", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.commander#UpdateIncidentRecordInput": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.commander#ClientToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {} + } + }, + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident record you are updating.

", + "smithy.api#required": {} + } + }, + "title": { + "target": "com.amazonaws.commander#IncidentTitle", + "traits": { + "smithy.api#documentation": "

The title of the incident is a brief and easily recognizable.

" + } + }, + "summary": { + "target": "com.amazonaws.commander#IncidentSummary", + "traits": { + "smithy.api#documentation": "

The summary describes what has happened during the incident.

" + } + }, + "impact": { + "target": "com.amazonaws.commander#Impact", + "traits": { + "smithy.api#documentation": "

Defines the impact to customers and applications. Providing an impact overwrites the\n impact provided by the response plan.

\n

\n Possible impacts:\n

\n " + } + }, + "status": { + "target": "com.amazonaws.commander#IncidentRecordStatus", + "traits": { + "smithy.api#documentation": "

The status of the incident. An incident can be Open or Resolved.

" + } + }, + "chatChannel": { + "target": "com.amazonaws.commander#ChatChannel", + "traits": { + "smithy.api#documentation": "

The AWS Chatbot chat channel for responders to collaborate in.

" + } + }, + "notificationTargets": { + "target": "com.amazonaws.commander#NotificationTargetSet", + "traits": { + "smithy.api#documentation": "

The SNS targets that AWS Chatbot uses to notify the chat channel of updates to an\n incident. You can also make updates to the incident through the chat channel using the\n SNS topics.

\n

Using multiple SNS topics creates redundancy in the case that a Region is down during\n the incident.

" + } + } + } + }, + "com.amazonaws.commander#UpdateIncidentRecordOutput": { + "type": "structure", + "members": {} + }, + "com.amazonaws.commander#UpdateRelatedItems": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#UpdateRelatedItemsInput" + }, + "output": { + "target": "com.amazonaws.commander#UpdateRelatedItemsOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#ConflictException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Add or remove related items from the related items tab of an incident record.

", + "smithy.api#http": { + "method": "POST", + "uri": "/updateRelatedItems", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.commander#UpdateRelatedItemsInput": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.commander#ClientToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {} + } + }, + "incidentRecordArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident record you are updating related items\n in.

", + "smithy.api#required": {} + } + }, + "relatedItemsUpdate": { + "target": "com.amazonaws.commander#RelatedItemsUpdate", + "traits": { + "smithy.api#documentation": "

Details about the item you are adding or deleting.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.commander#UpdateRelatedItemsOutput": { + "type": "structure", + "members": {} + }, + "com.amazonaws.commander#UpdateReplicationSet": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#UpdateReplicationSetInput" + }, + "output": { + "target": "com.amazonaws.commander#UpdateReplicationSetOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Add or delete Regions from your replication set.

", + "smithy.api#http": { + "method": "POST", + "uri": "/updateReplicationSet", + "code": 204 + } + } + }, + "com.amazonaws.commander#UpdateReplicationSetAction": { + "type": "union", + "members": { + "addRegionAction": { + "target": "com.amazonaws.commander#AddRegionAction", + "traits": { + "smithy.api#documentation": "

Details about the Region that you're adding to the replication set.

" + } + }, + "deleteRegionAction": { + "target": "com.amazonaws.commander#DeleteRegionAction", + "traits": { + "smithy.api#documentation": "

Details about the Region that you're deleting to the replication set.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details used when updating the replication set.

" + } + }, + "com.amazonaws.commander#UpdateReplicationSetInput": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the replication set you're updating.

", + "smithy.api#required": {} + } + }, + "actions": { + "target": "com.amazonaws.commander#UpdateActionList", + "traits": { + "smithy.api#documentation": "

An action to add or delete a Region.

", + "smithy.api#length": { + "min": 1, + "max": 1 + }, + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.commander#ClientToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.commander#UpdateReplicationSetOutput": { + "type": "structure", + "members": {} + }, + "com.amazonaws.commander#UpdateResponsePlan": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#UpdateResponsePlanInput" + }, + "output": { + "target": "com.amazonaws.commander#UpdateResponsePlanOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#ConflictException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates the specified response plan.

", + "smithy.api#http": { + "method": "POST", + "uri": "/updateResponsePlan", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.commander#UpdateResponsePlanInput": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.commander#ClientToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {} + } + }, + "arn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the response plan.

", + "smithy.api#required": {} + } + }, + "displayName": { + "target": "com.amazonaws.commander#ResponsePlanDisplayName", + "traits": { + "smithy.api#documentation": "

The long format name of the response plan. Can't contain spaces.

" + } + }, + "incidentTemplateTitle": { + "target": "com.amazonaws.commander#IncidentTitle", + "traits": { + "smithy.api#documentation": "

The short format name of the incident. Can't contain spaces.

" + } + }, + "incidentTemplateImpact": { + "target": "com.amazonaws.commander#Impact", + "traits": { + "smithy.api#documentation": "

Defines the impact to the customers. Providing an impact overwrites the impact\n provided by a response plan.

\n

\n Possible impacts:\n

\n " + } + }, + "incidentTemplateSummary": { + "target": "com.amazonaws.commander#IncidentSummary", + "traits": { + "smithy.api#documentation": "

A brief summary of the incident. This typically contains what has happened, what's\n currently happening, and next steps.

" + } + }, + "incidentTemplateDedupeString": { + "target": "com.amazonaws.commander#DedupeString", + "traits": { + "smithy.api#documentation": "

Used to create only one incident record for an incident.

" + } + }, + "incidentTemplateNotificationTargets": { + "target": "com.amazonaws.commander#NotificationTargetSet", + "traits": { + "smithy.api#documentation": "

The SNS targets that\n AWS\n Chatbot uses to notify the chat channels and perform actions on the\n incident record.

" + } + }, + "chatChannel": { + "target": "com.amazonaws.commander#ChatChannel", + "traits": { + "smithy.api#documentation": "

The\n AWS\n Chatbot chat channel used for collaboration during an\n incident.

" + } + }, + "engagements": { + "target": "com.amazonaws.commander#EngagementSet", + "traits": { + "smithy.api#documentation": "

The contacts and escalation plans that Incident Manager engages at the start of the incident.

" + } + }, + "actions": { + "target": "com.amazonaws.commander#ActionsList", + "traits": { + "smithy.api#documentation": "

The actions that this response plan takes at the beginning of an incident.

" + } + } + } + }, + "com.amazonaws.commander#UpdateResponsePlanOutput": { + "type": "structure", + "members": {} + }, + "com.amazonaws.commander#UpdateTimelineEvent": { + "type": "operation", + "input": { + "target": "com.amazonaws.commander#UpdateTimelineEventInput" + }, + "output": { + "target": "com.amazonaws.commander#UpdateTimelineEventOutput" + }, + "errors": [ + { + "target": "com.amazonaws.commander#AccessDeniedException" + }, + { + "target": "com.amazonaws.commander#ConflictException" + }, + { + "target": "com.amazonaws.commander#InternalServerException" + }, + { + "target": "com.amazonaws.commander#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.commander#ThrottlingException" + }, + { + "target": "com.amazonaws.commander#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates a timeline event. You can update events of type Custom\n Event.

", + "smithy.api#http": { + "method": "POST", + "uri": "/updateTimelineEvent", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.commander#UpdateTimelineEventInput": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.commander#ClientToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "incidentRecordArn": { + "target": "com.amazonaws.commander#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident that the timeline event is part\n of.

", + "smithy.api#required": {} + } + }, + "eventId": { + "target": "com.amazonaws.commander#UUID", + "traits": { + "smithy.api#documentation": "

The ID of the event you are updating. You can find this by using ListTimelineEvents.

", + "smithy.api#required": {} + } + }, + "eventTime": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time that the event occurred.

" + } + }, + "eventType": { + "target": "com.amazonaws.commander#TimelineEventType", + "traits": { + "smithy.api#documentation": "

The type of the event. You can update events of type Custom Event.

" + } + }, + "eventData": { + "target": "com.amazonaws.commander#EventData", + "traits": { + "smithy.api#documentation": "

A short description of the event.

" + } + } + } + }, + "com.amazonaws.commander#UpdateTimelineEventOutput": { + "type": "structure", + "members": {} + }, + "com.amazonaws.commander#Url": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1000 + } + } + }, + "com.amazonaws.commander#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.commander#ExceptionMessage", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by an AWS service.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + } + } +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/configservice.2014-11-12.json b/codegen/sdk-codegen/aws-models/configservice.2014-11-12.json index 3827b4a04bd..e614d20ebb3 100644 --- a/codegen/sdk-codegen/aws-models/configservice.2014-11-12.json +++ b/codegen/sdk-codegen/aws-models/configservice.2014-11-12.json @@ -3028,7 +3028,12 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of compliant and noncompliant rules with the\n\t\t\tnumber of resources for compliant and noncompliant rules.\n\t\t\t

\n\t\t \n\t\t\t

The results can return an empty result page, but if you\n\t\t\t\thave a nextToken, the results are displayed on the next\n\t\t\t\tpage.

\n\t\t
" + "smithy.api#documentation": "

Returns a list of compliant and noncompliant rules with the\n\t\t\tnumber of resources for compliant and noncompliant rules.\n\t\t\t

\n\t\t \n\t\t\t

The results can return an empty result page, but if you\n\t\t\t\thave a nextToken, the results are displayed on the next\n\t\t\t\tpage.

\n\t\t
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeAggregateComplianceByConfigRulesRequest": { @@ -3101,7 +3106,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of the conformance packs and their associated compliance status with the count of compliant and noncompliant AWS Config rules within each conformance pack.\n\t\t\tAlso returns the total rule count which includes compliant rules, noncompliant rules, and rules that cannot be evaluated due to insufficient data.

\n\t\t \n

The results can return an empty result page, but if you have a nextToken, the results are displayed on the next page.

\n
" + "smithy.api#documentation": "

Returns a list of the conformance packs and their associated compliance status with the count of compliant and noncompliant AWS Config rules within each conformance pack.\n\t\t\tAlso returns the total rule count which includes compliant rules, noncompliant rules, and rules that cannot be evaluated due to insufficient data.

\n\t\t \n

The results can return an empty result page, but if you have a nextToken, the results are displayed on the next page.

\n
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "AggregateComplianceByConformancePacks", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeAggregateComplianceByConformancePacksRequest": { @@ -3171,7 +3182,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of authorizations granted to various aggregator\n\t\t\taccounts and regions.

" + "smithy.api#documentation": "

Returns a list of authorizations granted to various aggregator\n\t\t\taccounts and regions.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "AggregationAuthorizations", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeAggregationAuthorizationsRequest": { @@ -3228,7 +3245,12 @@ } ], "traits": { - "smithy.api#documentation": "

Indicates whether the specified AWS Config rules are compliant.\n\t\t\tIf a rule is noncompliant, this action returns the number of AWS\n\t\t\tresources that do not comply with the rule.

\n\t\t

A rule is compliant if all of the evaluated resources comply\n\t\t\twith it. It is noncompliant if any of these resources do not\n\t\t\tcomply.

\n\t\t

If AWS Config has no current evaluation results for the rule,\n\t\t\tit returns INSUFFICIENT_DATA. This result might\n\t\t\tindicate one of the following conditions:

\n\t\t " + "smithy.api#documentation": "

Indicates whether the specified AWS Config rules are compliant.\n\t\t\tIf a rule is noncompliant, this action returns the number of AWS\n\t\t\tresources that do not comply with the rule.

\n\t\t

A rule is compliant if all of the evaluated resources comply\n\t\t\twith it. It is noncompliant if any of these resources do not\n\t\t\tcomply.

\n\t\t

If AWS Config has no current evaluation results for the rule,\n\t\t\tit returns INSUFFICIENT_DATA. This result might\n\t\t\tindicate one of the following conditions:

\n\t\t ", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ComplianceByConfigRules" + } } }, "com.amazonaws.configservice#DescribeComplianceByConfigRuleRequest": { @@ -3294,7 +3316,13 @@ } ], "traits": { - "smithy.api#documentation": "

Indicates whether the specified AWS resources are compliant. If\n\t\t\ta resource is noncompliant, this action returns the number of AWS\n\t\t\tConfig rules that the resource does not comply with.

\n\t\t

A resource is compliant if it complies with all the AWS Config\n\t\t\trules that evaluate it. It is noncompliant if it does not comply\n\t\t\twith one or more of these rules.

\n\t\t

If AWS Config has no current evaluation results for the\n\t\t\tresource, it returns INSUFFICIENT_DATA. This result\n\t\t\tmight indicate one of the following conditions about the rules that\n\t\t\tevaluate the resource:

\n\t\t " + "smithy.api#documentation": "

Indicates whether the specified AWS resources are compliant. If\n\t\t\ta resource is noncompliant, this action returns the number of AWS\n\t\t\tConfig rules that the resource does not comply with.

\n\t\t

A resource is compliant if it complies with all the AWS Config\n\t\t\trules that evaluate it. It is noncompliant if it does not comply\n\t\t\twith one or more of these rules.

\n\t\t

If AWS Config has no current evaluation results for the\n\t\t\tresource, it returns INSUFFICIENT_DATA. This result\n\t\t\tmight indicate one of the following conditions about the rules that\n\t\t\tevaluate the resource:

\n\t\t ", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ComplianceByResources", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeComplianceByResourceRequest": { @@ -3375,7 +3403,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns status information for each of your AWS managed Config\n\t\t\trules. The status includes information such as the last time AWS\n\t\t\tConfig invoked the rule, the last time AWS Config failed to invoke\n\t\t\tthe rule, and the related error for the last failure.

" + "smithy.api#documentation": "

Returns status information for each of your AWS managed Config\n\t\t\trules. The status includes information such as the last time AWS\n\t\t\tConfig invoked the rule, the last time AWS Config failed to invoke\n\t\t\tthe rule, and the related error for the last failure.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ConfigRulesEvaluationStatus", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeConfigRuleEvaluationStatusRequest": { @@ -3441,7 +3475,12 @@ } ], "traits": { - "smithy.api#documentation": "

Returns details about your AWS Config rules.

" + "smithy.api#documentation": "

Returns details about your AWS Config rules.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ConfigRules" + } } }, "com.amazonaws.configservice#DescribeConfigRulesRequest": { @@ -3507,7 +3546,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns status information for sources within an aggregator.\n\t\t\tThe status includes information about the last time AWS Config verified authorization between the source account and an aggregator account. In case of a failure, the status contains the related error code or message.

" + "smithy.api#documentation": "

Returns status information for sources within an aggregator.\n\t\t\tThe status includes information about the last time AWS Config verified authorization between the source account and an aggregator account. In case of a failure, the status contains the related error code or message.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "AggregatedSourceStatusList", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeConfigurationAggregatorSourcesStatusRequest": { @@ -3580,7 +3625,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the details of one or more configuration aggregators.\n\t\t\tIf the configuration aggregator is not specified, this action\n\t\t\treturns the details for all the configuration aggregators associated\n\t\t\twith the account.

" + "smithy.api#documentation": "

Returns the details of one or more configuration aggregators.\n\t\t\tIf the configuration aggregator is not specified, this action\n\t\t\treturns the details for all the configuration aggregators associated\n\t\t\twith the account.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ConfigurationAggregators", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeConfigurationAggregatorsRequest": { @@ -3739,7 +3790,12 @@ } ], "traits": { - "smithy.api#documentation": "

Returns compliance details for each rule in that conformance pack.

\n\t\t \n

You must provide exact rule names.

\n
" + "smithy.api#documentation": "

Returns compliance details for each rule in that conformance pack.

\n\t\t \n

You must provide exact rule names.

\n
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeConformancePackComplianceLimit": { @@ -3826,7 +3882,13 @@ } ], "traits": { - "smithy.api#documentation": "

Provides one or more conformance packs deployment status.

\n\t\t \n

If there are no conformance packs then you will see an empty result.

\n
" + "smithy.api#documentation": "

Provides one or more conformance packs deployment status.

\n\t\t \n

If there are no conformance packs then you will see an empty result.

\n
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ConformancePackStatusDetails", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeConformancePackStatusRequest": { @@ -3892,7 +3954,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of one or more conformance packs.

" + "smithy.api#documentation": "

Returns a list of one or more conformance packs.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ConformancePackDetails", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeConformancePacksRequest": { @@ -4048,7 +4116,13 @@ } ], "traits": { - "smithy.api#documentation": "

Provides organization config rule deployment status for an organization.

\n\t\t\n\t\t \n

The status is not considered successful until organization config rule is successfully deployed in all the member \n\t\t\taccounts with an exception of excluded accounts.

\n\t\t\t

When you specify the limit and the next token, you receive a paginated response.\n\t\t\tLimit and next token are not applicable if you specify organization config rule names. \n\t\t\tIt is only applicable, when you request all the organization config rules.

\n\t\t\t
" + "smithy.api#documentation": "

Provides organization config rule deployment status for an organization.

\n\t\t\n\t\t \n

The status is not considered successful until organization config rule is successfully deployed in all the member \n\t\t\taccounts with an exception of excluded accounts.

\n\t\t\t

When you specify the limit and the next token, you receive a paginated response.\n\t\t\tLimit and next token are not applicable if you specify organization config rule names. \n\t\t\tIt is only applicable, when you request all the organization config rules.

\n\t\t\t
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "OrganizationConfigRuleStatuses", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeOrganizationConfigRuleStatusesRequest": { @@ -4114,7 +4188,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of organization config rules.

\n\t\t\t\n\t\t \n

When you specify the limit and the next token, you receive a paginated response.\n\t\t\tLimit and next token are not applicable if you specify organization config rule names. \n\t\t\tIt is only applicable, when you request all the organization config rules.

\n
" + "smithy.api#documentation": "

Returns a list of organization config rules.

\n\t\t\t\n\t\t \n

When you specify the limit and the next token, you receive a paginated response.\n\t\t\tLimit and next token are not applicable if you specify organization config rule names. \n\t\t\tIt is only applicable, when you request all the organization config rules.

\n
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "OrganizationConfigRules", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeOrganizationConfigRulesRequest": { @@ -4180,7 +4260,13 @@ } ], "traits": { - "smithy.api#documentation": "

Provides organization conformance pack deployment status for an organization.

\n\t\t \n\t\t\t

The status is not considered successful until organization conformance pack is successfully \n\t\t\t\tdeployed in all the member accounts with an exception of excluded accounts.

\n\t\t\t

When you specify the limit and the next token, you receive a paginated response. \n\t\t\t\tLimit and next token are not applicable if you specify organization conformance pack names. \n\t\t\t\tThey are only applicable, when you request all the organization conformance packs.

\n
" + "smithy.api#documentation": "

Provides organization conformance pack deployment status for an organization.

\n\t\t \n\t\t\t

The status is not considered successful until organization conformance pack is successfully \n\t\t\t\tdeployed in all the member accounts with an exception of excluded accounts.

\n\t\t\t

When you specify the limit and the next token, you receive a paginated response. \n\t\t\t\tLimit and next token are not applicable if you specify organization conformance pack names. \n\t\t\t\tThey are only applicable, when you request all the organization conformance packs.

\n
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "OrganizationConformancePackStatuses", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeOrganizationConformancePackStatusesRequest": { @@ -4246,7 +4332,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of organization conformance packs.

\n\t\t \n

When you specify the limit and the next token, you receive a paginated response.

\n\t\t\t

Limit and next token are not applicable if you specify organization conformance packs names. They are only applicable,\n\t\t\twhen you request all the organization conformance packs.

\n
" + "smithy.api#documentation": "

Returns a list of organization conformance packs.

\n\t\t \n

When you specify the limit and the next token, you receive a paginated response.

\n\t\t\t

Limit and next token are not applicable if you specify organization conformance packs names. They are only applicable,\n\t\t\twhen you request all the organization conformance packs.

\n
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "OrganizationConformancePacks", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribeOrganizationConformancePacksRequest": { @@ -4309,7 +4401,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of all pending aggregation requests.

" + "smithy.api#documentation": "

Returns a list of all pending aggregation requests.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "PendingAggregationRequests", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#DescribePendingAggregationRequestsLimit": { @@ -4558,7 +4656,12 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the details of one or more retention configurations. If\n\t\t\tthe retention configuration name is not specified, this action\n\t\t\treturns the details for all the retention configurations for that\n\t\t\taccount.

\n\t\t \n\t\t\t

Currently, AWS Config supports only one retention\n\t\t\t\tconfiguration per region in your account.

\n\t\t
" + "smithy.api#documentation": "

Returns the details of one or more retention configurations. If\n\t\t\tthe retention configuration name is not specified, this action\n\t\t\treturns the details for all the retention configurations for that\n\t\t\taccount.

\n\t\t \n\t\t\t

Currently, AWS Config supports only one retention\n\t\t\t\tconfiguration per region in your account.

\n\t\t
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "RetentionConfigurations" + } } }, "com.amazonaws.configservice#DescribeRetentionConfigurationsRequest": { @@ -4978,7 +5081,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the evaluation results for the specified AWS Config\n\t\t\trule for a specific resource in a rule. The results indicate which\n\t\t\tAWS resources were evaluated by the rule, when each resource was\n\t\t\tlast evaluated, and whether each resource complies with the rule.

\n\t\t \n\t\t\t

The results can return an empty result page. But if you\n\t\t\t\thave a nextToken, the results are displayed on the next\n\t\t\t\tpage.

\n\t\t
" + "smithy.api#documentation": "

Returns the evaluation results for the specified AWS Config\n\t\t\trule for a specific resource in a rule. The results indicate which\n\t\t\tAWS resources were evaluated by the rule, when each resource was\n\t\t\tlast evaluated, and whether each resource complies with the rule.

\n\t\t \n\t\t\t

The results can return an empty result page. But if you\n\t\t\t\thave a nextToken, the results are displayed on the next\n\t\t\t\tpage.

\n\t\t
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "AggregateEvaluationResults", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#GetAggregateComplianceDetailsByConfigRuleRequest": { @@ -5072,7 +5181,12 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the number of compliant and noncompliant rules for one\n\t\t\tor more accounts and regions in an aggregator.

\n\t\t \n\t\t\t

The results can return an empty result page, but if you\n\t\t\t\thave a nextToken, the results are displayed on the next\n\t\t\t\tpage.

\n\t\t
" + "smithy.api#documentation": "

Returns the number of compliant and noncompliant rules for one\n\t\t\tor more accounts and regions in an aggregator.

\n\t\t \n\t\t\t

The results can return an empty result page, but if you\n\t\t\t\thave a nextToken, the results are displayed on the next\n\t\t\t\tpage.

\n\t\t
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#GetAggregateConfigRuleComplianceSummaryRequest": { @@ -5157,7 +5271,12 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the count of compliant and noncompliant conformance packs across all AWS Accounts and AWS Regions in an aggregator. You can filter based on AWS Account ID or AWS Region.

\n\t\t \n

The results can return an empty result page, but if you have a nextToken, the results are displayed on the next page.

\n
" + "smithy.api#documentation": "

Returns the count of compliant and noncompliant conformance packs across all AWS Accounts and AWS Regions in an aggregator. You can filter based on AWS Account ID or AWS Region.

\n\t\t \n

The results can return an empty result page, but if you have a nextToken, the results are displayed on the next page.

\n
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#GetAggregateConformancePackComplianceSummaryRequest": { @@ -5242,7 +5361,12 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the resource counts across accounts and regions that are present in your AWS Config aggregator. You can request the resource counts by providing filters and GroupByKey.

\n\t\t

For example, if the input contains accountID 12345678910 and region us-east-1 in filters, the API returns the count of resources in account ID 12345678910 and region us-east-1.\n\t\t\tIf the input contains ACCOUNT_ID as a GroupByKey, the API returns resource counts for all source accounts that are present in your aggregator.

" + "smithy.api#documentation": "

Returns the resource counts across accounts and regions that are present in your AWS Config aggregator. You can request the resource counts by providing filters and GroupByKey.

\n\t\t

For example, if the input contains accountID 12345678910 and region us-east-1 in filters, the API returns the count of resources in account ID 12345678910 and region us-east-1.\n\t\t\tIf the input contains ACCOUNT_ID as a GroupByKey, the API returns resource counts for all source accounts that are present in your aggregator.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#GetAggregateDiscoveredResourceCountsRequest": { @@ -5387,7 +5511,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the evaluation results for the specified AWS Config\n\t\t\trule. The results indicate which AWS resources were evaluated by the\n\t\t\trule, when each resource was last evaluated, and whether each\n\t\t\tresource complies with the rule.

" + "smithy.api#documentation": "

Returns the evaluation results for the specified AWS Config\n\t\t\trule. The results indicate which AWS resources were evaluated by the\n\t\t\trule, when each resource was last evaluated, and whether each\n\t\t\tresource complies with the rule.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "EvaluationResults", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#GetComplianceDetailsByConfigRuleRequest": { @@ -5457,7 +5587,12 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the evaluation results for the specified AWS resource.\n\t\t\tThe results indicate which AWS Config rules were used to evaluate\n\t\t\tthe resource, when each rule was last used, and whether the resource\n\t\t\tcomplies with each rule.

" + "smithy.api#documentation": "

Returns the evaluation results for the specified AWS resource.\n\t\t\tThe results indicate which AWS Config rules were used to evaluate\n\t\t\tthe resource, when each rule was last used, and whether the resource\n\t\t\tcomplies with each rule.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "EvaluationResults" + } } }, "com.amazonaws.configservice#GetComplianceDetailsByResourceRequest": { @@ -5608,7 +5743,12 @@ } ], "traits": { - "smithy.api#documentation": "

Returns compliance details of a conformance pack for all AWS resources that are monitered by conformance pack.

" + "smithy.api#documentation": "

Returns compliance details of a conformance pack for all AWS resources that are monitered by conformance pack.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#GetConformancePackComplianceDetailsLimit": { @@ -5694,7 +5834,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns compliance details for the conformance pack based on the cumulative compliance results of all the rules in that conformance pack.

" + "smithy.api#documentation": "

Returns compliance details for the conformance pack based on the cumulative compliance results of all the rules in that conformance pack.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ConformancePackComplianceSummaryList", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#GetConformancePackComplianceSummaryRequest": { @@ -5758,7 +5904,12 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the resource types, the number of each resource type,\n\t\t\tand the total number of resources that AWS Config is recording in\n\t\t\tthis region for your AWS account.

\n\t\t

\n Example\n

\n
    \n
  1. \n\t\t\t\t

    AWS Config is recording three resource types in the US\n\t\t\t\t\tEast (Ohio) Region for your account: 25 EC2 instances, 20\n\t\t\t\t\tIAM users, and 15 S3 buckets.

    \n\t\t\t
  2. \n
  3. \n\t\t\t\t

    You make a call to the\n\t\t\t\t\t\tGetDiscoveredResourceCounts action and\n\t\t\t\t\tspecify that you want all resource types.

    \n\t\t\t
  4. \n
  5. \n\t\t\t\t

    AWS Config returns the following:

    \n\n\t\t\t\t
      \n
    • \n\t\t\t\t\t\t

      The resource types (EC2 instances, IAM users,\n\t\t\t\t\t\t\tand S3 buckets).

      \n\t\t\t\t\t
    • \n
    • \n\t\t\t\t\t\t

      The number of each resource type (25, 20, and\n\t\t\t\t\t\t\t15).

      \n\t\t\t\t\t
    • \n
    • \n\t\t\t\t\t\t

      The total number of all resources\n\t\t\t\t\t\t\t(60).

      \n\t\t\t\t\t
    • \n
    \n\n\t\t\t
  6. \n
\n\n\t\t

The response is paginated. By default, AWS Config lists 100\n\t\t\t\tResourceCount objects on each page. You can\n\t\t\tcustomize this number with the limit parameter. The\n\t\t\tresponse includes a nextToken string. To get the next\n\t\t\tpage of results, run the request again and specify the string for\n\t\t\tthe nextToken parameter.

\n\n\t\t \n\t\t\t

If you make a call to the GetDiscoveredResourceCounts action, you might\n\t\t\t\tnot immediately receive resource counts in the following\n\t\t\t\tsituations:

\n\n\t\t\t \n\n\t\t\t

It might take a few minutes for AWS Config to record and\n\t\t\t\tcount your resources. Wait a few minutes and then retry the\n\t\t\t\t\tGetDiscoveredResourceCounts action.\n\t\t\t

\n\t\t
" + "smithy.api#documentation": "

Returns the resource types, the number of each resource type,\n\t\t\tand the total number of resources that AWS Config is recording in\n\t\t\tthis region for your AWS account.

\n\t\t

\n Example\n

\n
    \n
  1. \n\t\t\t\t

    AWS Config is recording three resource types in the US\n\t\t\t\t\tEast (Ohio) Region for your account: 25 EC2 instances, 20\n\t\t\t\t\tIAM users, and 15 S3 buckets.

    \n\t\t\t
  2. \n
  3. \n\t\t\t\t

    You make a call to the\n\t\t\t\t\t\tGetDiscoveredResourceCounts action and\n\t\t\t\t\tspecify that you want all resource types.

    \n\t\t\t
  4. \n
  5. \n\t\t\t\t

    AWS Config returns the following:

    \n\n\t\t\t\t
      \n
    • \n\t\t\t\t\t\t

      The resource types (EC2 instances, IAM users,\n\t\t\t\t\t\t\tand S3 buckets).

      \n\t\t\t\t\t
    • \n
    • \n\t\t\t\t\t\t

      The number of each resource type (25, 20, and\n\t\t\t\t\t\t\t15).

      \n\t\t\t\t\t
    • \n
    • \n\t\t\t\t\t\t

      The total number of all resources\n\t\t\t\t\t\t\t(60).

      \n\t\t\t\t\t
    • \n
    \n\n\t\t\t
  6. \n
\n\n\t\t

The response is paginated. By default, AWS Config lists 100\n\t\t\t\tResourceCount objects on each page. You can\n\t\t\tcustomize this number with the limit parameter. The\n\t\t\tresponse includes a nextToken string. To get the next\n\t\t\tpage of results, run the request again and specify the string for\n\t\t\tthe nextToken parameter.

\n\n\t\t \n\t\t\t

If you make a call to the GetDiscoveredResourceCounts action, you might\n\t\t\t\tnot immediately receive resource counts in the following\n\t\t\t\tsituations:

\n\n\t\t\t \n\n\t\t\t

It might take a few minutes for AWS Config to record and\n\t\t\t\tcount your resources. Wait a few minutes and then retry the\n\t\t\t\t\tGetDiscoveredResourceCounts action.\n\t\t\t

\n\t\t
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "limit" + } } }, "com.amazonaws.configservice#GetDiscoveredResourceCountsRequest": { @@ -5830,7 +5981,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns detailed status for each member account within an organization for a given organization config rule.

" + "smithy.api#documentation": "

Returns detailed status for each member account within an organization for a given organization config rule.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "OrganizationConfigRuleDetailedStatus", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#GetOrganizationConfigRuleDetailedStatusRequest": { @@ -5903,7 +6060,13 @@ } ], "traits": { - "smithy.api#documentation": "

Returns detailed status for each member account within an organization for a given organization conformance pack.

" + "smithy.api#documentation": "

Returns detailed status for each member account within an organization for a given organization conformance pack.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "OrganizationConformancePackDetailedStatuses", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#GetOrganizationConformancePackDetailedStatusRequest": { @@ -6439,7 +6602,13 @@ } ], "traits": { - "smithy.api#documentation": "

Accepts a resource type and returns a list of resource identifiers that are aggregated for a specific resource type across accounts and regions. \n\t\t\tA resource identifier includes the resource type, ID, (if available) the custom resource name, source account, and source region. \n\t\t\tYou can narrow the results to include only resources that have specific resource IDs, or a resource name, or source account ID, or source region.

\n\t\t\t

For example, if the input consists of accountID 12345678910 and the region is us-east-1 for resource type AWS::EC2::Instance then the API returns all the EC2 instance identifiers of accountID 12345678910 and region us-east-1.

" + "smithy.api#documentation": "

Accepts a resource type and returns a list of resource identifiers that are aggregated for a specific resource type across accounts and regions. \n\t\t\tA resource identifier includes the resource type, ID, (if available) the custom resource name, source account, and source region. \n\t\t\tYou can narrow the results to include only resources that have specific resource IDs, or a resource name, or source account ID, or source region.

\n\t\t\t

For example, if the input consists of accountID 12345678910 and the region is us-east-1 for resource type AWS::EC2::Instance then the API returns all the EC2 instance identifiers of accountID 12345678910 and region us-east-1.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ResourceIdentifiers", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#ListAggregateDiscoveredResourcesRequest": { @@ -6519,7 +6688,13 @@ } ], "traits": { - "smithy.api#documentation": "

Accepts a resource type and returns a list of resource\n\t\t\tidentifiers for the resources of that type. A resource identifier\n\t\t\tincludes the resource type, ID, and (if available) the custom\n\t\t\tresource name. The results consist of resources that AWS Config has\n\t\t\tdiscovered, including those that AWS Config is not currently\n\t\t\trecording. You can narrow the results to include only resources that\n\t\t\thave specific resource IDs or a resource name.

\n\t\t \n\t\t\t

You can specify either resource IDs or a resource name, but\n\t\t\t\tnot both, in the same request.

\n\t\t
\n\t\t

The response is paginated. By default, AWS Config lists 100\n\t\t\tresource identifiers on each page. You can customize this number\n\t\t\twith the limit parameter. The response includes a\n\t\t\t\tnextToken string. To get the next page of results,\n\t\t\trun the request again and specify the string for the\n\t\t\t\tnextToken parameter.

" + "smithy.api#documentation": "

Accepts a resource type and returns a list of resource\n\t\t\tidentifiers for the resources of that type. A resource identifier\n\t\t\tincludes the resource type, ID, and (if available) the custom\n\t\t\tresource name. The results consist of resources that AWS Config has\n\t\t\tdiscovered, including those that AWS Config is not currently\n\t\t\trecording. You can narrow the results to include only resources that\n\t\t\thave specific resource IDs or a resource name.

\n\t\t \n\t\t\t

You can specify either resource IDs or a resource name, but\n\t\t\t\tnot both, in the same request.

\n\t\t
\n\t\t

The response is paginated. By default, AWS Config lists 100\n\t\t\tresource identifiers on each page. You can customize this number\n\t\t\twith the limit parameter. The response includes a\n\t\t\t\tnextToken string. To get the next page of results,\n\t\t\trun the request again and specify the string for the\n\t\t\t\tnextToken parameter.

", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "resourceIdentifiers", + "pageSize": "limit" + } } }, "com.amazonaws.configservice#ListDiscoveredResourcesRequest": { @@ -6670,7 +6845,13 @@ } ], "traits": { - "smithy.api#documentation": "

List the tags for AWS Config resource.

" + "smithy.api#documentation": "

List the tags for AWS Config resource.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Tags", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#ListTagsForResourceRequest": { @@ -10302,7 +10483,8 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", - "pageSize": "MaxResults" + "items": "Results", + "pageSize": "Limit" } } }, @@ -10383,7 +10565,13 @@ } ], "traits": { - "smithy.api#documentation": "

Accepts a structured query language (SQL) SELECT command, performs the corresponding search, and returns resource configurations matching the properties.

\n\t\t

For more information about query components, see the \n\t\t\t\n Query Components\n section in the AWS Config Developer Guide.

" + "smithy.api#documentation": "

Accepts a structured query language (SQL) SELECT command, performs the corresponding search, and returns resource configurations matching the properties.

\n\t\t

For more information about query components, see the \n\t\t\t\n Query Components\n section in the AWS Config Developer Guide.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Results", + "pageSize": "Limit" + } } }, "com.amazonaws.configservice#SelectResourceConfigRequest": { 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 d74c546e426..6af653162a9 100644 --- a/codegen/sdk-codegen/aws-models/connect.2017-08-08.json +++ b/codegen/sdk-codegen/aws-models/connect.2017-08-08.json @@ -1369,7 +1369,7 @@ } ], "traits": { - "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Initiates an Amazon Connect instance with all the supported channels enabled. It does not attach any\n storage, such as Amazon Simple Storage Service (Amazon S3) or Amazon Kinesis. It also does not\n allow for any configurations on features, such as Contact Lens for Amazon Connect.

", + "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Initiates an Amazon Connect instance with all the supported channels enabled. It does not attach any\n storage, such as Amazon Simple Storage Service (Amazon S3) or Amazon Kinesis. It also does not\n allow for any configurations on features, such as Contact Lens for Amazon Connect.

\n

Amazon Connect enforces a limit on the total number of instances that you can create or delete in 30 days. \nIf you exceed this limit, you will get an error message indicating there has been an excessive number of attempts at creating or deleting instances. \nYou must wait 30 days before you can restart creating and deleting instances in your account.

", "smithy.api#http": { "method": "PUT", "uri": "/instance", @@ -1464,7 +1464,7 @@ } ], "traits": { - "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Create an AppIntegration association with an Amazon Connect instance.

", + "smithy.api#documentation": "

Create an AppIntegration association with an Amazon Connect instance.

", "smithy.api#http": { "method": "PUT", "uri": "/instance/{InstanceId}/integration-associations", @@ -1517,6 +1517,12 @@ "smithy.api#documentation": "

The type of the data source.

", "smithy.api#required": {} } + }, + "Tags": { + "target": "com.amazonaws.connect#TagMap", + "traits": { + "smithy.api#documentation": "

One or more tags.

" + } } } }, @@ -1884,7 +1890,7 @@ } ], "traits": { - "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Creates a use case for an AppIntegration association.

", + "smithy.api#documentation": "

Creates a use case for an AppIntegration association.

", "smithy.api#http": { "method": "PUT", "uri": "/instance/{InstanceId}/integration-associations/{IntegrationAssociationId}/use-cases", @@ -1917,6 +1923,12 @@ "smithy.api#documentation": "

The type of use case to associate to the AppIntegration association. Each AppIntegration\n association can have only one of each use case type.

", "smithy.api#required": {} } + }, + "Tags": { + "target": "com.amazonaws.connect#TagMap", + "traits": { + "smithy.api#documentation": "

One or more tags.

" + } } } }, @@ -2345,7 +2357,7 @@ } ], "traits": { - "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Deletes the Amazon Connect instance.

", + "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Deletes the Amazon Connect instance.

\n

Amazon Connect enforces a limit on the total number of instances that you can create or delete in 30 days. \nIf you exceed this limit, you will get an error message indicating there has been an excessive number of attempts at creating or deleting instances. \nYou must wait 30 days before you can restart creating and deleting instances in your account.

", "smithy.api#http": { "method": "DELETE", "uri": "/instance/{InstanceId}", @@ -2386,7 +2398,7 @@ } ], "traits": { - "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Deletes an AppIntegration association from an Amazon Connect instance. The association must not have\n any use cases associated with it.

", + "smithy.api#documentation": "

Deletes an AppIntegration association from an Amazon Connect instance. The association must not have\n any use cases associated with it.

", "smithy.api#http": { "method": "DELETE", "uri": "/instance/{InstanceId}/integration-associations/{IntegrationAssociationId}", @@ -2487,7 +2499,7 @@ } ], "traits": { - "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Deletes a use case from an AppIntegration association.

", + "smithy.api#documentation": "

Deletes a use case from an AppIntegration association.

", "smithy.api#http": { "method": "DELETE", "uri": "/instance/{InstanceId}/integration-associations/{IntegrationAssociationId}/use-cases/{UseCaseId}", @@ -4118,7 +4130,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves a token for federation.

", + "smithy.api#documentation": "

Retrieves a token for federation.

\n \n

This API doesn't support root users. If you try to invoke GetFederationToken with root\n credentials, an error message similar to the following one appears:

\n

\n Provided identity: Principal: .... User: .... cannot be used for federation with\n Amazon Connect\n

\n
", "smithy.api#http": { "method": "GET", "uri": "/user/federate/{InstanceId}", @@ -4176,7 +4188,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets historical metric data from the specified Amazon Connect instance.

\n

For a description of each historical metric, see Historical Metrics\n Definitions in the Amazon Connect Administrator Guide.

", + "smithy.api#documentation": "

Gets historical metric data from the specified Amazon Connect instance.

\n\n

For a description of each historical metric, see Historical Metrics\n Definitions in the Amazon Connect Administrator Guide.

", "smithy.api#http": { "method": "POST", "uri": "/metrics/historical/{InstanceId}", @@ -4217,20 +4229,20 @@ "Filters": { "target": "com.amazonaws.connect#Filters", "traits": { - "smithy.api#documentation": "

The queues, up to 100, or channels, to use to filter the metrics returned. Metric data is\n retrieved only for the resources associated with the queues or channels included in the filter.\n You can include both queue IDs and queue ARNs in the same request. VOICE, CHAT, and TASK channels are supported.

", + "smithy.api#documentation": "

The queues, up to 100, or channels, to use to filter the metrics returned. Metric data is\n retrieved only for the resources associated with the queues or channels included in the filter.\n You can include both queue IDs and queue ARNs in the same request. VOICE, CHAT, and TASK channels are supported.

\n \n

To filter by Queues, enter the queue\n ID/ARN, not the name of the queue.

\n
", "smithy.api#required": {} } }, "Groupings": { "target": "com.amazonaws.connect#Groupings", "traits": { - "smithy.api#documentation": "

The grouping applied to the metrics returned. For example, when results are grouped by\n queue, the metrics returned are grouped by queue. The values returned apply to the metrics for\n each queue rather than aggregated for all queues.

\n

The only supported grouping is QUEUE.

\n

If no grouping is specified, a summary of metrics for all queues is returned.

" + "smithy.api#documentation": "

The grouping applied to the metrics returned. For example, when results are grouped by\n queue, the metrics returned are grouped by queue. The values returned apply to the metrics for\n each queue rather than aggregated for all queues.

\n \n

If no grouping is specified, a summary of metrics for all queues is returned.

" } }, "HistoricalMetrics": { "target": "com.amazonaws.connect#HistoricalMetrics", "traits": { - "smithy.api#documentation": "

The metrics to retrieve. Specify the name, unit, and statistic for each metric. The\n following historical metrics are available. For a description of each metric, see Historical Metrics Definitions in the Amazon Connect Administrator\n Guide.

\n
\n
ABANDON_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
AFTER_CONTACT_WORK_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
API_CONTACTS_HANDLED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CALLBACK_CONTACTS_HANDLED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_ABANDONED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_AGENT_HUNG_UP_FIRST
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_CONSULTED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_HANDLED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_HANDLED_INCOMING
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_HANDLED_OUTBOUND
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_HOLD_ABANDONS
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_MISSED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_QUEUED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_TRANSFERRED_IN
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_TRANSFERRED_IN_FROM_QUEUE
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_TRANSFERRED_OUT
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_TRANSFERRED_OUT_FROM_QUEUE
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
HANDLE_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
HOLD_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
INTERACTION_AND_HOLD_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
INTERACTION_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
OCCUPANCY
\n
\n

Unit: PERCENT

\n

Statistic: AVG

\n
\n
QUEUE_ANSWER_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
QUEUED_TIME
\n
\n

Unit: SECONDS

\n

Statistic: MAX

\n
\n
SERVICE_LEVEL
\n
\n

Unit: PERCENT

\n

Statistic: AVG

\n

Threshold: Only \"Less than\" comparisons are supported, with the following service level\n thresholds: 15, 20, 25, 30, 45, 60, 90, 120, 180, 240, 300, 600

\n
\n
", + "smithy.api#documentation": "

The metrics to retrieve. Specify the name, unit, and statistic for each metric. The\n following historical metrics are available. For a description of each metric, see Historical Metrics Definitions in the Amazon Connect Administrator\n Guide.

\n
\n
ABANDON_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
AFTER_CONTACT_WORK_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
API_CONTACTS_HANDLED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CALLBACK_CONTACTS_HANDLED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_ABANDONED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_AGENT_HUNG_UP_FIRST
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_CONSULTED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_HANDLED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_HANDLED_INCOMING
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_HANDLED_OUTBOUND
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_HOLD_ABANDONS
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_MISSED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_QUEUED
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_TRANSFERRED_IN
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_TRANSFERRED_IN_FROM_QUEUE
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_TRANSFERRED_OUT
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
CONTACTS_TRANSFERRED_OUT_FROM_QUEUE
\n
\n

Unit: COUNT

\n

Statistic: SUM

\n
\n
HANDLE_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
HOLD_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
INTERACTION_AND_HOLD_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
INTERACTION_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
OCCUPANCY
\n
\n

Unit: PERCENT

\n

Statistic: AVG

\n
\n
QUEUE_ANSWER_TIME
\n
\n

Unit: SECONDS

\n

Statistic: AVG

\n
\n
QUEUED_TIME
\n
\n

Unit: SECONDS

\n

Statistic: MAX

\n
\n
SERVICE_LEVEL
\n
\n

You can include up to 20 SERVICE_LEVEL metrics in a request.

\n

Unit: PERCENT

\n

Statistic: AVG

\n

Threshold: For ThresholdValue, enter any whole number from 1 to 604800\n (inclusive), in seconds. For Comparison, you must enter LT (for\n \"Less than\").

\n
\n
", "smithy.api#required": {} } }, @@ -4803,7 +4815,7 @@ "Day": { "target": "com.amazonaws.connect#HoursOfOperationDays", "traits": { - "smithy.api#documentation": "

The\n day that the hours of operation applies to.

" + "smithy.api#documentation": "

The day that the hours of operation applies to.

" } }, "StartTime": { @@ -4976,7 +4988,7 @@ "StatusReason": { "target": "com.amazonaws.connect#InstanceStatusReason", "traits": { - "smithy.api#documentation": "

Relevant details why the instance was not successfully created.

" + "smithy.api#documentation": "

Relevant\n details why the instance was not successfully created.

" } }, "InboundCallsEnabled": { @@ -6026,7 +6038,7 @@ } ], "traits": { - "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Provides summary information about the AppIntegration associations for the specified Amazon Connect\n instance.

", + "smithy.api#documentation": "

Provides summary information about the AppIntegration associations for the specified Amazon Connect\n instance.

", "smithy.api#http": { "method": "GET", "uri": "/instance/{InstanceId}/integration-associations", @@ -6557,7 +6569,7 @@ } ], "traits": { - "smithy.api#documentation": "

Provides information about the queues for the specified Amazon Connect instance.

\n

For more information about queues, see Queues: Standard and\n Agent in the Amazon Connect Administrator Guide.

", + "smithy.api#documentation": "

Provides information about the queues for the specified Amazon Connect instance.

\n

If you do not specify a QueueTypes\n parameter, both standard and agent queues are returned. This might cause an unexpected truncation\n of results if you have more than 1000 agents and you limit the number of results of the API call\n in code.

\n

For more information about queues, see Queues: Standard and\n Agent in the Amazon Connect Administrator Guide.

", "smithy.api#http": { "method": "GET", "uri": "/queues-summary/{InstanceId}", @@ -7143,7 +7155,7 @@ } ], "traits": { - "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Lists the use cases.

", + "smithy.api#documentation": "

Lists the use cases.

", "smithy.api#http": { "method": "GET", "uri": "/instance/{InstanceId}/integration-associations/{IntegrationAssociationId}/use-cases", @@ -7456,7 +7468,7 @@ "Concurrency": { "target": "com.amazonaws.connect#Concurrency", "traits": { - "smithy.api#documentation": "

The number of contacts an agent can have on a channel simultaneously.

", + "smithy.api#documentation": "

The number of contacts an agent can have on a channel simultaneously.

\n

Valid Range for VOICE: Minimum value of 1. Maximum value of 1.

\n

Valid Range for CHAT: Minimum value of 1. Maximum value of 5.

\n

Valid Range for TASK: Minimum value of 1. Maximum value of 10.

", "smithy.api#required": {} } } @@ -9805,7 +9817,7 @@ } ], "traits": { - "smithy.api#documentation": "

Initiates a contact flow to start a new chat for the customer. Response of this API provides\n a token required to obtain credentials from the CreateParticipantConnection API in the Amazon Connect Participant Service.

\n\n

When a new chat contact is successfully created, clients must subscribe to the participant’s\n connection for the created chat within 5 minutes. This is achieved by invoking CreateParticipantConnection with WEBSOCKET and CONNECTION_CREDENTIALS.

\n\n

A 429 error occurs in two situations:

\n \n\n

For more information about chat, see Chat in the Amazon Connect Administrator\n Guide.

", + "smithy.api#documentation": "

Initiates a contact flow to start a new chat for the customer. Response of this API provides\n a token required to obtain credentials from the CreateParticipantConnection API in the Amazon Connect Participant Service.

\n\n

When a new chat contact is successfully created, clients must subscribe to the participant’s\n connection for the created chat within 5 minutes. This is achieved by invoking CreateParticipantConnection with WEBSOCKET and CONNECTION_CREDENTIALS.

\n\n

A 429 error occurs in two situations:

\n \n\n

For more information about chat, see Chat in the Amazon Connect Administrator\n Guide.

", "smithy.api#http": { "method": "PUT", "uri": "/contact/chat", @@ -9826,7 +9838,7 @@ "ContactFlowId": { "target": "com.amazonaws.connect#ContactFlowId", "traits": { - "smithy.api#documentation": "

The identifier of the contact flow for initiating the chat.\n To\n see the ContactFlowId in the Amazon Connect console user interface, on the navigation menu go to Routing, Contact Flows. Choose the contact flow. On\n the contact flow page, under the name of the contact flow, choose Show\n additional flow information. The ContactFlowId is the last part of the ARN, shown\n here in bold:

\n

arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx\n

", + "smithy.api#documentation": "

The identifier of the contact flow for initiating the chat.\n To\n see the ContactFlowId in the Amazon Connect console user interface, on the navigation menu go to Routing, Contact Flows. Choose the\n contact flow. On the contact flow page, under the name of the contact flow, choose Show additional flow information. The ContactFlowId is the last part of\n the ARN, shown here in bold:

\n

arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx\n

", "smithy.api#required": {} } }, @@ -9981,7 +9993,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).

\n\n

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\n

There is a 60-second dialing timeout for this operation. If the call is not connected after\n 60 seconds, it fails.

\n \n

UK 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.

\n
", + "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).

\n\n

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\n

There is a 60-second dialing timeout for this operation. If the call is not connected after\n 60 seconds, it fails.

\n \n

UK 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.

\n
", "smithy.api#http": { "method": "PUT", "uri": "/contact/outbound-voice", @@ -10002,7 +10014,7 @@ "ContactFlowId": { "target": "com.amazonaws.connect#ContactFlowId", "traits": { - "smithy.api#documentation": "

The\n identifier of the contact flow for the outbound call. To see the ContactFlowId in the Amazon Connect console user interface, on the navigation menu go to Routing, Contact Flows. Choose the contact flow. On\n the contact flow page, under the name of the contact flow, choose Show\n additional flow information. The ContactFlowId is the last part of the ARN, shown\n here in bold:

\n

arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx\n

", + "smithy.api#documentation": "

The\n identifier of the contact flow for the outbound call. To see the ContactFlowId in the Amazon Connect\n console user interface, on the navigation menu go to Routing,\n Contact Flows. Choose the contact flow. On the contact flow\n page, under the name of the contact flow, choose Show additional flow\n information. The ContactFlowId is the last part of the ARN, shown here in bold:

\n

arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx\n

", "smithy.api#required": {} } }, @@ -10434,7 +10446,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds the specified tags to the specified resource.

\n

The supported resource types are users, routing profiles, queues, quick connects, and contact\n flows.

\n

For 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.

\n

The supported resource types are users, routing profiles, queues, quick connects, and\n contact flows.

\n

For 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}", @@ -10620,7 +10632,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates or updates the contact attributes associated with the specified contact.

\n

You can add or update attributes for both ongoing and completed contacts. For example, while\n the call is active, you can update the customer's name or the reason the customer called. You can\n add notes about steps that the agent took during the call that display to the next agent that\n takes the call. You can also update attributes for a contact using data from your CRM application\n and save the data with the contact in Amazon Connect. You could also flag calls for additional analysis,\n such as legal review or to identify abusive callers.

\n

Contact attributes are available in Amazon Connect for 24 months, and are then deleted.

\n\n

\n Important: You cannot use the operation to update\n attributes for contacts that occurred prior to the release of the API, which was September 12,\n 2018. You can update attributes only for contacts that started after the release of the API. If\n you attempt to update attributes for a contact that occurred prior to the release of the API, a\n 400 error is returned. This applies also to queued callbacks that were initiated prior to the\n release of the API but are still active in your instance.

", + "smithy.api#documentation": "

Creates or updates\n user-defined contact attributes\n associated with the specified contact.

\n

You can create or update user-defined attributes for both ongoing and completed contacts.\n For example, while the call is active, you can update the customer's name or the reason the\n customer called. You can add notes about steps that the agent took during the call that display\n to the next agent that takes the call. You can also update attributes for a contact using data\n from your CRM application and save the data with the contact in Amazon Connect. You could also flag calls\n for additional analysis, such as legal review or to identify abusive callers.

\n

Contact attributes are available in Amazon Connect for 24 months, and are then deleted. For\n information about CTR retention and the maximum size of the CTR attributes section, see Feature\n specifications in the Amazon Connect Administrator Guide.

\n\n

\n Important: You cannot use the operation to update\n attributes for contacts that occurred prior to the release of the API, which was September 12,\n 2018. You can update attributes only for contacts that started after the release of the API. If\n you attempt to update attributes for a contact that occurred prior to the release of the API, a\n 400 error is returned. This applies also to queued callbacks that were initiated prior to the\n release of the API but are still active in your instance.

", "smithy.api#http": { "method": "POST", "uri": "/contact/attributes", @@ -10994,7 +11006,7 @@ } ], "traits": { - "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Updates the maximum number of contacts allowed in a queue before it is\n considered full.

", + "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Updates the maximum number of contacts allowed in a queue before it is considered\n full.

", "smithy.api#http": { "method": "POST", "uri": "/queues/{InstanceId}/{QueueId}/max-contacts", @@ -11056,7 +11068,7 @@ } ], "traits": { - "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Updates the name and description of a queue. At least Name or Description must be provided.

", + "smithy.api#documentation": "

This API is in preview release for Amazon Connect and is subject to change.

\n

Updates the name and description of a queue. At least Name or Description must be provided.

", "smithy.api#http": { "method": "POST", "uri": "/queues/{InstanceId}/{QueueId}/name", @@ -11482,7 +11494,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the name and description of a routing profile. The request accepts the following data in JSON format. At least Name or Description must be provided.

", + "smithy.api#documentation": "

Updates the name and description of a routing profile. The request accepts the following data in JSON format.\n At least Name or Description must be provided.

", "smithy.api#http": { "method": "POST", "uri": "/routing-profiles/{InstanceId}/{RoutingProfileId}/name", @@ -11576,7 +11588,7 @@ "QueueConfigs": { "target": "com.amazonaws.connect#RoutingProfileQueueConfigList", "traits": { - "smithy.api#documentation": "

The queues to be updated for this routing profile. Queues must first be associated to the\n routing profile. You can do this using AssociateRoutingProfileQueues.

", + "smithy.api#documentation": "

The queues to be updated for this routing profile.\n Queues must first be associated to the routing\n profile. You can do this using AssociateRoutingProfileQueues.

", "smithy.api#required": {} } } diff --git a/codegen/sdk-codegen/aws-models/ec2.2016-11-15.json b/codegen/sdk-codegen/aws-models/ec2.2016-11-15.json index 4eca26f5e5f..62cfffb715c 100644 --- a/codegen/sdk-codegen/aws-models/ec2.2016-11-15.json +++ b/codegen/sdk-codegen/aws-models/ec2.2016-11-15.json @@ -22332,7 +22332,7 @@ "Filters": { "target": "com.amazonaws.ec2#FilterList", "traits": { - "smithy.api#documentation": "

One or more filters.

\n ", + "smithy.api#documentation": "

One or more filters.

\n ", "smithy.api#xmlName": "Filter" } }, @@ -22460,7 +22460,7 @@ "Filters": { "target": "com.amazonaws.ec2#FilterList", "traits": { - "smithy.api#documentation": "

One or more filters.

\n ", + "smithy.api#documentation": "

One or more filters.

\n ", "smithy.api#xmlName": "Filter" } }, @@ -39249,6 +39249,22 @@ "value": "z1d.metal", "name": "z1d_metal" }, + { + "value": "u-6tb1.56xlarge", + "name": "u_6tb1_56xlarge" + }, + { + "value": "u-6tb1.112xlarge", + "name": "u_6tb1_112xlarge" + }, + { + "value": "u-9tb1.112xlarge", + "name": "u_9tb1_112xlarge" + }, + { + "value": "u-12tb1.112xlarge", + "name": "u_12tb1_112xlarge" + }, { "value": "u-6tb1.metal", "name": "u_6tb1_metal" 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 b09073e9329..80a5c20ad94 100644 --- a/codegen/sdk-codegen/aws-models/ecs.2014-11-13.json +++ b/codegen/sdk-codegen/aws-models/ecs.2014-11-13.json @@ -1084,7 +1084,7 @@ "name": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The name of a container. If you are linking multiple containers together in a task\n\t\t\tdefinition, the name of one container can be entered in the\n\t\t\t\tlinks of another container to connect the containers.\n\t\t\tUp to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. This parameter maps to name in the\n\t\t\tCreate a container section of the Docker Remote API and the\n\t\t\t\t--name option to docker\n\t\t\trun.

" + "smithy.api#documentation": "

The name of a container. If you are linking multiple containers together in a task\n\t\t\tdefinition, the name of one container can be entered in the\n\t\t\t\tlinks of another container to connect the containers.\n\t\t\tUp to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. This parameter maps to name in the\n\t\t\tCreate a container section of the Docker Remote API and the\n\t\t\t\t--name option to docker\n\t\t\trun.

" } }, "image": { @@ -1120,7 +1120,7 @@ "links": { "target": "com.amazonaws.ecs#StringList", "traits": { - "smithy.api#documentation": "

The links parameter allows containers to communicate with each other\n\t\t\twithout the need for port mappings. This parameter is only supported if the network mode\n\t\t\tof a task definition is bridge. The name:internalName\n\t\t\tconstruct is analogous to name:alias in Docker links.\n\t\t\tUp to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. For more information about linking Docker containers, go to\n\t\t\t\tLegacy container links\n\t\t\tin the Docker documentation. This parameter maps to Links in the\n\t\t\tCreate a container section of the Docker Remote API and the\n\t\t\t\t--link option to docker\n\t\t\trun.

\n \n

This parameter is not supported for Windows containers.

\n
\n \n\t\t\t

Containers that are collocated on a single container instance may be able to\n\t\t\t\tcommunicate with each other without requiring links or host port mappings. Network\n\t\t\t\tisolation is achieved on the container instance using security groups and VPC\n\t\t\t\tsettings.

\n\t\t
" + "smithy.api#documentation": "

The links parameter allows containers to communicate with each other\n\t\t\twithout the need for port mappings. This parameter is only supported if the network mode\n\t\t\tof a task definition is bridge. The name:internalName\n\t\t\tconstruct is analogous to name:alias in Docker links.\n\t\t\tUp to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. For more information about linking Docker containers, go to\n\t\t\t\tLegacy container links\n\t\t\tin the Docker documentation. This parameter maps to Links in the\n\t\t\tCreate a container section of the Docker Remote API and the\n\t\t\t\t--link option to docker\n\t\t\trun.

\n \n

This parameter is not supported for Windows containers.

\n
\n \n\t\t\t

Containers that are collocated on a single container instance may be able to\n\t\t\t\tcommunicate with each other without requiring links or host port mappings. Network\n\t\t\t\tisolation is achieved on the container instance using security groups and VPC\n\t\t\t\tsettings.

\n\t\t
" } }, "portMappings": { @@ -1732,7 +1732,7 @@ "clusterName": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The name of your cluster. If you do not specify a name for your cluster, you create a\n\t\t\tcluster named default. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed.

" + "smithy.api#documentation": "

The name of your cluster. If you do not specify a name for your cluster, you create a\n\t\t\tcluster named default. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.

" } }, "tags": { @@ -1828,7 +1828,7 @@ "serviceName": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The name of your service. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. Service names must be unique within\n\t\t\ta cluster, but you can have similarly named services in multiple clusters within a\n\t\t\tRegion or across multiple Regions.

", + "smithy.api#documentation": "

The name of your service. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. Service names must be unique within\n\t\t\ta cluster, but you can have similarly named services in multiple clusters within a\n\t\t\tRegion or across multiple Regions.

", "smithy.api#required": {} } }, @@ -3840,7 +3840,7 @@ "interactive": { "target": "com.amazonaws.ecs#Boolean", "traits": { - "smithy.api#documentation": "

Whether or not the execute command session is running in interactive mode.

" + "smithy.api#documentation": "

Whether or not the execute command session is running in interactive mode. Amazon ECS only\n\t\t\tsupports initiating interactive sessions, so you must specify true for this\n\t\t\tvalue.

" } }, "session": { @@ -6095,7 +6095,7 @@ "family": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

You must specify a family for a task definition, which allows you to\n\t\t\ttrack multiple versions of the same task definition. The family is used as\n\t\t\ta name for your task definition. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed.

", + "smithy.api#documentation": "

You must specify a family for a task definition, which allows you to\n\t\t\ttrack multiple versions of the same task definition. The family is used as\n\t\t\ta name for your task definition. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.

", "smithy.api#required": {} } }, @@ -6632,7 +6632,7 @@ "serviceName": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The name of your service. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. Service names must be unique within\n\t\t\ta cluster, but you can have similarly named services in multiple clusters within a\n\t\t\tRegion or across multiple Regions.

" + "smithy.api#documentation": "

The name of your service. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. Service names must be unique within\n\t\t\ta cluster, but you can have similarly named services in multiple clusters within a\n\t\t\tRegion or across multiple Regions.

" } }, "clusterArn": { @@ -9250,7 +9250,7 @@ "name": { "target": "com.amazonaws.ecs#String", "traits": { - "smithy.api#documentation": "

The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. This name is referenced in the\n\t\t\t\tsourceVolume parameter of container definition\n\t\t\tmountPoints.

" + "smithy.api#documentation": "

The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. This name is referenced in the\n\t\t\t\tsourceVolume parameter of container definition\n\t\t\tmountPoints.

" } }, "host": { diff --git a/codegen/sdk-codegen/aws-models/eks.2017-11-01.json b/codegen/sdk-codegen/aws-models/eks.2017-11-01.json index f7221c6ac23..92df0fd4ce0 100644 --- a/codegen/sdk-codegen/aws-models/eks.2017-11-01.json +++ b/codegen/sdk-codegen/aws-models/eks.2017-11-01.json @@ -229,7 +229,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 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

" } } }, @@ -442,7 +442,7 @@ } ], "traits": { - "smithy.api#documentation": "

Associate encryption configuration to an existing cluster.

\n

You can use this API to enable encryption on existing clusters which do not have\n encryption already enabled. This allows you to implement a defense-in-depth\n security strategy without migrating applications to new EKS clusters.

", + "smithy.api#documentation": "

Associate encryption configuration to an existing cluster.

\n

You can use this API to enable encryption on existing clusters which do not have\n encryption already enabled. This allows you to implement a defense-in-depth security\n strategy without migrating applications to new EKS clusters.

", "smithy.api#http": { "method": "POST", "uri": "/clusters/{clusterName}/encryption-config/associate", @@ -1239,7 +1239,7 @@ "subnets": { "target": "com.amazonaws.eks#StringList", "traits": { - "smithy.api#documentation": "

The subnets to use for the Auto Scaling group that is created for your node group.\n These subnets must have the tag key kubernetes.io/cluster/CLUSTER_NAME with\n a value of shared, where CLUSTER_NAME is replaced with the\n name of your cluster. If you specify launchTemplate, then don't specify \n SubnetId\n in your launch template, or the node group \n deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide.

", + "smithy.api#documentation": "

The subnets to use for the Auto Scaling group that is created for your node group.\n If you specify launchTemplate, then don't specify \n SubnetId\n in your launch template, or the node group \n deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the Amazon EKS User Guide.

", "smithy.api#required": {} } }, @@ -1274,6 +1274,12 @@ "smithy.api#documentation": "

The Kubernetes labels to be applied to the nodes in the node group when they are\n created.

" } }, + "taints": { + "target": "com.amazonaws.eks#taintsList", + "traits": { + "smithy.api#documentation": "

The Kubernetes taints to be applied to the nodes in the node group.

" + } + }, "tags": { "target": "com.amazonaws.eks#TagMap", "traits": { @@ -2308,7 +2314,7 @@ "provider": { "target": "com.amazonaws.eks#Provider", "traits": { - "smithy.api#documentation": "

AWS Key Management Service (AWS KMS) customer master key (CMK). Either the ARN or the alias can be\n used.

" + "smithy.api#documentation": "

AWS Key Management Service (AWS KMS) key. Either the ARN or the alias can be used.

" } } }, @@ -3537,6 +3543,12 @@ "smithy.api#documentation": "

The Kubernetes labels applied to the nodes in the node group.

\n \n

Only labels that are applied with the Amazon EKS API are shown here. There may be other\n Kubernetes labels applied to the nodes in this group.

\n
" } }, + "taints": { + "target": "com.amazonaws.eks#taintsList", + "traits": { + "smithy.api#documentation": "

The Kubernetes taints to be applied to the nodes in the node group when they are\n created. Effect is one of NoSchedule, PreferNoSchedule, or NoExecute. Kubernetes taints\n can be used together with tolerations to control how workloads are scheduled to your\n nodes.

" + } + }, "resources": { "target": "com.amazonaws.eks#NodegroupResources", "traits": { @@ -3708,7 +3720,7 @@ } }, "traits": { - "smithy.api#documentation": "

An object representing the scaling configuration details for the Auto Scaling group\n that is associated with your node group. If you specify a value for any property, then\n you must specify values for all of the properties.

" + "smithy.api#documentation": "

An object representing the scaling configuration details for the Auto Scaling group\n that is associated with your node group. When creating a node group, you must specify\n all or none of the properties. When updating a node group, you can specify any or none\n of the properties.

" } }, "com.amazonaws.eks#NodegroupStatus": { @@ -3918,12 +3930,12 @@ "keyArn": { "target": "com.amazonaws.eks#String", "traits": { - "smithy.api#documentation": "

Amazon Resource Name (ARN) or alias of the customer master key (CMK). The CMK must be symmetric,\n created in the same region as the cluster, and if the CMK was created in a different\n account, the user must have access to the CMK. For more information, see Allowing\n Users in Other Accounts to Use a CMK in the AWS Key Management Service Developer\n Guide.

" + "smithy.api#documentation": "

Amazon Resource Name (ARN) or alias of the KMS key. The KMS key must be symmetric, created in the same\n region as the cluster, and if the KMS key was created in a different account, the user\n must have access to the KMS key. For more information, see Allowing\n Users in Other Accounts to Use a KMS key in the AWS Key Management Service\n Developer Guide.

" } } }, "traits": { - "smithy.api#documentation": "

Identifies the AWS Key Management Service (AWS KMS) customer master key (CMK) used to encrypt the\n secrets.

" + "smithy.api#documentation": "

Identifies the AWS Key Management Service (AWS KMS) key used to encrypt the secrets.

" } }, "com.amazonaws.eks#RemoteAccessConfig": { @@ -4201,6 +4213,51 @@ } } }, + "com.amazonaws.eks#Taint": { + "type": "structure", + "members": { + "key": { + "target": "com.amazonaws.eks#taintKey", + "traits": { + "smithy.api#documentation": "

The key of the taint.

" + } + }, + "value": { + "target": "com.amazonaws.eks#taintValue", + "traits": { + "smithy.api#documentation": "

The value of the taint.

" + } + }, + "effect": { + "target": "com.amazonaws.eks#TaintEffect", + "traits": { + "smithy.api#documentation": "

The effect of the taint.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A property that allows a node to repel a set of pods.

" + } + }, + "com.amazonaws.eks#TaintEffect": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NO_SCHEDULE", + "name": "NO_SCHEDULE" + }, + { + "value": "NO_EXECUTE", + "name": "NO_EXECUTE" + }, + { + "value": "PREFER_NO_SCHEDULE", + "name": "PREFER_NO_SCHEDULE" + } + ] + } + }, "com.amazonaws.eks#Timestamp": { "type": "timestamp" }, @@ -4449,7 +4506,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates an Amazon EKS cluster configuration. Your cluster continues to function during the\n update. The response output includes an update ID that you can use to track the status\n of your cluster update with the DescribeUpdate API operation.

\n

You can use this API operation to enable or disable exporting the Kubernetes control\n plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs aren't\n exported to CloudWatch Logs. For more information, see Amazon EKS\n Cluster Control Plane Logs in the\n \n Amazon EKS User Guide\n .

\n \n

CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported\n control plane logs. For more information, see Amazon CloudWatch Pricing.

\n
\n

You can also use this API operation to enable or disable public and private access to\n your cluster's Kubernetes API server endpoint. By default, public access is enabled, and\n private access is disabled. For more information, see Amazon EKS Cluster\n Endpoint Access Control in the \n Amazon EKS User Guide\n .

\n \n

At this time, you can not update the subnets or security group IDs for an existing\n cluster.

\n
\n

Cluster updates are asynchronous, and they should finish within a few minutes. During\n an update, the cluster status moves to UPDATING (this status transition is\n eventually consistent). When the update is complete (either Failed or\n Successful), the cluster status moves to Active.

", + "smithy.api#documentation": "

Updates an Amazon EKS cluster configuration. Your cluster continues to function during the\n update. The response output includes an update ID that you can use to track the status\n of your cluster update with the DescribeUpdate API operation.

\n

You can use this API operation to enable or disable exporting the Kubernetes control\n plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs aren't\n exported to CloudWatch Logs. For more information, see Amazon EKS\n Cluster Control Plane Logs in the\n \n Amazon EKS User Guide\n .

\n \n

CloudWatch Logs ingestion, archive storage, and data scanning rates apply to exported\n control plane logs. For more information, see Amazon CloudWatch Pricing.

\n
\n

You can also use this API operation to enable or disable public and private access to\n your cluster's Kubernetes API server endpoint. By default, public access is enabled, and\n private access is disabled. For more information, see Amazon EKS Cluster\n Endpoint Access Control in the \n Amazon EKS User Guide\n .

\n \n

You can't update the subnets or security group IDs for an existing cluster.

\n
\n

Cluster updates are asynchronous, and they should finish within a few minutes. During\n an update, the cluster status moves to UPDATING (this status transition is\n eventually consistent). When the update is complete (either Failed or\n Successful), the cluster status moves to Active.

", "smithy.api#http": { "method": "POST", "uri": "/clusters/{name}/update-config", @@ -4651,6 +4708,12 @@ "smithy.api#documentation": "

The Kubernetes labels to be applied to the nodes in the node group after the\n update.

" } }, + "taints": { + "target": "com.amazonaws.eks#UpdateTaintsPayload", + "traits": { + "smithy.api#documentation": "

The Kubernetes taints to be applied to the nodes in the node group after the\n update.

" + } + }, "scalingConfig": { "target": "com.amazonaws.eks#NodegroupScalingConfig", "traits": { @@ -4827,6 +4890,14 @@ "value": "LabelsToRemove", "name": "LABELS_TO_REMOVE" }, + { + "value": "TaintsToAdd", + "name": "TAINTS_TO_ADD" + }, + { + "value": "TaintsToRemove", + "name": "TAINTS_TO_REMOVE" + }, { "value": "MaxSize", "name": "MAX_SIZE" @@ -4903,6 +4974,26 @@ ] } }, + "com.amazonaws.eks#UpdateTaintsPayload": { + "type": "structure", + "members": { + "addOrUpdateTaints": { + "target": "com.amazonaws.eks#taintsList", + "traits": { + "smithy.api#documentation": "

Kubernetes taints to be added or updated.

" + } + }, + "removeTaints": { + "target": "com.amazonaws.eks#taintsList", + "traits": { + "smithy.api#documentation": "

Kubernetes taints to be removed.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An object representing the details of an update to a taints payload.

" + } + }, "com.amazonaws.eks#UpdateType": { "type": "string", "traits": { @@ -5072,7 +5163,7 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 253 + "max": 63 } } }, @@ -5117,6 +5208,30 @@ "max": 253 } } + }, + "com.amazonaws.eks#taintKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 63 + } + } + }, + "com.amazonaws.eks#taintValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 63 + } + } + }, + "com.amazonaws.eks#taintsList": { + "type": "list", + "member": { + "target": "com.amazonaws.eks#Taint" + } } } } diff --git a/codegen/sdk-codegen/aws-models/finspace.2021-03-12.json b/codegen/sdk-codegen/aws-models/finspace.2021-03-12.json new file mode 100644 index 00000000000..aa0519627e4 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/finspace.2021-03-12.json @@ -0,0 +1,1059 @@ +{ + "smithy": "1.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "HttpResponseCodeSemantics", + "namespace": "*" + }, + { + "id": "PaginatedTrait", + "namespace": "*" + }, + { + "id": "HttpHeaderTrait", + "namespace": "*" + }, + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "Service", + "namespace": "*" + } + ] + }, + "shapes": { + "com.amazonaws.finspace#AWSHabaneroManagementService": { + "type": "service", + "version": "2021-03-12", + "operations": [ + { + "target": "com.amazonaws.finspace#CreateEnvironment" + }, + { + "target": "com.amazonaws.finspace#DeleteEnvironment" + }, + { + "target": "com.amazonaws.finspace#GetEnvironment" + }, + { + "target": "com.amazonaws.finspace#ListEnvironments" + }, + { + "target": "com.amazonaws.finspace#ListTagsForResource" + }, + { + "target": "com.amazonaws.finspace#TagResource" + }, + { + "target": "com.amazonaws.finspace#UntagResource" + }, + { + "target": "com.amazonaws.finspace#UpdateEnvironment" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "finspace", + "arnNamespace": "finspace", + "cloudFormationName": "Finspace", + "cloudTrailEventSource": "finspace.amazonaws.com", + "endpointPrefix": "finspace" + }, + "aws.auth#sigv4": { + "name": "finspace" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

The FinSpace management service provides the APIs for managing the FinSpace\n environments.

", + "smithy.api#title": "FinSpace User Environment Management service" + } + }, + "com.amazonaws.finspace#AccessDeniedException": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

You do not have sufficient access to perform this action.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.finspace#AttributeMap": { + "type": "map", + "key": { + "target": "com.amazonaws.finspace#FederationAttributeKey" + }, + "value": { + "target": "com.amazonaws.finspace#url" + } + }, + "com.amazonaws.finspace#CreateEnvironment": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspace#CreateEnvironmentRequest" + }, + "output": { + "target": "com.amazonaws.finspace#CreateEnvironmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspace#AccessDeniedException" + }, + { + "target": "com.amazonaws.finspace#InternalServerException" + }, + { + "target": "com.amazonaws.finspace#LimitExceededException" + }, + { + "target": "com.amazonaws.finspace#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.finspace#ThrottlingException" + }, + { + "target": "com.amazonaws.finspace#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Create a new FinSpace environment.

", + "smithy.api#http": { + "method": "POST", + "uri": "/environment", + "code": 200 + } + } + }, + "com.amazonaws.finspace#CreateEnvironmentRequest": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.finspace#EnvironmentName", + "traits": { + "smithy.api#documentation": "

The name of the FinSpace environment to be created.

", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.finspace#Description", + "traits": { + "smithy.api#documentation": "

The description of the FinSpace environment to be created.

" + } + }, + "kmsKeyId": { + "target": "com.amazonaws.finspace#KmsKeyId", + "traits": { + "smithy.api#documentation": "

The KMS key id to encrypt your data in the FinSpace environment.

" + } + }, + "tags": { + "target": "com.amazonaws.finspace#TagMap", + "traits": { + "smithy.api#documentation": "

Add tags to your FinSpace environment.

" + } + }, + "federationMode": { + "target": "com.amazonaws.finspace#FederationMode", + "traits": { + "smithy.api#documentation": "

Authentication mode for the environment.

\n " + } + }, + "federationParameters": { + "target": "com.amazonaws.finspace#FederationParameters", + "traits": { + "smithy.api#documentation": "

Configuration information when authentication mode is FEDERATED.

" + } + } + } + }, + "com.amazonaws.finspace#CreateEnvironmentResponse": { + "type": "structure", + "members": { + "environmentId": { + "target": "com.amazonaws.finspace#IdType", + "traits": { + "smithy.api#documentation": "

The unique identifier for FinSpace environment that you created.

" + } + }, + "environmentArn": { + "target": "com.amazonaws.finspace#EnvironmentArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the FinSpace environment that you created.

" + } + }, + "environmentUrl": { + "target": "com.amazonaws.finspace#url", + "traits": { + "smithy.api#documentation": "

The sign-in url for the web application of the FinSpace environment you created.

" + } + } + } + }, + "com.amazonaws.finspace#DeleteEnvironment": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspace#DeleteEnvironmentRequest" + }, + "output": { + "target": "com.amazonaws.finspace#DeleteEnvironmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspace#AccessDeniedException" + }, + { + "target": "com.amazonaws.finspace#InternalServerException" + }, + { + "target": "com.amazonaws.finspace#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.finspace#ThrottlingException" + }, + { + "target": "com.amazonaws.finspace#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Delete an FinSpace environment.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/environment/{environmentId}", + "code": 200 + } + } + }, + "com.amazonaws.finspace#DeleteEnvironmentRequest": { + "type": "structure", + "members": { + "environmentId": { + "target": "com.amazonaws.finspace#IdType", + "traits": { + "smithy.api#documentation": "

The identifier for the FinSpace environment.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.finspace#DeleteEnvironmentResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.finspace#Description": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + }, + "smithy.api#pattern": "^[a-zA-Z0-9. ]{1,1000}$" + } + }, + "com.amazonaws.finspace#Environment": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.finspace#EnvironmentName", + "traits": { + "smithy.api#documentation": "

The name of the FinSpace environment.

" + } + }, + "environmentId": { + "target": "com.amazonaws.finspace#IdType", + "traits": { + "smithy.api#documentation": "

The identifier of the FinSpace environment.

" + } + }, + "awsAccountId": { + "target": "com.amazonaws.finspace#IdType", + "traits": { + "smithy.api#documentation": "

The ID of the AWS account in which the FinSpace environment is created.

" + } + }, + "status": { + "target": "com.amazonaws.finspace#EnvironmentStatus", + "traits": { + "smithy.api#documentation": "

The current status of creation of the FinSpace environment.

" + } + }, + "environmentUrl": { + "target": "com.amazonaws.finspace#url", + "traits": { + "smithy.api#documentation": "

The sign-in url for the web application of your FinSpace environment.

" + } + }, + "description": { + "target": "com.amazonaws.finspace#Description", + "traits": { + "smithy.api#documentation": "

The description of the FinSpace environment.

" + } + }, + "environmentArn": { + "target": "com.amazonaws.finspace#EnvironmentArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of your FinSpace environment.

" + } + }, + "sageMakerStudioDomainUrl": { + "target": "com.amazonaws.finspace#SmsDomainUrl", + "traits": { + "smithy.api#documentation": "

The url of the integrated FinSpace notebook environment in your web application.

" + } + }, + "kmsKeyId": { + "target": "com.amazonaws.finspace#KmsKeyId", + "traits": { + "smithy.api#documentation": "

The KMS key id used to encrypt in the FinSpace environment.

" + } + }, + "dedicatedServiceAccountId": { + "target": "com.amazonaws.finspace#IdType", + "traits": { + "smithy.api#documentation": "

The AWS account ID of the dedicated service account associated with your FinSpace\n environment.

" + } + }, + "federationMode": { + "target": "com.amazonaws.finspace#FederationMode", + "traits": { + "smithy.api#documentation": "

The authentication mode for the environment.

" + } + }, + "federationParameters": { + "target": "com.amazonaws.finspace#FederationParameters", + "traits": { + "smithy.api#documentation": "

Configuration information when authentication mode is FEDERATED.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents an FinSpace environment.

" + } + }, + "com.amazonaws.finspace#EnvironmentArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws:finspace:[A-Za-z0-9_/.-]{0,63}:\\d+:environment/[0-9A-Za-z_-]{1,128}$" + } + }, + "com.amazonaws.finspace#EnvironmentList": { + "type": "list", + "member": { + "target": "com.amazonaws.finspace#Environment" + } + }, + "com.amazonaws.finspace#EnvironmentName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z0-9]+[a-zA-Z0-9-]*[a-zA-Z0-9]$" + } + }, + "com.amazonaws.finspace#EnvironmentStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATE_REQUESTED", + "name": "CREATE_REQUESTED" + }, + { + "value": "CREATING", + "name": "CREATING" + }, + { + "value": "CREATED", + "name": "CREATED" + }, + { + "value": "DELETE_REQUESTED", + "name": "DELETE_REQUESTED" + }, + { + "value": "DELETING", + "name": "DELETING" + }, + { + "value": "DELETED", + "name": "DELETED" + }, + { + "value": "FAILED_CREATION", + "name": "FAILED_CREATION" + }, + { + "value": "RETRY_DELETION", + "name": "RETRY_DELETION" + }, + { + "value": "FAILED_DELETION", + "name": "FAILED_DELETION" + }, + { + "value": "SUSPENDED", + "name": "SUSPENDED" + } + ] + } + }, + "com.amazonaws.finspace#FederationAttributeKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 32 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.finspace#FederationMode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "FEDERATED", + "name": "FEDERATED" + }, + { + "value": "LOCAL", + "name": "LOCAL" + } + ] + } + }, + "com.amazonaws.finspace#FederationParameters": { + "type": "structure", + "members": { + "samlMetadataDocument": { + "target": "com.amazonaws.finspace#SamlMetadataDocument", + "traits": { + "smithy.api#documentation": "

SAML 2.0 Metadata document from identity provider (IdP).

" + } + }, + "samlMetadataURL": { + "target": "com.amazonaws.finspace#url", + "traits": { + "smithy.api#documentation": "

Provide the metadata URL from your SAML 2.0 compliant identity provider (IdP).

" + } + }, + "applicationCallBackURL": { + "target": "com.amazonaws.finspace#url", + "traits": { + "smithy.api#documentation": "

The redirect or sign-in URL that should be entered into the SAML 2.0 compliant identity provider configuration\n (IdP).

" + } + }, + "federationURN": { + "target": "com.amazonaws.finspace#urn", + "traits": { + "smithy.api#documentation": "

The Uniform Resource Name (URN). Also referred as Service Provider URN or Audience URI or Service Provider Entity ID.

" + } + }, + "federationProviderName": { + "target": "com.amazonaws.finspace#FederationProviderName", + "traits": { + "smithy.api#documentation": "

Name of the identity provider (IdP).

" + } + }, + "attributeMap": { + "target": "com.amazonaws.finspace#AttributeMap", + "traits": { + "smithy.api#documentation": "

SAML attribute name and value. The name must always be Email and the value should be set to\n the attribute definition in which user email is set. For example, name would be Email and\n value http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress.\n Please check your SAML 2.0 compliant identity provider (IdP) documentation for details.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Configuration information when authentication mode is FEDERATED.

" + } + }, + "com.amazonaws.finspace#FederationProviderName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 32 + }, + "smithy.api#pattern": "[^_\\p{Z}][\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}][^_\\p{Z}]+" + } + }, + "com.amazonaws.finspace#GetEnvironment": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspace#GetEnvironmentRequest" + }, + "output": { + "target": "com.amazonaws.finspace#GetEnvironmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspace#AccessDeniedException" + }, + { + "target": "com.amazonaws.finspace#InternalServerException" + }, + { + "target": "com.amazonaws.finspace#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.finspace#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the FinSpace environment object.

", + "smithy.api#http": { + "method": "GET", + "uri": "/environment/{environmentId}", + "code": 200 + } + } + }, + "com.amazonaws.finspace#GetEnvironmentRequest": { + "type": "structure", + "members": { + "environmentId": { + "target": "com.amazonaws.finspace#IdType", + "traits": { + "smithy.api#documentation": "

The identifier of the FinSpace environment.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.finspace#GetEnvironmentResponse": { + "type": "structure", + "members": { + "environment": { + "target": "com.amazonaws.finspace#Environment", + "traits": { + "smithy.api#documentation": "

The name of the FinSpace environment.

" + } + } + } + }, + "com.amazonaws.finspace#IdType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 26 + }, + "smithy.api#pattern": "^[a-zA-Z0-9]{1,26}$" + } + }, + "com.amazonaws.finspace#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.finspace#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 + } + }, + "com.amazonaws.finspace#InvalidRequestException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.finspace#errorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The request is invalid. Something is wrong with the input to the request.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.finspace#KmsKeyId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + }, + "smithy.api#pattern": "^[a-zA-Z-0-9-:\\/]*$" + } + }, + "com.amazonaws.finspace#LimitExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.finspace#errorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

A service limit or quota is exceeded.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.finspace#ListEnvironments": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspace#ListEnvironmentsRequest" + }, + "output": { + "target": "com.amazonaws.finspace#ListEnvironmentsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspace#InternalServerException" + }, + { + "target": "com.amazonaws.finspace#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

A list of all of your FinSpace environments.

", + "smithy.api#http": { + "method": "GET", + "uri": "/environment", + "code": 200 + } + } + }, + "com.amazonaws.finspace#ListEnvironmentsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.finspace#PaginationToken", + "traits": { + "smithy.api#documentation": "

A token generated by FinSpace that specifies where to continue pagination if a previous\n request was truncated. To get the next set of pages, pass in the nextToken value from the\n response object of the previous page call.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.finspace#ResultLimit", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return in this request.

", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.finspace#ListEnvironmentsResponse": { + "type": "structure", + "members": { + "environments": { + "target": "com.amazonaws.finspace#EnvironmentList", + "traits": { + "smithy.api#documentation": "

A list of all of your FinSpace environments.

" + } + }, + "nextToken": { + "target": "com.amazonaws.finspace#PaginationToken", + "traits": { + "smithy.api#documentation": "

A token that you can use in a subsequent call to retrieve the next set of\n results.

" + } + } + } + }, + "com.amazonaws.finspace#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspace#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.finspace#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspace#InternalServerException" + }, + { + "target": "com.amazonaws.finspace#InvalidRequestException" + }, + { + "target": "com.amazonaws.finspace#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

A list of all tags for a resource.

", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{resourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.finspace#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.finspace#EnvironmentArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name of the resource.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.finspace#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.finspace#TagMap", + "traits": { + "smithy.api#documentation": "

A list of all tags for a resource.

" + } + } + } + }, + "com.amazonaws.finspace#PaginationToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.finspace#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.finspace#errorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

One or more resources can't be found.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.finspace#ResultLimit": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.finspace#SamlMetadataDocument": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1000, + "max": 10000000 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.finspace#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.finspace#errorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

You have exceeded your service quota. To perform the requested action, \n remove some of the relevant resources, or use Service Quotas to request a service quota increase.

", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.finspace#SmsDomainUrl": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + }, + "smithy.api#pattern": "^[a-zA-Z-0-9-:\\/.]*$" + } + }, + "com.amazonaws.finspace#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$" + } + }, + "com.amazonaws.finspace#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.finspace#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.finspace#TagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.finspace#TagKey" + }, + "value": { + "target": "com.amazonaws.finspace#TagValue" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.finspace#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspace#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.finspace#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspace#InternalServerException" + }, + { + "target": "com.amazonaws.finspace#InvalidRequestException" + }, + { + "target": "com.amazonaws.finspace#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Adds metadata tags to a FinSpace resource.

", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{resourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.finspace#TagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.finspace#EnvironmentArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the resource.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.finspace#TagMap", + "traits": { + "smithy.api#documentation": "

One or more tags to be assigned to the resource.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.finspace#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.finspace#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9+-=._:@ ]+$" + } + }, + "com.amazonaws.finspace#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.finspace#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspace#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.finspace#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspace#InternalServerException" + }, + { + "target": "com.amazonaws.finspace#InvalidRequestException" + }, + { + "target": "com.amazonaws.finspace#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes metadata tags from a FinSpace resource.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{resourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.finspace#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.finspace#EnvironmentArn", + "traits": { + "smithy.api#documentation": "

A FinSpace resource from which you want to remove a tag or tags. The value for this\n parameter is an Amazon Resource Name (ARN).

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.finspace#TagKeyList", + "traits": { + "smithy.api#documentation": "

The tag keys (names) of one or more tags to be removed.

", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.finspace#UntagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.finspace#UpdateEnvironment": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspace#UpdateEnvironmentRequest" + }, + "output": { + "target": "com.amazonaws.finspace#UpdateEnvironmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspace#AccessDeniedException" + }, + { + "target": "com.amazonaws.finspace#InternalServerException" + }, + { + "target": "com.amazonaws.finspace#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.finspace#ThrottlingException" + }, + { + "target": "com.amazonaws.finspace#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Update your FinSpace environment.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/environment/{environmentId}", + "code": 200 + } + } + }, + "com.amazonaws.finspace#UpdateEnvironmentRequest": { + "type": "structure", + "members": { + "environmentId": { + "target": "com.amazonaws.finspace#IdType", + "traits": { + "smithy.api#documentation": "

The identifier of the FinSpace environment.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.finspace#EnvironmentName", + "traits": { + "smithy.api#documentation": "

The name of the environment.

" + } + }, + "description": { + "target": "com.amazonaws.finspace#Description", + "traits": { + "smithy.api#documentation": "

The description of the environment.

" + } + }, + "federationMode": { + "target": "com.amazonaws.finspace#FederationMode", + "traits": { + "smithy.api#documentation": "

Authentication mode for the environment.

\n " + } + }, + "federationParameters": { + "target": "com.amazonaws.finspace#FederationParameters" + } + } + }, + "com.amazonaws.finspace#UpdateEnvironmentResponse": { + "type": "structure", + "members": { + "environment": { + "target": "com.amazonaws.finspace#Environment", + "traits": { + "smithy.api#documentation": "

Returns the FinSpace environment object.

" + } + } + } + }, + "com.amazonaws.finspace#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.finspace#errorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by an AWS service.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.finspace#errorMessage": { + "type": "string" + }, + "com.amazonaws.finspace#url": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + }, + "smithy.api#pattern": "^https?://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]" + } + }, + "com.amazonaws.finspace#urn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[A-Za-z0-9._\\-:\\/#\\+]+$" + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/finspacedata.2020-07-13.json b/codegen/sdk-codegen/aws-models/finspacedata.2020-07-13.json new file mode 100644 index 00000000000..d792439b76f --- /dev/null +++ b/codegen/sdk-codegen/aws-models/finspacedata.2020-07-13.json @@ -0,0 +1,712 @@ +{ + "smithy": "1.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "HttpResponseCodeSemantics", + "namespace": "*" + }, + { + "id": "PaginatedTrait", + "namespace": "*" + }, + { + "id": "HttpHeaderTrait", + "namespace": "*" + }, + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "Service", + "namespace": "*" + } + ] + }, + "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", + "arnNamespace": "finspace-api", + "cloudFormationName": "Finspacedata", + "cloudTrailEventSource": "finspacedata.amazonaws.com", + "endpointPrefix": "finspace-api" + }, + "aws.auth#sigv4": { + "name": "finspace-api" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

The FinSpace APIs let you take actions inside the FinSpace environment.

", + "smithy.api#title": "FinSpace Public API" + } + }, + "com.amazonaws.finspacedata#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.finspacedata#errorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

You do not have sufficient access to perform this action.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.finspacedata#ChangeType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "REPLACE", + "name": "REPLACE" + }, + { + "value": "APPEND", + "name": "APPEND" + }, + { + "value": "MODIFY", + "name": "MODIFY" + } + ] + } + }, + "com.amazonaws.finspacedata#ChangesetInfo": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.finspacedata#IdType", + "traits": { + "smithy.api#documentation": "

Unique identifier for a changeset.

" + } + }, + "changesetArn": { + "target": "com.amazonaws.finspacedata#arn", + "traits": { + "smithy.api#documentation": "

The ARN identifier of the changeset.

" + } + }, + "datasetId": { + "target": "com.amazonaws.finspacedata#IdType", + "traits": { + "smithy.api#documentation": "

The unique identifier for the FinSpace dataset in which the changeset is created.

" + } + }, + "changeType": { + "target": "com.amazonaws.finspacedata#ChangeType", + "traits": { + "smithy.api#documentation": "

Change type indicates how a changeset is applied to a dataset.

\n " + } + }, + "sourceType": { + "target": "com.amazonaws.finspacedata#SourceType", + "traits": { + "smithy.api#documentation": "

Type of the data source from which the files to create the changeset are sourced.

\n " + } + }, + "sourceParams": { + "target": "com.amazonaws.finspacedata#stringMap", + "traits": { + "smithy.api#documentation": "

Source path from which the files to create the changeset are sourced.

" + } + }, + "formatType": { + "target": "com.amazonaws.finspacedata#FormatType", + "traits": { + "smithy.api#documentation": "

Format type of the input files loaded into the changeset.

" + } + }, + "formatParams": { + "target": "com.amazonaws.finspacedata#stringMap", + "traits": { + "smithy.api#documentation": "

Structure of the source file(s).

" + } + }, + "createTimestamp": { + "target": "com.amazonaws.finspacedata#Timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp at which the changeset was created in FinSpace.

" + } + }, + "status": { + "target": "com.amazonaws.finspacedata#ChangesetStatus", + "traits": { + "smithy.api#documentation": "

The status of changeset creation operation.

" + } + }, + "errorInfo": { + "target": "com.amazonaws.finspacedata#ErrorInfo", + "traits": { + "smithy.api#documentation": "

The structure with error messages.

" + } + }, + "changesetLabels": { + "target": "com.amazonaws.finspacedata#stringMap", + "traits": { + "smithy.api#documentation": "

Tags associated with the changeset.

" + } + }, + "updatesChangesetId": { + "target": "com.amazonaws.finspacedata#stringValue", + "traits": { + "smithy.api#documentation": "

Unique identifier of the changeset that is updated.

" + } + }, + "updatedByChangesetId": { + "target": "com.amazonaws.finspacedata#stringValue", + "traits": { + "smithy.api#documentation": "

Unique identifier of the changeset that is updated a changeset.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A changeset is unit of data in a dataset.

" + } + }, + "com.amazonaws.finspacedata#ChangesetStatus": { + "type": "string", + "traits": { + "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#CreateChangeset": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspacedata#CreateChangesetRequest" + }, + "output": { + "target": "com.amazonaws.finspacedata#CreateChangesetResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspacedata#AccessDeniedException" + }, + { + "target": "com.amazonaws.finspacedata#InternalServerException" + }, + { + "target": "com.amazonaws.finspacedata#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.finspacedata#ThrottlingException" + }, + { + "target": "com.amazonaws.finspacedata#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a new changeset in a FinSpace dataset.

", + "smithy.api#http": { + "method": "POST", + "uri": "/datasets/{datasetId}/changesets", + "code": 200 + } + } + }, + "com.amazonaws.finspacedata#CreateChangesetRequest": { + "type": "structure", + "members": { + "datasetId": { + "target": "com.amazonaws.finspacedata#IdType", + "traits": { + "smithy.api#documentation": "

The unique identifier for the FinSpace dataset in which the changeset will be\n created.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "changeType": { + "target": "com.amazonaws.finspacedata#ChangeType", + "traits": { + "smithy.api#documentation": "

Option to indicate how a changeset will be applied to a dataset.

\n ", + "smithy.api#required": {} + } + }, + "sourceType": { + "target": "com.amazonaws.finspacedata#SourceType", + "traits": { + "smithy.api#documentation": "

Type of the data source from which the files to create the changeset will be\n sourced.

\n ", + "smithy.api#required": {} + } + }, + "sourceParams": { + "target": "com.amazonaws.finspacedata#stringMap", + "traits": { + "smithy.api#documentation": "

Source path from which the files to create the changeset will be sourced.

", + "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", + "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.

" + } + } + } + }, + "com.amazonaws.finspacedata#CreateChangesetResponse": { + "type": "structure", + "members": { + "changeset": { + "target": "com.amazonaws.finspacedata#ChangesetInfo", + "traits": { + "smithy.api#documentation": "

Returns the changeset details.

" + } + } + } + }, + "com.amazonaws.finspacedata#Credentials": { + "type": "structure", + "members": { + "accessKeyId": { + "target": "com.amazonaws.finspacedata#stringValueLength1to255", + "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": "

Set short term API credentials.

" + } + }, + "com.amazonaws.finspacedata#ErrorCategory": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "The_inputs_to_this_request_are_invalid", + "name": "VALIDATION" + }, + { + "value": "Service_limits_have_been_exceeded", + "name": "SERVICE_QUOTA_EXCEEDED" + }, + { + "value": "Missing_required_permission_to_perform_this_request", + "name": "ACCESS_DENIED" + }, + { + "value": "One_or_more_inputs_to_this_request_were_not_found", + "name": "RESOURCE_NOT_FOUND" + }, + { + "value": "The_system_temporarily_lacks_sufficient_resources_to_process_the_request", + "name": "THROTTLING" + }, + { + "value": "An_internal_error_has_occurred", + "name": "INTERNAL_SERVICE_EXCEPTION" + }, + { + "value": "Cancelled", + "name": "CANCELLED" + }, + { + "value": "A_user_recoverable_error_has_occurred", + "name": "USER_RECOVERABLE" + } + ] + } + }, + "com.amazonaws.finspacedata#ErrorInfo": { + "type": "structure", + "members": { + "errorMessage": { + "target": "com.amazonaws.finspacedata#stringValueMaxLength1000", + "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 " + } + } + }, + "traits": { + "smithy.api#documentation": "

Error message.

" + } + }, + "com.amazonaws.finspacedata#FormatType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CSV", + "name": "CSV" + }, + { + "value": "JSON", + "name": "JSON" + }, + { + "value": "PARQUET", + "name": "PARQUET" + }, + { + "value": "XML", + "name": "XML" + } + ] + } + }, + "com.amazonaws.finspacedata#GetProgrammaticAccessCredentials": { + "type": "operation", + "input": { + "target": "com.amazonaws.finspacedata#GetProgrammaticAccessCredentialsRequest" + }, + "output": { + "target": "com.amazonaws.finspacedata#GetProgrammaticAccessCredentialsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.finspacedata#AccessDeniedException" + }, + { + "target": "com.amazonaws.finspacedata#InternalServerException" + }, + { + "target": "com.amazonaws.finspacedata#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Request programmatic credentials to use with Habanero 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 habanero environment identifier.

", + "smithy.api#httpQuery": "environmentId", + "smithy.api#required": {} + } + } + } + }, + "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.

" + } + } + } + }, + "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 to copy your files from a source location to stage or use\n as a scratch space in Habanero 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 " + } + } + } + }, + "com.amazonaws.finspacedata#GetWorkingLocationResponse": { + "type": "structure", + "members": { + "s3Uri": { + "target": "com.amazonaws.finspacedata#stringValueLength1to1024", + "traits": { + "smithy.api#documentation": "

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#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 + } + }, + "com.amazonaws.finspacedata#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.finspacedata#errorMessage" + } + }, + "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 + } + }, + "com.amazonaws.finspacedata#Timestamp": { + "type": "timestamp" + }, + "com.amazonaws.finspacedata#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.finspacedata#errorMessage" + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by an AWS service.

", + "smithy.api#error": "client", + "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": { + "smithy.api#enum": [ + { + "value": "INGESTION", + "name": "INGESTION" + }, + { + "value": "SAGEMAKER", + "name": "SAGEMAKER" + } + ] + } + }, + "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": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.finspacedata#stringValueLength1to255": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + } + } + }, + "com.amazonaws.finspacedata#stringValueLength1to63": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 63 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.finspacedata#stringValueMaxLength1000": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1000 + } + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/iotwireless.2020-11-22.json b/codegen/sdk-codegen/aws-models/iotwireless.2020-11-22.json index 9cdc38ccfeb..6b2dc484f7e 100644 --- a/codegen/sdk-codegen/aws-models/iotwireless.2020-11-22.json +++ b/codegen/sdk-codegen/aws-models/iotwireless.2020-11-22.json @@ -515,10 +515,16 @@ "target": "com.amazonaws.iotwireless#Message" }, "ResourceId": { - "target": "com.amazonaws.iotwireless#ResourceId" + "target": "com.amazonaws.iotwireless#ResourceId", + "traits": { + "smithy.api#documentation": "

Id of the resource in the conflicting operation.

" + } }, "ResourceType": { - "target": "com.amazonaws.iotwireless#ResourceType" + "target": "com.amazonaws.iotwireless#ResourceType", + "traits": { + "smithy.api#documentation": "

Type of the resource in the conflicting operation.

" + } } }, "traits": { @@ -3172,6 +3178,32 @@ "smithy.api#pattern": "[a-fA-F0-9]{16}" } }, + "com.amazonaws.iotwireless#JoinEuiFilters": { + "type": "list", + "member": { + "target": "com.amazonaws.iotwireless#JoinEuiRange" + }, + "traits": { + "smithy.api#documentation": "

A list of JoinEuiRange used by LoRa gateways to filter LoRa frames.

", + "smithy.api#length": { + "min": 0, + "max": 3 + } + } + }, + "com.amazonaws.iotwireless#JoinEuiRange": { + "type": "list", + "member": { + "target": "com.amazonaws.iotwireless#JoinEui" + }, + "traits": { + "smithy.api#documentation": "

A pair of join EUI describing a range [BegEui, EndEui], both ends are inclusive.

", + "smithy.api#length": { + "min": 2, + "max": 2 + } + } + }, "com.amazonaws.iotwireless#ListDestinations": { "type": "operation", "input": { @@ -3989,6 +4021,15 @@ "traits": { "smithy.api#documentation": "

The frequency band (RFRegion) value.

" } + }, + "JoinEuiFilters": { + "target": "com.amazonaws.iotwireless#JoinEuiFilters" + }, + "NetIdFilters": { + "target": "com.amazonaws.iotwireless#NetIdFilters" + }, + "SubBands": { + "target": "com.amazonaws.iotwireless#SubBands" } }, "traits": { @@ -4396,6 +4437,26 @@ } } }, + "com.amazonaws.iotwireless#NetId": { + "type": "string", + "traits": { + "smithy.api#documentation": "

LoRaWAN network ID.

", + "smithy.api#pattern": "[a-fA-F0-9]{6}" + } + }, + "com.amazonaws.iotwireless#NetIdFilters": { + "type": "list", + "member": { + "target": "com.amazonaws.iotwireless#NetId" + }, + "traits": { + "smithy.api#documentation": "

A list of NetId values that are used by LoRa gateways to filter the uplink frames.

", + "smithy.api#length": { + "min": 0, + "max": 10 + } + } + }, "com.amazonaws.iotwireless#NextToken": { "type": "string", "traits": { @@ -4584,10 +4645,16 @@ "target": "com.amazonaws.iotwireless#Message" }, "ResourceId": { - "target": "com.amazonaws.iotwireless#ResourceId" + "target": "com.amazonaws.iotwireless#ResourceId", + "traits": { + "smithy.api#documentation": "

Id of the not found resource.

" + } }, "ResourceType": { - "target": "com.amazonaws.iotwireless#ResourceType" + "target": "com.amazonaws.iotwireless#ResourceType", + "traits": { + "smithy.api#documentation": "

Type of the font found resource.

" + } } }, "traits": { @@ -5079,6 +5146,29 @@ } } }, + "com.amazonaws.iotwireless#SubBand": { + "type": "integer", + "traits": { + "smithy.api#documentation": "

A subset of supported frequency channels in a certain RFRegion.

", + "smithy.api#range": { + "min": 1, + "max": 8 + } + } + }, + "com.amazonaws.iotwireless#SubBands": { + "type": "list", + "member": { + "target": "com.amazonaws.iotwireless#SubBand" + }, + "traits": { + "smithy.api#documentation": "

A list of integer indicating which sub bands are supported by LoRa gateway.

", + "smithy.api#length": { + "min": 0, + "max": 8 + } + } + }, "com.amazonaws.iotwireless#Supports32BitFCnt": { "type": "boolean" }, @@ -5309,7 +5399,10 @@ "target": "com.amazonaws.iotwireless#Message" }, "ResourceName": { - "target": "com.amazonaws.iotwireless#AmazonResourceName" + "target": "com.amazonaws.iotwireless#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

Name of the resource that exceeds maximum number of tags allowed.

" + } } }, "traits": { @@ -5703,6 +5796,12 @@ "traits": { "smithy.api#documentation": "

A new description of the resource.

" } + }, + "JoinEuiFilters": { + "target": "com.amazonaws.iotwireless#JoinEuiFilters" + }, + "NetIdFilters": { + "target": "com.amazonaws.iotwireless#NetIdFilters" } } }, diff --git a/codegen/sdk-codegen/aws-models/kinesisanalyticsv2.2018-05-23.json b/codegen/sdk-codegen/aws-models/kinesisanalyticsv2.2018-05-23.json index 428311d19c8..d3daea0937d 100644 --- a/codegen/sdk-codegen/aws-models/kinesisanalyticsv2.2018-05-23.json +++ b/codegen/sdk-codegen/aws-models/kinesisanalyticsv2.2018-05-23.json @@ -813,7 +813,7 @@ "ApplicationMaintenanceConfigurationDescription": { "target": "com.amazonaws.kinesisanalyticsv2#ApplicationMaintenanceConfigurationDescription", "traits": { - "smithy.api#documentation": "

Describes the time window for automatic application maintenance.

" + "smithy.api#documentation": "

The details of the maintenance configuration for the application.

" } }, "ApplicationVersionUpdatedFrom": { @@ -833,6 +833,12 @@ "traits": { "smithy.api#documentation": "

A value you use to implement strong concurrency for application updates.

" } + }, + "ApplicationVersionRolledBackTo": { + "target": "com.amazonaws.kinesisanalyticsv2#ApplicationVersionId", + "traits": { + "smithy.api#documentation": "

The version to which you want to roll back the application.

" + } } }, "traits": { @@ -845,20 +851,20 @@ "ApplicationMaintenanceWindowStartTime": { "target": "com.amazonaws.kinesisanalyticsv2#ApplicationMaintenanceWindowStartTime", "traits": { - "smithy.api#documentation": "

The start time for the automatic maintenance window.

", + "smithy.api#documentation": "

The start time for the maintenance window.

", "smithy.api#required": {} } }, "ApplicationMaintenanceWindowEndTime": { "target": "com.amazonaws.kinesisanalyticsv2#ApplicationMaintenanceWindowEndTime", "traits": { - "smithy.api#documentation": "

The end time for the automatic maintenance window.

", + "smithy.api#documentation": "

The end time for the maintenance window.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Describes the time window for automatic application maintenance.

" + "smithy.api#documentation": "

The details of the maintenance configuration for the application.

" } }, "com.amazonaws.kinesisanalyticsv2#ApplicationMaintenanceConfigurationUpdate": { @@ -867,13 +873,13 @@ "ApplicationMaintenanceWindowStartTimeUpdate": { "target": "com.amazonaws.kinesisanalyticsv2#ApplicationMaintenanceWindowStartTime", "traits": { - "smithy.api#documentation": "

The updated start time for the automatic maintenance window.

", + "smithy.api#documentation": "

The updated start time for the maintenance window.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Describes the updated time window for automatic application maintenance.

" + "smithy.api#documentation": "

Describes the updated maintenance configuration for the application.

" } }, "com.amazonaws.kinesisanalyticsv2#ApplicationMaintenanceWindowEndTime": { @@ -1034,6 +1040,10 @@ { "value": "ROLLING_BACK", "name": "ROLLING_BACK" + }, + { + "value": "ROLLED_BACK", + "name": "ROLLED_BACK" } ] } @@ -1097,6 +1107,34 @@ } } }, + "com.amazonaws.kinesisanalyticsv2#ApplicationVersionSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.kinesisanalyticsv2#ApplicationVersionSummary" + } + }, + "com.amazonaws.kinesisanalyticsv2#ApplicationVersionSummary": { + "type": "structure", + "members": { + "ApplicationVersionId": { + "target": "com.amazonaws.kinesisanalyticsv2#ApplicationVersionId", + "traits": { + "smithy.api#documentation": "

The ID of the application version. Kinesis Data Analytics updates the ApplicationVersionId each time you update the application.

", + "smithy.api#required": {} + } + }, + "ApplicationStatus": { + "target": "com.amazonaws.kinesisanalyticsv2#ApplicationStatus", + "traits": { + "smithy.api#documentation": "

The status of the application.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The summary of the application version.

" + } + }, "com.amazonaws.kinesisanalyticsv2#AuthorizedUrl": { "type": "string", "traits": { @@ -2313,6 +2351,56 @@ } } }, + "com.amazonaws.kinesisanalyticsv2#DescribeApplicationVersion": { + "type": "operation", + "input": { + "target": "com.amazonaws.kinesisanalyticsv2#DescribeApplicationVersionRequest" + }, + "output": { + "target": "com.amazonaws.kinesisanalyticsv2#DescribeApplicationVersionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.kinesisanalyticsv2#InvalidArgumentException" + }, + { + "target": "com.amazonaws.kinesisanalyticsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.kinesisanalyticsv2#UnsupportedOperationException" + } + ], + "traits": { + "smithy.api#documentation": "

Provides a detailed description of a specified version of the application. To see a list of all the versions of an application, invoke the ListApplicationVersions operation.

\n \n

This operation is supported only for Amazon Kinesis Data Analytics for Apache Flink.

\n
" + } + }, + "com.amazonaws.kinesisanalyticsv2#DescribeApplicationVersionRequest": { + "type": "structure", + "members": { + "ApplicationName": { + "target": "com.amazonaws.kinesisanalyticsv2#ApplicationName", + "traits": { + "smithy.api#documentation": "

The name of the application for which you want to get the version description.

", + "smithy.api#required": {} + } + }, + "ApplicationVersionId": { + "target": "com.amazonaws.kinesisanalyticsv2#ApplicationVersionId", + "traits": { + "smithy.api#documentation": "

The ID of the application version for which you want to get the description.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.kinesisanalyticsv2#DescribeApplicationVersionResponse": { + "type": "structure", + "members": { + "ApplicationVersionDetail": { + "target": "com.amazonaws.kinesisanalyticsv2#ApplicationDetail" + } + } + }, "com.amazonaws.kinesisanalyticsv2#DestinationSchema": { "type": "structure", "members": { @@ -3103,6 +3191,9 @@ { "target": "com.amazonaws.kinesisanalyticsv2#DescribeApplicationSnapshot" }, + { + "target": "com.amazonaws.kinesisanalyticsv2#DescribeApplicationVersion" + }, { "target": "com.amazonaws.kinesisanalyticsv2#DiscoverInputSchema" }, @@ -3112,6 +3203,9 @@ { "target": "com.amazonaws.kinesisanalyticsv2#ListApplicationSnapshots" }, + { + "target": "com.amazonaws.kinesisanalyticsv2#ListApplicationVersions" + }, { "target": "com.amazonaws.kinesisanalyticsv2#ListTagsForResource" }, @@ -3484,6 +3578,80 @@ } } }, + "com.amazonaws.kinesisanalyticsv2#ListApplicationVersions": { + "type": "operation", + "input": { + "target": "com.amazonaws.kinesisanalyticsv2#ListApplicationVersionsRequest" + }, + "output": { + "target": "com.amazonaws.kinesisanalyticsv2#ListApplicationVersionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.kinesisanalyticsv2#InvalidArgumentException" + }, + { + "target": "com.amazonaws.kinesisanalyticsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.kinesisanalyticsv2#UnsupportedOperationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all the versions for the specified application, including versions that were rolled back. The response also includes a summary of the configuration \n associated with each version.

\n \n

To get the complete description of a specific application version, invoke the DescribeApplicationVersion operation.

\n \n

This operation is supported only for Amazon Kinesis Data Analytics for Apache Flink.

\n
" + } + }, + "com.amazonaws.kinesisanalyticsv2#ListApplicationVersionsInputLimit": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.kinesisanalyticsv2#ListApplicationVersionsRequest": { + "type": "structure", + "members": { + "ApplicationName": { + "target": "com.amazonaws.kinesisanalyticsv2#ApplicationName", + "traits": { + "smithy.api#documentation": "

The name of the application for which you want to list all versions.

", + "smithy.api#required": {} + } + }, + "Limit": { + "target": "com.amazonaws.kinesisanalyticsv2#ListApplicationVersionsInputLimit", + "traits": { + "smithy.api#documentation": "

The maximum number of versions to list in this invocation of the operation.

" + } + }, + "NextToken": { + "target": "com.amazonaws.kinesisanalyticsv2#NextToken", + "traits": { + "smithy.api#documentation": "

If a previous invocation of this operation returned a pagination token, pass it into this value to retrieve the next set of results. For more information about pagination, see \n Using the AWS Command Line Interface's Pagination Options.

" + } + } + } + }, + "com.amazonaws.kinesisanalyticsv2#ListApplicationVersionsResponse": { + "type": "structure", + "members": { + "ApplicationVersionSummaries": { + "target": "com.amazonaws.kinesisanalyticsv2#ApplicationVersionSummaries", + "traits": { + "smithy.api#documentation": "

A list of the application versions and the associated configuration summaries. The list includes application versions that were rolled back.

\n

To get the complete description of a specific application version, invoke the DescribeApplicationVersion operation.

" + } + }, + "NextToken": { + "target": "com.amazonaws.kinesisanalyticsv2#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination token for the next set of results, or null if there are no additional results. \n To retrieve the next set of items, pass this token into a subsequent invocation of this operation. For more information about pagination, see \n Using the AWS Command Line Interface's Pagination Options.

" + } + } + } + }, "com.amazonaws.kinesisanalyticsv2#ListApplications": { "type": "operation", "input": { @@ -5442,7 +5610,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the configuration for the automatic maintenance that Kinesis Data Analytics performs on the application. For information about automatic application maintenance, see Kinesis Data Analytics for Apache Flink Maintenance.

" + "smithy.api#documentation": "

Updates the maintenance configuration of the Kinesis Data Analytics application.

\n

You can invoke this operation on an application that is in one of the two following\n states: READY or RUNNING. If you invoke it when the application is\n in a state other than these two states, it throws a ResourceInUseException. The\n service makes use of the updated configuration the next time it schedules maintenance for the\n application. If you invoke this operation after the service schedules maintenance, the service\n will apply the configuration update the next time it schedules maintenance for the\n application. This means that you might not see the maintenance configuration update applied to\n the maintenance process that follows a successful invocation of this operation, but to the\n following maintenance process instead.

\n

To see the current maintenance configuration of your application, invoke the\n DescribeApplication operation.

\n

For information about application maintenance, see Kinesis Data Analytics for Apache Flink Maintenance.

\n \n

This operation is supported only for Amazon Kinesis Data Analytics for Apache Flink.

\n
" } }, "com.amazonaws.kinesisanalyticsv2#UpdateApplicationMaintenanceConfigurationRequest": { @@ -5451,7 +5619,7 @@ "ApplicationName": { "target": "com.amazonaws.kinesisanalyticsv2#ApplicationName", "traits": { - "smithy.api#documentation": "

The name of the application for which you want to update the maintenance time window.

", + "smithy.api#documentation": "

The name of the application for which you want to update the maintenance configuration.

", "smithy.api#required": {} } }, diff --git a/codegen/sdk-codegen/aws-models/lakeformation.2017-03-31.json b/codegen/sdk-codegen/aws-models/lakeformation.2017-03-31.json index e94ee2510c8..35f1a1610b4 100644 --- a/codegen/sdk-codegen/aws-models/lakeformation.2017-03-31.json +++ b/codegen/sdk-codegen/aws-models/lakeformation.2017-03-31.json @@ -33,12 +33,21 @@ "type": "service", "version": "2017-03-31", "operations": [ + { + "target": "com.amazonaws.lakeformation#AddLFTagsToResource" + }, { "target": "com.amazonaws.lakeformation#BatchGrantPermissions" }, { "target": "com.amazonaws.lakeformation#BatchRevokePermissions" }, + { + "target": "com.amazonaws.lakeformation#CreateLFTag" + }, + { + "target": "com.amazonaws.lakeformation#DeleteLFTag" + }, { "target": "com.amazonaws.lakeformation#DeregisterResource" }, @@ -51,9 +60,18 @@ { "target": "com.amazonaws.lakeformation#GetEffectivePermissionsForPath" }, + { + "target": "com.amazonaws.lakeformation#GetLFTag" + }, + { + "target": "com.amazonaws.lakeformation#GetResourceLFTags" + }, { "target": "com.amazonaws.lakeformation#GrantPermissions" }, + { + "target": "com.amazonaws.lakeformation#ListLFTags" + }, { "target": "com.amazonaws.lakeformation#ListPermissions" }, @@ -66,9 +84,21 @@ { "target": "com.amazonaws.lakeformation#RegisterResource" }, + { + "target": "com.amazonaws.lakeformation#RemoveLFTagsFromResource" + }, { "target": "com.amazonaws.lakeformation#RevokePermissions" }, + { + "target": "com.amazonaws.lakeformation#SearchDatabasesByLFTags" + }, + { + "target": "com.amazonaws.lakeformation#SearchTablesByLFTags" + }, + { + "target": "com.amazonaws.lakeformation#UpdateLFTag" + }, { "target": "com.amazonaws.lakeformation#UpdateResource" } @@ -89,6 +119,89 @@ "smithy.api#title": "AWS Lake Formation" } }, + "com.amazonaws.lakeformation#AccessDeniedException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.lakeformation#MessageString", + "traits": { + "smithy.api#documentation": "

A message describing the problem.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Access to a resource was denied.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.lakeformation#AddLFTagsToResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#AddLFTagsToResourceRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#AddLFTagsToResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Attaches one or more tags to an existing resource.

" + } + }, + "com.amazonaws.lakeformation#AddLFTagsToResourceRequest": { + "type": "structure", + "members": { + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" + } + }, + "Resource": { + "target": "com.amazonaws.lakeformation#Resource", + "traits": { + "smithy.api#documentation": "

The resource to which to attach a tag.

", + "smithy.api#required": {} + } + }, + "LFTags": { + "target": "com.amazonaws.lakeformation#LFTagsList", + "traits": { + "smithy.api#documentation": "

The tags to attach to the resource.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.lakeformation#AddLFTagsToResourceResponse": { + "type": "structure", + "members": { + "Failures": { + "target": "com.amazonaws.lakeformation#LFTagErrors", + "traits": { + "smithy.api#documentation": "

A list of failures to tag the resource.

" + } + } + } + }, "com.amazonaws.lakeformation#AlreadyExistsException": { "type": "structure", "members": { @@ -273,6 +386,12 @@ } } }, + "com.amazonaws.lakeformation#BooleanNullable": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, "com.amazonaws.lakeformation#CatalogIdString": { "type": "string", "traits": { @@ -290,6 +409,32 @@ "smithy.api#documentation": "

A structure for the catalog object.

" } }, + "com.amazonaws.lakeformation#ColumnLFTag": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.lakeformation#NameString", + "traits": { + "smithy.api#documentation": "

The name of a column resource.

" + } + }, + "LFTags": { + "target": "com.amazonaws.lakeformation#LFTagsList", + "traits": { + "smithy.api#documentation": "

The tags attached to a column resource.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure containing the name of a column resource and the tags attached to it.

" + } + }, + "com.amazonaws.lakeformation#ColumnLFTagsList": { + "type": "list", + "member": { + "target": "com.amazonaws.lakeformation#ColumnLFTag" + } + }, "com.amazonaws.lakeformation#ColumnNames": { "type": "list", "member": { @@ -376,6 +521,67 @@ "smithy.api#error": "client" } }, + "com.amazonaws.lakeformation#CreateLFTag": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#CreateLFTagRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#CreateLFTagResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + }, + { + "target": "com.amazonaws.lakeformation#ResourceNumberLimitExceededException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a tag with the specified name and values.

" + } + }, + "com.amazonaws.lakeformation#CreateLFTagRequest": { + "type": "structure", + "members": { + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" + } + }, + "TagKey": { + "target": "com.amazonaws.lakeformation#LFTagKey", + "traits": { + "smithy.api#documentation": "

The key-name for the tag.

", + "smithy.api#required": {} + } + }, + "TagValues": { + "target": "com.amazonaws.lakeformation#TagValueList", + "traits": { + "smithy.api#documentation": "

A list of possible values an attribute can take.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.lakeformation#CreateLFTagResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.lakeformation#DataLakePrincipal": { "type": "structure", "members": { @@ -430,6 +636,22 @@ { "value": "DATA_LOCATION", "name": "DATA_LOCATION" + }, + { + "value": "LF_TAG", + "name": "LF_TAG" + }, + { + "value": "LF_TAG_POLICY", + "name": "LF_TAG_POLICY" + }, + { + "value": "LF_TAG_POLICY_DATABASE", + "name": "LF_TAG_POLICY_DATABASE" + }, + { + "value": "LF_TAG_POLICY_TABLE", + "name": "LF_TAG_POLICY_TABLE" } ] } @@ -487,6 +709,12 @@ "smithy.api#documentation": "

A structure for a data location object where permissions are granted or revoked.

" } }, + "com.amazonaws.lakeformation#DatabaseLFTagsList": { + "type": "list", + "member": { + "target": "com.amazonaws.lakeformation#TaggedDatabase" + } + }, "com.amazonaws.lakeformation#DatabaseResource": { "type": "structure", "members": { @@ -508,6 +736,57 @@ "smithy.api#documentation": "

A structure for the database object.

" } }, + "com.amazonaws.lakeformation#DeleteLFTag": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#DeleteLFTagRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#DeleteLFTagResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the specified tag key name. If the attribute key does not exist or the tag does not exist, then the operation will not do anything. If the attribute key exists, then the operation checks if any resources are tagged with this attribute key, if yes, the API throws a 400 Exception with the message \"Delete not allowed\" as the tag key is still attached with resources. You can consider untagging resources with this tag key.

" + } + }, + "com.amazonaws.lakeformation#DeleteLFTagRequest": { + "type": "structure", + "members": { + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" + } + }, + "TagKey": { + "target": "com.amazonaws.lakeformation#LFTagKey", + "traits": { + "smithy.api#documentation": "

The key-name for the tag to delete.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.lakeformation#DeleteLFTagResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.lakeformation#DeregisterResource": { "type": "operation", "input": { @@ -615,12 +894,12 @@ "ResourceShare": { "target": "com.amazonaws.lakeformation#ResourceShareList", "traits": { - "smithy.api#documentation": "

A share resource ARN for a catalog resource shared through AWS Resource Access Manager (AWS RAM).

" + "smithy.api#documentation": "

A resource share ARN for a catalog resource shared through AWS Resource Access Manager (AWS RAM).

" } } }, "traits": { - "smithy.api#documentation": "

A structure containing the additional details to be returned in the AdditionalDetails attribute of PrincipalResourcePermissions.

\n \n

If a catalog resource is shared through AWS Resource Access Manager (AWS RAM), then there will exist a corresponding RAM share resource ARN.

" + "smithy.api#documentation": "

A structure containing the additional details to be returned in the AdditionalDetails attribute of PrincipalResourcePermissions.

\n \n

If a catalog resource is shared through AWS Resource Access Manager (AWS RAM), then there will exist a corresponding RAM resource share ARN.

" } }, "com.amazonaws.lakeformation#EntityNotFoundException": { @@ -658,6 +937,18 @@ "smithy.api#documentation": "

Contains details about an error.

" } }, + "com.amazonaws.lakeformation#Expression": { + "type": "list", + "member": { + "target": "com.amazonaws.lakeformation#LFTag" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + } + } + }, "com.amazonaws.lakeformation#FieldNameString": { "type": "string", "traits": { @@ -838,30 +1129,36 @@ } } }, - "com.amazonaws.lakeformation#GrantPermissions": { + "com.amazonaws.lakeformation#GetLFTag": { "type": "operation", "input": { - "target": "com.amazonaws.lakeformation#GrantPermissionsRequest" + "target": "com.amazonaws.lakeformation#GetLFTagRequest" }, "output": { - "target": "com.amazonaws.lakeformation#GrantPermissionsResponse" + "target": "com.amazonaws.lakeformation#GetLFTagResponse" }, "errors": [ { - "target": "com.amazonaws.lakeformation#ConcurrentModificationException" + "target": "com.amazonaws.lakeformation#AccessDeniedException" }, { "target": "com.amazonaws.lakeformation#EntityNotFoundException" }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, { "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" } ], "traits": { - "smithy.api#documentation": "

Grants permissions to the principal to access metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3.

\n\t

For information about permissions, see Security and Access Control to Metadata and Data.

" + "smithy.api#documentation": "

Returns a tag definition.

" } }, - "com.amazonaws.lakeformation#GrantPermissionsRequest": { + "com.amazonaws.lakeformation#GetLFTagRequest": { "type": "structure", "members": { "CatalogId": { @@ -870,70 +1167,118 @@ "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" } }, - "Principal": { - "target": "com.amazonaws.lakeformation#DataLakePrincipal", + "TagKey": { + "target": "com.amazonaws.lakeformation#LFTagKey", "traits": { - "smithy.api#documentation": "

The principal to be granted the permissions on the resource. Supported principals are IAM users or IAM roles, and they are defined by their principal type and their ARN.

\n\t

Note that if you define a resource with a particular ARN, then later delete, and recreate a resource with that same ARN, the resource maintains the permissions already granted.

", + "smithy.api#documentation": "

The key-name for the tag.

", "smithy.api#required": {} } - }, - "Resource": { - "target": "com.amazonaws.lakeformation#Resource", + } + } + }, + "com.amazonaws.lakeformation#GetLFTagResponse": { + "type": "structure", + "members": { + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", "traits": { - "smithy.api#documentation": "

The resource to which permissions are to be granted. Resources in AWS Lake Formation are the Data Catalog, databases, and tables.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" } }, - "Permissions": { - "target": "com.amazonaws.lakeformation#PermissionList", + "TagKey": { + "target": "com.amazonaws.lakeformation#LFTagKey", "traits": { - "smithy.api#documentation": "

The permissions granted to the principal on the resource. AWS Lake Formation defines privileges to grant and revoke access to metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3. AWS Lake Formation requires that each principal be authorized to perform a specific task on AWS Lake Formation resources.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The key-name for the tag.

" } }, - "PermissionsWithGrantOption": { - "target": "com.amazonaws.lakeformation#PermissionList", + "TagValues": { + "target": "com.amazonaws.lakeformation#TagValueList", "traits": { - "smithy.api#documentation": "

Indicates a list of the granted permissions that the principal may pass to other users. These permissions may only be a subset of the permissions granted in the Privileges.

" + "smithy.api#documentation": "

A list of possible values an attribute can take.

" } } } }, - "com.amazonaws.lakeformation#GrantPermissionsResponse": { - "type": "structure", - "members": {} - }, - "com.amazonaws.lakeformation#IAMRoleArn": { - "type": "string", + "com.amazonaws.lakeformation#GetResourceLFTags": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#GetResourceLFTagsRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#GetResourceLFTagsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#GlueEncryptionException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], "traits": { - "smithy.api#pattern": "arn:aws:iam::[0-9]*:role/.*" + "smithy.api#documentation": "

Returns the tags applied to a resource.

" } }, - "com.amazonaws.lakeformation#Identifier": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 255 + "com.amazonaws.lakeformation#GetResourceLFTagsRequest": { + "type": "structure", + "members": { + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" + } + }, + "Resource": { + "target": "com.amazonaws.lakeformation#Resource", + "traits": { + "smithy.api#documentation": "

The resource for which you want to return tags.

", + "smithy.api#required": {} + } + }, + "ShowAssignedLFTags": { + "target": "com.amazonaws.lakeformation#BooleanNullable", + "traits": { + "smithy.api#documentation": "

Indicates whether to show the assigned tags.

" + } } } }, - "com.amazonaws.lakeformation#InternalServiceException": { + "com.amazonaws.lakeformation#GetResourceLFTagsResponse": { "type": "structure", "members": { - "Message": { - "target": "com.amazonaws.lakeformation#MessageString", + "LFTagOnDatabase": { + "target": "com.amazonaws.lakeformation#LFTagsList", "traits": { - "smithy.api#documentation": "

A message describing the problem.

" + "smithy.api#documentation": "

A list of tags applied to a database resource.

" + } + }, + "LFTagsOnTable": { + "target": "com.amazonaws.lakeformation#LFTagsList", + "traits": { + "smithy.api#documentation": "

A list of tags applied to a table resource.

" + } + }, + "LFTagsOnColumns": { + "target": "com.amazonaws.lakeformation#ColumnLFTagsList", + "traits": { + "smithy.api#documentation": "

A list of tags applied to a column resource.

" } } - }, - "traits": { - "smithy.api#documentation": "

An internal service error occurred.

", - "smithy.api#error": "server" } }, - "com.amazonaws.lakeformation#InvalidInputException": { + "com.amazonaws.lakeformation#GlueEncryptionException": { "type": "structure", "members": { "Message": { @@ -944,42 +1289,34 @@ } }, "traits": { - "smithy.api#documentation": "

The input provided was not valid.

", + "smithy.api#documentation": "

An encryption operation failed.

", "smithy.api#error": "client" } }, - "com.amazonaws.lakeformation#LastModifiedTimestamp": { - "type": "timestamp" - }, - "com.amazonaws.lakeformation#ListPermissions": { + "com.amazonaws.lakeformation#GrantPermissions": { "type": "operation", "input": { - "target": "com.amazonaws.lakeformation#ListPermissionsRequest" + "target": "com.amazonaws.lakeformation#GrantPermissionsRequest" }, "output": { - "target": "com.amazonaws.lakeformation#ListPermissionsResponse" + "target": "com.amazonaws.lakeformation#GrantPermissionsResponse" }, "errors": [ { - "target": "com.amazonaws.lakeformation#InternalServiceException" + "target": "com.amazonaws.lakeformation#ConcurrentModificationException" }, { - "target": "com.amazonaws.lakeformation#InvalidInputException" + "target": "com.amazonaws.lakeformation#EntityNotFoundException" }, { - "target": "com.amazonaws.lakeformation#OperationTimeoutException" + "target": "com.amazonaws.lakeformation#InvalidInputException" } ], "traits": { - "smithy.api#documentation": "

Returns a list of the principal permissions on the resource, filtered by the permissions of the caller. For example, if you are granted an ALTER permission, you are able to see only the principal permissions for ALTER.

\n\t

This operation returns only those permissions that have been explicitly granted.

\n\t

For information about permissions, see Security and Access Control to Metadata and Data.

", - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" - } + "smithy.api#documentation": "

Grants permissions to the principal to access metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3.

\n\t

For information about permissions, see Security and Access Control to Metadata and Data.

" } }, - "com.amazonaws.lakeformation#ListPermissionsRequest": { + "com.amazonaws.lakeformation#GrantPermissionsRequest": { "type": "structure", "members": { "CatalogId": { @@ -991,162 +1328,516 @@ "Principal": { "target": "com.amazonaws.lakeformation#DataLakePrincipal", "traits": { - "smithy.api#documentation": "

Specifies a principal to filter the permissions returned.

" - } - }, - "ResourceType": { - "target": "com.amazonaws.lakeformation#DataLakeResourceType", - "traits": { - "smithy.api#documentation": "

Specifies a resource type to filter the permissions returned.

" + "smithy.api#documentation": "

The principal to be granted the permissions on the resource. Supported principals are IAM users or IAM roles, and they are defined by their principal type and their ARN.

\n\t

Note that if you define a resource with a particular ARN, then later delete, and recreate a resource with that same ARN, the resource maintains the permissions already granted.

", + "smithy.api#required": {} } }, "Resource": { "target": "com.amazonaws.lakeformation#Resource", "traits": { - "smithy.api#documentation": "

A resource where you will get a list of the principal permissions.

\n

This operation does not support getting privileges on a table with columns. Instead, call this operation on the table, and the operation returns the table and the table w columns.

" + "smithy.api#documentation": "

The resource to which permissions are to be granted. Resources in AWS Lake Formation are the Data Catalog, databases, and tables.

", + "smithy.api#required": {} } }, - "NextToken": { - "target": "com.amazonaws.lakeformation#Token", + "Permissions": { + "target": "com.amazonaws.lakeformation#PermissionList", "traits": { - "smithy.api#documentation": "

A continuation token, if this is not the first call to retrieve this list.

" + "smithy.api#documentation": "

The permissions granted to the principal on the resource. AWS Lake Formation defines privileges to grant and revoke access to metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3. AWS Lake Formation requires that each principal be authorized to perform a specific task on AWS Lake Formation resources.

", + "smithy.api#required": {} } }, - "MaxResults": { - "target": "com.amazonaws.lakeformation#PageSize", + "PermissionsWithGrantOption": { + "target": "com.amazonaws.lakeformation#PermissionList", "traits": { - "smithy.api#documentation": "

The maximum number of results to return.

" + "smithy.api#documentation": "

Indicates a list of the granted permissions that the principal may pass to other users. These permissions may only be a subset of the permissions granted in the Privileges.

" } } } }, - "com.amazonaws.lakeformation#ListPermissionsResponse": { + "com.amazonaws.lakeformation#GrantPermissionsResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.lakeformation#IAMRoleArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "arn:aws:iam::[0-9]*:role/.*" + } + }, + "com.amazonaws.lakeformation#Identifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + } + } + }, + "com.amazonaws.lakeformation#InternalServiceException": { "type": "structure", "members": { - "PrincipalResourcePermissions": { - "target": "com.amazonaws.lakeformation#PrincipalResourcePermissionsList", - "traits": { - "smithy.api#documentation": "

A list of principals and their permissions on the resource for the specified principal and resource types.

" - } - }, - "NextToken": { - "target": "com.amazonaws.lakeformation#Token", + "Message": { + "target": "com.amazonaws.lakeformation#MessageString", "traits": { - "smithy.api#documentation": "

A continuation token, if this is not the first call to retrieve this list.

" + "smithy.api#documentation": "

A message describing the problem.

" } } - } - }, - "com.amazonaws.lakeformation#ListResources": { - "type": "operation", - "input": { - "target": "com.amazonaws.lakeformation#ListResourcesRequest" - }, - "output": { - "target": "com.amazonaws.lakeformation#ListResourcesResponse" }, - "errors": [ - { - "target": "com.amazonaws.lakeformation#InternalServiceException" - }, - { - "target": "com.amazonaws.lakeformation#InvalidInputException" - }, - { - "target": "com.amazonaws.lakeformation#OperationTimeoutException" - } - ], "traits": { - "smithy.api#documentation": "

Lists the resources registered to be managed by the Data Catalog.

", - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" - } + "smithy.api#documentation": "

An internal service error occurred.

", + "smithy.api#error": "server" } }, - "com.amazonaws.lakeformation#ListResourcesRequest": { + "com.amazonaws.lakeformation#InvalidInputException": { "type": "structure", "members": { - "FilterConditionList": { - "target": "com.amazonaws.lakeformation#FilterConditionList", + "Message": { + "target": "com.amazonaws.lakeformation#MessageString", "traits": { - "smithy.api#documentation": "

Any applicable row-level and/or column-level filtering conditions for the resources.

" + "smithy.api#documentation": "

A message describing the problem.

" } - }, - "MaxResults": { - "target": "com.amazonaws.lakeformation#PageSize", + } + }, + "traits": { + "smithy.api#documentation": "

The input provided was not valid.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.lakeformation#LFTag": { + "type": "structure", + "members": { + "TagKey": { + "target": "com.amazonaws.lakeformation#LFTagKey", "traits": { - "smithy.api#documentation": "

The maximum number of resource results.

" + "smithy.api#documentation": "

The key-name for the tag.

", + "smithy.api#required": {} } }, - "NextToken": { - "target": "com.amazonaws.lakeformation#Token", + "TagValues": { + "target": "com.amazonaws.lakeformation#TagValueList", "traits": { - "smithy.api#documentation": "

A continuation token, if this is not the first call to retrieve these resources.

" + "smithy.api#documentation": "

A list of possible values an attribute can take.

", + "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#documentation": "

A structure that allows an admin to grant user permissions on certain conditions. For example, granting a role access to all columns not tagged 'PII' of tables tagged 'Prod'.

" } }, - "com.amazonaws.lakeformation#ListResourcesResponse": { + "com.amazonaws.lakeformation#LFTagError": { "type": "structure", "members": { - "ResourceInfoList": { - "target": "com.amazonaws.lakeformation#ResourceInfoList", + "LFTag": { + "target": "com.amazonaws.lakeformation#LFTagPair", "traits": { - "smithy.api#documentation": "

A summary of the data lake resources.

" + "smithy.api#documentation": "

The key-name of the tag.

" } }, - "NextToken": { - "target": "com.amazonaws.lakeformation#Token", + "Error": { + "target": "com.amazonaws.lakeformation#ErrorDetail", "traits": { - "smithy.api#documentation": "

A continuation token, if this is not the first call to retrieve these resources.

" + "smithy.api#documentation": "

An error that occurred with the attachment or detachment of the tag.

" } } + }, + "traits": { + "smithy.api#documentation": "

A structure containing an error related to a TagResource or UnTagResource operation.

" } }, - "com.amazonaws.lakeformation#MessageString": { - "type": "string" + "com.amazonaws.lakeformation#LFTagErrors": { + "type": "list", + "member": { + "target": "com.amazonaws.lakeformation#LFTagError" + } }, - "com.amazonaws.lakeformation#NameString": { + "com.amazonaws.lakeformation#LFTagKey": { "type": "string", "traits": { "smithy.api#length": { "min": 1, - "max": 255 + "max": 128 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*" + "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@%]*)$" } }, - "com.amazonaws.lakeformation#NullableBoolean": { - "type": "boolean", - "traits": { - "smithy.api#box": {} - } - }, - "com.amazonaws.lakeformation#OperationTimeoutException": { + "com.amazonaws.lakeformation#LFTagKeyResource": { "type": "structure", "members": { - "Message": { - "target": "com.amazonaws.lakeformation#MessageString", + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", "traits": { - "smithy.api#documentation": "

A message describing the problem.

" + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" + } + }, + "TagKey": { + "target": "com.amazonaws.lakeformation#NameString", + "traits": { + "smithy.api#documentation": "

The key-name for the tag.

", + "smithy.api#required": {} + } + }, + "TagValues": { + "target": "com.amazonaws.lakeformation#TagValueList", + "traits": { + "smithy.api#documentation": "

A list of possible values an attribute can take.

", + "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

The operation timed out.

", - "smithy.api#error": "client" + "smithy.api#documentation": "

A structure containing a tag key and values for a resource.

" } }, - "com.amazonaws.lakeformation#PageSize": { - "type": "integer", - "traits": { - "smithy.api#box": {}, - "smithy.api#range": { - "min": 1, - "max": 1000 - } + "com.amazonaws.lakeformation#LFTagPair": { + "type": "structure", + "members": { + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" + } + }, + "TagKey": { + "target": "com.amazonaws.lakeformation#LFTagKey", + "traits": { + "smithy.api#documentation": "

The key-name for the tag.

", + "smithy.api#required": {} + } + }, + "TagValues": { + "target": "com.amazonaws.lakeformation#TagValueList", + "traits": { + "smithy.api#documentation": "

A list of possible values an attribute can take.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure containing a tag key-value pair.

" + } + }, + "com.amazonaws.lakeformation#LFTagPolicyResource": { + "type": "structure", + "members": { + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" + } + }, + "ResourceType": { + "target": "com.amazonaws.lakeformation#ResourceType", + "traits": { + "smithy.api#documentation": "

The resource type for which the tag policy applies.

", + "smithy.api#required": {} + } + }, + "Expression": { + "target": "com.amazonaws.lakeformation#Expression", + "traits": { + "smithy.api#documentation": "

A list of tag conditions that apply to the resource's tag policy.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure containing a list of tag conditions that apply to a resource's tag policy.

" + } + }, + "com.amazonaws.lakeformation#LFTagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:\\*\\/=+\\-@%]*)$" + } + }, + "com.amazonaws.lakeformation#LFTagsList": { + "type": "list", + "member": { + "target": "com.amazonaws.lakeformation#LFTagPair" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.lakeformation#LastModifiedTimestamp": { + "type": "timestamp" + }, + "com.amazonaws.lakeformation#ListLFTags": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#ListLFTagsRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#ListLFTagsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists tags that the requester has permission to view.

" + } + }, + "com.amazonaws.lakeformation#ListLFTagsRequest": { + "type": "structure", + "members": { + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" + } + }, + "ResourceShareType": { + "target": "com.amazonaws.lakeformation#ResourceShareType", + "traits": { + "smithy.api#documentation": "

If resource share type is ALL, returns both in-account tags and shared tags that the requester has permission to view. If resource share type is FOREIGN, returns all share tags that the requester can view. If no resource share type is passed, lists tags in the given catalog ID that the requester has permission to view.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.lakeformation#PageSize", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

" + } + }, + "NextToken": { + "target": "com.amazonaws.lakeformation#Token", + "traits": { + "smithy.api#documentation": "

A continuation token, if this is not the first call to retrieve this list.

" + } + } + } + }, + "com.amazonaws.lakeformation#ListLFTagsResponse": { + "type": "structure", + "members": { + "LFTags": { + "target": "com.amazonaws.lakeformation#LFTagsList", + "traits": { + "smithy.api#documentation": "

A list of tags that the requested has permission to view.

" + } + }, + "NextToken": { + "target": "com.amazonaws.lakeformation#Token", + "traits": { + "smithy.api#documentation": "

A continuation token, present if the current list segment is not the last.

" + } + } + } + }, + "com.amazonaws.lakeformation#ListPermissions": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#ListPermissionsRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#ListPermissionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of the principal permissions on the resource, filtered by the permissions of the caller. For example, if you are granted an ALTER permission, you are able to see only the principal permissions for ALTER.

\n\t

This operation returns only those permissions that have been explicitly granted.

\n\t

For information about permissions, see Security and Access Control to Metadata and Data.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.lakeformation#ListPermissionsRequest": { + "type": "structure", + "members": { + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" + } + }, + "Principal": { + "target": "com.amazonaws.lakeformation#DataLakePrincipal", + "traits": { + "smithy.api#documentation": "

Specifies a principal to filter the permissions returned.

" + } + }, + "ResourceType": { + "target": "com.amazonaws.lakeformation#DataLakeResourceType", + "traits": { + "smithy.api#documentation": "

Specifies a resource type to filter the permissions returned.

" + } + }, + "Resource": { + "target": "com.amazonaws.lakeformation#Resource", + "traits": { + "smithy.api#documentation": "

A resource where you will get a list of the principal permissions.

\n

This operation does not support getting privileges on a table with columns. Instead, call this operation on the table, and the operation returns the table and the table w columns.

" + } + }, + "NextToken": { + "target": "com.amazonaws.lakeformation#Token", + "traits": { + "smithy.api#documentation": "

A continuation token, if this is not the first call to retrieve this list.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.lakeformation#PageSize", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

" + } + } + } + }, + "com.amazonaws.lakeformation#ListPermissionsResponse": { + "type": "structure", + "members": { + "PrincipalResourcePermissions": { + "target": "com.amazonaws.lakeformation#PrincipalResourcePermissionsList", + "traits": { + "smithy.api#documentation": "

A list of principals and their permissions on the resource for the specified principal and resource types.

" + } + }, + "NextToken": { + "target": "com.amazonaws.lakeformation#Token", + "traits": { + "smithy.api#documentation": "

A continuation token, if this is not the first call to retrieve this list.

" + } + } + } + }, + "com.amazonaws.lakeformation#ListResources": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#ListResourcesRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#ListResourcesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the resources registered to be managed by the Data Catalog.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.lakeformation#ListResourcesRequest": { + "type": "structure", + "members": { + "FilterConditionList": { + "target": "com.amazonaws.lakeformation#FilterConditionList", + "traits": { + "smithy.api#documentation": "

Any applicable row-level and/or column-level filtering conditions for the resources.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.lakeformation#PageSize", + "traits": { + "smithy.api#documentation": "

The maximum number of resource results.

" + } + }, + "NextToken": { + "target": "com.amazonaws.lakeformation#Token", + "traits": { + "smithy.api#documentation": "

A continuation token, if this is not the first call to retrieve these resources.

" + } + } + } + }, + "com.amazonaws.lakeformation#ListResourcesResponse": { + "type": "structure", + "members": { + "ResourceInfoList": { + "target": "com.amazonaws.lakeformation#ResourceInfoList", + "traits": { + "smithy.api#documentation": "

A summary of the data lake resources.

" + } + }, + "NextToken": { + "target": "com.amazonaws.lakeformation#Token", + "traits": { + "smithy.api#documentation": "

A continuation token, if this is not the first call to retrieve these resources.

" + } + } + } + }, + "com.amazonaws.lakeformation#MessageString": { + "type": "string" + }, + "com.amazonaws.lakeformation#NameString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*" + } + }, + "com.amazonaws.lakeformation#NullableBoolean": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.lakeformation#OperationTimeoutException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.lakeformation#MessageString", + "traits": { + "smithy.api#documentation": "

A message describing the problem.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The operation timed out.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.lakeformation#PageSize": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 1000 + } } }, "com.amazonaws.lakeformation#Permission": { @@ -1192,107 +1883,436 @@ { "value": "DATA_LOCATION_ACCESS", "name": "DATA_LOCATION_ACCESS" + }, + { + "value": "CREATE_TAG", + "name": "CREATE_TAG" + }, + { + "value": "ALTER_TAG", + "name": "ALTER_TAG" + }, + { + "value": "DELETE_TAG", + "name": "DELETE_TAG" + }, + { + "value": "DESCRIBE_TAG", + "name": "DESCRIBE_TAG" + }, + { + "value": "ASSOCIATE_TAG", + "name": "ASSOCIATE_TAG" + } + ] + } + }, + "com.amazonaws.lakeformation#PermissionList": { + "type": "list", + "member": { + "target": "com.amazonaws.lakeformation#Permission" + } + }, + "com.amazonaws.lakeformation#PrincipalPermissions": { + "type": "structure", + "members": { + "Principal": { + "target": "com.amazonaws.lakeformation#DataLakePrincipal", + "traits": { + "smithy.api#documentation": "

The principal who is granted permissions.

" + } + }, + "Permissions": { + "target": "com.amazonaws.lakeformation#PermissionList", + "traits": { + "smithy.api#documentation": "

The permissions that are granted to the principal.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Permissions granted to a principal.

" + } + }, + "com.amazonaws.lakeformation#PrincipalPermissionsList": { + "type": "list", + "member": { + "target": "com.amazonaws.lakeformation#PrincipalPermissions" + } + }, + "com.amazonaws.lakeformation#PrincipalResourcePermissions": { + "type": "structure", + "members": { + "Principal": { + "target": "com.amazonaws.lakeformation#DataLakePrincipal", + "traits": { + "smithy.api#documentation": "

The Data Lake principal to be granted or revoked permissions.

" + } + }, + "Resource": { + "target": "com.amazonaws.lakeformation#Resource", + "traits": { + "smithy.api#documentation": "

The resource where permissions are to be granted or revoked.

" + } + }, + "Permissions": { + "target": "com.amazonaws.lakeformation#PermissionList", + "traits": { + "smithy.api#documentation": "

The permissions to be granted or revoked on the resource.

" + } + }, + "PermissionsWithGrantOption": { + "target": "com.amazonaws.lakeformation#PermissionList", + "traits": { + "smithy.api#documentation": "

Indicates whether to grant the ability to grant permissions (as a subset of permissions granted).

" + } + }, + "AdditionalDetails": { + "target": "com.amazonaws.lakeformation#DetailsMap", + "traits": { + "smithy.api#documentation": "

This attribute can be used to return any additional details of PrincipalResourcePermissions. Currently returns only as a RAM resource share ARN.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The permissions granted or revoked on a resource.

" + } + }, + "com.amazonaws.lakeformation#PrincipalResourcePermissionsList": { + "type": "list", + "member": { + "target": "com.amazonaws.lakeformation#PrincipalResourcePermissions" + } + }, + "com.amazonaws.lakeformation#PutDataLakeSettings": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#PutDataLakeSettingsRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#PutDataLakeSettingsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + } + ], + "traits": { + "smithy.api#documentation": "

Sets the list of data lake administrators who have admin privileges on all resources managed by Lake Formation. For more information on admin privileges, see Granting Lake Formation Permissions.

\n\t\n\t

This API replaces the current list of data lake admins with the new list being passed. To add an admin, fetch the current list and add the new admin to that list and pass that list in this API.

" + } + }, + "com.amazonaws.lakeformation#PutDataLakeSettingsRequest": { + "type": "structure", + "members": { + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" + } + }, + "DataLakeSettings": { + "target": "com.amazonaws.lakeformation#DataLakeSettings", + "traits": { + "smithy.api#documentation": "

A structure representing a list of AWS Lake Formation principals designated as data lake administrators.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.lakeformation#PutDataLakeSettingsResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.lakeformation#RAMResourceShareArn": { + "type": "string" + }, + "com.amazonaws.lakeformation#RegisterResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#RegisterResourceRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#RegisterResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AlreadyExistsException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Registers the resource as managed by the Data Catalog.

\n\t\n\t

To add or update data, Lake Formation needs read/write access to the chosen Amazon S3 path. Choose a role that you know has permission to do this, or choose the AWSServiceRoleForLakeFormationDataAccess service-linked role. When you register the first Amazon S3 path, the service-linked role and a new inline policy are created on your behalf. Lake Formation adds the first path to the inline policy and attaches it to the service-linked role. When you register subsequent paths, Lake Formation adds the path to the existing policy.

\n\n

The following request registers a new location and gives AWS Lake Formation permission to use the service-linked role to access that location.

\n\n

\n ResourceArn = arn:aws:s3:::my-bucket\nUseServiceLinkedRole = true\n

\n\t\n\t

If UseServiceLinkedRole is not set to true, you must provide or set the RoleArn:

\n\t\n

\n arn:aws:iam::12345:role/my-data-access-role\n

" + } + }, + "com.amazonaws.lakeformation#RegisterResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.lakeformation#ResourceArnString", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource that you want to register.

", + "smithy.api#required": {} } - ] + }, + "UseServiceLinkedRole": { + "target": "com.amazonaws.lakeformation#NullableBoolean", + "traits": { + "smithy.api#documentation": "

Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog. A service-linked role is a unique type of IAM role that is linked directly to Lake Formation.

\n \n

For more information, see Using Service-Linked Roles for Lake Formation.

" + } + }, + "RoleArn": { + "target": "com.amazonaws.lakeformation#IAMRoleArn", + "traits": { + "smithy.api#documentation": "

The identifier for the role that registers the resource.

" + } + } } }, - "com.amazonaws.lakeformation#PermissionList": { - "type": "list", - "member": { - "target": "com.amazonaws.lakeformation#Permission" + "com.amazonaws.lakeformation#RegisterResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.lakeformation#RemoveLFTagsFromResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#RemoveLFTagsFromResourceRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#RemoveLFTagsFromResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#GlueEncryptionException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes a tag from the resource. Only database, table, or tableWithColumns resource are allowed. To tag columns, use the column inclusion list in tableWithColumns to specify column input.

" } }, - "com.amazonaws.lakeformation#PrincipalPermissions": { + "com.amazonaws.lakeformation#RemoveLFTagsFromResourceRequest": { "type": "structure", "members": { - "Principal": { - "target": "com.amazonaws.lakeformation#DataLakePrincipal", + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", "traits": { - "smithy.api#documentation": "

The principal who is granted permissions.

" + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" } }, - "Permissions": { - "target": "com.amazonaws.lakeformation#PermissionList", + "Resource": { + "target": "com.amazonaws.lakeformation#Resource", "traits": { - "smithy.api#documentation": "

The permissions that are granted to the principal.

" + "smithy.api#documentation": "

The resource where you want to remove a tag.

", + "smithy.api#required": {} + } + }, + "LFTags": { + "target": "com.amazonaws.lakeformation#LFTagsList", + "traits": { + "smithy.api#documentation": "

The tags to be removed from the resource.

", + "smithy.api#required": {} } } - }, - "traits": { - "smithy.api#documentation": "

Permissions granted to a principal.

" } }, - "com.amazonaws.lakeformation#PrincipalPermissionsList": { - "type": "list", - "member": { - "target": "com.amazonaws.lakeformation#PrincipalPermissions" + "com.amazonaws.lakeformation#RemoveLFTagsFromResourceResponse": { + "type": "structure", + "members": { + "Failures": { + "target": "com.amazonaws.lakeformation#LFTagErrors", + "traits": { + "smithy.api#documentation": "

A list of failures to untag a resource.

" + } + } } }, - "com.amazonaws.lakeformation#PrincipalResourcePermissions": { + "com.amazonaws.lakeformation#Resource": { "type": "structure", "members": { - "Principal": { - "target": "com.amazonaws.lakeformation#DataLakePrincipal", + "Catalog": { + "target": "com.amazonaws.lakeformation#CatalogResource", "traits": { - "smithy.api#documentation": "

The Data Lake principal to be granted or revoked permissions.

" + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" } }, - "Resource": { - "target": "com.amazonaws.lakeformation#Resource", + "Database": { + "target": "com.amazonaws.lakeformation#DatabaseResource", "traits": { - "smithy.api#documentation": "

The resource where permissions are to be granted or revoked.

" + "smithy.api#documentation": "

The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

" } }, - "Permissions": { - "target": "com.amazonaws.lakeformation#PermissionList", + "Table": { + "target": "com.amazonaws.lakeformation#TableResource", "traits": { - "smithy.api#documentation": "

The permissions to be granted or revoked on the resource.

" + "smithy.api#documentation": "

The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

" } }, - "PermissionsWithGrantOption": { - "target": "com.amazonaws.lakeformation#PermissionList", + "TableWithColumns": { + "target": "com.amazonaws.lakeformation#TableWithColumnsResource", "traits": { - "smithy.api#documentation": "

Indicates whether to grant the ability to grant permissions (as a subset of permissions granted).

" + "smithy.api#documentation": "

The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

" } }, - "AdditionalDetails": { - "target": "com.amazonaws.lakeformation#DetailsMap", + "DataLocation": { + "target": "com.amazonaws.lakeformation#DataLocationResource", "traits": { - "smithy.api#documentation": "

This attribute can be used to return any additional details of PrincipalResourcePermissions. Currently returns only as a RAM share resource ARN.

" + "smithy.api#documentation": "

The location of an Amazon S3 path where permissions are granted or revoked.

" + } + }, + "LFTag": { + "target": "com.amazonaws.lakeformation#LFTagKeyResource", + "traits": { + "smithy.api#documentation": "

The tag key and values attached to a resource.

" + } + }, + "LFTagPolicy": { + "target": "com.amazonaws.lakeformation#LFTagPolicyResource", + "traits": { + "smithy.api#documentation": "

A list of tag conditions that define a resource's tag policy.

" } } }, "traits": { - "smithy.api#documentation": "

The permissions granted or revoked on a resource.

" + "smithy.api#documentation": "

A structure for the resource.

" } }, - "com.amazonaws.lakeformation#PrincipalResourcePermissionsList": { + "com.amazonaws.lakeformation#ResourceArnString": { + "type": "string" + }, + "com.amazonaws.lakeformation#ResourceInfo": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.lakeformation#ResourceArnString", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

" + } + }, + "RoleArn": { + "target": "com.amazonaws.lakeformation#IAMRoleArn", + "traits": { + "smithy.api#documentation": "

The IAM role that registered a resource.

" + } + }, + "LastModified": { + "target": "com.amazonaws.lakeformation#LastModifiedTimestamp", + "traits": { + "smithy.api#documentation": "

The date and time the resource was last modified.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure containing information about an AWS Lake Formation resource.

" + } + }, + "com.amazonaws.lakeformation#ResourceInfoList": { "type": "list", "member": { - "target": "com.amazonaws.lakeformation#PrincipalResourcePermissions" + "target": "com.amazonaws.lakeformation#ResourceInfo" } }, - "com.amazonaws.lakeformation#PutDataLakeSettings": { + "com.amazonaws.lakeformation#ResourceNumberLimitExceededException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.lakeformation#MessageString", + "traits": { + "smithy.api#documentation": "

A message describing the problem.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A resource numerical limit was exceeded.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.lakeformation#ResourceShareList": { + "type": "list", + "member": { + "target": "com.amazonaws.lakeformation#RAMResourceShareArn" + } + }, + "com.amazonaws.lakeformation#ResourceShareType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "FOREIGN", + "name": "FOREIGN" + }, + { + "value": "ALL", + "name": "ALL" + } + ] + } + }, + "com.amazonaws.lakeformation#ResourceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DATABASE", + "name": "DATABASE" + }, + { + "value": "TABLE", + "name": "TABLE" + } + ] + } + }, + "com.amazonaws.lakeformation#RevokePermissions": { "type": "operation", "input": { - "target": "com.amazonaws.lakeformation#PutDataLakeSettingsRequest" + "target": "com.amazonaws.lakeformation#RevokePermissionsRequest" }, "output": { - "target": "com.amazonaws.lakeformation#PutDataLakeSettingsResponse" + "target": "com.amazonaws.lakeformation#RevokePermissionsResponse" }, "errors": [ { - "target": "com.amazonaws.lakeformation#InternalServiceException" + "target": "com.amazonaws.lakeformation#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" }, { "target": "com.amazonaws.lakeformation#InvalidInputException" } ], "traits": { - "smithy.api#documentation": "

Sets the list of data lake administrators who have admin privileges on all resources managed by Lake Formation. For more information on admin privileges, see Granting Lake Formation Permissions.

\n\t\n\t

This API replaces the current list of data lake admins with the new list being passed. To add an admin, fetch the current list and add the new admin to that list and pass that list in this API.

" + "smithy.api#documentation": "

Revokes permissions to the principal to access metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3.

" } }, - "com.amazonaws.lakeformation#PutDataLakeSettingsRequest": { + "com.amazonaws.lakeformation#RevokePermissionsRequest": { "type": "structure", "members": { "CatalogId": { @@ -1301,33 +2321,56 @@ "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" } }, - "DataLakeSettings": { - "target": "com.amazonaws.lakeformation#DataLakeSettings", + "Principal": { + "target": "com.amazonaws.lakeformation#DataLakePrincipal", "traits": { - "smithy.api#documentation": "

A structure representing a list of AWS Lake Formation principals designated as data lake administrators.

", + "smithy.api#documentation": "

The principal to be revoked permissions on the resource.

", + "smithy.api#required": {} + } + }, + "Resource": { + "target": "com.amazonaws.lakeformation#Resource", + "traits": { + "smithy.api#documentation": "

The resource to which permissions are to be revoked.

", + "smithy.api#required": {} + } + }, + "Permissions": { + "target": "com.amazonaws.lakeformation#PermissionList", + "traits": { + "smithy.api#documentation": "

The permissions revoked to the principal on the resource. For information about permissions, see Security\n and Access Control to Metadata and Data.

", "smithy.api#required": {} } + }, + "PermissionsWithGrantOption": { + "target": "com.amazonaws.lakeformation#PermissionList", + "traits": { + "smithy.api#documentation": "

Indicates a list of permissions for which to revoke the grant option allowing the principal to pass permissions to other principals.

" + } } } }, - "com.amazonaws.lakeformation#PutDataLakeSettingsResponse": { + "com.amazonaws.lakeformation#RevokePermissionsResponse": { "type": "structure", "members": {} }, - "com.amazonaws.lakeformation#RAMResourceShareArn": { - "type": "string" - }, - "com.amazonaws.lakeformation#RegisterResource": { + "com.amazonaws.lakeformation#SearchDatabasesByLFTags": { "type": "operation", "input": { - "target": "com.amazonaws.lakeformation#RegisterResourceRequest" + "target": "com.amazonaws.lakeformation#SearchDatabasesByLFTagsRequest" }, "output": { - "target": "com.amazonaws.lakeformation#RegisterResourceResponse" + "target": "com.amazonaws.lakeformation#SearchDatabasesByLFTagsResponse" }, "errors": [ { - "target": "com.amazonaws.lakeformation#AlreadyExistsException" + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#GlueEncryptionException" }, { "target": "com.amazonaws.lakeformation#InternalServiceException" @@ -1340,181 +2383,135 @@ } ], "traits": { - "smithy.api#documentation": "

Registers the resource as managed by the Data Catalog.

\n\t\n\t

To add or update data, Lake Formation needs read/write access to the chosen Amazon S3 path. Choose a role that you know has permission to do this, or choose the AWSServiceRoleForLakeFormationDataAccess service-linked role. When you register the first Amazon S3 path, the service-linked role and a new inline policy are created on your behalf. Lake Formation adds the first path to the inline policy and attaches it to the service-linked role. When you register subsequent paths, Lake Formation adds the path to the existing policy.

\n\n

The following request registers a new location and gives AWS Lake Formation permission to use the service-linked role to access that location.

\n\n

\n ResourceArn = arn:aws:s3:::my-bucket\nUseServiceLinkedRole = true\n

\n\t\n\t

If UseServiceLinkedRole is not set to true, you must provide or set the RoleArn:

\n\t\n

\n arn:aws:iam::12345:role/my-data-access-role\n

" + "smithy.api#documentation": "

This operation allows a search on DATABASE resources by TagCondition. This operation is used by admins who want to grant user permissions on certain TagConditions. Before making a grant, the admin can use SearchDatabasesByTags to find all resources where the given TagConditions are valid to verify whether the returned resources can be shared.

" } }, - "com.amazonaws.lakeformation#RegisterResourceRequest": { + "com.amazonaws.lakeformation#SearchDatabasesByLFTagsRequest": { "type": "structure", "members": { - "ResourceArn": { - "target": "com.amazonaws.lakeformation#ResourceArnString", + "NextToken": { + "target": "com.amazonaws.lakeformation#Token", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource that you want to register.

", - "smithy.api#required": {} + "smithy.api#documentation": "

A continuation token, if this is not the first call to retrieve this list.

" } }, - "UseServiceLinkedRole": { - "target": "com.amazonaws.lakeformation#NullableBoolean", + "MaxResults": { + "target": "com.amazonaws.lakeformation#PageSize", "traits": { - "smithy.api#documentation": "

Designates an AWS Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog. A service-linked role is a unique type of IAM role that is linked directly to Lake Formation.

\n \n

For more information, see Using Service-Linked Roles for Lake Formation.

" + "smithy.api#documentation": "

The maximum number of results to return.

" } }, - "RoleArn": { - "target": "com.amazonaws.lakeformation#IAMRoleArn", - "traits": { - "smithy.api#documentation": "

The identifier for the role that registers the resource.

" - } - } - } - }, - "com.amazonaws.lakeformation#RegisterResourceResponse": { - "type": "structure", - "members": {} - }, - "com.amazonaws.lakeformation#Resource": { - "type": "structure", - "members": { - "Catalog": { - "target": "com.amazonaws.lakeformation#CatalogResource", + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", "traits": { "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" } }, - "Database": { - "target": "com.amazonaws.lakeformation#DatabaseResource", - "traits": { - "smithy.api#documentation": "

The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.

" - } - }, - "Table": { - "target": "com.amazonaws.lakeformation#TableResource", - "traits": { - "smithy.api#documentation": "

The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.

" - } - }, - "TableWithColumns": { - "target": "com.amazonaws.lakeformation#TableWithColumnsResource", - "traits": { - "smithy.api#documentation": "

The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.

" - } - }, - "DataLocation": { - "target": "com.amazonaws.lakeformation#DataLocationResource", + "Expression": { + "target": "com.amazonaws.lakeformation#Expression", "traits": { - "smithy.api#documentation": "

The location of an Amazon S3 path where permissions are granted or revoked.

" + "smithy.api#documentation": "

A list of conditions (LFTag structures) to search for in database resources.

", + "smithy.api#required": {} } } - }, - "traits": { - "smithy.api#documentation": "

A structure for the resource.

" } }, - "com.amazonaws.lakeformation#ResourceArnString": { - "type": "string" - }, - "com.amazonaws.lakeformation#ResourceInfo": { + "com.amazonaws.lakeformation#SearchDatabasesByLFTagsResponse": { "type": "structure", "members": { - "ResourceArn": { - "target": "com.amazonaws.lakeformation#ResourceArnString", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

" - } - }, - "RoleArn": { - "target": "com.amazonaws.lakeformation#IAMRoleArn", + "NextToken": { + "target": "com.amazonaws.lakeformation#Token", "traits": { - "smithy.api#documentation": "

The IAM role that registered a resource.

" + "smithy.api#documentation": "

A continuation token, present if the current list segment is not the last.

" } }, - "LastModified": { - "target": "com.amazonaws.lakeformation#LastModifiedTimestamp", + "DatabaseList": { + "target": "com.amazonaws.lakeformation#DatabaseLFTagsList", "traits": { - "smithy.api#documentation": "

The date and time the resource was last modified.

" + "smithy.api#documentation": "

A list of databases that meet the tag conditions.

" } } - }, - "traits": { - "smithy.api#documentation": "

A structure containing information about an AWS Lake Formation resource.

" - } - }, - "com.amazonaws.lakeformation#ResourceInfoList": { - "type": "list", - "member": { - "target": "com.amazonaws.lakeformation#ResourceInfo" - } - }, - "com.amazonaws.lakeformation#ResourceShareList": { - "type": "list", - "member": { - "target": "com.amazonaws.lakeformation#RAMResourceShareArn" } }, - "com.amazonaws.lakeformation#RevokePermissions": { + "com.amazonaws.lakeformation#SearchTablesByLFTags": { "type": "operation", "input": { - "target": "com.amazonaws.lakeformation#RevokePermissionsRequest" + "target": "com.amazonaws.lakeformation#SearchTablesByLFTagsRequest" }, "output": { - "target": "com.amazonaws.lakeformation#RevokePermissionsResponse" + "target": "com.amazonaws.lakeformation#SearchTablesByLFTagsResponse" }, "errors": [ { - "target": "com.amazonaws.lakeformation#ConcurrentModificationException" + "target": "com.amazonaws.lakeformation#AccessDeniedException" }, { "target": "com.amazonaws.lakeformation#EntityNotFoundException" }, + { + "target": "com.amazonaws.lakeformation#GlueEncryptionException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, { "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" } ], "traits": { - "smithy.api#documentation": "

Revokes permissions to the principal to access metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3.

" + "smithy.api#documentation": "

This operation allows a search on TABLE resources by LFTags. This will be used by admins who want to grant user permissions on certain LFTags. Before making a grant, the admin can use SearchTablesByLFTags to find all resources where the given LFTags are valid to verify whether the returned resources can be shared.

" } }, - "com.amazonaws.lakeformation#RevokePermissionsRequest": { + "com.amazonaws.lakeformation#SearchTablesByLFTagsRequest": { "type": "structure", "members": { - "CatalogId": { - "target": "com.amazonaws.lakeformation#CatalogIdString", + "NextToken": { + "target": "com.amazonaws.lakeformation#Token", "traits": { - "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" + "smithy.api#documentation": "

A continuation token, if this is not the first call to retrieve this list.

" } }, - "Principal": { - "target": "com.amazonaws.lakeformation#DataLakePrincipal", + "MaxResults": { + "target": "com.amazonaws.lakeformation#PageSize", "traits": { - "smithy.api#documentation": "

The principal to be revoked permissions on the resource.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The maximum number of results to return.

" } }, - "Resource": { - "target": "com.amazonaws.lakeformation#Resource", + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", "traits": { - "smithy.api#documentation": "

The resource to which permissions are to be revoked.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" } }, - "Permissions": { - "target": "com.amazonaws.lakeformation#PermissionList", + "Expression": { + "target": "com.amazonaws.lakeformation#Expression", "traits": { - "smithy.api#documentation": "

The permissions revoked to the principal on the resource. For information about permissions, see Security\n and Access Control to Metadata and Data.

", + "smithy.api#documentation": "

A list of conditions (LFTag structures) to search for in table resources.

", "smithy.api#required": {} } + } + } + }, + "com.amazonaws.lakeformation#SearchTablesByLFTagsResponse": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.lakeformation#Token", + "traits": { + "smithy.api#documentation": "

A continuation token, present if the current list segment is not the last.

" + } }, - "PermissionsWithGrantOption": { - "target": "com.amazonaws.lakeformation#PermissionList", + "TableList": { + "target": "com.amazonaws.lakeformation#TableLFTagsList", "traits": { - "smithy.api#documentation": "

Indicates a list of permissions for which to revoke the grant option allowing the principal to pass permissions to other principals.

" + "smithy.api#documentation": "

A list of tables that meet the tag conditions.

" } } } }, - "com.amazonaws.lakeformation#RevokePermissionsResponse": { - "type": "structure", - "members": {} - }, "com.amazonaws.lakeformation#StringValue": { "type": "string" }, @@ -1524,6 +2521,12 @@ "target": "com.amazonaws.lakeformation#StringValue" } }, + "com.amazonaws.lakeformation#TableLFTagsList": { + "type": "list", + "member": { + "target": "com.amazonaws.lakeformation#TaggedTable" + } + }, "com.amazonaws.lakeformation#TableResource": { "type": "structure", "members": { @@ -1604,6 +2607,70 @@ "smithy.api#documentation": "

A structure for a table with columns object. This object is only used when granting a SELECT permission.

\n\t

This object must take a value for at least one of ColumnsNames, ColumnsIndexes, or ColumnsWildcard.

" } }, + "com.amazonaws.lakeformation#TagValueList": { + "type": "list", + "member": { + "target": "com.amazonaws.lakeformation#LFTagValue" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.lakeformation#TaggedDatabase": { + "type": "structure", + "members": { + "Database": { + "target": "com.amazonaws.lakeformation#DatabaseResource", + "traits": { + "smithy.api#documentation": "

A database that has tags attached to it.

" + } + }, + "LFTags": { + "target": "com.amazonaws.lakeformation#LFTagsList", + "traits": { + "smithy.api#documentation": "

A list of tags attached to the database.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure describing a database resource with tags.

" + } + }, + "com.amazonaws.lakeformation#TaggedTable": { + "type": "structure", + "members": { + "Table": { + "target": "com.amazonaws.lakeformation#TableResource", + "traits": { + "smithy.api#documentation": "

A table that has tags attached to it.

" + } + }, + "LFTagOnDatabase": { + "target": "com.amazonaws.lakeformation#LFTagsList", + "traits": { + "smithy.api#documentation": "

A list of tags attached to the database where the table resides.

" + } + }, + "LFTagsOnTable": { + "target": "com.amazonaws.lakeformation#LFTagsList", + "traits": { + "smithy.api#documentation": "

A list of tags attached to the table.

" + } + }, + "LFTagsOnColumns": { + "target": "com.amazonaws.lakeformation#ColumnLFTagsList", + "traits": { + "smithy.api#documentation": "

A list of tags attached to columns in the table.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A structure describing a table resource with tags.

" + } + }, "com.amazonaws.lakeformation#Token": { "type": "string" }, @@ -1613,6 +2680,72 @@ "target": "com.amazonaws.lakeformation#CatalogIdString" } }, + "com.amazonaws.lakeformation#UpdateLFTag": { + "type": "operation", + "input": { + "target": "com.amazonaws.lakeformation#UpdateLFTagRequest" + }, + "output": { + "target": "com.amazonaws.lakeformation#UpdateLFTagResponse" + }, + "errors": [ + { + "target": "com.amazonaws.lakeformation#AccessDeniedException" + }, + { + "target": "com.amazonaws.lakeformation#ConcurrentModificationException" + }, + { + "target": "com.amazonaws.lakeformation#EntityNotFoundException" + }, + { + "target": "com.amazonaws.lakeformation#InternalServiceException" + }, + { + "target": "com.amazonaws.lakeformation#InvalidInputException" + }, + { + "target": "com.amazonaws.lakeformation#OperationTimeoutException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates the list of possible values for the specified tag key. If the tag does not exist, the operation throws an EntityNotFoundException. The values in the delete key values will be deleted from list of possible values. If any value in the delete key values is attached to a resource, then API errors out with a 400 Exception - \"Update not allowed\". Untag the attribute before deleting the tag key's value.

" + } + }, + "com.amazonaws.lakeformation#UpdateLFTagRequest": { + "type": "structure", + "members": { + "CatalogId": { + "target": "com.amazonaws.lakeformation#CatalogIdString", + "traits": { + "smithy.api#documentation": "

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your AWS Lake Formation environment.

" + } + }, + "TagKey": { + "target": "com.amazonaws.lakeformation#LFTagKey", + "traits": { + "smithy.api#documentation": "

The key-name for the tag for which to add or delete values.

", + "smithy.api#required": {} + } + }, + "TagValuesToDelete": { + "target": "com.amazonaws.lakeformation#TagValueList", + "traits": { + "smithy.api#documentation": "

A list of tag values to delete from the tag.

" + } + }, + "TagValuesToAdd": { + "target": "com.amazonaws.lakeformation#TagValueList", + "traits": { + "smithy.api#documentation": "

A list of tag values to add from the tag.

" + } + } + } + }, + "com.amazonaws.lakeformation#UpdateLFTagResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.lakeformation#UpdateResource": { "type": "operation", "input": { diff --git a/codegen/sdk-codegen/aws-models/lookoutmetrics.2017-07-25.json b/codegen/sdk-codegen/aws-models/lookoutmetrics.2017-07-25.json index a19c4b022d7..0961be2407b 100644 --- a/codegen/sdk-codegen/aws-models/lookoutmetrics.2017-07-25.json +++ b/codegen/sdk-codegen/aws-models/lookoutmetrics.2017-07-25.json @@ -676,7 +676,7 @@ "FlowName": { "target": "com.amazonaws.lookoutmetrics#FlowName", "traits": { - "smithy.api#documentation": "

The name of the flow.

", + "smithy.api#documentation": "

name of the flow.

", "smithy.api#required": {} } } @@ -1306,7 +1306,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a detector. Deleting an anomaly detector will delete all of its corresponding resources including any\n configured datasets and alerts.

", + "smithy.api#documentation": "

Deletes a detector. Deleting an anomaly detector will delete all of its corresponding resources including any\n configured datasets and alerts.

", "smithy.api#http": { "method": "POST", "uri": "/DeleteAnomalyDetector", @@ -1366,7 +1366,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes an alert.

", + "smithy.api#documentation": "

Describes an alert.

\n

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource\n immediately after creating or modifying it, use retries to allow time for the write operation to complete.

", "smithy.api#http": { "method": "POST", "uri": "/DescribeAlert", @@ -1510,7 +1510,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes a detector.

", + "smithy.api#documentation": "

Describes a detector.

\n

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource\n immediately after creating or modifying it, use retries to allow time for the write operation to complete.

", "smithy.api#http": { "method": "POST", "uri": "/DescribeAnomalyDetector", @@ -1615,7 +1615,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes a dataset.

", + "smithy.api#documentation": "

Describes a dataset.

\n

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource\n immediately after creating or modifying it, use retries to allow time for the write operation to complete.

", "smithy.api#http": { "method": "POST", "uri": "/DescribeMetricSet", @@ -2248,7 +2248,7 @@ "min": 20, "max": 2048 }, - "smithy.api#pattern": "arn:aws.*:kms:.*:[0-9]{12}:key/.*" + "smithy.api#pattern": "arn:aws.*:kms:.*:[0-9]{12}:key/[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}" } }, "com.amazonaws.lookoutmetrics#LambdaConfiguration": { @@ -2299,7 +2299,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the alerts attached to a detector.

", + "smithy.api#documentation": "

Lists the alerts attached to a detector.

\n

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource\n immediately after creating or modifying it, use retries to allow time for the write operation to complete.

", "smithy.api#http": { "method": "POST", "uri": "/ListAlerts", @@ -2379,7 +2379,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the detectors in the current AWS Region.

", + "smithy.api#documentation": "

Lists the detectors in the current AWS Region.

\n

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource\n immediately after creating or modifying it, use retries to allow time for the write operation to complete.

", "smithy.api#http": { "method": "POST", "uri": "/ListAnomalyDetectors", @@ -2660,7 +2660,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the datasets in the current AWS Region.

", + "smithy.api#documentation": "

Lists the datasets in the current AWS Region.

\n

Amazon Lookout for Metrics API actions are eventually consistent. If you do a read operation on a resource\n immediately after creating or modifying it, use retries to allow time for the write operation to complete.

", "smithy.api#http": { "method": "POST", "uri": "/ListMetricSets", @@ -3432,7 +3432,7 @@ "RoleArn": { "target": "com.amazonaws.lookoutmetrics#Arn", "traits": { - "smithy.api#documentation": "

THe ARN of the IAM role that has access to the target SNS topic.

", + "smithy.api#documentation": "

The ARN of the IAM role that has access to the target SNS topic.

", "smithy.api#required": {} } }, @@ -3861,7 +3861,7 @@ "min": 0, "max": 63 }, - "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_]*" + "smithy.api#pattern": "[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}" } }, "com.amazonaws.lookoutmetrics#UntagResource": { diff --git a/codegen/sdk-codegen/aws-models/mediaconvert.2017-08-29.json b/codegen/sdk-codegen/aws-models/mediaconvert.2017-08-29.json index 67840d0ff52..fca985168de 100644 --- a/codegen/sdk-codegen/aws-models/mediaconvert.2017-08-29.json +++ b/codegen/sdk-codegen/aws-models/mediaconvert.2017-08-29.json @@ -4861,6 +4861,27 @@ "smithy.api#jsonName": "backgroundOpacity" } }, + "DdsHandling": { + "target": "com.amazonaws.mediaconvert#DvbddsHandling", + "traits": { + "smithy.api#documentation": "Specify how MediaConvert handles the display definition segment (DDS). Keep the default, None (NONE), to exclude the DDS from this set of captions. Choose No display window (NO_DISPLAY_WINDOW) to have MediaConvert include the DDS but not include display window data. In this case, MediaConvert writes that information to the page composition segment (PCS) instead. Choose Specify (SPECIFIED) to have MediaConvert set up the display window based on the values that you specify in related job settings. For video resolutions that are 576 pixels or smaller in height, MediaConvert doesn't include the DDS, regardless of the value you choose for DDS handling (ddsHandling). In this case, it doesn't write the display window data to the PCS either. Related settings: Use the settings DDS x-coordinate (ddsXCoordinate) and DDS y-coordinate (ddsYCoordinate) to specify the offset between the top left corner of the display window and the top left corner of the video frame. All burn-in and DVB-Sub font settings must match.", + "smithy.api#jsonName": "ddsHandling" + } + }, + "DdsXCoordinate": { + "target": "com.amazonaws.mediaconvert#__integerMin0Max2147483647", + "traits": { + "smithy.api#documentation": "Use this setting, along with DDS y-coordinate (ddsYCoordinate), to specify the upper left corner of the display definition segment (DDS) display window. With this setting, specify the distance, in pixels, between the left side of the frame and the left side of the DDS display window. Keep the default value, 0, to have MediaConvert automatically choose this offset. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). MediaConvert uses these values to determine whether to write page position data to the DDS or to the page composition segment (PCS). All burn-in and DVB-Sub font settings must match.", + "smithy.api#jsonName": "ddsXCoordinate" + } + }, + "DdsYCoordinate": { + "target": "com.amazonaws.mediaconvert#__integerMin0Max2147483647", + "traits": { + "smithy.api#documentation": "Use this setting, along with DDS x-coordinate (ddsXCoordinate), to specify the upper left corner of the display definition segment (DDS) display window. With this setting, specify the distance, in pixels, between the top of the frame and the top of the DDS display window. Keep the default value, 0, to have MediaConvert automatically choose this offset. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). MediaConvert uses these values to determine whether to write page position data to the DDS or to the page composition segment (PCS). All burn-in and DVB-Sub font settings must match.", + "smithy.api#jsonName": "ddsYCoordinate" + } + }, "FontColor": { "target": "com.amazonaws.mediaconvert#DvbSubtitleFontColor", "traits": { @@ -4896,6 +4917,13 @@ "smithy.api#jsonName": "fontSize" } }, + "Height": { + "target": "com.amazonaws.mediaconvert#__integerMin1Max2147483647", + "traits": { + "smithy.api#documentation": "Specify the height, in pixels, of this set of DVB-Sub captions. The default value is 576 pixels. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). All burn-in and DVB-Sub font settings must match.", + "smithy.api#jsonName": "height" + } + }, "OutlineColor": { "target": "com.amazonaws.mediaconvert#DvbSubtitleOutlineColor", "traits": { @@ -4952,6 +4980,13 @@ "smithy.api#jsonName": "teletextSpacing" } }, + "Width": { + "target": "com.amazonaws.mediaconvert#__integerMin1Max2147483647", + "traits": { + "smithy.api#documentation": "Specify the width, in pixels, of this set of DVB-Sub captions. The default value is 720 pixels. Related setting: When you use this setting, you must set DDS handling (ddsHandling) to a value other than None (NONE). All burn-in and DVB-Sub font settings must match.", + "smithy.api#jsonName": "width" + } + }, "XPosition": { "target": "com.amazonaws.mediaconvert#__integerMin0Max2147483647", "traits": { @@ -5153,6 +5188,26 @@ "smithy.api#documentation": "Use these settings to insert a DVB Time and Date Table (TDT) in the transport stream of this output. When you work directly in your JSON job specification, include this object only when your job has a transport stream output and the container settings contain the object M2tsSettings." } }, + "com.amazonaws.mediaconvert#DvbddsHandling": { + "type": "string", + "traits": { + "smithy.api#documentation": "Specify how MediaConvert handles the display definition segment (DDS). Keep the default, None (NONE), to exclude the DDS from this set of captions. Choose No display window (NO_DISPLAY_WINDOW) to have MediaConvert include the DDS but not include display window data. In this case, MediaConvert writes that information to the page composition segment (PCS) instead. Choose Specify (SPECIFIED) to have MediaConvert set up the display window based on the values that you specify in related job settings. For video resolutions that are 576 pixels or smaller in height, MediaConvert doesn't include the DDS, regardless of the value you choose for DDS handling (ddsHandling). In this case, it doesn't write the display window data to the PCS either. Related settings: Use the settings DDS x-coordinate (ddsXCoordinate) and DDS y-coordinate (ddsYCoordinate) to specify the offset between the top left corner of the display window and the top left corner of the video frame. All burn-in and DVB-Sub font settings must match.", + "smithy.api#enum": [ + { + "value": "NONE", + "name": "NONE" + }, + { + "value": "SPECIFIED", + "name": "SPECIFIED" + }, + { + "value": "NO_DISPLAY_WINDOW", + "name": "NO_DISPLAY_WINDOW" + } + ] + } + }, "com.amazonaws.mediaconvert#Eac3AtmosBitstreamMode": { "type": "string", "traits": { @@ -9348,6 +9403,26 @@ ] } }, + "com.amazonaws.mediaconvert#InputSampleRange": { + "type": "string", + "traits": { + "smithy.api#documentation": "Use this setting when your input video codec is AVC-Intra. Ignore this setting for all other inputs. If the sample range metadata in your input video is accurate, or if you don't know about sample range, keep the default value, Follow (FOLLOW), for this setting. When you do, the service automatically detects your input sample range. If your input video has metadata indicating the wrong sample range, specify the accurate sample range here. When you do, MediaConvert ignores any sample range information in the input metadata. Regardless of whether MediaConvert uses the input sample range or the sample range that you specify, MediaConvert uses the sample range for transcoding and also writes it to the output metadata.", + "smithy.api#enum": [ + { + "value": "FOLLOW", + "name": "FOLLOW" + }, + { + "value": "FULL_RANGE", + "name": "FULL_RANGE" + }, + { + "value": "LIMITED_RANGE", + "name": "LIMITED_RANGE" + } + ] + } + }, "com.amazonaws.mediaconvert#InputScanType": { "type": "string", "traits": { @@ -9870,6 +9945,13 @@ "smithy.api#jsonName": "inputs" } }, + "KantarWatermark": { + "target": "com.amazonaws.mediaconvert#KantarWatermarkSettings", + "traits": { + "smithy.api#documentation": "Use these settings only when you use Kantar watermarking. Specify the values that MediaConvert uses to generate and place Kantar watermarks in your output audio. These settings apply to every output in your job. In addition to specifying these values, you also need to store your Kantar credentials in AWS Secrets Manager. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html.", + "smithy.api#jsonName": "kantarWatermark" + } + }, "MotionImageInserter": { "target": "com.amazonaws.mediaconvert#MotionImageInserter", "traits": { @@ -10097,6 +10179,13 @@ "smithy.api#jsonName": "inputs" } }, + "KantarWatermark": { + "target": "com.amazonaws.mediaconvert#KantarWatermarkSettings", + "traits": { + "smithy.api#documentation": "Use these settings only when you use Kantar watermarking. Specify the values that MediaConvert uses to generate and place Kantar watermarks in your output audio. These settings apply to every output in your job. In addition to specifying these values, you also need to store your Kantar credentials in AWS Secrets Manager. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html.", + "smithy.api#jsonName": "kantarWatermark" + } + }, "MotionImageInserter": { "target": "com.amazonaws.mediaconvert#MotionImageInserter", "traits": { @@ -10144,6 +10233,105 @@ "smithy.api#documentation": "JobTemplateSettings contains all the transcode settings saved in the template that will be applied to jobs created from it." } }, + "com.amazonaws.mediaconvert#KantarWatermarkSettings": { + "type": "structure", + "members": { + "ChannelName": { + "target": "com.amazonaws.mediaconvert#__stringMin1Max20", + "traits": { + "smithy.api#documentation": "Provide an audio channel name from your Kantar audio license.", + "smithy.api#jsonName": "channelName" + } + }, + "ContentReference": { + "target": "com.amazonaws.mediaconvert#__stringMin1Max50PatternAZAZ09", + "traits": { + "smithy.api#documentation": "Specify a unique identifier for Kantar to use for this piece of content.", + "smithy.api#jsonName": "contentReference" + } + }, + "CredentialsSecretName": { + "target": "com.amazonaws.mediaconvert#__stringMin1Max512PatternAZAZ09", + "traits": { + "smithy.api#documentation": "Provide the name of the AWS Secrets Manager secret where your Kantar credentials are stored. Note that your MediaConvert service role must provide access to this secret. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/granting-permissions-for-mediaconvert-to-access-secrets-manager-secret.html. For instructions on creating a secret, see https://docs.aws.amazon.com/secretsmanager/latest/userguide/tutorials_basic.html, in the AWS Secrets Manager User Guide.", + "smithy.api#jsonName": "credentialsSecretName" + } + }, + "FileOffset": { + "target": "com.amazonaws.mediaconvert#__doubleMin0", + "traits": { + "smithy.api#documentation": "Optional. Specify an offset, in whole seconds, from the start of your output and the beginning of the watermarking. When you don't specify an offset, Kantar defaults to zero.", + "smithy.api#jsonName": "fileOffset" + } + }, + "KantarLicenseId": { + "target": "com.amazonaws.mediaconvert#__integerMin0Max2147483647", + "traits": { + "smithy.api#documentation": "Provide your Kantar license ID number. You should get this number from Kantar.", + "smithy.api#jsonName": "kantarLicenseId" + } + }, + "KantarServerUrl": { + "target": "com.amazonaws.mediaconvert#__stringPatternHttpsKantarmediaCom", + "traits": { + "smithy.api#documentation": "Provide the HTTPS endpoint to the Kantar server. You should get this endpoint from Kantar.", + "smithy.api#jsonName": "kantarServerUrl" + } + }, + "LogDestination": { + "target": "com.amazonaws.mediaconvert#__stringPatternS3", + "traits": { + "smithy.api#documentation": "Optional. Specify the Amazon S3 bucket where you want MediaConvert to store your Kantar watermark XML logs. When you don't specify a bucket, MediaConvert doesn't save these logs. Note that your MediaConvert service role must provide access to this location. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html", + "smithy.api#jsonName": "logDestination" + } + }, + "Metadata3": { + "target": "com.amazonaws.mediaconvert#__stringMin1Max50", + "traits": { + "smithy.api#documentation": "You can optionally use this field to specify the first timestamp that Kantar embeds during watermarking. Kantar suggests that you be very cautious when using this Kantar feature, and that you use it only on channels that are managed specifically for use with this feature by your Audience Measurement Operator. For more information about this feature, contact Kantar technical support.", + "smithy.api#jsonName": "metadata3" + } + }, + "Metadata4": { + "target": "com.amazonaws.mediaconvert#__stringMin1Max50", + "traits": { + "smithy.api#documentation": "Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.", + "smithy.api#jsonName": "metadata4" + } + }, + "Metadata5": { + "target": "com.amazonaws.mediaconvert#__stringMin1Max50", + "traits": { + "smithy.api#documentation": "Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.", + "smithy.api#jsonName": "metadata5" + } + }, + "Metadata6": { + "target": "com.amazonaws.mediaconvert#__stringMin1Max50", + "traits": { + "smithy.api#documentation": "Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.", + "smithy.api#jsonName": "metadata6" + } + }, + "Metadata7": { + "target": "com.amazonaws.mediaconvert#__stringMin1Max50", + "traits": { + "smithy.api#documentation": "Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.", + "smithy.api#jsonName": "metadata7" + } + }, + "Metadata8": { + "target": "com.amazonaws.mediaconvert#__stringMin1Max50", + "traits": { + "smithy.api#documentation": "Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 characters.", + "smithy.api#jsonName": "metadata8" + } + } + }, + "traits": { + "smithy.api#documentation": "Use these settings only when you use Kantar watermarking. Specify the values that MediaConvert uses to generate and place Kantar watermarks in your output audio. These settings apply to every output in your job. In addition to specifying these values, you also need to store your Kantar credentials in AWS Secrets Manager. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html." + } + }, "com.amazonaws.mediaconvert#LanguageCode": { "type": "string", "traits": { @@ -11973,6 +12161,13 @@ "smithy.api#jsonName": "audioPids" } }, + "MaxPcrInterval": { + "target": "com.amazonaws.mediaconvert#__integerMin0Max500", + "traits": { + "smithy.api#documentation": "Specify the maximum time, in milliseconds, between Program Clock References (PCRs) inserted into the transport stream.", + "smithy.api#jsonName": "maxPcrInterval" + } + }, "NielsenId3": { "target": "com.amazonaws.mediaconvert#M3u8NielsenId3", "traits": { @@ -13989,7 +14184,7 @@ "VideoDescription": { "target": "com.amazonaws.mediaconvert#VideoDescription", "traits": { - "smithy.api#documentation": "VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.", + "smithy.api#documentation": "VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.", "smithy.api#jsonName": "videoDescription" } } @@ -14011,7 +14206,7 @@ "InputChannelsFineTune": { "target": "com.amazonaws.mediaconvert#__listOf__doubleMinNegative60Max6", "traits": { - "smithy.api#documentation": "Use this setting to specify your remix values when they have a decimal component, such as -10.312, 0.08, or 4.9. MediaConvert rounds your remixing values to the nearest thousandth.", + "smithy.api#documentation": "Use this setting to specify your remix values when they have a decimal component, such as -10.312, 0.08, or 4.9. MediaConvert rounds your remixing values to the nearest thousandth.", "smithy.api#jsonName": "inputChannelsFineTune" } } @@ -14345,7 +14540,7 @@ "VideoDescription": { "target": "com.amazonaws.mediaconvert#VideoDescription", "traits": { - "smithy.api#documentation": "VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.", + "smithy.api#documentation": "VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.", "smithy.api#jsonName": "videoDescription" } } @@ -16644,6 +16839,13 @@ "smithy.api#documentation": "Use Rotate (InputRotate) to specify how the service rotates your video. You can choose automatic rotation or specify a rotation. You can specify a clockwise rotation of 0, 90, 180, or 270 degrees. If your input video container is .mov or .mp4 and your input has rotation metadata, you can choose Automatic to have the service rotate your video according to the rotation specified in the metadata. The rotation must be within one degree of 90, 180, or 270 degrees. If the rotation metadata specifies any other rotation, the service will default to no rotation. By default, the service does no rotation, even if your input video has rotation metadata. The service doesn't pass through rotation metadata.", "smithy.api#jsonName": "rotate" } + }, + "SampleRange": { + "target": "com.amazonaws.mediaconvert#InputSampleRange", + "traits": { + "smithy.api#documentation": "Use this setting when your input video codec is AVC-Intra. Ignore this setting for all other inputs. If the sample range metadata in your input video is accurate, or if you don't know about sample range, keep the default value, Follow (FOLLOW), for this setting. When you do, the service automatically detects your input sample range. If your input video has metadata indicating the wrong sample range, specify the accurate sample range here. When you do, MediaConvert ignores any sample range information in the input metadata. Regardless of whether MediaConvert uses the input sample range or the sample range that you specify, MediaConvert uses the sample range for transcoding and also writes it to the output metadata.", + "smithy.api#jsonName": "sampleRange" + } } }, "traits": { @@ -18310,6 +18512,26 @@ } } }, + "com.amazonaws.mediaconvert#__stringMin1Max50PatternAZAZ09": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_\\/_+=.@-]*$" + } + }, + "com.amazonaws.mediaconvert#__stringMin1Max512PatternAZAZ09": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 512 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_\\/_+=.@-]*$" + } + }, "com.amazonaws.mediaconvert#__stringMin24Max512PatternAZaZ0902": { "type": "string", "traits": { @@ -18448,6 +18670,12 @@ "smithy.api#pattern": "^https:\\/\\/" } }, + "com.amazonaws.mediaconvert#__stringPatternHttpsKantarmediaCom": { + "type": "string", + "traits": { + "smithy.api#pattern": "^https:\\/\\/.*.kantarmedia.com$" + } + }, "com.amazonaws.mediaconvert#__stringPatternIdentityAZaZ26AZaZ09163": { "type": "string", "traits": { diff --git a/codegen/sdk-codegen/aws-models/route53.2013-04-01.json b/codegen/sdk-codegen/aws-models/route53.2013-04-01.json index 48528b07b1e..04333306f8a 100644 --- a/codegen/sdk-codegen/aws-models/route53.2013-04-01.json +++ b/codegen/sdk-codegen/aws-models/route53.2013-04-01.json @@ -1175,7 +1175,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new public or private hosted zone. You create records in a public hosted zone to define how you want to route traffic \n\t\t\ton the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a \n\t\t\tprivate hosted zone to define how you want to route traffic for a domain and its subdomains within one or more \n\t\t\tAmazon Virtual Private Clouds (Amazon VPCs).

\n\t\t \n\t\t\t

You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone \n\t\t\t\twith the same name and create new resource record sets.

\n\t\t
\n\t\t

For more information about charges for hosted zones, see Amazon Route 53 Pricing.

\n\t\t

Note the following:

\n\t\t \n\t\t

When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING. \n\t\t\tFor public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the \n\t\t\tNS and SOA records are available, the status of the zone changes to INSYNC.

\n\t\t

The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.

", + "smithy.api#documentation": "

Creates a new public or private hosted zone. You create records in a public hosted zone to define how you want to route traffic \n\t\t\ton the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a \n\t\t\tprivate hosted zone to define how you want to route traffic for a domain and its subdomains within one or more \n\t\t\tAmazon Virtual Private Clouds (Amazon VPCs).

\n\t\t \n\t\t\t

You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone \n\t\t\t\twith the same name and create new resource record sets.

\n\t\t
\n\t\t

For more information about charges for hosted zones, see Amazon Route 53 Pricing.

\n\t\t

Note the following:

\n\t\t \n\t\t

When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING. \n\t\t\tFor public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the \n\t\t\tNS and SOA records are available, the status of the zone changes to INSYNC.

", "smithy.api#http": { "method": "POST", "uri": "/2013-04-01/hostedzone", @@ -1335,7 +1335,7 @@ "KeyManagementServiceArn": { "target": "com.amazonaws.route53#SigningKeyString", "traits": { - "smithy.api#documentation": "

The Amazon resource name (ARN) for a customer managed customer master key (CMK) in AWS Key Management Service (AWS KMS).\n\t\t\tThe KeyManagementServiceArn must be unique for each key-signing key (KSK) in a single hosted zone. \n\t\t\tTo see an example of KeyManagementServiceArn that grants the correct permissions for DNSSEC, \n\t\t\tscroll down to Example.

\n\t\t

You must configure the customer managed CMK as follows:

\n\t\t
\n
Status
\n
\n

Enabled

\n
\n
Key spec
\n
\n

ECC_NIST_P256

\n
\n
Key usage
\n
\n

Sign and verify

\n
\n
Key policy
\n
\n

The key policy must give permission for the following actions:

\n\t\t\t\t\t
    \n
  • \n

    DescribeKey

    \n
  • \n
  • \n

    GetPublicKey

    \n
  • \n
  • \n

    Sign

    \n
  • \n
\n\t\t\t\t\t

The key policy must also include the Amazon Route 53 service in the principal for your account. \n\t\t\t\t\t\tSpecify the following:

\n\t\t\t\t\t
    \n
  • \n

    \n \"Service\": \"dnssec.route53.aws.amazonaws.com\"\n

    \n
  • \n
\n\t\t\t\t
\n
\n\t\t

For more information about working with a customer managed CMK in AWS KMS, see \n\t\t\tAWS Key Management Service concepts.

", + "smithy.api#documentation": "

The Amazon resource name (ARN) for a customer managed customer master key (CMK) in AWS Key Management Service (AWS KMS).\n\t\t\tThe KeyManagementServiceArn must be unique for each key-signing key (KSK) in a single hosted zone. \n\t\t\tTo see an example of KeyManagementServiceArn that grants the correct permissions for DNSSEC, \n\t\t\tscroll down to Example.

\n\t\t

You must configure the customer managed CMK as follows:

\n\t\t
\n
Status
\n
\n

Enabled

\n
\n
Key spec
\n
\n

ECC_NIST_P256

\n
\n
Key usage
\n
\n

Sign and verify

\n
\n
Key policy
\n
\n

The key policy must give permission for the following actions:

\n\t\t\t\t\t
    \n
  • \n

    DescribeKey

    \n
  • \n
  • \n

    GetPublicKey

    \n
  • \n
  • \n

    Sign

    \n
  • \n
\n\t\t\t\t\t

The key policy must also include the Amazon Route 53 service in the principal for your account. \n\t\t\t\t\t\tSpecify the following:

\n\t\t\t\t\t
    \n
  • \n

    \n \"Service\": \"api-service.dnssec.route53.aws.internal\"\n

    \n
  • \n
\n\t\t\t\t
\n
\n\t\t

For more information about working with a customer managed CMK in AWS KMS, see \n\t\t\tAWS Key Management Service concepts.

", "smithy.api#required": {} } }, @@ -2263,7 +2263,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a key-signing key (KSK). Before you can delete a KSK, you must deactivate it. The KSK must be\n\t\tdeactivated before you can delete it regardless of whether the hosted zone is enabled for DNSSEC signing.

", + "smithy.api#documentation": "

Deletes a key-signing key (KSK). Before you can delete a KSK, you must deactivate it. The KSK must be\n\t\tdeactived before you can delete it regardless of whether the hosted zone is enabled for DNSSEC signing.

", "smithy.api#http": { "method": "DELETE", "uri": "/2013-04-01/keysigningkey/{HostedZoneId}/{Name}", @@ -3104,6 +3104,23 @@ "method": "GET", "uri": "/2013-04-01/change/{Id}", "code": 200 + }, + "smithy.waiters#waitable": { + "ResourceRecordSetsChanged": { + "acceptors": [ + { + "state": "success", + "matcher": { + "output": { + "path": "ChangeInfo.Status", + "expected": "INSYNC", + "comparator": "stringEquals" + } + } + } + ], + "minDelay": 30 + } } } }, @@ -7772,7 +7789,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the value that Amazon Route 53 returns in response to a DNS request for a specified record name and type. You can optionally specify \n\t\t\tthe IP address of a DNS resolver, an EDNS0 client subnet IP address, and a subnet mask.

\n\t\t

This call only supports querying public hosted zones.

", + "smithy.api#documentation": "

Gets the value that Amazon Route 53 returns in response to a DNS request for a specified record name and type. You can optionally specify \n\t\t\tthe IP address of a DNS resolver, an EDNS0 client subnet IP address, and a subnet mask.

", "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/testdnsanswer", 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 d37ad10093d..49aa0eceb5f 100644 --- a/codegen/sdk-codegen/aws-models/s3control.2018-08-20.json +++ b/codegen/sdk-codegen/aws-models/s3control.2018-08-20.json @@ -234,7 +234,7 @@ "VpcConfiguration": { "target": "com.amazonaws.s3control#VpcConfiguration", "traits": { - "smithy.api#documentation": "

The virtual private cloud (VPC) configuration for this access point, if one exists.

" + "smithy.api#documentation": "

The virtual private cloud (VPC) configuration for this access point, if one exists.

\n \n

This element is empty if this access point is an Amazon S3 on Outposts access point that is used by other AWS services.

\n
" } }, "Bucket": { @@ -523,7 +523,7 @@ "target": "com.amazonaws.s3control#CreateAccessPointResult" }, "traits": { - "smithy.api#documentation": "

Creates an access point and associates it with the specified bucket. For more information, see \n Managing Data Access with Amazon S3 Access \n Points in the Amazon Simple Storage Service User Guide.

\n

\n \n

S3 on Outposts only supports VPC-style Access Points.\n

\n

For more information, see \n Accessing Amazon S3 on Outposts using virtual private cloud (VPC) only Access Points in \n the Amazon Simple Storage Service User Guide.

\n
\n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n

\n

The following actions are related to CreateAccessPoint:

\n ", + "smithy.api#documentation": "

Creates an access point and associates it with the specified bucket. For more information, see \n Managing Data Access with Amazon S3 Access \n Points in the Amazon S3 User Guide.

\n

\n \n

S3 on Outposts only supports VPC-style access points.\n

\n

For more information, see \n Accessing Amazon S3 on Outposts using virtual private cloud (VPC) only access points in \n the Amazon S3 User Guide.

\n
\n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n

\n

The following actions are related to CreateAccessPoint:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -543,7 +543,7 @@ "target": "com.amazonaws.s3control#CreateAccessPointForObjectLambdaResult" }, "traits": { - "smithy.api#documentation": "

Creates an Object Lambda Access Point. For more information, see \n Transforming objects with Object Lambda Access Points in the Amazon Simple Storage Service User Guide.

\n

The following actions are related to CreateAccessPointForObjectLambda:

\n ", + "smithy.api#documentation": "

Creates an Object Lambda Access Point. For more information, see \n Transforming objects with Object Lambda Access Points in the Amazon S3 User Guide.

\n

The following actions are related to CreateAccessPointForObjectLambda:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -663,7 +663,7 @@ } ], "traits": { - "smithy.api#documentation": "\n

This action creates an Amazon S3 on Outposts bucket. To create an S3 bucket, see Create Bucket in the Amazon Simple Storage Service API.\n

\n
\n

Creates a new Outposts bucket. By creating the bucket, you become the bucket owner. To create an Outposts bucket, you must have S3 on Outposts. \n For more information, see Using Amazon S3 on Outposts in Amazon Simple Storage Service User Guide.

\n

Not every string is an acceptable bucket name. For information on bucket naming restrictions, see Working with Amazon S3 Buckets.

\n

S3 on Outposts buckets support:

\n \n

For a complete list of restrictions and Amazon S3 feature limitations on S3 on Outposts, \n see \n Amazon S3 on Outposts Restrictions and Limitations.

\n

For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts\n endpoint hostname prefix and x-amz-outpost-id in your API request, see the Examples section.

\n \n

The following actions are related to CreateBucket for Amazon S3 on Outposts:

\n ", + "smithy.api#documentation": "\n

This action creates an Amazon S3 on Outposts bucket. To create an S3 bucket, see Create Bucket in the Amazon S3 API Reference.\n

\n
\n

Creates a new Outposts bucket. By creating the bucket, you become the bucket owner. To create an Outposts bucket, you must have S3 on Outposts. \n For more information, see Using Amazon S3 on Outposts in Amazon S3 User Guide.

\n

Not every string is an acceptable bucket name. For information on bucket naming restrictions, see Working with Amazon S3 Buckets.

\n

S3 on Outposts buckets support:

\n \n

For a complete list of restrictions and Amazon S3 feature limitations on S3 on Outposts, \n see \n Amazon S3 on Outposts Restrictions and Limitations.

\n

For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts\n endpoint hostname prefix and x-amz-outpost-id in your API request, see the Examples section.

\n \n

The following actions are related to CreateBucket for Amazon S3 on Outposts:

\n ", "smithy.api#http": { "method": "PUT", "uri": "/v20180820/bucket/{Bucket}", @@ -804,7 +804,7 @@ } ], "traits": { - "smithy.api#documentation": "

You can use S3 Batch Operations to perform large-scale batch actions on Amazon S3 objects. Batch Operations can run a\n single action on lists of Amazon S3 objects that you specify. For more information,\n see S3 Batch Operations in the\n Amazon Simple Storage Service User Guide.

\n

This action creates a S3 Batch Operations job.

\n

\n

Related actions include:

\n ", + "smithy.api#documentation": "

You can use S3 Batch Operations to perform large-scale batch actions on Amazon S3 objects. Batch Operations can run a\n single action on lists of Amazon S3 objects that you specify. For more information,\n see S3 Batch Operations in the\n Amazon S3 User Guide.

\n

This action creates a S3 Batch Operations job.

\n

\n

Related actions include:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -837,7 +837,7 @@ "Operation": { "target": "com.amazonaws.s3control#JobOperation", "traits": { - "smithy.api#documentation": "

The action that you want this job to perform on every object listed in the manifest.\n For more information about the available actions, see Operations in the\n Amazon Simple Storage Service User Guide.

", + "smithy.api#documentation": "

The action that you want this job to perform on every object listed in the manifest.\n For more information about the available actions, see Operations in the\n Amazon S3 User Guide.

", "smithy.api#required": {} } }, @@ -1077,7 +1077,7 @@ "target": "com.amazonaws.s3control#DeleteBucketRequest" }, "traits": { - "smithy.api#documentation": "\n

This action deletes an Amazon S3 on Outposts bucket. To delete an S3 bucket, \n see DeleteBucket in the Amazon Simple Storage Service API.\n

\n
\n

Deletes the Amazon S3 on Outposts bucket. All objects (including all object versions and delete markers) in the\n bucket must be deleted before the bucket itself can be deleted. \n For more information, see Using Amazon S3 on Outposts in Amazon Simple Storage Service User Guide.

\n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n

\n Related Resources\n

\n ", + "smithy.api#documentation": "\n

This action deletes an Amazon S3 on Outposts bucket. To delete an S3 bucket, \n see DeleteBucket in the Amazon S3 API Reference.\n

\n
\n

Deletes the Amazon S3 on Outposts bucket. All objects (including all object versions and delete markers) in the\n bucket must be deleted before the bucket itself can be deleted. \n For more information, see Using Amazon S3 on Outposts in Amazon S3 User Guide.

\n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n

\n Related Resources\n

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -1094,7 +1094,7 @@ "target": "com.amazonaws.s3control#DeleteBucketLifecycleConfigurationRequest" }, "traits": { - "smithy.api#documentation": "\n

This action deletes an Amazon S3 on Outposts bucket's lifecycle configuration. To delete an \n S3 bucket's lifecycle configuration, see DeleteBucketLifecycle in the Amazon Simple Storage Service API.\n

\n
\n

Deletes the lifecycle configuration from the specified Outposts bucket. Amazon S3 on Outposts removes all the lifecycle configuration \n rules in the lifecycle subresource associated with the bucket. Your objects never expire, and Amazon S3 on Outposts no longer automatically \n deletes any objects on the basis of rules contained in the deleted lifecycle configuration. \n For more information, see Using Amazon S3 on Outposts in Amazon Simple Storage Service User Guide.

\n

To use this action, you must have permission to perform the\n s3-outposts:DeleteLifecycleConfiguration action. By default, the bucket\n owner has this permission and the Outposts bucket owner can grant this permission to\n others.

\n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

For more information about object expiration, see Elements to Describe Lifecycle Actions.

\n

Related actions include:

\n ", + "smithy.api#documentation": "\n

This action deletes an Amazon S3 on Outposts bucket's lifecycle configuration. To delete an \n S3 bucket's lifecycle configuration, see DeleteBucketLifecycle in the Amazon S3 API Reference.\n

\n
\n

Deletes the lifecycle configuration from the specified Outposts bucket. Amazon S3 on Outposts removes all the lifecycle configuration \n rules in the lifecycle subresource associated with the bucket. Your objects never expire, and Amazon S3 on Outposts no longer automatically \n deletes any objects on the basis of rules contained in the deleted lifecycle configuration. \n For more information, see Using Amazon S3 on Outposts in Amazon S3 User Guide.

\n

To use this action, you must have permission to perform the\n s3-outposts:DeleteLifecycleConfiguration action. By default, the bucket\n owner has this permission and the Outposts bucket owner can grant this permission to\n others.

\n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

For more information about object expiration, see Elements to Describe Lifecycle Actions.

\n

Related actions include:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -1133,7 +1133,7 @@ "target": "com.amazonaws.s3control#DeleteBucketPolicyRequest" }, "traits": { - "smithy.api#documentation": "\n

This action deletes an Amazon S3 on Outposts bucket policy. To delete an \n S3 bucket policy, see DeleteBucketPolicy in the Amazon Simple Storage Service API.\n

\n
\n

This implementation of the DELETE action uses the policy subresource to delete the\n policy of a specified Amazon S3 on Outposts bucket. If you are using an identity other than the\n root user of the AWS account that owns the bucket, the calling identity must have the\n s3-outposts:DeleteBucketPolicy permissions on the specified Outposts bucket\n and belong to the bucket owner's account to use this action. For more information, see\n Using Amazon S3 on Outposts in\n Amazon Simple Storage Service User Guide.

\n \n

If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a\n 403 Access Denied error. If you have the correct permissions, but you're\n not using an identity that belongs to the bucket owner's account, Amazon S3 returns a\n 405 Method Not Allowed error.

\n \n \n \n

As a security precaution, the root user of the AWS account that owns a bucket can always use this action,\n even if the policy explicitly denies the root user the ability to perform this action.

\n
\n \n

For more information about bucket policies, see Using Bucket Policies and User Policies.

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

The following actions are related to DeleteBucketPolicy:

\n ", + "smithy.api#documentation": "\n

This action deletes an Amazon S3 on Outposts bucket policy. To delete an \n S3 bucket policy, see DeleteBucketPolicy in the Amazon S3 API Reference.\n

\n
\n

This implementation of the DELETE action uses the policy subresource to delete the\n policy of a specified Amazon S3 on Outposts bucket. If you are using an identity other than the\n root user of the AWS account that owns the bucket, the calling identity must have the\n s3-outposts:DeleteBucketPolicy permissions on the specified Outposts bucket\n and belong to the bucket owner's account to use this action. For more information, see\n Using Amazon S3 on Outposts in\n Amazon S3 User Guide.

\n \n

If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a\n 403 Access Denied error. If you have the correct permissions, but you're\n not using an identity that belongs to the bucket owner's account, Amazon S3 returns a\n 405 Method Not Allowed error.

\n \n \n \n

As a security precaution, the root user of the AWS account that owns a bucket can always use this action,\n even if the policy explicitly denies the root user the ability to perform this action.

\n
\n \n

For more information about bucket policies, see Using Bucket Policies and User Policies.

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

The following actions are related to DeleteBucketPolicy:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -1194,7 +1194,7 @@ "target": "com.amazonaws.s3control#DeleteBucketTaggingRequest" }, "traits": { - "smithy.api#documentation": "\n

This action deletes an Amazon S3 on Outposts bucket's tags. To delete an \n S3 bucket tags, see DeleteBucketTagging in the Amazon Simple Storage Service API.\n

\n
\n

Deletes the tags from the Outposts bucket. For more information, see Using Amazon S3 on Outposts in\n Amazon Simple Storage Service User Guide.

\n \n

To use this action, you must have permission to perform the PutBucketTagging action. \n By default, the bucket owner has this permission and can grant this permission to others. \n

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

The following actions are related to DeleteBucketTagging:

\n ", + "smithy.api#documentation": "\n

This action deletes an Amazon S3 on Outposts bucket's tags. To delete an \n S3 bucket tags, see DeleteBucketTagging in the Amazon S3 API Reference.\n

\n
\n

Deletes the tags from the Outposts bucket. For more information, see Using Amazon S3 on Outposts in\n Amazon S3 User Guide.

\n \n

To use this action, you must have permission to perform the PutBucketTagging action. \n By default, the bucket owner has this permission and can grant this permission to others. \n

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

The following actions are related to DeleteBucketTagging:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -1247,7 +1247,7 @@ } ], "traits": { - "smithy.api#documentation": "

Removes the entire tag set from the specified S3 Batch Operations job. To use this operation,\n you must have permission to perform the s3:DeleteJobTagging action. For more\n information, see Controlling access and labeling jobs using tags in the\n Amazon Simple Storage Service User Guide.

\n

\n

Related actions include:

\n ", + "smithy.api#documentation": "

Removes the entire tag set from the specified S3 Batch Operations job. To use this operation,\n you must have permission to perform the s3:DeleteJobTagging action. For more\n information, see Controlling access and labeling jobs using tags in the\n Amazon S3 User Guide.

\n

\n

Related actions include:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -1321,7 +1321,7 @@ "target": "com.amazonaws.s3control#DeleteStorageLensConfigurationRequest" }, "traits": { - "smithy.api#documentation": "

Deletes the Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see \n Assessing your storage \n activity and usage with Amazon S3 Storage Lens in the \n Amazon Simple Storage Service User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:DeleteStorageLensConfiguration action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon Simple Storage Service User Guide.

\n
", + "smithy.api#documentation": "

Deletes the Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see \n Assessing your storage \n activity and usage with Amazon S3 Storage Lens in the \n Amazon S3 User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:DeleteStorageLensConfiguration action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon S3 User Guide.

\n
", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -1363,7 +1363,7 @@ "target": "com.amazonaws.s3control#DeleteStorageLensConfigurationTaggingResult" }, "traits": { - "smithy.api#documentation": "

Deletes the Amazon S3 Storage Lens configuration tags. For more information about S3 Storage Lens, see \n Assessing your storage \n activity and usage with Amazon S3 Storage Lens in the \n Amazon Simple Storage Service User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:DeleteStorageLensConfigurationTagging action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon Simple Storage Service User Guide.

\n
", + "smithy.api#documentation": "

Deletes the Amazon S3 Storage Lens configuration tags. For more information about S3 Storage Lens, see \n Assessing your storage \n activity and usage with Amazon S3 Storage Lens in the \n Amazon S3 User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:DeleteStorageLensConfigurationTagging action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon S3 User Guide.

\n
", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -1423,7 +1423,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the configuration parameters and status for a Batch Operations job. For more\n information, see S3 Batch Operations in\n the Amazon Simple Storage Service User Guide.

\n

\n

Related actions include:

\n ", + "smithy.api#documentation": "

Retrieves the configuration parameters and status for a Batch Operations job. For more\n information, see S3 Batch Operations in\n the Amazon S3 User Guide.

\n

\n

Related actions include:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -1792,7 +1792,7 @@ "target": "com.amazonaws.s3control#GetAccessPointPolicyStatusResult" }, "traits": { - "smithy.api#documentation": "

Indicates whether the specified access point currently has a policy that allows public access. For more information about public access through access points, see Managing Data Access with Amazon S3 Access Points in the Amazon Simple Storage Service Developer Guide.

", + "smithy.api#documentation": "

Indicates whether the specified access point currently has a policy that allows public access. For more information about public access through access points, see Managing Data Access with Amazon S3 access points in the Amazon S3 User Guide.

", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -1932,7 +1932,7 @@ "VpcConfiguration": { "target": "com.amazonaws.s3control#VpcConfiguration", "traits": { - "smithy.api#documentation": "

Contains the virtual private cloud (VPC) configuration for the specified access point.

" + "smithy.api#documentation": "

Contains the virtual private cloud (VPC) configuration for the specified access point.

\n \n

This element is empty if this access point is an Amazon S3 on Outposts access point that is used by other AWS services.

\n
" } }, "PublicAccessBlockConfiguration": { @@ -1955,7 +1955,7 @@ "target": "com.amazonaws.s3control#GetBucketResult" }, "traits": { - "smithy.api#documentation": "

Gets an Amazon S3 on Outposts bucket. For more information, see \n Using Amazon S3 on Outposts in the Amazon Simple Storage Service User Guide.

\n

If you are using an identity other than the root user of the AWS account \n that owns the Outposts bucket, the calling identity must have the \n s3-outposts:GetBucket permissions on the specified Outposts bucket and \n belong to the Outposts bucket owner's account in order to use this action. Only \n users from Outposts bucket owner account with the right permissions can perform \n actions on an Outposts bucket. \n

\n

\n If you don't have s3-outposts:GetBucket permissions or you're not using an identity that belongs to the bucket owner's \n account, Amazon S3 returns a 403 Access Denied error.

\n

The following actions are related to GetBucket for Amazon S3 on Outposts:

\n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n ", + "smithy.api#documentation": "

Gets an Amazon S3 on Outposts bucket. For more information, see \n Using Amazon S3 on Outposts in the Amazon S3 User Guide.

\n

If you are using an identity other than the root user of the AWS account \n that owns the Outposts bucket, the calling identity must have the \n s3-outposts:GetBucket permissions on the specified Outposts bucket and \n belong to the Outposts bucket owner's account in order to use this action. Only \n users from Outposts bucket owner account with the right permissions can perform \n actions on an Outposts bucket. \n

\n

\n If you don't have s3-outposts:GetBucket permissions or you're not using an identity that belongs to the bucket owner's \n account, Amazon S3 returns a 403 Access Denied error.

\n

The following actions are related to GetBucket for Amazon S3 on Outposts:

\n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -1975,7 +1975,7 @@ "target": "com.amazonaws.s3control#GetBucketLifecycleConfigurationResult" }, "traits": { - "smithy.api#documentation": "\n

This action gets an Amazon S3 on Outposts bucket's lifecycle configuration. To get an \n S3 bucket's lifecycle configuration, see GetBucketLifecycleConfiguration in the Amazon Simple Storage Service API.\n

\n
\n

Returns the lifecycle configuration information set on the Outposts bucket. For more\n information, see Using Amazon S3 on Outposts and for\n information about lifecycle configuration, see Object Lifecycle Management in\n Amazon Simple Storage Service User Guide.

\n \n

To use this action, you must have permission to perform the s3-outposts:GetLifecycleConfiguration action. \n The Outposts bucket owner has this permission, by default. The bucket owner can grant this permission to others. For more \n information about permissions, see Permissions \n Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

\n GetBucketLifecycleConfiguration has the following special error:

\n \n

The following actions are related to GetBucketLifecycleConfiguration:

\n ", + "smithy.api#documentation": "\n

This action gets an Amazon S3 on Outposts bucket's lifecycle configuration. To get an \n S3 bucket's lifecycle configuration, see GetBucketLifecycleConfiguration in the Amazon S3 API Reference.\n

\n
\n

Returns the lifecycle configuration information set on the Outposts bucket. For more\n information, see Using Amazon S3 on Outposts and for\n information about lifecycle configuration, see Object Lifecycle Management in\n Amazon S3 User Guide.

\n \n

To use this action, you must have permission to perform the s3-outposts:GetLifecycleConfiguration action. \n The Outposts bucket owner has this permission, by default. The bucket owner can grant this permission to others. For more \n information about permissions, see Permissions \n Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

\n GetBucketLifecycleConfiguration has the following special error:

\n \n

The following actions are related to GetBucketLifecycleConfiguration:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -2028,7 +2028,7 @@ "target": "com.amazonaws.s3control#GetBucketPolicyResult" }, "traits": { - "smithy.api#documentation": "\n

This action gets a bucket policy for an Amazon S3 on Outposts bucket. To get a policy for an S3\n bucket, see GetBucketPolicy in the\n Amazon Simple Storage Service API.

\n
\n

Returns the policy of a specified Outposts bucket. For more information, see Using Amazon S3 on Outposts in the\n Amazon Simple Storage Service User Guide.

\n

If you are using an identity other than the root user of the AWS account that owns the bucket, the calling identity \n must have the GetBucketPolicy permissions on the specified bucket and belong to the bucket owner's account in order to use this action.

\n \n

Only users from Outposts bucket owner account with the right permissions can perform actions on an Outposts bucket. \n If you don't have s3-outposts:GetBucketPolicy permissions or you're not using an identity that belongs to the bucket owner's \n account, Amazon S3 returns a 403 Access Denied error.

\n \n \n

As a security precaution, the root user of the AWS account that owns a bucket can always use this action, even if the policy \n explicitly denies the root user the ability to perform this action.

\n
\n \n

For more information about bucket policies, see Using Bucket Policies and User Policies.

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

The following actions are related to GetBucketPolicy:

\n ", + "smithy.api#documentation": "\n

This action gets a bucket policy for an Amazon S3 on Outposts bucket. To get a policy for an S3\n bucket, see GetBucketPolicy in the\n Amazon S3 API Reference.

\n
\n

Returns the policy of a specified Outposts bucket. For more information, see Using Amazon S3 on Outposts in the\n Amazon S3 User Guide.

\n

If you are using an identity other than the root user of the AWS account that owns the bucket, the calling identity \n must have the GetBucketPolicy permissions on the specified bucket and belong to the bucket owner's account in order to use this action.

\n \n

Only users from Outposts bucket owner account with the right permissions can perform actions on an Outposts bucket. \n If you don't have s3-outposts:GetBucketPolicy permissions or you're not using an identity that belongs to the bucket owner's \n account, Amazon S3 returns a 403 Access Denied error.

\n \n \n

As a security precaution, the root user of the AWS account that owns a bucket can always use this action, even if the policy \n explicitly denies the root user the ability to perform this action.

\n
\n \n

For more information about bucket policies, see Using Bucket Policies and User Policies.

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

The following actions are related to GetBucketPolicy:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -2126,7 +2126,7 @@ "target": "com.amazonaws.s3control#GetBucketTaggingResult" }, "traits": { - "smithy.api#documentation": "\n

This action gets an Amazon S3 on Outposts bucket's tags. To get an \n S3 bucket tags, see GetBucketTagging in the Amazon Simple Storage Service API.\n

\n
\n

Returns the tag set associated with the Outposts bucket. For more information, see\n Using Amazon S3 on Outposts in the\n Amazon Simple Storage Service User Guide.

\n

To use this action, you must have permission to perform the GetBucketTagging action. \n By default, the bucket owner has this permission and can grant this permission to others.

\n \n

\n GetBucketTagging has the following special error:

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

The following actions are related to GetBucketTagging:

\n ", + "smithy.api#documentation": "\n

This action gets an Amazon S3 on Outposts bucket's tags. To get an \n S3 bucket tags, see GetBucketTagging in the Amazon S3 API Reference.\n

\n
\n

Returns the tag set associated with the Outposts bucket. For more information, see\n Using Amazon S3 on Outposts in the\n Amazon S3 User Guide.

\n

To use this action, you must have permission to perform the GetBucketTagging action. \n By default, the bucket owner has this permission and can grant this permission to others.

\n \n

\n GetBucketTagging has the following special error:

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

The following actions are related to GetBucketTagging:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -2191,7 +2191,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the tags on an S3 Batch Operations job. To use this operation, you must have\n permission to perform the s3:GetJobTagging action. For more information, see\n Controlling\n access and labeling jobs using tags in the\n Amazon Simple Storage Service User Guide.

\n

\n

Related actions include:

\n ", + "smithy.api#documentation": "

Returns the tags on an S3 Batch Operations job. To use this operation, you must have\n permission to perform the s3:GetJobTagging action. For more information, see\n Controlling\n access and labeling jobs using tags in the\n Amazon S3 User Guide.

\n

\n

Related actions include:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -2295,7 +2295,7 @@ "target": "com.amazonaws.s3control#GetStorageLensConfigurationResult" }, "traits": { - "smithy.api#documentation": "

Gets the Amazon S3 Storage Lens configuration. For more information, see \n Assessing your storage \n activity and usage with Amazon S3 Storage Lens in the \n Amazon Simple Storage Service User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:GetStorageLensConfiguration action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon Simple Storage Service User Guide.

\n
", + "smithy.api#documentation": "

Gets the Amazon S3 Storage Lens configuration. For more information, see \n Assessing your storage \n activity and usage with Amazon S3 Storage Lens in the \n Amazon S3 User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:GetStorageLensConfiguration action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon S3 User Guide.

\n
", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -2349,7 +2349,7 @@ "target": "com.amazonaws.s3control#GetStorageLensConfigurationTaggingResult" }, "traits": { - "smithy.api#documentation": "

Gets the tags of Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see \n Assessing your storage \n activity and usage with Amazon S3 Storage Lens in the Amazon Simple Storage Service User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:GetStorageLensConfigurationTagging action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon Simple Storage Service User Guide.

\n
", + "smithy.api#documentation": "

Gets the tags of Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see \n Assessing your storage \n activity and usage with Amazon S3 Storage Lens in the Amazon S3 User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:GetStorageLensConfigurationTagging action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon S3 User Guide.

\n
", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -2913,7 +2913,7 @@ } }, "traits": { - "smithy.api#documentation": "

The operation that you want this job to perform on every object listed in the manifest.\n For more information about the available operations, see Operations in the\n Amazon Simple Storage Service User Guide.

" + "smithy.api#documentation": "

The operation that you want this job to perform on every object listed in the manifest.\n For more information about the available operations, see Operations in the\n Amazon S3 User Guide.

" } }, "com.amazonaws.s3control#JobPriority": { @@ -3228,7 +3228,7 @@ "AbortIncompleteMultipartUpload": { "target": "com.amazonaws.s3control#AbortIncompleteMultipartUpload", "traits": { - "smithy.api#documentation": "

Specifies the days since the initiation of an incomplete multipart upload that Amazon S3\n waits before permanently removing all parts of the upload. For more information, see \n Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy in the\n Amazon Simple Storage Service Developer Guide.

" + "smithy.api#documentation": "

Specifies the days since the initiation of an incomplete multipart upload that Amazon S3\n waits before permanently removing all parts of the upload. For more information, see \n Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Policy in the\n Amazon S3 User Guide.

" } } }, @@ -3297,7 +3297,7 @@ "target": "com.amazonaws.s3control#ListAccessPointsResult" }, "traits": { - "smithy.api#documentation": "

Returns a list of the access points currently associated with the specified bucket. You\n can retrieve up to 1000 access points per call. If the specified bucket has more than 1,000\n access points (or the number specified in maxResults, whichever is less), the\n response will include a continuation token that you can use to list the additional access\n points.

\n

\n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n

The following actions are related to ListAccessPoints:

\n ", + "smithy.api#documentation": "

Returns a list of the access points currently associated with the specified bucket. You\n can retrieve up to 1000 access points per call. If the specified bucket has more than 1,000\n access points (or the number specified in maxResults, whichever is less), the\n response will include a continuation token that you can use to list the additional access points.

\n

\n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n

The following actions are related to ListAccessPoints:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -3322,7 +3322,7 @@ "target": "com.amazonaws.s3control#ListAccessPointsForObjectLambdaResult" }, "traits": { - "smithy.api#documentation": "

Returns a list of the access points associated with the Object Lambda Access Point. You\n can retrieve up to 1000 access points per call. If there are more than 1,000\n access points (or the number specified in maxResults, whichever is less), the\n response will include a continuation token that you can use to list the additional access\n points.

\n

The following actions are related to ListAccessPointsForObjectLambda:

\n ", + "smithy.api#documentation": "

Returns a list of the access points associated with the Object Lambda Access Point. You\n can retrieve up to 1000 access points per call. If there are more than 1,000\n access points (or the number specified in maxResults, whichever is less), the\n response will include a continuation token that you can use to list the additional access points.

\n

The following actions are related to ListAccessPointsForObjectLambda:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -3455,7 +3455,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists current S3 Batch Operations jobs and jobs that have ended within the last 30 days for\n the AWS account making the request. For more information, see S3 Batch Operations in the\n Amazon Simple Storage Service User Guide.

\n

Related actions include:

\n

\n ", + "smithy.api#documentation": "

Lists current S3 Batch Operations jobs and jobs that have ended within the last 30 days for\n the AWS account making the request. For more information, see S3 Batch Operations in the\n Amazon S3 User Guide.

\n

Related actions include:

\n

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -3533,7 +3533,7 @@ "target": "com.amazonaws.s3control#ListRegionalBucketsResult" }, "traits": { - "smithy.api#documentation": "

Returns a list of all Outposts buckets in an Outpost that are owned by the authenticated\n sender of the request. For more information, see Using Amazon S3 on Outposts in the\n Amazon Simple Storage Service User Guide.

\n

For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts\n endpoint hostname prefix and x-amz-outpost-id in your request, see the Examples section.

", + "smithy.api#documentation": "

Returns a list of all Outposts buckets in an Outpost that are owned by the authenticated\n sender of the request. For more information, see Using Amazon S3 on Outposts in the\n Amazon S3 User Guide.

\n

For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts\n endpoint hostname prefix and x-amz-outpost-id in your request, see the Examples section.

", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -3645,7 +3645,7 @@ "target": "com.amazonaws.s3control#ListStorageLensConfigurationsResult" }, "traits": { - "smithy.api#documentation": "

Gets a list of Amazon S3 Storage Lens configurations. For more information about S3 Storage Lens, see \n Assessing your storage \n activity and usage with Amazon S3 Storage Lens in the \n Amazon Simple Storage Service User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:ListStorageLensConfigurations action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon Simple Storage Service User Guide.

\n
", + "smithy.api#documentation": "

Gets a list of Amazon S3 Storage Lens configurations. For more information about S3 Storage Lens, see \n Assessing your storage \n activity and usage with Amazon S3 Storage Lens in the \n Amazon S3 User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:ListStorageLensConfigurations action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon S3 User Guide.

\n
", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -3802,7 +3802,7 @@ "NoncurrentDays": { "target": "com.amazonaws.s3control#Days", "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\n Simple Storage Service Developer Guide.

" + "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.

" } } }, @@ -3816,7 +3816,7 @@ "NoncurrentDays": { "target": "com.amazonaws.s3control#Days", "traits": { - "smithy.api#documentation": "

Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. \n For information about the noncurrent days calculations, see \n \n How Amazon S3 Calculates How Long an Object Has Been Noncurrent in the Amazon Simple Storage Service Developer Guide.

" + "smithy.api#documentation": "

Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. \n For information about the noncurrent days calculations, see \n \n How Amazon S3 Calculates How Long an Object Has Been Noncurrent in the Amazon S3 User Guide.

" } }, "StorageClass": { @@ -4105,7 +4105,7 @@ } }, "traits": { - "smithy.api#documentation": "

Indicates whether this access point policy is public. For more information about how Amazon S3 evaluates policies to determine whether they are public, see \n The Meaning of \"Public\" in the \n\t Amazon Simple Storage Service User Guide.\n

" + "smithy.api#documentation": "

Indicates whether this access point policy is public. For more information about how Amazon S3 evaluates policies to determine whether they are public, see \n The Meaning of \"Public\" in the \n\t Amazon S3 User Guide.\n

" } }, "com.amazonaws.s3control#Prefix": { @@ -4176,7 +4176,7 @@ } }, "traits": { - "smithy.api#documentation": "

The PublicAccessBlock configuration that you want to apply to this Amazon S3 account.\n You can enable the configuration options in any combination. For more information about\n when Amazon S3 considers a bucket or object public, see The Meaning of \"Public\" in the Amazon Simple Storage Service Developer\n Guide.

\n

This is not supported for Amazon S3 on Outposts.

" + "smithy.api#documentation": "

The PublicAccessBlock configuration that you want to apply to this Amazon S3 account.\n You can enable the configuration options in any combination. For more information about\n when Amazon S3 considers a bucket or object public, see The Meaning of \"Public\" in the Amazon S3 User Guide.

\n

This is not supported for Amazon S3 on Outposts.

" } }, "com.amazonaws.s3control#PublicAccessBlockEnabled": { @@ -4251,7 +4251,7 @@ "target": "com.amazonaws.s3control#PutAccessPointPolicyForObjectLambdaRequest" }, "traits": { - "smithy.api#documentation": "

Creates or replaces resource policy for an Object Lambda Access Point. For an example policy, see \n Creating Object Lambda Access Points in the Amazon Simple Storage Service User Guide.

\n

The following actions are related to PutAccessPointPolicyForObjectLambda:

\n ", + "smithy.api#documentation": "

Creates or replaces resource policy for an Object Lambda Access Point. For an example policy, see \n Creating Object Lambda Access Points in the Amazon S3 User Guide.

\n

The following actions are related to PutAccessPointPolicyForObjectLambda:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -4314,7 +4314,7 @@ "Policy": { "target": "com.amazonaws.s3control#Policy", "traits": { - "smithy.api#documentation": "

The policy that you want to apply to the specified access point. For more information about access point policies, see Managing data access with Amazon S3 Access Points in the Amazon Simple Storage Service User Guide.

", + "smithy.api#documentation": "

The policy that you want to apply to the specified access point. For more information about access point policies, see Managing data access with Amazon S3 access points in the Amazon S3 User Guide.

", "smithy.api#required": {} } } @@ -4326,7 +4326,7 @@ "target": "com.amazonaws.s3control#PutBucketLifecycleConfigurationRequest" }, "traits": { - "smithy.api#documentation": "\n

This action puts a lifecycle configuration to an Amazon S3 on Outposts bucket. To put a lifecycle configuration to an S3 bucket, \n see PutBucketLifecycleConfiguration in the Amazon Simple Storage Service API.\n

\n
\n

Creates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing\n lifecycle configuration. Outposts buckets only support lifecycle configurations that delete/expire objects\n after a certain period of time and abort incomplete multipart uploads.

\n

\n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n

The following actions are related to PutBucketLifecycleConfiguration:

\n ", + "smithy.api#documentation": "\n

This action puts a lifecycle configuration to an Amazon S3 on Outposts bucket. To put a lifecycle configuration to an S3 bucket, \n see PutBucketLifecycleConfiguration in the Amazon S3 API Reference.\n

\n
\n

Creates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing\n lifecycle configuration. Outposts buckets only support lifecycle configurations that delete/expire objects\n after a certain period of time and abort incomplete multipart uploads.

\n

\n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n

The following actions are related to PutBucketLifecycleConfiguration:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -4374,7 +4374,7 @@ "target": "com.amazonaws.s3control#PutBucketPolicyRequest" }, "traits": { - "smithy.api#documentation": "\n

This action puts a bucket policy to an Amazon S3 on Outposts bucket. To put a policy on an S3 bucket, \n see PutBucketPolicy in the Amazon Simple Storage Service API.\n

\n
\n

Applies an Amazon S3 bucket policy to an Outposts bucket. For more information, see Using Amazon S3 on Outposts in the\n Amazon Simple Storage Service User Guide.

\n

If you are using an identity other than the root user of the AWS account that owns the\n Outposts bucket, the calling identity must have the PutBucketPolicy\n permissions on the specified Outposts bucket and belong to the bucket owner's account in\n order to use this action.

\n \n

If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access Denied error. If you have the correct permissions, \n but you're not using an identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not Allowed error.

\n \n \n

As a security precaution, the root user of the AWS account that owns a bucket can always use this action, even if the policy \n explicitly denies the root user the ability to perform this action.\n

\n
\n \n \n

For more information about bucket policies, see Using Bucket Policies and User Policies.

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

The following actions are related to PutBucketPolicy:

\n ", + "smithy.api#documentation": "\n

This action puts a bucket policy to an Amazon S3 on Outposts bucket. To put a policy on an S3 bucket, \n see PutBucketPolicy in the Amazon S3 API Reference.\n

\n
\n

Applies an Amazon S3 bucket policy to an Outposts bucket. For more information, see Using Amazon S3 on Outposts in the\n Amazon S3 User Guide.

\n

If you are using an identity other than the root user of the AWS account that owns the\n Outposts bucket, the calling identity must have the PutBucketPolicy\n permissions on the specified Outposts bucket and belong to the bucket owner's account in\n order to use this action.

\n \n

If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access Denied error. If you have the correct permissions, \n but you're not using an identity that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not Allowed error.

\n \n \n

As a security precaution, the root user of the AWS account that owns a bucket can always use this action, even if the policy \n explicitly denies the root user the ability to perform this action.\n

\n
\n \n \n

For more information about bucket policies, see Using Bucket Policies and User Policies.

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

The following actions are related to PutBucketPolicy:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -4428,7 +4428,7 @@ "target": "com.amazonaws.s3control#PutBucketTaggingRequest" }, "traits": { - "smithy.api#documentation": "\n

This action puts tags on an Amazon S3 on Outposts bucket. To put tags on an S3 bucket, see\n PutBucketTagging in the Amazon Simple Storage Service API.

\n
\n

Sets the tags for an S3 on Outposts bucket. For more information, see Using Amazon S3 on Outposts in the\n Amazon Simple Storage Service User Guide.

\n

Use tags to organize your AWS bill to reflect your own cost structure. To do this, sign up to get your \n AWS account bill with tag key values included. Then, to see the cost of combined resources, organize your \n billing information according to resources with the same tag key values. For example, you can tag several \n resources with a specific application name, and then organize your billing information to see the total cost \n of that application across several services. For more information, see \n Cost \n allocation and tagging.

\n \n \n

Within a bucket, if you add a tag that has the same key as an existing tag, the new value overwrites \n the old value. For more information, see \n Using cost allocation in Amazon S3 bucket tags.

\n
\n

To use this action, you must have permissions to perform the\n s3-outposts:PutBucketTagging action. The Outposts bucket owner has this\n permission by default and can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing access permissions to your Amazon S3\n resources.

\n \n

\n PutBucketTagging has the following special errors:

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

The following actions are related to PutBucketTagging:

\n ", + "smithy.api#documentation": "\n

This action puts tags on an Amazon S3 on Outposts bucket. To put tags on an S3 bucket, see\n PutBucketTagging in the Amazon S3 API Reference.

\n
\n

Sets the tags for an S3 on Outposts bucket. For more information, see Using Amazon S3 on Outposts in the\n Amazon S3 User Guide.

\n

Use tags to organize your AWS bill to reflect your own cost structure. To do this, sign up to get your \n AWS account bill with tag key values included. Then, to see the cost of combined resources, organize your \n billing information according to resources with the same tag key values. For example, you can tag several \n resources with a specific application name, and then organize your billing information to see the total cost \n of that application across several services. For more information, see \n Cost \n allocation and tagging.

\n \n \n

Within a bucket, if you add a tag that has the same key as an existing tag, the new value overwrites \n the old value. For more information, see \n Using cost allocation in Amazon S3 bucket tags.

\n
\n

To use this action, you must have permissions to perform the\n s3-outposts:PutBucketTagging action. The Outposts bucket owner has this\n permission by default and can grant this permission to others. For more information about\n permissions, see Permissions Related to Bucket Subresource Operations and Managing access permissions to your Amazon S3\n resources.

\n \n

\n PutBucketTagging has the following special errors:

\n \n

All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the access point ARN, see the Examples section.

\n \n

The following actions are related to PutBucketTagging:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -4494,7 +4494,7 @@ } ], "traits": { - "smithy.api#documentation": "

Sets the supplied tag-set on an S3 Batch Operations job.

\n

A tag is a key-value pair. You can associate S3 Batch Operations tags with any job by sending\n a PUT request against the tagging subresource that is associated with the job. To modify\n the existing tag set, you can either replace the existing tag set entirely, or make changes\n within the existing tag set by retrieving the existing tag set using GetJobTagging, modify that tag set, and use this action to replace the\n tag set with the one you modified. For more information, see Controlling access and\n labeling jobs using tags in the Amazon Simple Storage Service User Guide.

\n

\n \n \n \n

\n

To use this action, you must have permission to perform the s3:PutJobTagging action.

\n

Related actions include:

\n ", + "smithy.api#documentation": "

Sets the supplied tag-set on an S3 Batch Operations job.

\n

A tag is a key-value pair. You can associate S3 Batch Operations tags with any job by sending\n a PUT request against the tagging subresource that is associated with the job. To modify\n the existing tag set, you can either replace the existing tag set entirely, or make changes\n within the existing tag set by retrieving the existing tag set using GetJobTagging, modify that tag set, and use this action to replace the\n tag set with the one you modified. For more information, see Controlling access and\n labeling jobs using tags in the Amazon S3 User Guide.

\n

\n \n \n \n

\n

To use this action, you must have permission to perform the s3:PutJobTagging action.

\n

Related actions include:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -4584,7 +4584,7 @@ "target": "com.amazonaws.s3control#PutStorageLensConfigurationRequest" }, "traits": { - "smithy.api#documentation": "

Puts an Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see Working with\n Amazon S3 Storage Lens in the Amazon Simple Storage Service User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:PutStorageLensConfiguration action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon Simple Storage Service User Guide.

\n
", + "smithy.api#documentation": "

Puts an Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see Working with\n Amazon S3 Storage Lens in the Amazon S3 User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:PutStorageLensConfiguration action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon S3 User Guide.

\n
", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -4639,7 +4639,7 @@ "target": "com.amazonaws.s3control#PutStorageLensConfigurationTaggingResult" }, "traits": { - "smithy.api#documentation": "

Put or replace tags on an existing Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see \n Assessing your storage \n activity and usage with Amazon S3 Storage Lens in the \n Amazon Simple Storage Service User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:PutStorageLensConfigurationTagging action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon Simple Storage Service User Guide.

\n
", + "smithy.api#documentation": "

Put or replace tags on an existing Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see \n Assessing your storage \n activity and usage with Amazon S3 Storage Lens in the \n Amazon S3 User Guide.

\n \n

To use this action,\n you must have permission to perform the s3:PutStorageLensConfigurationTagging action. For more\n information, see Setting permissions to use Amazon S3 Storage Lens in the\n Amazon S3 User Guide.

\n
", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -5395,7 +5395,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the S3 Object Lock retention mode to be applied to all objects in the\n S3 Batch Operations job. If you don't provide Mode and RetainUntilDate\n data types in your operation, you will remove the retention from your objects. For more\n information, see Using S3 Object Lock retention\n with S3 Batch Operations in the Amazon Simple Storage Service User Guide.

" + "smithy.api#documentation": "

Contains the S3 Object Lock retention mode to be applied to all objects in the\n S3 Batch Operations job. If you don't provide Mode and RetainUntilDate\n data types in your operation, you will remove the retention from your objects. For more\n information, see Using S3 Object Lock retention\n with S3 Batch Operations in the Amazon S3 User Guide.

" } }, "com.amazonaws.s3control#S3SSEAlgorithm": { @@ -5439,7 +5439,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the configuration for an S3 Object Lock legal hold operation that an\n S3 Batch Operations job passes every object to the underlying\n PutObjectLegalHold API. For more information, see Using\n S3 Object Lock legal hold with S3 Batch Operations in the\n Amazon Simple Storage Service User Guide.

" + "smithy.api#documentation": "

Contains the configuration for an S3 Object Lock legal hold operation that an\n S3 Batch Operations job passes every object to the underlying\n PutObjectLegalHold API. For more information, see Using\n S3 Object Lock legal hold with S3 Batch Operations in the\n Amazon S3 User Guide.

" } }, "com.amazonaws.s3control#S3SetObjectRetentionOperation": { @@ -5455,13 +5455,13 @@ "Retention": { "target": "com.amazonaws.s3control#S3Retention", "traits": { - "smithy.api#documentation": "

Contains the Object Lock retention mode to be applied to all objects in the Batch Operations\n job. For more information, see Using S3 Object Lock retention\n with S3 Batch Operations in the Amazon Simple Storage Service User Guide.

", + "smithy.api#documentation": "

Contains the Object Lock retention mode to be applied to all objects in the Batch Operations\n job. For more information, see Using S3 Object Lock retention\n with S3 Batch Operations in the Amazon S3 User Guide.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Contains the configuration parameters for the Object Lock retention action for an\n S3 Batch Operations job. Batch Operations passes every object to the underlying\n PutObjectRetention API. For more information, see Using\n S3 Object Lock retention with S3 Batch Operations in the\n Amazon Simple Storage Service User Guide.

" + "smithy.api#documentation": "

Contains the configuration parameters for the Object Lock retention action for an\n S3 Batch Operations job. Batch Operations passes every object to the underlying\n PutObjectRetention API. For more information, see Using\n S3 Object Lock retention with S3 Batch Operations in the\n Amazon S3 User Guide.

" } }, "com.amazonaws.s3control#S3SetObjectTaggingOperation": { @@ -5816,7 +5816,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@%]*)$" + "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" } }, "com.amazonaws.s3control#TagValueString": { @@ -5826,7 +5826,7 @@ "min": 0, "max": 1024 }, - "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@%]*)$" + "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" } }, "com.amazonaws.s3control#Tagging": { @@ -5894,7 +5894,7 @@ } }, "traits": { - "smithy.api#documentation": "

Specifies when an object transitions to a specified storage class. For more information\n about Amazon S3 Lifecycle configuration rules, see \n Transitioning objects using Amazon S3 Lifecycle in the\n Amazon Simple Storage Service User Guide.

" + "smithy.api#documentation": "

Specifies when an object transitions to a specified storage class. For more information\n about Amazon S3 Lifecycle configuration rules, see \n Transitioning objects using Amazon S3 Lifecycle in the\n Amazon S3 User Guide.

" } }, "com.amazonaws.s3control#TransitionList": { @@ -5956,7 +5956,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates an existing S3 Batch Operations job's priority. For more information, see S3 Batch Operations in the\n Amazon Simple Storage Service User Guide.

\n

\n

Related actions include:

\n ", + "smithy.api#documentation": "

Updates an existing S3 Batch Operations job's priority. For more information, see S3 Batch Operations in the\n Amazon S3 User Guide.

\n

\n

Related actions include:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, @@ -6042,7 +6042,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the status for the specified job. Use this action to confirm that you want to\n run a job or to cancel an existing job. For more information, see S3 Batch Operations in the\n Amazon Simple Storage Service User Guide.

\n

\n

Related actions include:

\n ", + "smithy.api#documentation": "

Updates the status for the specified job. Use this action to confirm that you want to\n run a job or to cancel an existing job. For more information, see S3 Batch Operations in the\n Amazon S3 User Guide.

\n

\n

Related actions include:

\n ", "smithy.api#endpoint": { "hostPrefix": "{AccountId}." }, 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 0e3d507c94f..e648c7bff03 100644 --- a/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json +++ b/codegen/sdk-codegen/aws-models/ssm.2014-11-06.json @@ -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: Key=Owner and\n Value=DbAdmin, SysAdmin, or Dev. Or Key=Stack and Value=Production, Pre-Production, or\n Test.

\n\n

Each resource can have a maximum of 50 tags.

\n

We 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.

\n

For more information about using tags with EC2 instances, see Tagging your Amazon EC2 resources in the\n 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 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: Key=Owner and\n Value=DbAdmin, SysAdmin, or Dev. Or Key=Stack and Value=Production, Pre-Production, or\n Test.

\n

Each resource can have a maximum of 50 tags.

\n

We 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.

\n

For more information about using tags with EC2 instances, see Tagging your Amazon EC2 resources in the\n Amazon EC2 User Guide.

" } }, "com.amazonaws.ssm#AddTagsToResourceRequest": { @@ -237,7 +237,7 @@ "ResourceId": { "target": "com.amazonaws.ssm#ResourceId", "traits": { - "smithy.api#documentation": "

The resource ID you want to tag.

\n

Use the ID of the resource. Here are some examples:

\n

ManagedInstance: mi-012345abcde

\n

MaintenanceWindow: mw-012345abcde

\n

PatchBaseline: pb-012345abcde

\n

OpsMetadata 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.

\n

For the Document and Parameter values, use the name of the resource.

\n\n \n

The ManagedInstance type for this API action is only for on-premises managed instances. You\n must specify the name of the managed instance in the following format: mi-ID_number. For\n example, mi-1a2b3c4d5e6f.

\n
", + "smithy.api#documentation": "

The resource ID you want to tag.

\n

Use the ID of the resource. Here are some examples:

\n

ManagedInstance: mi-012345abcde

\n

MaintenanceWindow: mw-012345abcde

\n

PatchBaseline: pb-012345abcde

\n

OpsMetadata 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.

\n

For the Document and Parameter values, use the name of the resource.

\n \n

The ManagedInstance type for this API action is only for on-premises managed instances. You\n must specify the name of the managed instance in the following format: mi-ID_number. For\n example, mi-1a2b3c4d5e6f.

\n
", "smithy.api#required": {} } }, @@ -294,6 +294,9 @@ { "target": "com.amazonaws.ssm#AddTagsToResource" }, + { + "target": "com.amazonaws.ssm#AssociateOpsItemRelatedItem" + }, { "target": "com.amazonaws.ssm#CancelCommand" }, @@ -465,6 +468,9 @@ { "target": "com.amazonaws.ssm#DescribeSessions" }, + { + "target": "com.amazonaws.ssm#DisassociateOpsItemRelatedItem" + }, { "target": "com.amazonaws.ssm#GetAutomationExecution" }, @@ -573,6 +579,9 @@ { "target": "com.amazonaws.ssm#ListOpsItemEvents" }, + { + "target": "com.amazonaws.ssm#ListOpsItemRelatedItems" + }, { "target": "com.amazonaws.ssm#ListOpsMetadata" }, @@ -700,7 +709,7 @@ "name": "ssm" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "AWS Systems Manager\n

AWS 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.

\n

This reference is intended to be used with the AWS Systems Manager User Guide.

\n

To get started, verify prerequisites and configure managed instances. For more information,\n see Setting up\n AWS Systems Manager in the AWS Systems Manager User Guide.

\n

For information about other API actions you can perform on EC2 instances, see the Amazon EC2 API Reference. For information\n about how to use a Query API, see Making API requests.

", + "smithy.api#documentation": "AWS Systems Manager\n

AWS 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.

\n

This reference is intended to be used with the AWS Systems Manager User Guide.

\n

To get started, verify prerequisites and configure managed instances. For more information,\n see Setting up\n AWS Systems Manager in the AWS Systems Manager User Guide.

\n

\n Related resources\n

\n ", "smithy.api#title": "Amazon Simple Systems Manager (SSM)", "smithy.api#xmlNamespace": { "uri": "http://ssm.amazonaws.com/doc/2014-11-06/" @@ -719,6 +728,79 @@ } } }, + "com.amazonaws.ssm#AssociateOpsItemRelatedItem": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssm#AssociateOpsItemRelatedItemRequest" + }, + "output": { + "target": "com.amazonaws.ssm#AssociateOpsItemRelatedItemResponse" + }, + "errors": [ + { + "target": "com.amazonaws.ssm#InternalServerError" + }, + { + "target": "com.amazonaws.ssm#OpsItemInvalidParameterException" + }, + { + "target": "com.amazonaws.ssm#OpsItemLimitExceededException" + }, + { + "target": "com.amazonaws.ssm#OpsItemNotFoundException" + }, + { + "target": "com.amazonaws.ssm#OpsItemRelatedItemAlreadyExistsException" + } + ], + "traits": { + "smithy.api#documentation": "

Associates a related resource to a Systems Manager OpsCenter OpsItem. For example, you can\n associate an Incident Manager incident or analysis with an OpsItem. Incident Manager is a\n capability of AWS Systems Manager.

" + } + }, + "com.amazonaws.ssm#AssociateOpsItemRelatedItemRequest": { + "type": "structure", + "members": { + "OpsItemId": { + "target": "com.amazonaws.ssm#OpsItemId", + "traits": { + "smithy.api#documentation": "

The ID of the OpsItem to which you want to associate a resource as a related item.

", + "smithy.api#required": {} + } + }, + "AssociationType": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemAssociationType", + "traits": { + "smithy.api#documentation": "

The type of association that you want to create between an OpsItem and a resource. OpsCenter\n supports IsParentOf and RelatesTo association types.

", + "smithy.api#required": {} + } + }, + "ResourceType": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemAssociationResourceType", + "traits": { + "smithy.api#documentation": "

The type of resource that you want to associate with an OpsItem. OpsCenter supports the\n following types:

\n

\n AWS::SSMIncidents::IncidentRecord: an Incident Manager incident. Incident\n Manager is a capability of AWS Systems Manager.

\n

\n AWS::SSM::Document: a Systems Manager (SSM) document.

", + "smithy.api#required": {} + } + }, + "ResourceUri": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemAssociationResourceUri", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AWS resource that you want to associate with the\n OpsItem.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssm#AssociateOpsItemRelatedItemResponse": { + "type": "structure", + "members": { + "AssociationId": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemAssociationId", + "traits": { + "smithy.api#documentation": "

The association ID.

" + } + } + } + }, "com.amazonaws.ssm#AssociatedInstances": { "type": "structure", "members": {}, @@ -2674,7 +2756,7 @@ "ApprovedPatches": { "target": "com.amazonaws.ssm#PatchIdList", "traits": { - "smithy.api#documentation": "

A list of explicitly approved patches for the baseline.

\n

For information about accepted formats for lists of approved patches and rejected patches,\n see About\n package name formats for approved and rejected patch lists in the AWS Systems Manager User Guide.

" + "smithy.api#documentation": "

A list of explicitly approved patches for the baseline.

\n

For information about accepted formats for lists of approved patches and rejected patches,\n see About\n package name formats for approved and rejected patch lists in the AWS Systems Manager User Guide.

" } }, "ApprovedPatchesComplianceLevel": { @@ -2686,7 +2768,7 @@ "RejectedPatches": { "target": "com.amazonaws.ssm#PatchIdList", "traits": { - "smithy.api#documentation": "

A list of explicitly rejected patches for the baseline.

\n

For information about accepted formats for lists of approved patches and rejected patches,\n see About\n package name formats for approved and rejected patch lists in the AWS Systems Manager User Guide.

" + "smithy.api#documentation": "

A list of explicitly rejected patches for the baseline.

\n

For information about accepted formats for lists of approved patches and rejected patches,\n see About\n package name formats for approved and rejected patch lists in the AWS Systems Manager User Guide.

" } }, "RejectedPatchesAction": { @@ -4021,7 +4103,7 @@ "Tags": { "target": "com.amazonaws.ssm#TagList", "traits": { - "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 name/value\n pairs:

\n \n \n

When you install SSM Agent on your on-premises servers and VMs, you specify an activation\n ID 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.

\n
\n\n

You 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 AWS 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 name/value\n pairs:

\n \n \n

When you install SSM Agent on your on-premises servers and VMs, you specify an activation\n ID 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.

\n
\n

You 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 AWS 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.

" } } } @@ -4459,6 +4541,12 @@ "smithy.api#required": {} } }, + "DisplayName": { + "target": "com.amazonaws.ssm#DocumentDisplayName", + "traits": { + "smithy.api#documentation": "

An optional field where you can specify a friendly name for the Systems Manager document. This value\n can differ for each version of the document. You can update this value at a later time using the\n UpdateDocument action.

" + } + }, "VersionName": { "target": "com.amazonaws.ssm#DocumentVersionName", "traits": { @@ -4486,7 +4574,7 @@ "Tags": { "target": "com.amazonaws.ssm#TagList", "traits": { - "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 SSM document to identify the types of targets or the environment where it will run. In this case,\n you could specify the following key name/value pairs:

\n\n \n \n

To add tags to an existing SSM document, use the AddTagsToResource\n action.

\n
" + "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 SSM document to identify the types of targets or the environment where it will run. In this case,\n you could specify the following key name/value pairs:

\n \n \n

To add tags to an existing SSM document, use the AddTagsToResource\n action.

\n
" } } } @@ -4665,7 +4753,7 @@ "OperationalData": { "target": "com.amazonaws.ssm#OpsItemOperationalData", "traits": { - "smithy.api#documentation": "

Operational data is custom data that provides useful reference details about the OpsItem.\n For example, you can specify log files, error strings, license keys, troubleshooting tips, or\n other relevant data. You enter operational data as key-value pairs. The key has a maximum length\n of 128 characters. The value has a maximum size of 20 KB.

\n \n

Operational data keys can't begin with the following: amazon, aws,\n amzn, ssm, /amazon, /aws, /amzn, /ssm.

\n
\n

You can choose to make the data searchable by other users in the account or you can restrict\n search access. Searchable data means that all users with access to the OpsItem Overview page (as\n provided by the DescribeOpsItems API action) can view and search on the\n specified data. Operational data that is not searchable is only viewable by users who have access\n to the OpsItem (as provided by the GetOpsItem API action).

\n\n

Use the /aws/resources key in OperationalData to specify a related resource in\n the request. Use the /aws/automations key in OperationalData to associate an\n Automation runbook with the OpsItem. To view AWS CLI example commands that use these keys, see\n Creating OpsItems manually in the AWS Systems Manager User Guide.

" + "smithy.api#documentation": "

Operational data is custom data that provides useful reference details about the OpsItem.\n For example, you can specify log files, error strings, license keys, troubleshooting tips, or\n other relevant data. You enter operational data as key-value pairs. The key has a maximum length\n of 128 characters. The value has a maximum size of 20 KB.

\n \n

Operational data keys can't begin with the following: amazon, aws,\n amzn, ssm, /amazon, /aws, /amzn, /ssm.

\n
\n

You can choose to make the data searchable by other users in the account or you can restrict\n search access. Searchable data means that all users with access to the OpsItem Overview page (as\n provided by the DescribeOpsItems API action) can view and search on the\n specified data. Operational data that is not searchable is only viewable by users who have access\n to the OpsItem (as provided by the GetOpsItem API action).

\n

Use the /aws/resources key in OperationalData to specify a related resource in\n the request. Use the /aws/automations key in OperationalData to associate an\n Automation runbook with the OpsItem. To view AWS CLI example commands that use these keys, see\n Creating OpsItems manually in the AWS Systems Manager User Guide.

" } }, "Notifications": { @@ -4703,7 +4791,7 @@ "Tags": { "target": "com.amazonaws.ssm#TagList", "traits": { - "smithy.api#documentation": "

Optional metadata that you assign to a resource. You can restrict access to OpsItems by\n using an inline IAM policy that specifies tags. For more information, see Getting started with OpsCenter in the AWS Systems Manager User Guide.

\n

Tags use a key-value pair. For example:

\n\n

\n Key=Department,Value=Finance\n

\n\n \n

To add tags to an existing OpsItem, use the AddTagsToResource\n action.

\n
" + "smithy.api#documentation": "

Optional metadata that you assign to a resource. You can restrict access to OpsItems by\n using an inline IAM policy that specifies tags. For more information, see Getting started with OpsCenter in the AWS Systems Manager User Guide.

\n

Tags use a key-value pair. For example:

\n

\n Key=Department,Value=Finance\n

\n \n

To add tags to an existing OpsItem, use the AddTagsToResource\n action.

\n
" } }, "Category": { @@ -4873,7 +4961,7 @@ "ApprovedPatches": { "target": "com.amazonaws.ssm#PatchIdList", "traits": { - "smithy.api#documentation": "

A list of explicitly approved patches for the baseline.

\n

For information about accepted formats for lists of approved patches and rejected patches,\n see About\n package name formats for approved and rejected patch lists in the AWS Systems Manager User Guide.

" + "smithy.api#documentation": "

A list of explicitly approved patches for the baseline.

\n

For information about accepted formats for lists of approved patches and rejected patches,\n see About\n package name formats for approved and rejected patch lists in the AWS Systems Manager User Guide.

" } }, "ApprovedPatchesComplianceLevel": { @@ -4892,7 +4980,7 @@ "RejectedPatches": { "target": "com.amazonaws.ssm#PatchIdList", "traits": { - "smithy.api#documentation": "

A list of explicitly rejected patches for the baseline.

\n

For information about accepted formats for lists of approved patches and rejected patches,\n see About\n package name formats for approved and rejected patch lists in the AWS Systems Manager User Guide.

" + "smithy.api#documentation": "

A list of explicitly rejected patches for the baseline.

\n

For information about accepted formats for lists of approved patches and rejected patches,\n see About\n package name formats for approved and rejected patch lists in the AWS Systems Manager User Guide.

" } }, "RejectedPatchesAction": { @@ -4962,7 +5050,7 @@ } ], "traits": { - "smithy.api#documentation": "

A resource data sync helps you view data from multiple sources in a single location. Systems\n Manager offers two types of resource data sync: SyncToDestination and\n SyncFromSource.

\n

You can configure Systems Manager Inventory to use the SyncToDestination type to\n synchronize Inventory data from multiple AWS Regions to a single S3 bucket. For more information,\n see Configuring Resource Data\n Sync for Inventory in the AWS Systems Manager User Guide.

\n\n

You can configure Systems Manager Explorer to use the SyncFromSource type to synchronize\n operational work items (OpsItems) and operational data (OpsData) from multiple AWS Regions to a\n single S3 bucket. This type can synchronize OpsItems and OpsData from multiple AWS accounts and\n Regions or EntireOrganization by using AWS Organizations. For more information, see Setting up Systems Manager Explorer to display data from multiple accounts and Regions in the\n AWS Systems Manager User Guide.

\n\n

A resource data sync is an asynchronous operation that returns immediately. After a\n successful initial sync is completed, the system continuously syncs data. To check the status of\n a sync, use the ListResourceDataSync.

\n\n \n

By default, data is not encrypted in Amazon S3. We strongly recommend that you enable encryption\n in Amazon S3 to ensure secure data storage. We also recommend that you secure access to the Amazon S3\n bucket by creating a restrictive bucket policy.

\n
" + "smithy.api#documentation": "

A resource data sync helps you view data from multiple sources in a single location. Systems\n Manager offers two types of resource data sync: SyncToDestination and\n SyncFromSource.

\n

You can configure Systems Manager Inventory to use the SyncToDestination type to\n synchronize Inventory data from multiple AWS Regions to a single S3 bucket. For more information,\n see Configuring Resource Data\n Sync for Inventory in the AWS Systems Manager User Guide.

\n

You can configure Systems Manager Explorer to use the SyncFromSource type to synchronize\n operational work items (OpsItems) and operational data (OpsData) from multiple AWS Regions to a\n single S3 bucket. This type can synchronize OpsItems and OpsData from multiple AWS accounts and\n Regions or EntireOrganization by using AWS Organizations. For more information, see Setting up Systems Manager Explorer to display data from multiple accounts and Regions in the\n AWS Systems Manager User Guide.

\n

A resource data sync is an asynchronous operation that returns immediately. After a\n successful initial sync is completed, the system continuously syncs data. To check the status of\n a sync, use the ListResourceDataSync.

\n \n

By default, data is not encrypted in Amazon S3. We strongly recommend that you enable encryption\n in Amazon S3 to ensure secure data storage. We also recommend that you secure access to the Amazon S3\n bucket by creating a restrictive bucket policy.

\n
" } }, "com.amazonaws.ssm#CreateResourceDataSyncRequest": { @@ -6226,7 +6314,7 @@ "target": "com.amazonaws.ssm#Boolean", "traits": { "smithy.api#box": {}, - "smithy.api#documentation": "

A boolean that indicates whether to list step executions in reverse order by start time. The\n default value is 'false'.

" + "smithy.api#documentation": "

Indicates whether to list step executions in reverse order by start time. The default value\n is 'false'.

" } } } @@ -8187,6 +8275,55 @@ "com.amazonaws.ssm#DescriptionInDocument": { "type": "string" }, + "com.amazonaws.ssm#DisassociateOpsItemRelatedItem": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssm#DisassociateOpsItemRelatedItemRequest" + }, + "output": { + "target": "com.amazonaws.ssm#DisassociateOpsItemRelatedItemResponse" + }, + "errors": [ + { + "target": "com.amazonaws.ssm#InternalServerError" + }, + { + "target": "com.amazonaws.ssm#OpsItemInvalidParameterException" + }, + { + "target": "com.amazonaws.ssm#OpsItemNotFoundException" + }, + { + "target": "com.amazonaws.ssm#OpsItemRelatedItemAssociationNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the association between an OpsItem and a related resource. For example, this API\n action can delete an Incident Manager incident from an OpsItem. Incident Manager is a capability\n of AWS Systems Manager.

" + } + }, + "com.amazonaws.ssm#DisassociateOpsItemRelatedItemRequest": { + "type": "structure", + "members": { + "OpsItemId": { + "target": "com.amazonaws.ssm#OpsItemId", + "traits": { + "smithy.api#documentation": "

The ID of the OpsItem for which you want to delete an association between the OpsItem and a\n related resource.

", + "smithy.api#required": {} + } + }, + "AssociationId": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemAssociationId", + "traits": { + "smithy.api#documentation": "

The ID of the association for which you want to delete an association between the OpsItem\n and a related resource.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssm#DisassociateOpsItemRelatedItemResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.ssm#DocumentARN": { "type": "string", "traits": { @@ -8269,6 +8406,12 @@ "smithy.api#documentation": "

The name of the Systems Manager document.

" } }, + "DisplayName": { + "target": "com.amazonaws.ssm#DocumentDisplayName", + "traits": { + "smithy.api#documentation": "

The friendly name of the Systems Manager document. This value can differ for each version of the\n document. If you want to update this value, see UpdateDocument.

" + } + }, "VersionName": { "target": "com.amazonaws.ssm#DocumentVersionName", "traits": { @@ -8412,6 +8555,16 @@ "smithy.api#documentation": "

Describes a Systems Manager document.

" } }, + "com.amazonaws.ssm#DocumentDisplayName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": "^[\\w\\.\\-\\:\\/ ]*$" + } + }, "com.amazonaws.ssm#DocumentFilter": { "type": "structure", "members": { @@ -8531,6 +8684,18 @@ "smithy.api#documentation": "

The name of the Systems Manager document.

" } }, + "CreatedDate": { + "target": "com.amazonaws.ssm#DateTime", + "traits": { + "smithy.api#documentation": "

The date the Systems Manager document was created.

" + } + }, + "DisplayName": { + "target": "com.amazonaws.ssm#DocumentDisplayName", + "traits": { + "smithy.api#documentation": "

An optional field where you can specify a friendly name for the Systems Manager document. This value\n can differ for each version of the document. If you want to update this value, see UpdateDocument.

" + } + }, "Owner": { "target": "com.amazonaws.ssm#DocumentOwner", "traits": { @@ -9072,6 +9237,14 @@ { "value": "Automation.ChangeTemplate", "name": "ChangeTemplate" + }, + { + "value": "ProblemAnalysis", + "name": "ProblemAnalysis" + }, + { + "value": "ProblemAnalysisTemplate", + "name": "ProblemAnalysisTemplate" } ] } @@ -9091,6 +9264,12 @@ "smithy.api#documentation": "

The document name.

" } }, + "DisplayName": { + "target": "com.amazonaws.ssm#DocumentDisplayName", + "traits": { + "smithy.api#documentation": "

The friendly name of the Systems Manager document. This value can differ for each version of the\n document. If you want to update this value, see UpdateDocument.

" + } + }, "DocumentVersion": { "target": "com.amazonaws.ssm#DocumentVersion", "traits": { @@ -9707,7 +9886,7 @@ "StatusDetails": { "target": "com.amazonaws.ssm#StatusDetails", "traits": { - "smithy.api#documentation": "

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 AWS Systems Manager User Guide.\n StatusDetails can be one of the following values:

\n\n " + "smithy.api#documentation": "

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 AWS Systems Manager User Guide.\n StatusDetails can be one of the following values:

\n " } }, "StandardOutputContent": { @@ -9972,6 +10151,18 @@ "smithy.api#documentation": "

The name of the Systems Manager document.

" } }, + "CreatedDate": { + "target": "com.amazonaws.ssm#DateTime", + "traits": { + "smithy.api#documentation": "

The date the Systems Manager document was created.

" + } + }, + "DisplayName": { + "target": "com.amazonaws.ssm#DocumentDisplayName", + "traits": { + "smithy.api#documentation": "

The friendly name of the Systems Manager document. This value can differ for each version of the\n document. If you want to update this value, see UpdateDocument.

" + } + }, "VersionName": { "target": "com.amazonaws.ssm#DocumentVersionName", "traits": { @@ -11520,7 +11711,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n ServiceSetting is an account-level setting for an AWS service. This setting\n defines how a user interacts with or uses a service or a feature of a service. For example, if an\n AWS service charges money to the account based on feature or service usage, then the AWS service\n team might create a default setting of \"false\". This means the user can't use this feature unless\n they change the setting to \"true\" and intentionally opt in for a paid feature.

\n

Services map a SettingId object to a setting value. AWS services teams define\n the default value for a SettingId. You can't create a new SettingId,\n but you can overwrite the default value if you have the ssm:UpdateServiceSetting\n permission for the setting. Use the UpdateServiceSetting API action to change\n the default setting. Or use the ResetServiceSetting to change the value back to\n the original value defined by the AWS service team.

\n\n

Query the current service setting for the account.

" + "smithy.api#documentation": "

\n ServiceSetting is an account-level setting for an AWS service. This setting\n defines how a user interacts with or uses a service or a feature of a service. For example, if an\n AWS service charges money to the account based on feature or service usage, then the AWS service\n team might create a default setting of \"false\". This means the user can't use this feature unless\n they change the setting to \"true\" and intentionally opt in for a paid feature.

\n

Services map a SettingId object to a setting value. AWS services teams define\n the default value for a SettingId. You can't create a new SettingId,\n but you can overwrite the default value if you have the ssm:UpdateServiceSetting\n permission for the setting. Use the UpdateServiceSetting API action to change\n the default setting. Or use the ResetServiceSetting to change the value back to\n the original value defined by the AWS service team.

\n

Query the current service setting for the account.

" } }, "com.amazonaws.ssm#GetServiceSettingRequest": { @@ -14704,6 +14895,78 @@ } } }, + "com.amazonaws.ssm#ListOpsItemRelatedItems": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssm#ListOpsItemRelatedItemsRequest" + }, + "output": { + "target": "com.amazonaws.ssm#ListOpsItemRelatedItemsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.ssm#InternalServerError" + }, + { + "target": "com.amazonaws.ssm#OpsItemInvalidParameterException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all related-item resources associated with an OpsItem.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Summaries", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.ssm#ListOpsItemRelatedItemsRequest": { + "type": "structure", + "members": { + "OpsItemId": { + "target": "com.amazonaws.ssm#OpsItemId", + "traits": { + "smithy.api#documentation": "

The ID of the OpsItem for which you want to list all related-item resources.

" + } + }, + "Filters": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemsFilters", + "traits": { + "smithy.api#documentation": "

One or more OpsItem filters. Use a filter to return a more specific list of results.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemsMaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of items to return for this call. The call also returns a token that you\n can specify in a subsequent call to get the next set of results.

" + } + }, + "NextToken": { + "target": "com.amazonaws.ssm#String", + "traits": { + "smithy.api#documentation": "

The token for the next set of items to return. (You received this token from a previous\n call.)

" + } + } + } + }, + "com.amazonaws.ssm#ListOpsItemRelatedItemsResponse": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.ssm#String", + "traits": { + "smithy.api#documentation": "

The token for the next set of items to return. Use this token to get the next set of\n results.

" + } + }, + "Summaries": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemSummaries", + "traits": { + "smithy.api#documentation": "

A list of related-item resources for the specified OpsItem.

" + } + } + } + }, "com.amazonaws.ssm#ListOpsMetadata": { "type": "operation", "input": { @@ -15019,7 +15282,7 @@ "Parameters": { "target": "com.amazonaws.ssm#AutomationParameterMap", "traits": { - "smithy.api#documentation": "

The parameters for the AUTOMATION task.

\n\n

For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow and UpdateMaintenanceWindowTask.

\n \n

\n LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, instead use the\n OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure.\n For information about how Systems Manager handles these options for the supported maintenance\n window task types, see MaintenanceWindowTaskInvocationParameters.

\n

\n TaskParameters has been deprecated. To specify parameters to pass to a task when it runs,\n instead use the Parameters option in the TaskInvocationParameters structure. For information\n about how Systems Manager handles these options for the supported maintenance window task\n types, see MaintenanceWindowTaskInvocationParameters.

\n

For AUTOMATION task types,\n Systems Manager ignores any values specified for these parameters.

\n
" + "smithy.api#documentation": "

The parameters for the AUTOMATION task.

\n

For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow and UpdateMaintenanceWindowTask.

\n \n \n

\n LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, instead use the\n OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure.\n For information about how Systems Manager handles these options for the supported maintenance\n window task types, see MaintenanceWindowTaskInvocationParameters.

\n \n

\n TaskParameters has been deprecated. To specify parameters to pass to a task when it runs,\n instead use the Parameters option in the TaskInvocationParameters structure. For information\n about how Systems Manager handles these options for the supported maintenance window task\n types, see MaintenanceWindowTaskInvocationParameters.

\n

For AUTOMATION task types, Systems Manager ignores any values specified for these parameters.

\n
" } } }, @@ -15554,7 +15817,7 @@ } }, "traits": { - "smithy.api#documentation": "

The parameters for a LAMBDA task type.

\n

For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow and UpdateMaintenanceWindowTask.

\n \n

\n LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, instead use the\n OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure.\n For information about how Systems Manager handles these options for the supported maintenance\n window task types, see MaintenanceWindowTaskInvocationParameters.

\n

\n TaskParameters has been deprecated. To specify parameters to pass to a task when it runs,\n instead use the Parameters option in the TaskInvocationParameters structure. For information\n about how Systems Manager handles these options for the supported maintenance window task\n types, see MaintenanceWindowTaskInvocationParameters.

\n

For Lambda tasks, Systems Manager\n ignores any values specified for TaskParameters and LoggingInfo.

\n
" + "smithy.api#documentation": "

The parameters for a LAMBDA task type.

\n

For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow and UpdateMaintenanceWindowTask.

\n \n \n

\n LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, instead use the\n OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure.\n For information about how Systems Manager handles these options for the supported maintenance\n window task types, see MaintenanceWindowTaskInvocationParameters.

\n \n

\n TaskParameters has been deprecated. To specify parameters to pass to a task when it runs,\n instead use the Parameters option in the TaskInvocationParameters structure. For information\n about how Systems Manager handles these options for the supported maintenance window task\n types, see MaintenanceWindowTaskInvocationParameters.

\n

For Lambda tasks, Systems Manager ignores any values specified for TaskParameters and\n LoggingInfo.

\n
" } }, "com.amazonaws.ssm#MaintenanceWindowLambdaPayload": { @@ -15688,7 +15951,7 @@ } }, "traits": { - "smithy.api#documentation": "

The parameters for a RUN_COMMAND task type.

\n

For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow and UpdateMaintenanceWindowTask.

\n \n

\n LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, instead use the\n OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure.\n For information about how Systems Manager handles these options for the supported maintenance\n window task types, see MaintenanceWindowTaskInvocationParameters.

\n

\n TaskParameters has been deprecated. To specify parameters to pass to a task when it runs,\n instead use the Parameters option in the TaskInvocationParameters structure. For information\n about how Systems Manager handles these options for the supported maintenance window task\n types, see MaintenanceWindowTaskInvocationParameters.

\n

For Run Command tasks, Systems Manager\n uses specified values for TaskParameters and LoggingInfo only if no\n values are specified for TaskInvocationParameters.

\n
" + "smithy.api#documentation": "

The parameters for a RUN_COMMAND task type.

\n

For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow and UpdateMaintenanceWindowTask.

\n \n \n

\n LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, instead use the\n OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure.\n For information about how Systems Manager handles these options for the supported maintenance\n window task types, see MaintenanceWindowTaskInvocationParameters.

\n \n

\n TaskParameters has been deprecated. To specify parameters to pass to a task when it runs,\n instead use the Parameters option in the TaskInvocationParameters structure. For information\n about how Systems Manager handles these options for the supported maintenance window task\n types, see MaintenanceWindowTaskInvocationParameters.

\n

For Run Command tasks, Systems Manager uses specified values for TaskParameters and\n LoggingInfo only if no values are specified for\n TaskInvocationParameters.

\n
" } }, "com.amazonaws.ssm#MaintenanceWindowSchedule": { @@ -15744,7 +16007,7 @@ } }, "traits": { - "smithy.api#documentation": "

The parameters for a STEP_FUNCTIONS task.

\n

For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow and UpdateMaintenanceWindowTask.

\n \n

\n LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, instead use the\n OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure.\n For information about how Systems Manager handles these options for the supported maintenance\n window task types, see MaintenanceWindowTaskInvocationParameters.

\n

\n TaskParameters has been deprecated. To specify parameters to pass to a task when it runs,\n instead use the Parameters option in the TaskInvocationParameters structure. For information\n about how Systems Manager handles these options for the supported maintenance window task\n types, see MaintenanceWindowTaskInvocationParameters.

\n

For Step Functions tasks,\n Systems Manager ignores any values specified for TaskParameters and\n LoggingInfo.

\n
" + "smithy.api#documentation": "

The parameters for a STEP_FUNCTIONS task.

\n

For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow and UpdateMaintenanceWindowTask.

\n \n \n

\n LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, instead use the\n OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure.\n For information about how Systems Manager handles these options for the supported maintenance\n window task types, see MaintenanceWindowTaskInvocationParameters.

\n \n

\n TaskParameters has been deprecated. To specify parameters to pass to a task when it runs,\n instead use the Parameters option in the TaskInvocationParameters structure. For information\n about how Systems Manager handles these options for the supported maintenance window task\n types, see MaintenanceWindowTaskInvocationParameters.

\n

For Step Functions tasks, Systems Manager ignores any values specified for\n TaskParameters and LoggingInfo.

\n
" } }, "com.amazonaws.ssm#MaintenanceWindowStringDateTime": { @@ -16833,7 +17096,7 @@ "OperationalData": { "target": "com.amazonaws.ssm#OpsItemOperationalData", "traits": { - "smithy.api#documentation": "

Operational data is custom data that provides useful reference details about the OpsItem.\n For example, you can specify log files, error strings, license keys, troubleshooting tips, or\n other relevant data. You enter operational data as key-value pairs. The key has a maximum length\n of 128 characters. The value has a maximum size of 20 KB.

\n \n

Operational data keys can't begin with the following: amazon, aws,\n amzn, ssm, /amazon, /aws, /amzn, /ssm.

\n
\n

You can choose to make the data searchable by other users in the account or you can restrict\n search access. Searchable data means that all users with access to the OpsItem Overview page (as\n provided by the DescribeOpsItems API action) can view and search on the\n specified data. Operational data that is not searchable is only viewable by users who have access\n to the OpsItem (as provided by the GetOpsItem API action).

\n\n

Use the /aws/resources key in OperationalData to specify a related resource in\n the request. Use the /aws/automations key in OperationalData to associate an\n Automation runbook with the OpsItem. To view AWS CLI example commands that use these keys, see\n Creating OpsItems manually in the AWS Systems Manager User Guide.

" + "smithy.api#documentation": "

Operational data is custom data that provides useful reference details about the OpsItem.\n For example, you can specify log files, error strings, license keys, troubleshooting tips, or\n other relevant data. You enter operational data as key-value pairs. The key has a maximum length\n of 128 characters. The value has a maximum size of 20 KB.

\n \n

Operational data keys can't begin with the following: amazon, aws,\n amzn, ssm, /amazon, /aws, /amzn, /ssm.

\n
\n

You can choose to make the data searchable by other users in the account or you can restrict\n search access. Searchable data means that all users with access to the OpsItem Overview page (as\n provided by the DescribeOpsItems API action) can view and search on the\n specified data. Operational data that is not searchable is only viewable by users who have access\n to the OpsItem (as provided by the GetOpsItem API action).

\n

Use the /aws/resources key in OperationalData to specify a related resource in\n the request. Use the /aws/automations key in OperationalData to associate an\n Automation runbook with the OpsItem. To view AWS CLI example commands that use these keys, see\n Creating OpsItems manually in the AWS Systems Manager User Guide.

" } }, "Category": { @@ -16958,7 +17221,7 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 1024 + "max": 2048 }, "smithy.api#pattern": "[\\s\\S]*\\S[\\s\\S]*" } @@ -17099,7 +17362,7 @@ } }, "traits": { - "smithy.api#documentation": "

Summary information about an OpsItem event.

" + "smithy.api#documentation": "

Summary information about an OpsItem event or that associated an OpsItem with a related\n item.

" } }, "com.amazonaws.ssm#OpsItemFilter": { @@ -17409,6 +17672,194 @@ } } }, + "com.amazonaws.ssm#OpsItemRelatedItemAlreadyExistsException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.ssm#String" + }, + "ResourceUri": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemAssociationResourceUri" + }, + "OpsItemId": { + "target": "com.amazonaws.ssm#OpsItemId" + } + }, + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) is already associated with the OpsItem.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.ssm#OpsItemRelatedItemAssociationId": { + "type": "string" + }, + "com.amazonaws.ssm#OpsItemRelatedItemAssociationNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.ssm#String" + } + }, + "traits": { + "smithy.api#documentation": "

The association was not found using the parameters you specified in the call. Verify the\n information and try again.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.ssm#OpsItemRelatedItemAssociationResourceType": { + "type": "string" + }, + "com.amazonaws.ssm#OpsItemRelatedItemAssociationResourceUri": { + "type": "string" + }, + "com.amazonaws.ssm#OpsItemRelatedItemAssociationType": { + "type": "string" + }, + "com.amazonaws.ssm#OpsItemRelatedItemSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemSummary" + } + }, + "com.amazonaws.ssm#OpsItemRelatedItemSummary": { + "type": "structure", + "members": { + "OpsItemId": { + "target": "com.amazonaws.ssm#OpsItemId", + "traits": { + "smithy.api#documentation": "

The OpsItem ID.

" + } + }, + "AssociationId": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemAssociationId", + "traits": { + "smithy.api#documentation": "

The association ID.

" + } + }, + "ResourceType": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemAssociationResourceType", + "traits": { + "smithy.api#documentation": "

The resource type.

" + } + }, + "AssociationType": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemAssociationType", + "traits": { + "smithy.api#documentation": "

The association type.

" + } + }, + "ResourceUri": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemAssociationResourceUri", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the related-item resource.

" + } + }, + "CreatedBy": { + "target": "com.amazonaws.ssm#OpsItemIdentity" + }, + "CreatedTime": { + "target": "com.amazonaws.ssm#DateTime", + "traits": { + "smithy.api#documentation": "

The time the related-item association was created.

" + } + }, + "LastModifiedBy": { + "target": "com.amazonaws.ssm#OpsItemIdentity" + }, + "LastModifiedTime": { + "target": "com.amazonaws.ssm#DateTime", + "traits": { + "smithy.api#documentation": "

The time the related-item association was last updated.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary information about related-item resources for an OpsItem.

" + } + }, + "com.amazonaws.ssm#OpsItemRelatedItemsFilter": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemsFilterKey", + "traits": { + "smithy.api#documentation": "

The name of the filter key. Supported values include ResourceUri,\n ResourceType, or AssociationId.

", + "smithy.api#required": {} + } + }, + "Values": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemsFilterValues", + "traits": { + "smithy.api#documentation": "

The values for the filter.

", + "smithy.api#required": {} + } + }, + "Operator": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemsFilterOperator", + "traits": { + "smithy.api#documentation": "

The operator used by the filter call. The only supported operator is\n EQUAL.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a filter for a specific list of related-item resources.

" + } + }, + "com.amazonaws.ssm#OpsItemRelatedItemsFilterKey": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ResourceType", + "name": "RESOURCE_TYPE" + }, + { + "value": "AssociationId", + "name": "ASSOCIATION_ID" + }, + { + "value": "ResourceUri", + "name": "RESOURCE_URI" + } + ] + } + }, + "com.amazonaws.ssm#OpsItemRelatedItemsFilterOperator": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Equal", + "name": "EQUAL" + } + ] + } + }, + "com.amazonaws.ssm#OpsItemRelatedItemsFilterValue": { + "type": "string" + }, + "com.amazonaws.ssm#OpsItemRelatedItemsFilterValues": { + "type": "list", + "member": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemsFilterValue" + } + }, + "com.amazonaws.ssm#OpsItemRelatedItemsFilters": { + "type": "list", + "member": { + "target": "com.amazonaws.ssm#OpsItemRelatedItemsFilter" + } + }, + "com.amazonaws.ssm#OpsItemRelatedItemsMaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, "com.amazonaws.ssm#OpsItemSeverity": { "type": "string", "traits": { @@ -19974,7 +20425,7 @@ "Tags": { "target": "com.amazonaws.ssm#TagList", "traits": { - "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 a\n Systems Manager parameter to identify the type of resource to which it applies, the environment, or the\n type of configuration data referenced by the parameter. In this case, you could specify the\n following key name/value pairs:

\n\n \n \n

To add tags to an existing Systems Manager parameter, use the AddTagsToResource\n action.

\n
" + "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 a\n Systems Manager parameter to identify the type of resource to which it applies, the environment, or the\n type of configuration data referenced by the parameter. In this case, you could specify the\n following key name/value pairs:

\n \n \n

To add tags to an existing Systems Manager parameter, use the AddTagsToResource\n action.

\n
" } }, "Tier": { @@ -19986,7 +20437,7 @@ "Policies": { "target": "com.amazonaws.ssm#ParameterPolicies", "traits": { - "smithy.api#documentation": "

One or more policies to apply to a parameter. This action takes a JSON array. Parameter\n Store supports the following policy types:

\n\n

Expiration: 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 does not affect the expiration date and time.\n When the expiration time is reached, Parameter Store deletes the parameter.

\n

ExpirationNotification: 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.

\n

NoChangeNotification: This policy triggers a CloudWatch event if a parameter has not been\n modified for a specified period of time. This policy type is useful when, for example, a secret\n needs to be changed within a period of time, but it has not been changed.

\n\n

All 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 action takes a JSON array. Parameter\n Store supports the following policy types:

\n

Expiration: 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 does not affect the expiration date and time.\n When the expiration time is reached, Parameter Store deletes the parameter.

\n

ExpirationNotification: 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.

\n

NoChangeNotification: This policy triggers a CloudWatch event if a parameter has not been\n modified for a specified period of time. This policy type is useful when, for example, a secret\n needs to be changed within a period of time, but it has not been changed.

\n

All 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": { @@ -20495,7 +20946,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n ServiceSetting is an account-level setting for an AWS service. This setting\n defines how a user interacts with or uses a service or a feature of a service. For example, if an\n AWS service charges money to the account based on feature or service usage, then the AWS service\n team might create a default setting of \"false\". This means the user can't use this feature unless\n they change the setting to \"true\" and intentionally opt in for a paid feature.

\n

Services map a SettingId object to a setting value. AWS services teams define\n the default value for a SettingId. You can't create a new SettingId,\n but you can overwrite the default value if you have the ssm:UpdateServiceSetting\n permission for the setting. Use the GetServiceSetting API action to view the\n current value. Use the UpdateServiceSetting API action to change the default\n setting.

\n\n

Reset the service setting for the account to the default value as provisioned by the AWS\n service team.

" + "smithy.api#documentation": "

\n ServiceSetting is an account-level setting for an AWS service. This setting\n defines how a user interacts with or uses a service or a feature of a service. For example, if an\n AWS service charges money to the account based on feature or service usage, then the AWS service\n team might create a default setting of \"false\". This means the user can't use this feature unless\n they change the setting to \"true\" and intentionally opt in for a paid feature.

\n

Services map a SettingId object to a setting value. AWS services teams define\n the default value for a SettingId. You can't create a new SettingId,\n but you can overwrite the default value if you have the ssm:UpdateServiceSetting\n permission for the setting. Use the GetServiceSetting API action to view the\n current value. Use the UpdateServiceSetting API action to change the default\n setting.

\n

Reset the service setting for the account to the default value as provisioned by the AWS\n service team.

" } }, "com.amazonaws.ssm#ResetServiceSettingRequest": { @@ -21057,7 +21508,7 @@ "State": { "target": "com.amazonaws.ssm#ResourceDataSyncState", "traits": { - "smithy.api#documentation": "

The data type name for including resource data sync state. There are four sync\n states:

\n\n

\n OrganizationNotExists: Your organization doesn't exist.

\n

\n NoPermissions: The system can't locate the service-linked role. This role is\n automatically created when a user creates a resource data sync in Explorer.

\n

\n InvalidOrganizationalUnit: You specified or selected an invalid unit in the\n resource data sync configuration.

\n

\n TrustedAccessDisabled: You disabled Systems Manager access in the organization in\n AWS Organizations.

" + "smithy.api#documentation": "

The data type name for including resource data sync state. There are four sync\n states:

\n

\n OrganizationNotExists: Your organization doesn't exist.

\n

\n NoPermissions: The system can't locate the service-linked role. This role is\n automatically created when a user creates a resource data sync in Explorer.

\n

\n InvalidOrganizationalUnit: You specified or selected an invalid unit in the\n resource data sync configuration.

\n

\n TrustedAccessDisabled: You disabled Systems Manager access in the organization in\n AWS Organizations.

" } }, "EnableAllOpsDataSources": { @@ -21068,7 +21519,7 @@ } }, "traits": { - "smithy.api#documentation": "

The data type name for including resource data sync state. There are four sync\n states:

\n\n

\n OrganizationNotExists (Your organization doesn't exist)

\n

\n NoPermissions (The system can't locate the service-linked role. This role is\n automatically created when a user creates a resource data sync in Explorer.)

\n

\n InvalidOrganizationalUnit (You specified or selected an invalid unit in the\n resource data sync configuration.)

\n

\n TrustedAccessDisabled (You disabled Systems Manager access in the organization in\n AWS Organizations.)

" + "smithy.api#documentation": "

The data type name for including resource data sync state. There are four sync\n states:

\n

\n OrganizationNotExists (Your organization doesn't exist)

\n

\n NoPermissions (The system can't locate the service-linked role. This role is\n automatically created when a user creates a resource data sync in Explorer.)

\n

\n InvalidOrganizationalUnit (You specified or selected an invalid unit in the\n resource data sync configuration.)

\n

\n TrustedAccessDisabled (You disabled Systems Manager access in the organization in\n AWS Organizations.)

" } }, "com.amazonaws.ssm#ResourceDataSyncState": { @@ -21253,7 +21704,7 @@ "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\tAWS Region supported by AWS 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 AWS General Reference.

\n

\n session-id represents the ID of a Session Manager session, such as\n 1a2b3c4dEXAMPLE.

" + "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\tAWS Region supported by AWS 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 AWS General Reference.

\n

\n session-id represents the ID of a Session Manager session, such as\n 1a2b3c4dEXAMPLE.

" } } } @@ -21774,7 +22225,7 @@ } }, "traits": { - "smithy.api#documentation": "

The service setting data structure.

\n\n

\n ServiceSetting is an account-level setting for an AWS service. This setting\n defines how a user interacts with or uses a service or a feature of a service. For example, if an\n AWS service charges money to the account based on feature or service usage, then the AWS service\n team might create a default setting of \"false\". This means the user can't use this feature unless\n they change the setting to \"true\" and intentionally opt in for a paid feature.

\n

Services map a SettingId object to a setting value. AWS services teams define\n the default value for a SettingId. You can't create a new SettingId,\n but you can overwrite the default value if you have the ssm:UpdateServiceSetting\n permission for the setting. Use the UpdateServiceSetting API action to change\n the default setting. Or, use the ResetServiceSetting to change the value back\n to the original value defined by the AWS service team.

" + "smithy.api#documentation": "

The service setting data structure.

\n

\n ServiceSetting is an account-level setting for an AWS service. This setting\n defines how a user interacts with or uses a service or a feature of a service. For example, if an\n AWS service charges money to the account based on feature or service usage, then the AWS service\n team might create a default setting of \"false\". This means the user can't use this feature unless\n they change the setting to \"true\" and intentionally opt in for a paid feature.

\n

Services map a SettingId object to a setting value. AWS services teams define\n the default value for a SettingId. You can't create a new SettingId,\n but you can overwrite the default value if you have the ssm:UpdateServiceSetting\n permission for the setting. Use the UpdateServiceSetting API action to change\n the default setting. Or, use the ResetServiceSetting to change the value back\n to the original value defined by the AWS service team.

" } }, "com.amazonaws.ssm#ServiceSettingId": { @@ -22562,7 +23013,7 @@ "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

\n region represents the Region identifier for an\n\t\t\t\t\t\tAWS Region supported by AWS 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 AWS General Reference.

\n

\n session-id represents the ID of a Session Manager session, such as\n 1a2b3c4dEXAMPLE.

" + "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

\n region represents the Region identifier for an\n\t\t\t\t\t\tAWS Region supported by AWS 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 AWS General Reference.

\n

\n session-id represents the ID of a Session Manager session, such as\n 1a2b3c4dEXAMPLE.

" } } } @@ -23863,10 +24314,16 @@ "Name": { "target": "com.amazonaws.ssm#DocumentName", "traits": { - "smithy.api#documentation": "

The name of the document that you want to update.

", + "smithy.api#documentation": "

The name of the Systems Manager document that you want to update.

", "smithy.api#required": {} } }, + "DisplayName": { + "target": "com.amazonaws.ssm#DocumentDisplayName", + "traits": { + "smithy.api#documentation": "

The friendly name of the Systems Manager document that you want to update. This value can differ for\n each version of the document. If you do not specify a value for this parameter in your request,\n the existing value is applied to the new document version.

" + } + }, "VersionName": { "target": "com.amazonaws.ssm#DocumentVersionName", "traits": { @@ -24483,7 +24940,7 @@ "OperationalData": { "target": "com.amazonaws.ssm#OpsItemOperationalData", "traits": { - "smithy.api#documentation": "

Add new keys or edit existing key-value pairs of the OperationalData map in the OpsItem\n object.

\n

Operational data is custom data that provides useful reference details about the OpsItem.\n For example, you can specify log files, error strings, license keys, troubleshooting tips, or\n other relevant data. You enter operational data as key-value pairs. The key has a maximum length\n of 128 characters. The value has a maximum size of 20 KB.

\n\n \n

Operational data keys can't begin with the following: amazon, aws,\n amzn, ssm, /amazon, /aws, /amzn, /ssm.

\n
\n\n

You can choose to make the data searchable by other users in the account or you can restrict\n search access. Searchable data means that all users with access to the OpsItem Overview page (as\n provided by the DescribeOpsItems API action) can view and search on the\n specified data. Operational data that is not searchable is only viewable by users who have access\n to the OpsItem (as provided by the GetOpsItem API action).

\n\n

Use the /aws/resources key in OperationalData to specify a related resource in\n the request. Use the /aws/automations key in OperationalData to associate an\n Automation runbook with the OpsItem. To view AWS CLI example commands that use these keys, see\n Creating OpsItems manually in the AWS Systems Manager User Guide.

" + "smithy.api#documentation": "

Add new keys or edit existing key-value pairs of the OperationalData map in the OpsItem\n object.

\n

Operational data is custom data that provides useful reference details about the OpsItem.\n For example, you can specify log files, error strings, license keys, troubleshooting tips, or\n other relevant data. You enter operational data as key-value pairs. The key has a maximum length\n of 128 characters. The value has a maximum size of 20 KB.

\n \n

Operational data keys can't begin with the following: amazon, aws,\n amzn, ssm, /amazon, /aws, /amzn, /ssm.

\n
\n

You can choose to make the data searchable by other users in the account or you can restrict\n search access. Searchable data means that all users with access to the OpsItem Overview page (as\n provided by the DescribeOpsItems API action) can view and search on the\n specified data. Operational data that is not searchable is only viewable by users who have access\n to the OpsItem (as provided by the GetOpsItem API action).

\n

Use the /aws/resources key in OperationalData to specify a related resource in\n the request. Use the /aws/automations key in OperationalData to associate an\n Automation runbook with the OpsItem. To view AWS CLI example commands that use these keys, see\n Creating OpsItems manually in the AWS Systems Manager User Guide.

" } }, "OperationalDataToDelete": { @@ -24901,7 +25358,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n ServiceSetting is an account-level setting for an AWS service. This setting\n defines how a user interacts with or uses a service or a feature of a service. For example, if an\n AWS service charges money to the account based on feature or service usage, then the AWS service\n team might create a default setting of \"false\". This means the user can't use this feature unless\n they change the setting to \"true\" and intentionally opt in for a paid feature.

\n

Services map a SettingId object to a setting value. AWS services teams define\n the default value for a SettingId. You can't create a new SettingId,\n but you can overwrite the default value if you have the ssm:UpdateServiceSetting\n permission for the setting. Use the GetServiceSetting API action to view the\n current value. Or, use the ResetServiceSetting to change the value back to the\n original value defined by the AWS service team.

\n\n

Update the service setting for the account.

" + "smithy.api#documentation": "

\n ServiceSetting is an account-level setting for an AWS service. This setting\n defines how a user interacts with or uses a service or a feature of a service. For example, if an\n AWS service charges money to the account based on feature or service usage, then the AWS service\n team might create a default setting of \"false\". This means the user can't use this feature unless\n they change the setting to \"true\" and intentionally opt in for a paid feature.

\n

Services map a SettingId object to a setting value. AWS services teams define\n the default value for a SettingId. You can't create a new SettingId,\n but you can overwrite the default value if you have the ssm:UpdateServiceSetting\n permission for the setting. Use the GetServiceSetting API action to view the\n current value. Or, use the ResetServiceSetting to change the value back to the\n original value defined by the AWS service team.

\n

Update the service setting for the account.

" } }, "com.amazonaws.ssm#UpdateServiceSettingRequest": { diff --git a/codegen/sdk-codegen/aws-models/ssmcontacts.2021-05-03.json b/codegen/sdk-codegen/aws-models/ssmcontacts.2021-05-03.json new file mode 100644 index 00000000000..76b7e7d4060 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/ssmcontacts.2021-05-03.json @@ -0,0 +1,3114 @@ +{ + "smithy": "1.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "HttpResponseCodeSemantics", + "namespace": "*" + }, + { + "id": "PaginatedTrait", + "namespace": "*" + }, + { + "id": "HttpHeaderTrait", + "namespace": "*" + }, + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "Service", + "namespace": "*" + } + ] + }, + "shapes": { + "com.amazonaws.ssmcontacts#AcceptCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 6, + "max": 10 + }, + "smithy.api#pattern": "^[0-9]*$" + } + }, + "com.amazonaws.ssmcontacts#AcceptPage": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#AcceptPageRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#AcceptPageResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Used to acknowledge an engagement to a contact channel during an incident.

" + } + }, + "com.amazonaws.ssmcontacts#AcceptPageRequest": { + "type": "structure", + "members": { + "PageId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the engagement to a contact channel.

", + "smithy.api#required": {} + } + }, + "ContactChannelId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the contact channel.

" + } + }, + "AcceptType": { + "target": "com.amazonaws.ssmcontacts#AcceptType", + "traits": { + "smithy.api#documentation": "

The type indicates if the page was DELIVERED or READ.

", + "smithy.api#required": {} + } + }, + "Note": { + "target": "com.amazonaws.ssmcontacts#ReceiptInfo", + "traits": { + "smithy.api#documentation": "

Information provided by the user when the user acknowledges the page.

" + } + }, + "AcceptCode": { + "target": "com.amazonaws.ssmcontacts#AcceptCode", + "traits": { + "smithy.api#documentation": "

The accept code is a 6-digit code used to acknowledge the page.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#AcceptPageResult": { + "type": "structure", + "members": {} + }, + "com.amazonaws.ssmcontacts#AcceptType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DELIVERED", + "name": "DELIVERED" + }, + { + "value": "READ", + "name": "READ" + } + ] + } + }, + "com.amazonaws.ssmcontacts#AccessDeniedException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

You don't have sufficient access to perform this action.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.ssmcontacts#ActivateContactChannel": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#ActivateContactChannelRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#ActivateContactChannelResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Activates a contact's contact channel. Incident Manager can't engage a contact until\n the\n contact channel has been activated.

" + } + }, + "com.amazonaws.ssmcontacts#ActivateContactChannelRequest": { + "type": "structure", + "members": { + "ContactChannelId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact channel.

", + "smithy.api#required": {} + } + }, + "ActivationCode": { + "target": "com.amazonaws.ssmcontacts#ActivationCode", + "traits": { + "smithy.api#documentation": "

The code sent to the contact channel when it was created in the contact.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#ActivateContactChannelResult": { + "type": "structure", + "members": {} + }, + "com.amazonaws.ssmcontacts#ActivationCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 6, + "max": 10 + }, + "smithy.api#pattern": "^[0-9]*$" + } + }, + "com.amazonaws.ssmcontacts#ActivationStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVATED", + "name": "ACTIVATED" + }, + { + "value": "NOT_ACTIVATED", + "name": "NOT_ACTIVATED" + } + ] + } + }, + "com.amazonaws.ssmcontacts#AmazonResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1011 + } + } + }, + "com.amazonaws.ssmcontacts#ChannelName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_\\-\\s\\.]*$" + } + }, + "com.amazonaws.ssmcontacts#ChannelTargetInfo": { + "type": "structure", + "members": { + "ContactChannelId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact channel.

", + "smithy.api#required": {} + } + }, + "RetryIntervalInMinutes": { + "target": "com.amazonaws.ssmcontacts#RetryIntervalInMinutes", + "traits": { + "smithy.api#documentation": "

The number of minutes to wait to retry sending engagement in the case the engagement\n initially fails.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the contact channel that Incident Manager uses to engage the\n contact.

" + } + }, + "com.amazonaws.ssmcontacts#ChannelType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SMS", + "name": "SMS" + }, + { + "value": "VOICE", + "name": "VOICE" + }, + { + "value": "EMAIL", + "name": "EMAIL" + } + ] + } + }, + "com.amazonaws.ssmcontacts#ConflictException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#required": {} + } + }, + "ResourceId": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#documentation": "Identifier of the resource in use", + "smithy.api#required": {} + } + }, + "ResourceType": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#documentation": "ype of the resource in use", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Updating or deleting a resource causes an inconsistent state.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.ssmcontacts#Contact": { + "type": "structure", + "members": { + "ContactArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact or escalation plan.

", + "smithy.api#required": {} + } + }, + "Alias": { + "target": "com.amazonaws.ssmcontacts#ContactAlias", + "traits": { + "smithy.api#documentation": "

The unique and identifiable alias of the contact or escalation plan.

", + "smithy.api#required": {} + } + }, + "DisplayName": { + "target": "com.amazonaws.ssmcontacts#ContactName", + "traits": { + "smithy.api#documentation": "

The full name of the contact or escalation plan.

" + } + }, + "Type": { + "target": "com.amazonaws.ssmcontacts#ContactType", + "traits": { + "smithy.api#documentation": "

Refers to the type of contact. A single contact is type PERSONAL and an\n escalation plan is type ESCALATION.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A personal contact or escalation plan that Incident Manager engages during an\n incident.

" + } + }, + "com.amazonaws.ssmcontacts#ContactAlias": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[a-z0-9_\\-]*$" + } + }, + "com.amazonaws.ssmcontacts#ContactChannel": { + "type": "structure", + "members": { + "ContactChannelArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact channel.

", + "smithy.api#required": {} + } + }, + "ContactArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the contact that contains the contact channel.

", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.ssmcontacts#ChannelName", + "traits": { + "smithy.api#documentation": "

The name of the contact channel.

", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.ssmcontacts#ChannelType", + "traits": { + "smithy.api#documentation": "

The type of the contact channel. Incident Manager supports three contact methods:

\n " + } + }, + "DeliveryAddress": { + "target": "com.amazonaws.ssmcontacts#ContactChannelAddress", + "traits": { + "smithy.api#documentation": "

The details that Incident Manager uses when trying to engage the contact channel.

", + "smithy.api#required": {} + } + }, + "ActivationStatus": { + "target": "com.amazonaws.ssmcontacts#ActivationStatus", + "traits": { + "smithy.api#documentation": "

A Boolean value describing if the contact channel has been activated or not. If the\n contact channel isn't activated, Incident Manager can't engage the contact through it.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The method that Incident Manager uses to engage a contact.

" + } + }, + "com.amazonaws.ssmcontacts#ContactChannelAddress": { + "type": "structure", + "members": { + "SimpleAddress": { + "target": "com.amazonaws.ssmcontacts#SimpleAddress", + "traits": { + "smithy.api#documentation": "

The format is dependent on the type of the contact channel. The following are the\n expected formats:

\n " + } + } + }, + "traits": { + "smithy.api#documentation": "

The details that Incident Manager uses when trying to engage the contact channel.

" + } + }, + "com.amazonaws.ssmcontacts#ContactChannelList": { + "type": "list", + "member": { + "target": "com.amazonaws.ssmcontacts#ContactChannel" + } + }, + "com.amazonaws.ssmcontacts#ContactName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_\\-\\s\\.]*$" + } + }, + "com.amazonaws.ssmcontacts#ContactTargetInfo": { + "type": "structure", + "members": { + "ContactId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact.

" + } + }, + "IsEssential": { + "target": "com.amazonaws.ssmcontacts#IsEssential", + "traits": { + "smithy.api#documentation": "

A Boolean value determining if the contact's acknowledgement stops the progress of\n stages in the plan.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The contact that Incident Manager is engaging during an incident.

" + } + }, + "com.amazonaws.ssmcontacts#ContactType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PERSONAL", + "name": "PERSONAL" + }, + { + "value": "ESCALATION", + "name": "ESCALATION" + } + ] + } + }, + "com.amazonaws.ssmcontacts#ContactsList": { + "type": "list", + "member": { + "target": "com.amazonaws.ssmcontacts#Contact" + } + }, + "com.amazonaws.ssmcontacts#Content": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 8192 + }, + "smithy.api#pattern": "^[.\\s\\S]*$" + } + }, + "com.amazonaws.ssmcontacts#CreateContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#CreateContactRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#CreateContactResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#ConflictException" + }, + { + "target": "com.amazonaws.ssmcontacts#DataEncryptionException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Contacts are either the contacts that Incident Manager engages during an incident or the\n escalation plans that Incident Manager uses to engage contacts in phases during an\n incident.

" + } + }, + "com.amazonaws.ssmcontacts#CreateContactChannel": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#CreateContactChannelRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#CreateContactChannelResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#ConflictException" + }, + { + "target": "com.amazonaws.ssmcontacts#DataEncryptionException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

A contact channel is the method that Incident Manager uses to engage your contact.

" + } + }, + "com.amazonaws.ssmcontacts#CreateContactChannelRequest": { + "type": "structure", + "members": { + "ContactId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact channel.

", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.ssmcontacts#ChannelName", + "traits": { + "smithy.api#documentation": "

The name of the contact channel.

", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.ssmcontacts#ChannelType", + "traits": { + "smithy.api#documentation": "

Incident Manager supports three types of contact channels:

\n ", + "smithy.api#required": {} + } + }, + "DeliveryAddress": { + "target": "com.amazonaws.ssmcontacts#ContactChannelAddress", + "traits": { + "smithy.api#documentation": "

The details that Incident Manager uses when trying to engage the contact channel. The format\n is dependent on the type of the contact channel. The following are the expected\n formats:

\n ", + "smithy.api#required": {} + } + }, + "DeferActivation": { + "target": "com.amazonaws.ssmcontacts#DeferActivation", + "traits": { + "smithy.api#documentation": "

If you want to activate the channel at a later time, you can choose to defer activation.\n Incident Manager can't engage your contact channel until it has been activated.

" + } + }, + "IdempotencyToken": { + "target": "com.amazonaws.ssmcontacts#IdempotencyToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#CreateContactChannelResult": { + "type": "structure", + "members": { + "ContactChannelArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the contact channel.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#CreateContactRequest": { + "type": "structure", + "members": { + "Alias": { + "target": "com.amazonaws.ssmcontacts#ContactAlias", + "traits": { + "smithy.api#documentation": "

The short name to quickly identify a contact or escalation plan. The contact alias must\n be unique and identifiable.

", + "smithy.api#required": {} + } + }, + "DisplayName": { + "target": "com.amazonaws.ssmcontacts#ContactName", + "traits": { + "smithy.api#documentation": "

The full name of the contact or escalation plan.

" + } + }, + "Type": { + "target": "com.amazonaws.ssmcontacts#ContactType", + "traits": { + "smithy.api#documentation": "

To create an escalation plan use ESCALATION. To create a contact use\n PERSONAL.

", + "smithy.api#required": {} + } + }, + "Plan": { + "target": "com.amazonaws.ssmcontacts#Plan", + "traits": { + "smithy.api#documentation": "

A list of stages. A contact has an engagement plan with stages that contact specified\n contact channels. An escalation plan uses stages that contact specified contacts.

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.ssmcontacts#TagsList", + "traits": { + "smithy.api#documentation": "

Adds a tag to the target. You can only tag resources created in the first Region of your\n replication set.

" + } + }, + "IdempotencyToken": { + "target": "com.amazonaws.ssmcontacts#IdempotencyToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#CreateContactResult": { + "type": "structure", + "members": { + "ContactArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the created contact or escalation plan.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#DataEncryptionException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The action failed to due an encryption key error.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.ssmcontacts#DateTime": { + "type": "timestamp" + }, + "com.amazonaws.ssmcontacts#DeactivateContactChannel": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#DeactivateContactChannelRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#DeactivateContactChannelResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

To no longer receive Incident Manager engagements to a contact channel, you can deactivate\n the channel.

" + } + }, + "com.amazonaws.ssmcontacts#DeactivateContactChannelRequest": { + "type": "structure", + "members": { + "ContactChannelId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact channel you're deactivating.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#DeactivateContactChannelResult": { + "type": "structure", + "members": {} + }, + "com.amazonaws.ssmcontacts#DeferActivation": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.ssmcontacts#DeleteContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#DeleteContactRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#DeleteContactResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

To remove a contact from Incident Manager, you can delete the contact. Deleting a contact\n removes them from all escalation plans and related response plans. Deleting an escalation\n plan removes it from all related response plans. You will have to recreate the contact and\n its contact channels before you can use it again.

" + } + }, + "com.amazonaws.ssmcontacts#DeleteContactChannel": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#DeleteContactChannelRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#DeleteContactChannelResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

To no longer receive engagements on a contact channel, you can delete the channel from a\n contact. Deleting the contact channel removes it from the contact's engagement plan. If you\n delete the only contact channel for a contact, you won't be able to engage that contact\n during an incident.

" + } + }, + "com.amazonaws.ssmcontacts#DeleteContactChannelRequest": { + "type": "structure", + "members": { + "ContactChannelId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact channel.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#DeleteContactChannelResult": { + "type": "structure", + "members": {} + }, + "com.amazonaws.ssmcontacts#DeleteContactRequest": { + "type": "structure", + "members": { + "ContactId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact that you're deleting.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#DeleteContactResult": { + "type": "structure", + "members": {} + }, + "com.amazonaws.ssmcontacts#DescribeEngagement": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#DescribeEngagementRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#DescribeEngagementResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#DataEncryptionException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Incident Manager uses engagements to engage contacts and escalation plans during an incident.\n Use this command to describe the engagement that occurred during an incident.

" + } + }, + "com.amazonaws.ssmcontacts#DescribeEngagementRequest": { + "type": "structure", + "members": { + "EngagementId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the engagement you want the details of.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#DescribeEngagementResult": { + "type": "structure", + "members": { + "ContactArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the escalation plan or contacts involved in the engagement.

", + "smithy.api#required": {} + } + }, + "EngagementArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the engagement.

", + "smithy.api#required": {} + } + }, + "Sender": { + "target": "com.amazonaws.ssmcontacts#Sender", + "traits": { + "smithy.api#documentation": "

The user that started the engagement.

", + "smithy.api#required": {} + } + }, + "Subject": { + "target": "com.amazonaws.ssmcontacts#Subject", + "traits": { + "smithy.api#documentation": "

The secure subject of the message that was sent to the contact. Use this field for\n engagements to VOICE and EMAIL.

", + "smithy.api#required": {} + } + }, + "Content": { + "target": "com.amazonaws.ssmcontacts#Content", + "traits": { + "smithy.api#documentation": "

The secure content of the message that was sent to the contact. Use this field for\n engagements to VOICE and EMAIL.

", + "smithy.api#required": {} + } + }, + "PublicSubject": { + "target": "com.amazonaws.ssmcontacts#PublicSubject", + "traits": { + "smithy.api#documentation": "

The insecure subject of the message that was sent to the contact. Use this field for\n engagements to SMS.

" + } + }, + "PublicContent": { + "target": "com.amazonaws.ssmcontacts#PublicContent", + "traits": { + "smithy.api#documentation": "

The insecure content of the message that was sent to the contact. Use this field for\n engagements to SMS.

" + } + }, + "IncidentId": { + "target": "com.amazonaws.ssmcontacts#IncidentId", + "traits": { + "smithy.api#documentation": "

The ARN of the incident in which the engagement occurred.

" + } + }, + "StartTime": { + "target": "com.amazonaws.ssmcontacts#DateTime", + "traits": { + "smithy.api#documentation": "

The time that the engagement started.

" + } + }, + "StopTime": { + "target": "com.amazonaws.ssmcontacts#DateTime", + "traits": { + "smithy.api#documentation": "

The time that the engagement ended.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#DescribePage": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#DescribePageRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#DescribePageResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#DataEncryptionException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists details of the engagement to a contact channel.

" + } + }, + "com.amazonaws.ssmcontacts#DescribePageRequest": { + "type": "structure", + "members": { + "PageId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ID of the engagement to a contact channel.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#DescribePageResult": { + "type": "structure", + "members": { + "PageArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the engagement to a contact channel.

", + "smithy.api#required": {} + } + }, + "EngagementArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the engagement that engaged the contact channel.

", + "smithy.api#required": {} + } + }, + "ContactArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the contact that was engaged.

", + "smithy.api#required": {} + } + }, + "Sender": { + "target": "com.amazonaws.ssmcontacts#Sender", + "traits": { + "smithy.api#documentation": "

The user that started the engagement.

", + "smithy.api#required": {} + } + }, + "Subject": { + "target": "com.amazonaws.ssmcontacts#Subject", + "traits": { + "smithy.api#documentation": "

The secure subject of the message that was sent to the contact. Use this field for\n engagements to VOICE and EMAIL.

", + "smithy.api#required": {} + } + }, + "Content": { + "target": "com.amazonaws.ssmcontacts#Content", + "traits": { + "smithy.api#documentation": "

The secure content of the message that was sent to the contact. Use this field for\n engagements to VOICE and EMAIL.

", + "smithy.api#required": {} + } + }, + "PublicSubject": { + "target": "com.amazonaws.ssmcontacts#PublicSubject", + "traits": { + "smithy.api#documentation": "

The insecure subject of the message that was sent to the contact. Use this field for\n engagements to SMS.

" + } + }, + "PublicContent": { + "target": "com.amazonaws.ssmcontacts#PublicContent", + "traits": { + "smithy.api#documentation": "

The insecure content of the message that was sent to the contact. Use this field for\n engagements to SMS.

" + } + }, + "IncidentId": { + "target": "com.amazonaws.ssmcontacts#IncidentId", + "traits": { + "smithy.api#documentation": "

The ARN of the incident that engaged the contact channel.

" + } + }, + "SentTime": { + "target": "com.amazonaws.ssmcontacts#DateTime", + "traits": { + "smithy.api#documentation": "

The time the engagement was sent to the contact channel.

" + } + }, + "ReadTime": { + "target": "com.amazonaws.ssmcontacts#DateTime", + "traits": { + "smithy.api#documentation": "

The time that the contact channel acknowledged the engagement.

" + } + }, + "DeliveryTime": { + "target": "com.amazonaws.ssmcontacts#DateTime", + "traits": { + "smithy.api#documentation": "

The time that the contact channel received the engagement.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#Engagement": { + "type": "structure", + "members": { + "EngagementArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the engagement.

", + "smithy.api#required": {} + } + }, + "ContactArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the escalation plan or contact that Incident Manager is engaging.

", + "smithy.api#required": {} + } + }, + "Sender": { + "target": "com.amazonaws.ssmcontacts#Sender", + "traits": { + "smithy.api#documentation": "

The user that started the engagement.

", + "smithy.api#required": {} + } + }, + "IncidentId": { + "target": "com.amazonaws.ssmcontacts#IncidentId", + "traits": { + "smithy.api#documentation": "

The ARN of the incident that's engaging the contact.

" + } + }, + "StartTime": { + "target": "com.amazonaws.ssmcontacts#DateTime", + "traits": { + "smithy.api#documentation": "

The time that the engagement began.

" + } + }, + "StopTime": { + "target": "com.amazonaws.ssmcontacts#DateTime", + "traits": { + "smithy.api#documentation": "

The time that the engagement ended.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Incident Manager reaching out to a contact or escalation plan to engage contact during an\n incident.

" + } + }, + "com.amazonaws.ssmcontacts#EngagementsList": { + "type": "list", + "member": { + "target": "com.amazonaws.ssmcontacts#Engagement" + } + }, + "com.amazonaws.ssmcontacts#GetContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#GetContactRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#GetContactResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#DataEncryptionException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves information about the specified contact or escalation plan.

" + } + }, + "com.amazonaws.ssmcontacts#GetContactChannel": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#GetContactChannelRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#GetContactChannelResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#DataEncryptionException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

List details about a specific contact channel.

" + } + }, + "com.amazonaws.ssmcontacts#GetContactChannelRequest": { + "type": "structure", + "members": { + "ContactChannelId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact channel you want information about.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#GetContactChannelResult": { + "type": "structure", + "members": { + "ContactArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the contact that the channel belongs to.

", + "smithy.api#required": {} + } + }, + "ContactChannelArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the contact channel.

", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.ssmcontacts#ChannelName", + "traits": { + "smithy.api#documentation": "

The name of the contact channel

", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.ssmcontacts#ChannelType", + "traits": { + "smithy.api#documentation": "

The type of contact channel. The type is SMS, VOICE, or\n EMAIL.

", + "smithy.api#required": {} + } + }, + "DeliveryAddress": { + "target": "com.amazonaws.ssmcontacts#ContactChannelAddress", + "traits": { + "smithy.api#documentation": "

The details that Incident Manager uses when trying to engage the contact channel.

", + "smithy.api#required": {} + } + }, + "ActivationStatus": { + "target": "com.amazonaws.ssmcontacts#ActivationStatus", + "traits": { + "smithy.api#documentation": "

A Boolean value indicating if the contact channel has been activated or not.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#GetContactPolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#GetContactPolicyRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#GetContactPolicyResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the resource policies attached to the specified contact or escalation\n plan.

" + } + }, + "com.amazonaws.ssmcontacts#GetContactPolicyRequest": { + "type": "structure", + "members": { + "ContactArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact or escalation plan.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#GetContactPolicyResult": { + "type": "structure", + "members": { + "ContactArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the contact or escalation plan.

" + } + }, + "Policy": { + "target": "com.amazonaws.ssmcontacts#Policy", + "traits": { + "smithy.api#documentation": "

Details about the resource policy attached to the contact or escalation plan.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#GetContactRequest": { + "type": "structure", + "members": { + "ContactId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact or escalation plan.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#GetContactResult": { + "type": "structure", + "members": { + "ContactArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the contact or escalation plan.

", + "smithy.api#required": {} + } + }, + "Alias": { + "target": "com.amazonaws.ssmcontacts#ContactAlias", + "traits": { + "smithy.api#documentation": "

The alias of the contact or escalation plan. The alias is unique and\n identifiable.

", + "smithy.api#required": {} + } + }, + "DisplayName": { + "target": "com.amazonaws.ssmcontacts#ContactName", + "traits": { + "smithy.api#documentation": "

The full name of the contact or escalation plan.

" + } + }, + "Type": { + "target": "com.amazonaws.ssmcontacts#ContactType", + "traits": { + "smithy.api#documentation": "

The type of contact, either PERSONAL or ESCALATION.

", + "smithy.api#required": {} + } + }, + "Plan": { + "target": "com.amazonaws.ssmcontacts#Plan", + "traits": { + "smithy.api#documentation": "

Details about the specific timing or stages and targets of the escalation plan or\n engagement plan.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#IdempotencyToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": "^[\\\\\\/a-zA-Z0-9_+=\\-]*$" + } + }, + "com.amazonaws.ssmcontacts#IncidentId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + }, + "smithy.api#pattern": "^[\\\\a-zA-Z0-9_@#%*+=:?.\\/!\\s-]*$" + } + }, + "com.amazonaws.ssmcontacts#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#required": {} + } + }, + "RetryAfterSeconds": { + "target": "com.amazonaws.ssmcontacts#RetryAfterSeconds", + "traits": { + "smithy.api#documentation": "Advice to clients on when the call can be safely retried", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "

Unexpected error occurred while\n processing the request.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.ssmcontacts#IsEssential": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.ssmcontacts#ListContactChannels": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#ListContactChannelsRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#ListContactChannelsResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#DataEncryptionException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all contact channels for the specified contact.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ContactChannels", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.ssmcontacts#ListContactChannelsRequest": { + "type": "structure", + "members": { + "ContactId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact.

", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.ssmcontacts#PaginationToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.ssmcontacts#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of contact channels per page.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#ListContactChannelsResult": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.ssmcontacts#PaginationToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + }, + "ContactChannels": { + "target": "com.amazonaws.ssmcontacts#ContactChannelList", + "traits": { + "smithy.api#documentation": "

A list of contact channels related to the specified contact.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#ListContacts": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#ListContactsRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#ListContactsResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all contacts and escalation plans in Incident Manager.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Contacts", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.ssmcontacts#ListContactsRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.ssmcontacts#PaginationToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.ssmcontacts#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of contacts and escalation plans per page of results.

" + } + }, + "AliasPrefix": { + "target": "com.amazonaws.ssmcontacts#ContactAlias", + "traits": { + "smithy.api#documentation": "

Used to list only contacts who's aliases start with the specified prefix.

" + } + }, + "Type": { + "target": "com.amazonaws.ssmcontacts#ContactType", + "traits": { + "smithy.api#documentation": "

The type of contact. A contact is type PERSONAL and an escalation plan is\n type ESCALATION.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#ListContactsResult": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.ssmcontacts#PaginationToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + }, + "Contacts": { + "target": "com.amazonaws.ssmcontacts#ContactsList", + "traits": { + "smithy.api#documentation": "

A list of the contacts and escalation plans in your Incident Manager account.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#ListEngagements": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#ListEngagementsRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#ListEngagementsResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all engagements that have happened in an incident.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Engagements", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.ssmcontacts#ListEngagementsRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.ssmcontacts#PaginationToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.ssmcontacts#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of engagements per page of results.

" + } + }, + "IncidentId": { + "target": "com.amazonaws.ssmcontacts#IncidentId", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the incident you're listing engagements for.

" + } + }, + "TimeRangeValue": { + "target": "com.amazonaws.ssmcontacts#TimeRange", + "traits": { + "smithy.api#documentation": "

The time range to lists engagements for an incident.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#ListEngagementsResult": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.ssmcontacts#PaginationToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + }, + "Engagements": { + "target": "com.amazonaws.ssmcontacts#EngagementsList", + "traits": { + "smithy.api#documentation": "

A list of each engagement that occurred during the specified time range of an\n incident.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#ListPageReceipts": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#ListPageReceiptsRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#ListPageReceiptsResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all of the engagements to contact channels that have been acknowledged.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Receipts", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.ssmcontacts#ListPageReceiptsRequest": { + "type": "structure", + "members": { + "PageId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the engagement to a specific contact channel.

", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.ssmcontacts#PaginationToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.ssmcontacts#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of acknowledgements per page of results.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#ListPageReceiptsResult": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.ssmcontacts#PaginationToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + }, + "Receipts": { + "target": "com.amazonaws.ssmcontacts#ReceiptsList", + "traits": { + "smithy.api#documentation": "

A list of each acknowledgement.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#ListPagesByContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#ListPagesByContactRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#ListPagesByContactResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the engagements to a contact's contact channels.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Pages", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.ssmcontacts#ListPagesByContactRequest": { + "type": "structure", + "members": { + "ContactId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact you are retrieving engagements for.

", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.ssmcontacts#PaginationToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.ssmcontacts#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of engagements to contact channels to list per page of results.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#ListPagesByContactResult": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.ssmcontacts#PaginationToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + }, + "Pages": { + "target": "com.amazonaws.ssmcontacts#PagesList", + "traits": { + "smithy.api#documentation": "

The list of engagements to a contact's contact channel.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#ListPagesByEngagement": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#ListPagesByEngagementRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#ListPagesByEngagementResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the engagements to contact channels that occurred by engaging a contact.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Pages", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.ssmcontacts#ListPagesByEngagementRequest": { + "type": "structure", + "members": { + "EngagementId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the engagement.

", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.ssmcontacts#PaginationToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + }, + "MaxResults": { + "target": "com.amazonaws.ssmcontacts#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of engagements to contact channels to list per page of\n results.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#ListPagesByEngagementResult": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.ssmcontacts#PaginationToken", + "traits": { + "smithy.api#documentation": "

The pagination token to continue to the next page of results.

" + } + }, + "Pages": { + "target": "com.amazonaws.ssmcontacts#PagesList", + "traits": { + "smithy.api#documentation": "

The list of engagements to contact channels.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#ListTagsForResourceResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the tags of an escalation plan or contact.

" + } + }, + "com.amazonaws.ssmcontacts#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.ssmcontacts#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact or escalation plan.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#ListTagsForResourceResult": { + "type": "structure", + "members": { + "Tags": { + "target": "com.amazonaws.ssmcontacts#TagsList", + "traits": { + "smithy.api#documentation": "

The tags related to the contact or escalation plan.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0, + "max": 1024 + } + } + }, + "com.amazonaws.ssmcontacts#Page": { + "type": "structure", + "members": { + "PageArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the page to the contact channel.

", + "smithy.api#required": {} + } + }, + "EngagementArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the engagement that this page is part of.

", + "smithy.api#required": {} + } + }, + "ContactArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the contact that Incident Manager is engaging.

", + "smithy.api#required": {} + } + }, + "Sender": { + "target": "com.amazonaws.ssmcontacts#Sender", + "traits": { + "smithy.api#documentation": "

The user that started the engagement.

", + "smithy.api#required": {} + } + }, + "IncidentId": { + "target": "com.amazonaws.ssmcontacts#IncidentId", + "traits": { + "smithy.api#documentation": "

The ARN of the incident that's engaging the contact channel.

" + } + }, + "SentTime": { + "target": "com.amazonaws.ssmcontacts#DateTime", + "traits": { + "smithy.api#documentation": "

The time that Incident Manager engaged the contact channel.

" + } + }, + "DeliveryTime": { + "target": "com.amazonaws.ssmcontacts#DateTime", + "traits": { + "smithy.api#documentation": "

The time the message was delivered to the contact channel.

" + } + }, + "ReadTime": { + "target": "com.amazonaws.ssmcontacts#DateTime", + "traits": { + "smithy.api#documentation": "

The time that the contact channel acknowledged engagement.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Incident Manager engaging a contact's contact channel.

" + } + }, + "com.amazonaws.ssmcontacts#PagesList": { + "type": "list", + "member": { + "target": "com.amazonaws.ssmcontacts#Page" + } + }, + "com.amazonaws.ssmcontacts#PaginationToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + }, + "smithy.api#pattern": "^[\\\\\\/a-zA-Z0-9_+=\\-]*$" + } + }, + "com.amazonaws.ssmcontacts#Plan": { + "type": "structure", + "members": { + "Stages": { + "target": "com.amazonaws.ssmcontacts#StagesList", + "traits": { + "smithy.api#documentation": "

A list of stages that the escalation plan or engagement plan uses to engage contacts and\n contact methods.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The stages that an escalation plan or engagement plan engages contacts and contact\n methods in.

" + } + }, + "com.amazonaws.ssmcontacts#Policy": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 395000 + }, + "smithy.api#pattern": ".*\\S.*" + } + }, + "com.amazonaws.ssmcontacts#PublicContent": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 8192 + }, + "smithy.api#pattern": "^[.\\s\\S]*$" + } + }, + "com.amazonaws.ssmcontacts#PublicSubject": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^[.\\s\\S]*$" + } + }, + "com.amazonaws.ssmcontacts#PutContactPolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#PutContactPolicyRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#PutContactPolicyResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#ConflictException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Adds a resource to the specified contact or escalation plan.

" + } + }, + "com.amazonaws.ssmcontacts#PutContactPolicyRequest": { + "type": "structure", + "members": { + "ContactArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact or escalation plan.

", + "smithy.api#required": {} + } + }, + "Policy": { + "target": "com.amazonaws.ssmcontacts#Policy", + "traits": { + "smithy.api#documentation": "

Details of the resource policy.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#PutContactPolicyResult": { + "type": "structure", + "members": {} + }, + "com.amazonaws.ssmcontacts#Receipt": { + "type": "structure", + "members": { + "ContactChannelArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact channel Incident Manager engaged.

" + } + }, + "ReceiptType": { + "target": "com.amazonaws.ssmcontacts#ReceiptType", + "traits": { + "smithy.api#documentation": "

The type follows the engagement cycle, SENT, DELIVERED, and\n READ.

", + "smithy.api#required": {} + } + }, + "ReceiptInfo": { + "target": "com.amazonaws.ssmcontacts#ReceiptInfo", + "traits": { + "smithy.api#documentation": "

Information provided during the page acknowledgement.

" + } + }, + "ReceiptTime": { + "target": "com.amazonaws.ssmcontacts#DateTime", + "traits": { + "smithy.api#documentation": "

The time receipt was SENT, DELIVERED, or\n READ.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Records events during an engagement.

" + } + }, + "com.amazonaws.ssmcontacts#ReceiptInfo": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^[.\\s\\S]*$" + } + }, + "com.amazonaws.ssmcontacts#ReceiptType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DELIVERED", + "name": "DELIVERED" + }, + { + "value": "ERROR", + "name": "ERROR" + }, + { + "value": "READ", + "name": "READ" + }, + { + "value": "SENT", + "name": "SENT" + }, + { + "value": "STOP", + "name": "STOP" + } + ] + } + }, + "com.amazonaws.ssmcontacts#ReceiptsList": { + "type": "list", + "member": { + "target": "com.amazonaws.ssmcontacts#Receipt" + } + }, + "com.amazonaws.ssmcontacts#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#required": {} + } + }, + "ResourceId": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#documentation": "Hypothetical resource identifier that was not found", + "smithy.api#required": {} + } + }, + "ResourceType": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#documentation": "Hypothetical resource type that was not found", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Request references a resource that\n doesn't\n exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.ssmcontacts#RetryAfterSeconds": { + "type": "integer" + }, + "com.amazonaws.ssmcontacts#RetryIntervalInMinutes": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0, + "max": 60 + } + } + }, + "com.amazonaws.ssmcontacts#SSMContacts": { + "type": "service", + "version": "2021-05-03", + "operations": [ + { + "target": "com.amazonaws.ssmcontacts#AcceptPage" + }, + { + "target": "com.amazonaws.ssmcontacts#ActivateContactChannel" + }, + { + "target": "com.amazonaws.ssmcontacts#CreateContact" + }, + { + "target": "com.amazonaws.ssmcontacts#CreateContactChannel" + }, + { + "target": "com.amazonaws.ssmcontacts#DeactivateContactChannel" + }, + { + "target": "com.amazonaws.ssmcontacts#DeleteContact" + }, + { + "target": "com.amazonaws.ssmcontacts#DeleteContactChannel" + }, + { + "target": "com.amazonaws.ssmcontacts#DescribeEngagement" + }, + { + "target": "com.amazonaws.ssmcontacts#DescribePage" + }, + { + "target": "com.amazonaws.ssmcontacts#GetContact" + }, + { + "target": "com.amazonaws.ssmcontacts#GetContactChannel" + }, + { + "target": "com.amazonaws.ssmcontacts#GetContactPolicy" + }, + { + "target": "com.amazonaws.ssmcontacts#ListContactChannels" + }, + { + "target": "com.amazonaws.ssmcontacts#ListContacts" + }, + { + "target": "com.amazonaws.ssmcontacts#ListEngagements" + }, + { + "target": "com.amazonaws.ssmcontacts#ListPageReceipts" + }, + { + "target": "com.amazonaws.ssmcontacts#ListPagesByContact" + }, + { + "target": "com.amazonaws.ssmcontacts#ListPagesByEngagement" + }, + { + "target": "com.amazonaws.ssmcontacts#ListTagsForResource" + }, + { + "target": "com.amazonaws.ssmcontacts#PutContactPolicy" + }, + { + "target": "com.amazonaws.ssmcontacts#SendActivationCode" + }, + { + "target": "com.amazonaws.ssmcontacts#StartEngagement" + }, + { + "target": "com.amazonaws.ssmcontacts#StopEngagement" + }, + { + "target": "com.amazonaws.ssmcontacts#TagResource" + }, + { + "target": "com.amazonaws.ssmcontacts#UntagResource" + }, + { + "target": "com.amazonaws.ssmcontacts#UpdateContact" + }, + { + "target": "com.amazonaws.ssmcontacts#UpdateContactChannel" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "SSM Contacts", + "arnNamespace": "ssm-contacts", + "cloudFormationName": "SSMContacts", + "cloudTrailEventSource": "ssmcontacts.amazonaws.com", + "endpointPrefix": "ssm-contacts" + }, + "aws.auth#sigv4": { + "name": "ssm-contacts" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "

", + "smithy.api#title": "AWS Systems Manager Incident Manager Contacts" + } + }, + "com.amazonaws.ssmcontacts#SendActivationCode": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#SendActivationCodeRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#SendActivationCodeResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#DataEncryptionException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Sends an activation code to a contact channel. The contact can use this code to activate\n the contact channel in the console or with the ActivateChannel action.\n Incident Manager can't engage a contact channel until it has been activated.

" + } + }, + "com.amazonaws.ssmcontacts#SendActivationCodeRequest": { + "type": "structure", + "members": { + "ContactChannelId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact channel.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#SendActivationCodeResult": { + "type": "structure", + "members": {} + }, + "com.amazonaws.ssmcontacts#Sender": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 255 + }, + "smithy.api#pattern": "^[\\\\a-zA-Z0-9_@#%*+=:?.\\/!\\s-]*$" + } + }, + "com.amazonaws.ssmcontacts#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#required": {} + } + }, + "ResourceId": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#documentation": "Identifier of the resource affected" + } + }, + "ResourceType": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#documentation": "Type of the resource affected" + } + }, + "QuotaCode": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#documentation": "Service Quotas requirement to identify originating service", + "smithy.api#required": {} + } + }, + "ServiceCode": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#documentation": "Service Quotas requirement to identify originating quota", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Request would cause a service quota to be exceeded.

", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.ssmcontacts#SimpleAddress": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 320 + } + } + }, + "com.amazonaws.ssmcontacts#SsmContactsArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "arn:(aws|aws-cn|aws-us-gov):ssm-contacts:[-\\w+=\\/,.@]*:[0-9]+:([\\w+=\\/,.@:-]+)*" + } + }, + "com.amazonaws.ssmcontacts#Stage": { + "type": "structure", + "members": { + "DurationInMinutes": { + "target": "com.amazonaws.ssmcontacts#StageDurationInMins", + "traits": { + "smithy.api#documentation": "

The time to wait until beginning the next stage.

", + "smithy.api#required": {} + } + }, + "Targets": { + "target": "com.amazonaws.ssmcontacts#TargetsList", + "traits": { + "smithy.api#documentation": "

The contacts or contact methods that the escalation plan or engagement plan is\n engaging.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A set amount of time that an escalation plan or engagement plan engages the specified\n contacts or contact methods.

" + } + }, + "com.amazonaws.ssmcontacts#StageDurationInMins": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 0, + "max": 30 + } + } + }, + "com.amazonaws.ssmcontacts#StagesList": { + "type": "list", + "member": { + "target": "com.amazonaws.ssmcontacts#Stage" + } + }, + "com.amazonaws.ssmcontacts#StartEngagement": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#StartEngagementRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#StartEngagementResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#DataEncryptionException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts an engagement to a contact or escalation plan. The engagement engages each\n contact specified in the incident.

" + } + }, + "com.amazonaws.ssmcontacts#StartEngagementRequest": { + "type": "structure", + "members": { + "ContactId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact being engaged.

", + "smithy.api#required": {} + } + }, + "Sender": { + "target": "com.amazonaws.ssmcontacts#Sender", + "traits": { + "smithy.api#documentation": "

The user that started the engagement.

", + "smithy.api#required": {} + } + }, + "Subject": { + "target": "com.amazonaws.ssmcontacts#Subject", + "traits": { + "smithy.api#documentation": "

The secure subject of the message that was sent to the contact. Use this field for\n engagements to VOICE or EMAIL.

", + "smithy.api#required": {} + } + }, + "Content": { + "target": "com.amazonaws.ssmcontacts#Content", + "traits": { + "smithy.api#documentation": "

The secure content of the message that was sent to the contact. Use this field for\n engagements to VOICE or EMAIL.

", + "smithy.api#required": {} + } + }, + "PublicSubject": { + "target": "com.amazonaws.ssmcontacts#PublicSubject", + "traits": { + "smithy.api#documentation": "

The insecure subject of the message that was sent to the contact. Use this field for\n engagements to SMS.

" + } + }, + "PublicContent": { + "target": "com.amazonaws.ssmcontacts#PublicContent", + "traits": { + "smithy.api#documentation": "

The insecure content of the message that was sent to the contact. Use this field for\n engagements to SMS.

" + } + }, + "IncidentId": { + "target": "com.amazonaws.ssmcontacts#IncidentId", + "traits": { + "smithy.api#documentation": "

The ARN of the incident that the engagement is part of.

" + } + }, + "IdempotencyToken": { + "target": "com.amazonaws.ssmcontacts#IdempotencyToken", + "traits": { + "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#StartEngagementResult": { + "type": "structure", + "members": { + "EngagementArn": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The ARN of the engagement.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#StopEngagement": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#StopEngagementRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#StopEngagementResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Stops an engagement before it finishes the final stage of the escalation plan or\n engagement plan. Further contacts aren't engaged.

" + } + }, + "com.amazonaws.ssmcontacts#StopEngagementRequest": { + "type": "structure", + "members": { + "EngagementId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the engagement.

", + "smithy.api#required": {} + } + }, + "Reason": { + "target": "com.amazonaws.ssmcontacts#StopReason", + "traits": { + "smithy.api#documentation": "

The reason that you're stopping the engagement.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#StopEngagementResult": { + "type": "structure", + "members": {} + }, + "com.amazonaws.ssmcontacts#StopReason": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 255 + }, + "smithy.api#pattern": "^[.\\s\\S]*$" + } + }, + "com.amazonaws.ssmcontacts#String": { + "type": "string" + }, + "com.amazonaws.ssmcontacts#Subject": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^[.\\s\\S]*$" + } + }, + "com.amazonaws.ssmcontacts#Tag": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.ssmcontacts#TagKey", + "traits": { + "smithy.api#documentation": "

Name of the\n object\n key.

" + } + }, + "Value": { + "target": "com.amazonaws.ssmcontacts#TagValue", + "traits": { + "smithy.api#documentation": "

Value of the tag.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A container of a key-value name pair.

" + } + }, + "com.amazonaws.ssmcontacts#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[\\\\\\/a-zA-Z0-9_+=\\-]*$" + } + }, + "com.amazonaws.ssmcontacts#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.ssmcontacts#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.ssmcontacts#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#TagResourceResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Tags a contact or escalation plan. You can tag only contacts and escalation plans in the\n first region of your replication set.

" + } + }, + "com.amazonaws.ssmcontacts#TagResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.ssmcontacts#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact or escalation plan.

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.ssmcontacts#TagsList", + "traits": { + "smithy.api#documentation": "

A list of tags that you are adding to the contact or escalation plan.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#TagResourceResult": { + "type": "structure", + "members": {} + }, + "com.amazonaws.ssmcontacts#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^[\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@]*$" + } + }, + "com.amazonaws.ssmcontacts#TagsList": { + "type": "list", + "member": { + "target": "com.amazonaws.ssmcontacts#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.ssmcontacts#Target": { + "type": "structure", + "members": { + "ChannelTargetInfo": { + "target": "com.amazonaws.ssmcontacts#ChannelTargetInfo", + "traits": { + "smithy.api#documentation": "

Information about the contact channel Incident Manager is engaging.

" + } + }, + "ContactTargetInfo": { + "target": "com.amazonaws.ssmcontacts#ContactTargetInfo", + "traits": { + "smithy.api#documentation": "

Information about the contact that Incident Manager is engaging.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The contact or contact channel that is being engaged.

" + } + }, + "com.amazonaws.ssmcontacts#TargetsList": { + "type": "list", + "member": { + "target": "com.amazonaws.ssmcontacts#Target" + } + }, + "com.amazonaws.ssmcontacts#ThrottlingException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#required": {} + } + }, + "QuotaCode": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#documentation": "Service Quotas requirement to identify originating service" + } + }, + "ServiceCode": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#documentation": "Service Quotas requirement to identify originating quota" + } + }, + "RetryAfterSeconds": { + "target": "com.amazonaws.ssmcontacts#RetryAfterSeconds", + "traits": { + "smithy.api#documentation": "Advice to clients on when the call can be safely retried", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "

The request was denied due to request throttling.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.ssmcontacts#TimeRange": { + "type": "structure", + "members": { + "StartTime": { + "target": "com.amazonaws.ssmcontacts#DateTime", + "traits": { + "smithy.api#documentation": "

The start of the time range.

" + } + }, + "EndTime": { + "target": "com.amazonaws.ssmcontacts#DateTime", + "traits": { + "smithy.api#documentation": "

The end of the time range.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A range of between two set times

" + } + }, + "com.amazonaws.ssmcontacts#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#UntagResourceResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes tags from the specified resource.

" + } + }, + "com.amazonaws.ssmcontacts#UntagResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.ssmcontacts#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact or escalation plan.

", + "smithy.api#required": {} + } + }, + "TagKeys": { + "target": "com.amazonaws.ssmcontacts#TagKeyList", + "traits": { + "smithy.api#documentation": "

The key of the tag that you want to remove.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.ssmcontacts#UntagResourceResult": { + "type": "structure", + "members": {} + }, + "com.amazonaws.ssmcontacts#UpdateContact": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#UpdateContactRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#UpdateContactResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#DataEncryptionException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates the contact or escalation plan specified.

" + } + }, + "com.amazonaws.ssmcontacts#UpdateContactChannel": { + "type": "operation", + "input": { + "target": "com.amazonaws.ssmcontacts#UpdateContactChannelRequest" + }, + "output": { + "target": "com.amazonaws.ssmcontacts#UpdateContactChannelResult" + }, + "errors": [ + { + "target": "com.amazonaws.ssmcontacts#AccessDeniedException" + }, + { + "target": "com.amazonaws.ssmcontacts#ConflictException" + }, + { + "target": "com.amazonaws.ssmcontacts#DataEncryptionException" + }, + { + "target": "com.amazonaws.ssmcontacts#InternalServerException" + }, + { + "target": "com.amazonaws.ssmcontacts#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.ssmcontacts#ThrottlingException" + }, + { + "target": "com.amazonaws.ssmcontacts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates a contact's contact channel.

" + } + }, + "com.amazonaws.ssmcontacts#UpdateContactChannelRequest": { + "type": "structure", + "members": { + "ContactChannelId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact channel you want to update.

", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.ssmcontacts#ChannelName", + "traits": { + "smithy.api#documentation": "

The name of the contact channel

" + } + }, + "DeliveryAddress": { + "target": "com.amazonaws.ssmcontacts#ContactChannelAddress", + "traits": { + "smithy.api#documentation": "

The details that Incident Manager uses when trying to engage the contact channel.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#UpdateContactChannelResult": { + "type": "structure", + "members": {} + }, + "com.amazonaws.ssmcontacts#UpdateContactRequest": { + "type": "structure", + "members": { + "ContactId": { + "target": "com.amazonaws.ssmcontacts#SsmContactsArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact or escalation plan you're updating.

", + "smithy.api#required": {} + } + }, + "DisplayName": { + "target": "com.amazonaws.ssmcontacts#ContactName", + "traits": { + "smithy.api#documentation": "

The full name of the contact or escalation plan.

" + } + }, + "Plan": { + "target": "com.amazonaws.ssmcontacts#Plan", + "traits": { + "smithy.api#documentation": "

A list of stages. A contact has an engagement plan with stages for specified contact\n channels. An escalation plan uses these stages to contact specified contacts.

" + } + } + } + }, + "com.amazonaws.ssmcontacts#UpdateContactResult": { + "type": "structure", + "members": {} + }, + "com.amazonaws.ssmcontacts#ValidationException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#required": {} + } + }, + "Reason": { + "target": "com.amazonaws.ssmcontacts#ValidationExceptionReason", + "traits": { + "smithy.api#documentation": "Reason the request failed validation" + } + }, + "Fields": { + "target": "com.amazonaws.ssmcontacts#ValidationExceptionFieldList", + "traits": { + "smithy.api#documentation": "The fields that caused the error" + } + } + }, + "traits": { + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by an\n AWS\n service.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.ssmcontacts#ValidationExceptionField": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#documentation": "

The name of the field that caused the exception.

", + "smithy.api#required": {} + } + }, + "Message": { + "target": "com.amazonaws.ssmcontacts#String", + "traits": { + "smithy.api#documentation": "

Information about what caused the field to cause an exception.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Provides information about which field caused the exception.

" + } + }, + "com.amazonaws.ssmcontacts#ValidationExceptionFieldList": { + "type": "list", + "member": { + "target": "com.amazonaws.ssmcontacts#ValidationExceptionField" + } + }, + "com.amazonaws.ssmcontacts#ValidationExceptionReason": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "UNKNOWN_OPERATION", + "name": "UNKNOWN_OPERATION" + }, + { + "value": "CANNOT_PARSE", + "name": "CANNOT_PARSE" + }, + { + "value": "FIELD_VALIDATION_FAILED", + "name": "FIELD_VALIDATION_FAILED" + }, + { + "value": "OTHER", + "name": "OTHER" + } + ] + } + } + } +} diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AssembleMiddlewareStack.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AssembleMiddlewareStack.java index 5f191fe6549..5b3a117fff9 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AssembleMiddlewareStack.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AssembleMiddlewareStack.java @@ -1,6 +1,7 @@ package software.amazon.smithy.aws.go.codegen; import java.util.List; +import software.amazon.smithy.aws.go.codegen.customization.AdjustAwsRestJsonContentType; import software.amazon.smithy.aws.traits.auth.UnsignedPayloadTrait; import software.amazon.smithy.go.codegen.SmithyGoDependency; import software.amazon.smithy.go.codegen.SymbolUtils; @@ -130,6 +131,16 @@ public List getClientPlugins() { .resolvedFunction(SymbolUtils.createPointableSymbolBuilder( AwsClientUserAgent.MIDDLEWARE_RESOLVER).build()) .build()) + .build(), + + // Add REST-JSON Content-Type Adjuster + RuntimeClientPlugin.builder() + .registerMiddleware(MiddlewareRegistrar.builder() + .resolvedFunction(SymbolUtils.createValueSymbolBuilder( + AdjustAwsRestJsonContentType.RESOLVER_NAME).build()) + .build()) + .servicePredicate((model, serviceShape) -> + AdjustAwsRestJsonContentType.isServiceOnShameList(serviceShape)) .build() ); } diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/AdjustAwsRestJsonContentType.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/AdjustAwsRestJsonContentType.java new file mode 100644 index 00000000000..eb378cd9e69 --- /dev/null +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/customization/AdjustAwsRestJsonContentType.java @@ -0,0 +1,119 @@ +/* + * Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file 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. + */ + +package software.amazon.smithy.aws.go.codegen.customization; + +import java.util.Set; +import software.amazon.smithy.codegen.core.Symbol; +import software.amazon.smithy.codegen.core.SymbolProvider; +import software.amazon.smithy.go.codegen.GoDelegator; +import software.amazon.smithy.go.codegen.GoSettings; +import software.amazon.smithy.go.codegen.GoStackStepMiddlewareGenerator; +import software.amazon.smithy.go.codegen.GoWriter; +import software.amazon.smithy.go.codegen.MiddlewareIdentifier; +import software.amazon.smithy.go.codegen.SmithyGoDependency; +import software.amazon.smithy.go.codegen.SymbolUtils; +import software.amazon.smithy.go.codegen.integration.GoIntegration; +import software.amazon.smithy.model.Model; +import software.amazon.smithy.model.shapes.ShapeId; +import software.amazon.smithy.model.shapes.ToShapeId; +import software.amazon.smithy.utils.SetUtils; + +/** + * Generates a middleware to fix the AWS REST-JSON Content-Type header from the standard protocol header + * to the json 1.1 header. + */ +public class AdjustAwsRestJsonContentType implements GoIntegration { + public static final String RESOLVER_NAME = "addRestJsonContentTypeCustomization"; + + private static final String MIDDLEWARE_NAME = "customizeRestJsonContentType"; + private static final GoStackStepMiddlewareGenerator SERIALIZE_STEP_MIDDLEWARE = + GoStackStepMiddlewareGenerator.createSerializeStepMiddleware(MIDDLEWARE_NAME, + MiddlewareIdentifier.builder().name(MIDDLEWARE_NAME).build()); + private static final String CONTENT_TYPE_HEADER = "Content-Type"; + private static final String EXPECTED_CONTENT_TYPE = "application/json"; + private static final String TARGET_CONTENT_TYPE = "application/x-amz-json-1.1"; + private static final String INSERT_AFTER = "OperationSerializer"; + + private static final Set SHAME_SET = SetUtils.of( + ShapeId.from("com.amazonaws.finspace#AWSHabaneroManagementService"), + ShapeId.from("com.amazonaws.finspacedata#AWSHabaneroPublicAPI") + ); + + @Override + public void writeAdditionalFiles( + GoSettings settings, + Model model, + SymbolProvider symbolProvider, + GoDelegator goDelegator + ) { + if (!isServiceOnShameList(settings.getService())) { + return; + } + + goDelegator.useShapeWriter(settings.getService(model), writer -> { + generateMiddleware(writer); + generateAddMiddleware(writer); + }); + } + + /** + * Determine if a service should be customized. + * @param service the service shape id + * @return whether the service requires customization + */ + public static boolean isServiceOnShameList(ToShapeId service) { + return SHAME_SET.contains(service.toShapeId()); + } + + private void generateAddMiddleware(GoWriter writer) { + Symbol stackSymbol = SymbolUtils.createPointableSymbolBuilder("Stack", + SmithyGoDependency.SMITHY_MIDDLEWARE).build(); + writer.write(""); + writer.openBlock("func $L(stack $P) error {", "}", RESOLVER_NAME, stackSymbol, () -> { + writer.openBlock("return stack.Serialize.Insert(&$T{}, $S, $T)", + SERIALIZE_STEP_MIDDLEWARE.getMiddlewareSymbol(), INSERT_AFTER, + SymbolUtils.createValueSymbolBuilder("After", SmithyGoDependency.SMITHY_MIDDLEWARE).build()); + }); + } + + private void generateMiddleware(GoWriter writer) { + SERIALIZE_STEP_MIDDLEWARE.writeMiddleware(writer, (g, w) -> { + Symbol requestSymbol = SymbolUtils.createPointableSymbolBuilder("Request", + SmithyGoDependency.SMITHY_HTTP_TRANSPORT).build(); + + w.write("req, ok := in.Request.($P)", requestSymbol); + w.openBlock("if !ok {", "}", () -> { + w.addUseImports(SmithyGoDependency.FMT); + w.write("return out, metadata, fmt.Errorf(\"unknown transport type %T\", in.Request)"); + }); + w.write(""); + + w.write("const contentType = $S", CONTENT_TYPE_HEADER); + w.write("const expectedType = $S", EXPECTED_CONTENT_TYPE); + w.write("const targetType = $S", TARGET_CONTENT_TYPE); + w.write(""); + + w.addUseImports(SmithyGoDependency.STRINGS); + w.openBlock("if strings.EqualFold(req.Header.Get(contentType), expectedType) {", "}", + () -> { + w.write("req.Header.Set(contentType, targetType)"); + }); + w.write(""); + + w.write("return next.$L(ctx, in)", g.getHandleMethodName()); + }); + } +} diff --git a/codegen/smithy-aws-go-codegen/src/main/resources/META-INF/services/software.amazon.smithy.go.codegen.integration.GoIntegration b/codegen/smithy-aws-go-codegen/src/main/resources/META-INF/services/software.amazon.smithy.go.codegen.integration.GoIntegration index 5256c73cd37..0270300400a 100644 --- a/codegen/smithy-aws-go-codegen/src/main/resources/META-INF/services/software.amazon.smithy.go.codegen.integration.GoIntegration +++ b/codegen/smithy-aws-go-codegen/src/main/resources/META-INF/services/software.amazon.smithy.go.codegen.integration.GoIntegration @@ -37,3 +37,4 @@ software.amazon.smithy.aws.go.codegen.customization.S3GetBucketLocation software.amazon.smithy.aws.go.codegen.RequestResponseLogging software.amazon.smithy.aws.go.codegen.customization.S3AddPutObjectUnseekableBodyDoc software.amazon.smithy.aws.go.codegen.customization.BackfillEc2UnboxedToBoxedShapes +software.amazon.smithy.aws.go.codegen.customization.AdjustAwsRestJsonContentType 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 a0622afa0ee..6e07258794d 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 @@ -222,6 +222,8 @@ "SNS": "sns", "SQS": "sqs", "SSM": "ssm", + "SSM Contacts": "ssm-contacts", + "SSM Incidents": "ssm-incidents", "SSO": "portal.sso", "SSO Admin": "sso", "SSO OIDC": "oidc", diff --git a/internal/repotools/cmd/updatemodulemeta/main.go b/internal/repotools/cmd/updatemodulemeta/main.go index 39828667dfa..4daff7bc7db 100644 --- a/internal/repotools/cmd/updatemodulemeta/main.go +++ b/internal/repotools/cmd/updatemodulemeta/main.go @@ -94,9 +94,9 @@ func main() { log.Printf("[WARN] unable to determine go package for %v...skipping", modDir) continue } - latest, _ := moduleTags.Latest(modDir) + latest, isTagged := moduleTags.Latest(modDir) - if cfg, ok := config.Modules[modDir]; ok && cfg.NoTag { + if cfg, ok := config.Modules[modDir]; (ok && cfg.NoTag) || !isTagged { latest = "tip" } diff --git a/service/codeartifact/api_op_DisposePackageVersions.go b/service/codeartifact/api_op_DisposePackageVersions.go index 56410370faf..3dc0373f2ae 100644 --- a/service/codeartifact/api_op_DisposePackageVersions.go +++ b/service/codeartifact/api_op_DisposePackageVersions.go @@ -20,7 +20,7 @@ import ( // (https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_ListPackageVersions.html#API_ListPackageVersions_RequestSyntax) // parameter to Disposed. To view information about a disposed package version, use // DescribePackageVersion -// (https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DescribePackageVersion.html).. +// (https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DescribePackageVersion.html). func (c *Client) DisposePackageVersions(ctx context.Context, params *DisposePackageVersionsInput, optFns ...func(*Options)) (*DisposePackageVersionsOutput, error) { if params == nil { params = &DisposePackageVersionsInput{} diff --git a/service/commander/LICENSE.txt b/service/commander/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/commander/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/commander/api_client.go b/service/commander/api_client.go new file mode 100644 index 00000000000..24c5e245666 --- /dev/null +++ b/service/commander/api_client.go @@ -0,0 +1,278 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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" + smithy "github.com/aws/smithy-go" + "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 = "Commander" +const ServiceAPIVersion = "2018-05-10" + +// Client provides the API client to make operations call for Incident Manager. +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) + } + + 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 +} + +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) + 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, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "commander", 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) +} + +// 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/commander/api_op_CreateReplicationSet.go b/service/commander/api_op_CreateReplicationSet.go new file mode 100644 index 00000000000..8469458ff39 --- /dev/null +++ b/service/commander/api_op_CreateReplicationSet.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// A replication set replicates and encrypts your data to the provided Regions with +// the provided KMS key. +func (c *Client) CreateReplicationSet(ctx context.Context, params *CreateReplicationSetInput, optFns ...func(*Options)) (*CreateReplicationSetOutput, error) { + if params == nil { + params = &CreateReplicationSetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateReplicationSet", params, optFns, addOperationCreateReplicationSetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateReplicationSetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateReplicationSetInput struct { + + // The Regions that Incident Manager replicates your data to. You can have up to + // three Regions in your replication set. + // + // This member is required. + Regions map[string]types.RegionMapInputValue + + // A token ensuring that the action is called only once with the specified details. + ClientToken *string +} + +type CreateReplicationSetOutput struct { + + // The Amazon Resource Name (ARN) of the replication set. + // + // This member is required. + Arn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationCreateReplicationSetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateReplicationSet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateReplicationSet{}, 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_opCreateReplicationSetMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateReplicationSetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateReplicationSet(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_initializeOpCreateReplicationSet struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateReplicationSet) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateReplicationSet) 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.(*CreateReplicationSetInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateReplicationSetInput ") + } + + 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_opCreateReplicationSetMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateReplicationSet{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateReplicationSet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "CreateReplicationSet", + } +} diff --git a/service/commander/api_op_CreateResponsePlan.go b/service/commander/api_op_CreateResponsePlan.go new file mode 100644 index 00000000000..174d1912097 --- /dev/null +++ b/service/commander/api_op_CreateResponsePlan.go @@ -0,0 +1,182 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a response plan that automates the initial response to incidents. A +// response plan engages contacts, starts chat channel collaboration, and initiates +// runbooks at the beginning of an incident. +func (c *Client) CreateResponsePlan(ctx context.Context, params *CreateResponsePlanInput, optFns ...func(*Options)) (*CreateResponsePlanOutput, error) { + if params == nil { + params = &CreateResponsePlanInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateResponsePlan", params, optFns, addOperationCreateResponsePlanMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateResponsePlanOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateResponsePlanInput struct { + + // Details used to create an incident when using this response plan. + // + // This member is required. + IncidentTemplate *types.IncidentTemplate + + // The short format name of the response plan. Can't include spaces. + // + // This member is required. + Name *string + + // The actions that the response plan starts at the beginning of an incident. + Actions []types.Action + + // The AWS Chatbot chat channel used for collaboration during an incident. + ChatChannel types.ChatChannel + + // A token ensuring that the action is called only once with the specified details. + ClientToken *string + + // The long format of the response plan name. This field can contain spaces. + DisplayName *string + + // The contacts and escalation plans that the response plan engages during an + // incident. + Engagements []string + + // A list of tags that you are adding to the response plan. + Tags map[string]string +} + +type CreateResponsePlanOutput struct { + + // The Amazon Resource Name (ARN) of the response plan. + // + // This member is required. + Arn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationCreateResponsePlanMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateResponsePlan{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateResponsePlan{}, 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_opCreateResponsePlanMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateResponsePlanValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateResponsePlan(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_initializeOpCreateResponsePlan struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateResponsePlan) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateResponsePlan) 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.(*CreateResponsePlanInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateResponsePlanInput ") + } + + 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_opCreateResponsePlanMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateResponsePlan{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateResponsePlan(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "CreateResponsePlan", + } +} diff --git a/service/commander/api_op_CreateTimelineEvent.go b/service/commander/api_op_CreateTimelineEvent.go new file mode 100644 index 00000000000..c7becaa0064 --- /dev/null +++ b/service/commander/api_op_CreateTimelineEvent.go @@ -0,0 +1,185 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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" + "time" +) + +// Creates a custom timeline event on the incident details page of an incident +// record. Timeline events are automatically created by Incident Manager, marking +// key moment during an incident. You can create custom timeline events to mark +// important events that are automatically detected by Incident Manager. +func (c *Client) CreateTimelineEvent(ctx context.Context, params *CreateTimelineEventInput, optFns ...func(*Options)) (*CreateTimelineEventOutput, error) { + if params == nil { + params = &CreateTimelineEventInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateTimelineEvent", params, optFns, addOperationCreateTimelineEventMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateTimelineEventOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateTimelineEventInput struct { + + // A token ensuring that the action is called only once with the specified details. + // + // This member is required. + ClientToken *string + + // A short description of the event. + // + // This member is required. + EventData *string + + // The time that the event occurred. + // + // This member is required. + EventTime *time.Time + + // The type of the event. You can create timeline events of type Custom Event. + // + // This member is required. + EventType *string + + // The Amazon Resource Name (ARN) of the incident record you are adding the event + // to. + // + // This member is required. + IncidentRecordArn *string +} + +type CreateTimelineEventOutput struct { + + // The ID of the event for easy reference later. + // + // This member is required. + EventId *string + + // The ARN of the incident record that you added the event to. + // + // This member is required. + IncidentRecordArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationCreateTimelineEventMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateTimelineEvent{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateTimelineEvent{}, 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_opCreateTimelineEventMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateTimelineEventValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTimelineEvent(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_initializeOpCreateTimelineEvent struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateTimelineEvent) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateTimelineEvent) 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.(*CreateTimelineEventInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateTimelineEventInput ") + } + + 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_opCreateTimelineEventMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateTimelineEvent{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateTimelineEvent(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "CreateTimelineEvent", + } +} diff --git a/service/commander/api_op_DeleteIncidentRecord.go b/service/commander/api_op_DeleteIncidentRecord.go new file mode 100644 index 00000000000..58721a51b38 --- /dev/null +++ b/service/commander/api_op_DeleteIncidentRecord.go @@ -0,0 +1,112 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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" +) + +// Delete an incident record from Incident Manager. +func (c *Client) DeleteIncidentRecord(ctx context.Context, params *DeleteIncidentRecordInput, optFns ...func(*Options)) (*DeleteIncidentRecordOutput, error) { + if params == nil { + params = &DeleteIncidentRecordInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteIncidentRecord", params, optFns, addOperationDeleteIncidentRecordMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteIncidentRecordOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteIncidentRecordInput struct { + + // The Amazon Resource Name (ARN) of the incident record you are deleting. + // + // This member is required. + Arn *string +} + +type DeleteIncidentRecordOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationDeleteIncidentRecordMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteIncidentRecord{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteIncidentRecord{}, 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 = addOpDeleteIncidentRecordValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIncidentRecord(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_opDeleteIncidentRecord(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "DeleteIncidentRecord", + } +} diff --git a/service/commander/api_op_DeleteReplicationSet.go b/service/commander/api_op_DeleteReplicationSet.go new file mode 100644 index 00000000000..604fe2b3dc6 --- /dev/null +++ b/service/commander/api_op_DeleteReplicationSet.go @@ -0,0 +1,113 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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 all Regions in your replication set. Deleting the replication set +// deletes all Incident Manager data. +func (c *Client) DeleteReplicationSet(ctx context.Context, params *DeleteReplicationSetInput, optFns ...func(*Options)) (*DeleteReplicationSetOutput, error) { + if params == nil { + params = &DeleteReplicationSetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteReplicationSet", params, optFns, addOperationDeleteReplicationSetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteReplicationSetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteReplicationSetInput struct { + + // The Amazon Resource Name (ARN) of the replication set you're deleting. + // + // This member is required. + Arn *string +} + +type DeleteReplicationSetOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationDeleteReplicationSetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteReplicationSet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteReplicationSet{}, 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 = addOpDeleteReplicationSetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteReplicationSet(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_opDeleteReplicationSet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "DeleteReplicationSet", + } +} diff --git a/service/commander/api_op_DeleteResourcePolicy.go b/service/commander/api_op_DeleteResourcePolicy.go new file mode 100644 index 00000000000..3fc6ef9fb89 --- /dev/null +++ b/service/commander/api_op_DeleteResourcePolicy.go @@ -0,0 +1,118 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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 that AWS Resource Access Manager uses to share your +// Incident Manager resource. +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, addOperationDeleteResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResourcePolicyInput struct { + + // The ID of the resource policy you're deleting. + // + // This member is required. + PolicyId *string + + // The Amazon Resource Name (ARN) of the resource you're deleting the policy from. + // + // This member is required. + ResourceArn *string +} + +type DeleteResourcePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func 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: "ssm-incidents", + OperationName: "DeleteResourcePolicy", + } +} diff --git a/service/commander/api_op_DeleteResponsePlan.go b/service/commander/api_op_DeleteResponsePlan.go new file mode 100644 index 00000000000..4bfb2d09b5a --- /dev/null +++ b/service/commander/api_op_DeleteResponsePlan.go @@ -0,0 +1,114 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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 specified response plan. Deleting a response plan stops all linked +// CloudWatch alarms and EventBridge events from creating an incident with this +// response plan. +func (c *Client) DeleteResponsePlan(ctx context.Context, params *DeleteResponsePlanInput, optFns ...func(*Options)) (*DeleteResponsePlanOutput, error) { + if params == nil { + params = &DeleteResponsePlanInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResponsePlan", params, optFns, addOperationDeleteResponsePlanMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResponsePlanOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResponsePlanInput struct { + + // The Amazon Resource Name (ARN) of the response plan. + // + // This member is required. + Arn *string +} + +type DeleteResponsePlanOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationDeleteResponsePlanMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteResponsePlan{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteResponsePlan{}, 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 = addOpDeleteResponsePlanValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResponsePlan(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_opDeleteResponsePlan(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "DeleteResponsePlan", + } +} diff --git a/service/commander/api_op_DeleteTimelineEvent.go b/service/commander/api_op_DeleteTimelineEvent.go new file mode 100644 index 00000000000..99786ae6538 --- /dev/null +++ b/service/commander/api_op_DeleteTimelineEvent.go @@ -0,0 +1,118 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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 timeline event from an incident. +func (c *Client) DeleteTimelineEvent(ctx context.Context, params *DeleteTimelineEventInput, optFns ...func(*Options)) (*DeleteTimelineEventOutput, error) { + if params == nil { + params = &DeleteTimelineEventInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteTimelineEvent", params, optFns, addOperationDeleteTimelineEventMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteTimelineEventOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteTimelineEventInput struct { + + // The ID of the event you are updating. You can find this by using + // ListTimelineEvents. + // + // This member is required. + EventId *string + + // The Amazon Resource Name (ARN) of the incident that the event is part of. + // + // This member is required. + IncidentRecordArn *string +} + +type DeleteTimelineEventOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationDeleteTimelineEventMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteTimelineEvent{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteTimelineEvent{}, 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 = addOpDeleteTimelineEventValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTimelineEvent(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_opDeleteTimelineEvent(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "DeleteTimelineEvent", + } +} diff --git a/service/commander/api_op_GetIncidentRecord.go b/service/commander/api_op_GetIncidentRecord.go new file mode 100644 index 00000000000..1a007bac994 --- /dev/null +++ b/service/commander/api_op_GetIncidentRecord.go @@ -0,0 +1,119 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the details of the specified incident record. +func (c *Client) GetIncidentRecord(ctx context.Context, params *GetIncidentRecordInput, optFns ...func(*Options)) (*GetIncidentRecordOutput, error) { + if params == nil { + params = &GetIncidentRecordInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetIncidentRecord", params, optFns, addOperationGetIncidentRecordMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetIncidentRecordOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetIncidentRecordInput struct { + + // The Amazon Resource Name (ARN) of the incident record. + // + // This member is required. + Arn *string +} + +type GetIncidentRecordOutput struct { + + // Details structure of the incident record. + // + // This member is required. + IncidentRecord *types.IncidentRecord + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationGetIncidentRecordMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetIncidentRecord{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetIncidentRecord{}, 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 = addOpGetIncidentRecordValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIncidentRecord(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_opGetIncidentRecord(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "GetIncidentRecord", + } +} diff --git a/service/commander/api_op_GetReplicationSet.go b/service/commander/api_op_GetReplicationSet.go new file mode 100644 index 00000000000..fdd39b22c0a --- /dev/null +++ b/service/commander/api_op_GetReplicationSet.go @@ -0,0 +1,518 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +import ( + "context" + "errors" + "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/commander/types" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + "github.com/jmespath/go-jmespath" + "time" +) + +// Retrieve your Incident Manager replication set. +func (c *Client) GetReplicationSet(ctx context.Context, params *GetReplicationSetInput, optFns ...func(*Options)) (*GetReplicationSetOutput, error) { + if params == nil { + params = &GetReplicationSetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetReplicationSet", params, optFns, addOperationGetReplicationSetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetReplicationSetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetReplicationSetInput struct { + + // The Amazon Resource Name (ARN) of the replication set you want to retrieve. + // + // This member is required. + Arn *string +} + +type GetReplicationSetOutput struct { + + // Details of the replication set. + // + // This member is required. + ReplicationSet *types.ReplicationSet + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationGetReplicationSetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetReplicationSet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetReplicationSet{}, 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 = addOpGetReplicationSetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReplicationSet(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 +} + +// GetReplicationSetAPIClient is a client that implements the GetReplicationSet +// operation. +type GetReplicationSetAPIClient interface { + GetReplicationSet(context.Context, *GetReplicationSetInput, ...func(*Options)) (*GetReplicationSetOutput, error) +} + +var _ GetReplicationSetAPIClient = (*Client)(nil) + +// WaitForReplicationSetActiveWaiterOptions are waiter options for +// WaitForReplicationSetActiveWaiter +type WaitForReplicationSetActiveWaiterOptions 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 + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // WaitForReplicationSetActiveWaiter will use default minimum delay of 30 seconds. + // Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or set + // to zero, WaitForReplicationSetActiveWaiter will use default max delay of 30 + // seconds. Note that MaxDelay must resolve to value greater than or equal to the + // MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetReplicationSetInput, *GetReplicationSetOutput, error) (bool, error) +} + +// WaitForReplicationSetActiveWaiter defines the waiters for +// WaitForReplicationSetActive +type WaitForReplicationSetActiveWaiter struct { + client GetReplicationSetAPIClient + + options WaitForReplicationSetActiveWaiterOptions +} + +// NewWaitForReplicationSetActiveWaiter constructs a +// WaitForReplicationSetActiveWaiter. +func NewWaitForReplicationSetActiveWaiter(client GetReplicationSetAPIClient, optFns ...func(*WaitForReplicationSetActiveWaiterOptions)) *WaitForReplicationSetActiveWaiter { + options := WaitForReplicationSetActiveWaiterOptions{} + options.MinDelay = 30 * time.Second + options.MaxDelay = 30 * time.Second + options.Retryable = waitForReplicationSetActiveStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &WaitForReplicationSetActiveWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for WaitForReplicationSetActive waiter. The +// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is +// required and must be greater than zero. +func (w *WaitForReplicationSetActiveWaiter) Wait(ctx context.Context, params *GetReplicationSetInput, maxWaitDur time.Duration, optFns ...func(*WaitForReplicationSetActiveWaiterOptions)) error { + if maxWaitDur <= 0 { + return fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 30 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetReplicationSet(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return err + } + if !retryable { + return nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return fmt.Errorf("exceeded max wait time for WaitForReplicationSetActive waiter") +} + +func waitForReplicationSetActiveStateRetryable(ctx context.Context, input *GetReplicationSetInput, output *GetReplicationSetOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("replicationSet.status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "ACTIVE" + value, ok := pathValue.(types.ReplicationSetStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ReplicationSetStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("replicationSet.status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "CREATING" + value, ok := pathValue.(types.ReplicationSetStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ReplicationSetStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return true, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("replicationSet.status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "UPDATING" + value, ok := pathValue.(types.ReplicationSetStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ReplicationSetStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return true, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("replicationSet.status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "FAILED" + value, ok := pathValue.(types.ReplicationSetStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ReplicationSetStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + return true, nil +} + +// WaitForReplicationSetDeletedWaiterOptions are waiter options for +// WaitForReplicationSetDeletedWaiter +type WaitForReplicationSetDeletedWaiterOptions 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 + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // WaitForReplicationSetDeletedWaiter will use default minimum delay of 30 seconds. + // Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or set + // to zero, WaitForReplicationSetDeletedWaiter will use default max delay of 30 + // seconds. Note that MaxDelay must resolve to value greater than or equal to the + // MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetReplicationSetInput, *GetReplicationSetOutput, error) (bool, error) +} + +// WaitForReplicationSetDeletedWaiter defines the waiters for +// WaitForReplicationSetDeleted +type WaitForReplicationSetDeletedWaiter struct { + client GetReplicationSetAPIClient + + options WaitForReplicationSetDeletedWaiterOptions +} + +// NewWaitForReplicationSetDeletedWaiter constructs a +// WaitForReplicationSetDeletedWaiter. +func NewWaitForReplicationSetDeletedWaiter(client GetReplicationSetAPIClient, optFns ...func(*WaitForReplicationSetDeletedWaiterOptions)) *WaitForReplicationSetDeletedWaiter { + options := WaitForReplicationSetDeletedWaiterOptions{} + options.MinDelay = 30 * time.Second + options.MaxDelay = 30 * time.Second + options.Retryable = waitForReplicationSetDeletedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &WaitForReplicationSetDeletedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for WaitForReplicationSetDeleted waiter. The +// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is +// required and must be greater than zero. +func (w *WaitForReplicationSetDeletedWaiter) Wait(ctx context.Context, params *GetReplicationSetInput, maxWaitDur time.Duration, optFns ...func(*WaitForReplicationSetDeletedWaiterOptions)) error { + if maxWaitDur <= 0 { + return fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 30 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetReplicationSet(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return err + } + if !retryable { + return nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return fmt.Errorf("exceeded max wait time for WaitForReplicationSetDeleted waiter") +} + +func waitForReplicationSetDeletedStateRetryable(ctx context.Context, input *GetReplicationSetInput, output *GetReplicationSetOutput, err error) (bool, error) { + + if err != nil { + var errorType *types.ResourceNotFoundException + if errors.As(err, &errorType) { + return false, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("replicationSet.status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "DELETING" + value, ok := pathValue.(types.ReplicationSetStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ReplicationSetStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return true, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("replicationSet.status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "FAILED" + value, ok := pathValue.(types.ReplicationSetStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ReplicationSetStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + return true, nil +} + +func newServiceMetadataMiddleware_opGetReplicationSet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "GetReplicationSet", + } +} diff --git a/service/commander/api_op_GetResourcePolicies.go b/service/commander/api_op_GetResourcePolicies.go new file mode 100644 index 00000000000..d59424a7705 --- /dev/null +++ b/service/commander/api_op_GetResourcePolicies.go @@ -0,0 +1,217 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the resource policies attached to the specified response plan. +func (c *Client) GetResourcePolicies(ctx context.Context, params *GetResourcePoliciesInput, optFns ...func(*Options)) (*GetResourcePoliciesOutput, error) { + if params == nil { + params = &GetResourcePoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResourcePolicies", params, optFns, addOperationGetResourcePoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResourcePoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResourcePoliciesInput struct { + + // The Amazon Resource Name (ARN) of the response plan with the attached resource + // policy. + // + // This member is required. + ResourceArn *string + + // The maximum number of resource policies to display per page of results. + MaxResults *int32 + + // The pagination token to continue to the next page of results. + NextToken *string +} + +type GetResourcePoliciesOutput struct { + + // Details about the resource policy attached to the response plan. + // + // This member is required. + ResourcePolicies []types.ResourcePolicy + + // The pagination token to continue to the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationGetResourcePoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetResourcePolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetResourcePolicies{}, 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 = addOpGetResourcePoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicies(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 +} + +// GetResourcePoliciesAPIClient is a client that implements the GetResourcePolicies +// operation. +type GetResourcePoliciesAPIClient interface { + GetResourcePolicies(context.Context, *GetResourcePoliciesInput, ...func(*Options)) (*GetResourcePoliciesOutput, error) +} + +var _ GetResourcePoliciesAPIClient = (*Client)(nil) + +// GetResourcePoliciesPaginatorOptions is the paginator options for +// GetResourcePolicies +type GetResourcePoliciesPaginatorOptions struct { + // The maximum number of resource policies to display per page of results. + 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 +} + +// GetResourcePoliciesPaginator is a paginator for GetResourcePolicies +type GetResourcePoliciesPaginator struct { + options GetResourcePoliciesPaginatorOptions + client GetResourcePoliciesAPIClient + params *GetResourcePoliciesInput + nextToken *string + firstPage bool +} + +// NewGetResourcePoliciesPaginator returns a new GetResourcePoliciesPaginator +func NewGetResourcePoliciesPaginator(client GetResourcePoliciesAPIClient, params *GetResourcePoliciesInput, optFns ...func(*GetResourcePoliciesPaginatorOptions)) *GetResourcePoliciesPaginator { + if params == nil { + params = &GetResourcePoliciesInput{} + } + + options := GetResourcePoliciesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetResourcePoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetResourcePoliciesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetResourcePolicies page. +func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetResourcePoliciesOutput, 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.GetResourcePolicies(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_opGetResourcePolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "GetResourcePolicies", + } +} diff --git a/service/commander/api_op_GetResponsePlan.go b/service/commander/api_op_GetResponsePlan.go new file mode 100644 index 00000000000..d444d233b06 --- /dev/null +++ b/service/commander/api_op_GetResponsePlan.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the details of the specified response plan. +func (c *Client) GetResponsePlan(ctx context.Context, params *GetResponsePlanInput, optFns ...func(*Options)) (*GetResponsePlanOutput, error) { + if params == nil { + params = &GetResponsePlanInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResponsePlan", params, optFns, addOperationGetResponsePlanMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResponsePlanOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResponsePlanInput struct { + + // The Amazon Resource Name (ARN) of the response plan. + // + // This member is required. + Arn *string +} + +type GetResponsePlanOutput struct { + + // The ARN of the response plan. + // + // This member is required. + Arn *string + + // Details used to create the incident when using this response plan. + // + // This member is required. + IncidentTemplate *types.IncidentTemplate + + // The short format name of the response plan. Can't contain spaces. + // + // This member is required. + Name *string + + // The actions that this response plan takes at the beginning of the incident. + Actions []types.Action + + // The AWS Chatbot chat channel used for collaboration during an incident. + ChatChannel types.ChatChannel + + // The long format name of the response plan. Can contain spaces. + DisplayName *string + + // The contacts and escalation plans that the response plan engages during an + // incident. + Engagements []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationGetResponsePlanMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetResponsePlan{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetResponsePlan{}, 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 = addOpGetResponsePlanValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResponsePlan(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_opGetResponsePlan(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "GetResponsePlan", + } +} diff --git a/service/commander/api_op_GetTimelineEvent.go b/service/commander/api_op_GetTimelineEvent.go new file mode 100644 index 00000000000..55e11068e9b --- /dev/null +++ b/service/commander/api_op_GetTimelineEvent.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a timeline event based on its ID and incident record. +func (c *Client) GetTimelineEvent(ctx context.Context, params *GetTimelineEventInput, optFns ...func(*Options)) (*GetTimelineEventOutput, error) { + if params == nil { + params = &GetTimelineEventInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetTimelineEvent", params, optFns, addOperationGetTimelineEventMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetTimelineEventOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetTimelineEventInput struct { + + // The ID of the event. You can get an event's ID when you create it or by using + // ListTimelineEvents. + // + // This member is required. + EventId *string + + // The Amazon Resource Name (ARN) of the incident that the timeline event is part + // of. + // + // This member is required. + IncidentRecordArn *string +} + +type GetTimelineEventOutput struct { + + // Details about the timeline event. + // + // This member is required. + Event *types.TimelineEvent + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationGetTimelineEventMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetTimelineEvent{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetTimelineEvent{}, 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 = addOpGetTimelineEventValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTimelineEvent(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_opGetTimelineEvent(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "GetTimelineEvent", + } +} diff --git a/service/commander/api_op_ListIncidentRecords.go b/service/commander/api_op_ListIncidentRecords.go new file mode 100644 index 00000000000..5b5790c9f1c --- /dev/null +++ b/service/commander/api_op_ListIncidentRecords.go @@ -0,0 +1,224 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all incident records in your account. Use this command to retrieve the +// Amazon Resource Name (ARN) of the incident record you want to update. +func (c *Client) ListIncidentRecords(ctx context.Context, params *ListIncidentRecordsInput, optFns ...func(*Options)) (*ListIncidentRecordsOutput, error) { + if params == nil { + params = &ListIncidentRecordsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListIncidentRecords", params, optFns, addOperationListIncidentRecordsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListIncidentRecordsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListIncidentRecordsInput struct { + + // Filter the list of incident records you are searching through. You can filter on + // the following keys: + // + // * creationTime + // + // * impact + // + // * status + // + // * createdBy + Filters []types.Filter + + // The maximum number of results per page. + MaxResults *int32 + + // The pagination token to continue to the next page of results. + NextToken *string +} + +type ListIncidentRecordsOutput struct { + + // The details of each listed incident record. + // + // This member is required. + IncidentRecordSummaries []types.IncidentRecordSummary + + // The pagination token to continue to the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListIncidentRecordsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListIncidentRecords{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListIncidentRecords{}, 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 = addOpListIncidentRecordsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIncidentRecords(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 +} + +// ListIncidentRecordsAPIClient is a client that implements the ListIncidentRecords +// operation. +type ListIncidentRecordsAPIClient interface { + ListIncidentRecords(context.Context, *ListIncidentRecordsInput, ...func(*Options)) (*ListIncidentRecordsOutput, error) +} + +var _ ListIncidentRecordsAPIClient = (*Client)(nil) + +// ListIncidentRecordsPaginatorOptions is the paginator options for +// ListIncidentRecords +type ListIncidentRecordsPaginatorOptions 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 +} + +// ListIncidentRecordsPaginator is a paginator for ListIncidentRecords +type ListIncidentRecordsPaginator struct { + options ListIncidentRecordsPaginatorOptions + client ListIncidentRecordsAPIClient + params *ListIncidentRecordsInput + nextToken *string + firstPage bool +} + +// NewListIncidentRecordsPaginator returns a new ListIncidentRecordsPaginator +func NewListIncidentRecordsPaginator(client ListIncidentRecordsAPIClient, params *ListIncidentRecordsInput, optFns ...func(*ListIncidentRecordsPaginatorOptions)) *ListIncidentRecordsPaginator { + if params == nil { + params = &ListIncidentRecordsInput{} + } + + options := ListIncidentRecordsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListIncidentRecordsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListIncidentRecordsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListIncidentRecords page. +func (p *ListIncidentRecordsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListIncidentRecordsOutput, 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.ListIncidentRecords(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_opListIncidentRecords(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "ListIncidentRecords", + } +} diff --git a/service/commander/api_op_ListRelatedItems.go b/service/commander/api_op_ListRelatedItems.go new file mode 100644 index 00000000000..ab904f162ae --- /dev/null +++ b/service/commander/api_op_ListRelatedItems.go @@ -0,0 +1,216 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List all related items for an incident record. +func (c *Client) ListRelatedItems(ctx context.Context, params *ListRelatedItemsInput, optFns ...func(*Options)) (*ListRelatedItemsOutput, error) { + if params == nil { + params = &ListRelatedItemsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRelatedItems", params, optFns, addOperationListRelatedItemsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRelatedItemsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRelatedItemsInput struct { + + // The Amazon Resource Name (ARN) of the incident record that you are listing + // related items for. + // + // This member is required. + IncidentRecordArn *string + + // The maximum number of related items per page. + MaxResults *int32 + + // The pagination token to continue to the next page of results. + NextToken *string +} + +type ListRelatedItemsOutput struct { + + // Details about each related item. + // + // This member is required. + RelatedItems []types.RelatedItem + + // The pagination token to continue to the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListRelatedItemsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListRelatedItems{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListRelatedItems{}, 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 = addOpListRelatedItemsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRelatedItems(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 +} + +// ListRelatedItemsAPIClient is a client that implements the ListRelatedItems +// operation. +type ListRelatedItemsAPIClient interface { + ListRelatedItems(context.Context, *ListRelatedItemsInput, ...func(*Options)) (*ListRelatedItemsOutput, error) +} + +var _ ListRelatedItemsAPIClient = (*Client)(nil) + +// ListRelatedItemsPaginatorOptions is the paginator options for ListRelatedItems +type ListRelatedItemsPaginatorOptions struct { + // The maximum number of related items 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 +} + +// ListRelatedItemsPaginator is a paginator for ListRelatedItems +type ListRelatedItemsPaginator struct { + options ListRelatedItemsPaginatorOptions + client ListRelatedItemsAPIClient + params *ListRelatedItemsInput + nextToken *string + firstPage bool +} + +// NewListRelatedItemsPaginator returns a new ListRelatedItemsPaginator +func NewListRelatedItemsPaginator(client ListRelatedItemsAPIClient, params *ListRelatedItemsInput, optFns ...func(*ListRelatedItemsPaginatorOptions)) *ListRelatedItemsPaginator { + if params == nil { + params = &ListRelatedItemsInput{} + } + + options := ListRelatedItemsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListRelatedItemsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListRelatedItemsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListRelatedItems page. +func (p *ListRelatedItemsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRelatedItemsOutput, 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.ListRelatedItems(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_opListRelatedItems(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "ListRelatedItems", + } +} diff --git a/service/commander/api_op_ListReplicationSets.go b/service/commander/api_op_ListReplicationSets.go new file mode 100644 index 00000000000..591a5d0e2e1 --- /dev/null +++ b/service/commander/api_op_ListReplicationSets.go @@ -0,0 +1,207 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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" +) + +// Lists details about the replication set configured in your account. +func (c *Client) ListReplicationSets(ctx context.Context, params *ListReplicationSetsInput, optFns ...func(*Options)) (*ListReplicationSetsOutput, error) { + if params == nil { + params = &ListReplicationSetsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListReplicationSets", params, optFns, addOperationListReplicationSetsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListReplicationSetsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListReplicationSetsInput struct { + + // The maximum number of results per page. + MaxResults *int32 + + // The pagination token to continue to the next page of results. + NextToken *string +} + +type ListReplicationSetsOutput struct { + + // The Amazon Resource Name (ARN) of the list replication set. + // + // This member is required. + ReplicationSetArns []string + + // The pagination token to continue to the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListReplicationSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListReplicationSets{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListReplicationSets{}, 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_opListReplicationSets(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 +} + +// ListReplicationSetsAPIClient is a client that implements the ListReplicationSets +// operation. +type ListReplicationSetsAPIClient interface { + ListReplicationSets(context.Context, *ListReplicationSetsInput, ...func(*Options)) (*ListReplicationSetsOutput, error) +} + +var _ ListReplicationSetsAPIClient = (*Client)(nil) + +// ListReplicationSetsPaginatorOptions is the paginator options for +// ListReplicationSets +type ListReplicationSetsPaginatorOptions 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 +} + +// ListReplicationSetsPaginator is a paginator for ListReplicationSets +type ListReplicationSetsPaginator struct { + options ListReplicationSetsPaginatorOptions + client ListReplicationSetsAPIClient + params *ListReplicationSetsInput + nextToken *string + firstPage bool +} + +// NewListReplicationSetsPaginator returns a new ListReplicationSetsPaginator +func NewListReplicationSetsPaginator(client ListReplicationSetsAPIClient, params *ListReplicationSetsInput, optFns ...func(*ListReplicationSetsPaginatorOptions)) *ListReplicationSetsPaginator { + if params == nil { + params = &ListReplicationSetsInput{} + } + + options := ListReplicationSetsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListReplicationSetsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListReplicationSetsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListReplicationSets page. +func (p *ListReplicationSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListReplicationSetsOutput, 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.ListReplicationSets(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_opListReplicationSets(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "ListReplicationSets", + } +} diff --git a/service/commander/api_op_ListResponsePlans.go b/service/commander/api_op_ListResponsePlans.go new file mode 100644 index 00000000000..c6d92c72c7a --- /dev/null +++ b/service/commander/api_op_ListResponsePlans.go @@ -0,0 +1,207 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all response plans in your account. +func (c *Client) ListResponsePlans(ctx context.Context, params *ListResponsePlansInput, optFns ...func(*Options)) (*ListResponsePlansOutput, error) { + if params == nil { + params = &ListResponsePlansInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListResponsePlans", params, optFns, addOperationListResponsePlansMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListResponsePlansOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListResponsePlansInput struct { + + // The maximum number of response plans per page. + MaxResults *int32 + + // The pagination token to continue to the next page of results. + NextToken *string +} + +type ListResponsePlansOutput struct { + + // Details of each response plan. + // + // This member is required. + ResponsePlanSummaries []types.ResponsePlanSummary + + // The pagination token to continue to the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListResponsePlansMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListResponsePlans{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListResponsePlans{}, 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_opListResponsePlans(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 +} + +// ListResponsePlansAPIClient is a client that implements the ListResponsePlans +// operation. +type ListResponsePlansAPIClient interface { + ListResponsePlans(context.Context, *ListResponsePlansInput, ...func(*Options)) (*ListResponsePlansOutput, error) +} + +var _ ListResponsePlansAPIClient = (*Client)(nil) + +// ListResponsePlansPaginatorOptions is the paginator options for ListResponsePlans +type ListResponsePlansPaginatorOptions struct { + // The maximum number of response plans 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 +} + +// ListResponsePlansPaginator is a paginator for ListResponsePlans +type ListResponsePlansPaginator struct { + options ListResponsePlansPaginatorOptions + client ListResponsePlansAPIClient + params *ListResponsePlansInput + nextToken *string + firstPage bool +} + +// NewListResponsePlansPaginator returns a new ListResponsePlansPaginator +func NewListResponsePlansPaginator(client ListResponsePlansAPIClient, params *ListResponsePlansInput, optFns ...func(*ListResponsePlansPaginatorOptions)) *ListResponsePlansPaginator { + if params == nil { + params = &ListResponsePlansInput{} + } + + options := ListResponsePlansPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListResponsePlansPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListResponsePlansPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListResponsePlans page. +func (p *ListResponsePlansPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResponsePlansOutput, 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.ListResponsePlans(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_opListResponsePlans(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "ListResponsePlans", + } +} diff --git a/service/commander/api_op_ListTagsForResource.go b/service/commander/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..04bea8837f5 --- /dev/null +++ b/service/commander/api_op_ListTagsForResource.go @@ -0,0 +1,118 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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 that are attached to the specified response plan. +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, 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 response plan. + // + // This member is required. + ResourceArn *string +} + +type ListTagsForResourceOutput struct { + + // A list of tags for the response plan. + // + // This member is required. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func 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: "ssm-incidents", + OperationName: "ListTagsForResource", + } +} diff --git a/service/commander/api_op_ListTimelineEvents.go b/service/commander/api_op_ListTimelineEvents.go new file mode 100644 index 00000000000..cd0c08a997a --- /dev/null +++ b/service/commander/api_op_ListTimelineEvents.go @@ -0,0 +1,230 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists timeline events of the specified incident record. +func (c *Client) ListTimelineEvents(ctx context.Context, params *ListTimelineEventsInput, optFns ...func(*Options)) (*ListTimelineEventsOutput, error) { + if params == nil { + params = &ListTimelineEventsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTimelineEvents", params, optFns, addOperationListTimelineEventsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTimelineEventsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTimelineEventsInput struct { + + // The Amazon Resource Name (ARN) of the incident that the event is part of. + // + // This member is required. + IncidentRecordArn *string + + // Filters the timeline events based on the provided conditional values. You can + // filter timeline events using the following keys: + // + // * eventTime + // + // * eventType + Filters []types.Filter + + // The maximum number of results per page. + MaxResults *int32 + + // The pagination token to continue to the next page of results. + NextToken *string + + // Sort by the specified key value pair. + SortBy types.TimelineEventSort + + // Sorts the order of timeline events by the value specified in the sortBy field. + SortOrder types.SortOrder +} + +type ListTimelineEventsOutput struct { + + // Details about each event that occurred during the incident. + // + // This member is required. + EventSummaries []types.EventSummary + + // The pagination token to continue to the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListTimelineEventsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTimelineEvents{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTimelineEvents{}, 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 = addOpListTimelineEventsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTimelineEvents(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 +} + +// ListTimelineEventsAPIClient is a client that implements the ListTimelineEvents +// operation. +type ListTimelineEventsAPIClient interface { + ListTimelineEvents(context.Context, *ListTimelineEventsInput, ...func(*Options)) (*ListTimelineEventsOutput, error) +} + +var _ ListTimelineEventsAPIClient = (*Client)(nil) + +// ListTimelineEventsPaginatorOptions is the paginator options for +// ListTimelineEvents +type ListTimelineEventsPaginatorOptions 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 +} + +// ListTimelineEventsPaginator is a paginator for ListTimelineEvents +type ListTimelineEventsPaginator struct { + options ListTimelineEventsPaginatorOptions + client ListTimelineEventsAPIClient + params *ListTimelineEventsInput + nextToken *string + firstPage bool +} + +// NewListTimelineEventsPaginator returns a new ListTimelineEventsPaginator +func NewListTimelineEventsPaginator(client ListTimelineEventsAPIClient, params *ListTimelineEventsInput, optFns ...func(*ListTimelineEventsPaginatorOptions)) *ListTimelineEventsPaginator { + if params == nil { + params = &ListTimelineEventsInput{} + } + + options := ListTimelineEventsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListTimelineEventsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListTimelineEventsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListTimelineEvents page. +func (p *ListTimelineEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTimelineEventsOutput, 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.ListTimelineEvents(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_opListTimelineEvents(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "ListTimelineEvents", + } +} diff --git a/service/commander/api_op_PutResourcePolicy.go b/service/commander/api_op_PutResourcePolicy.go new file mode 100644 index 00000000000..a90610f9ecd --- /dev/null +++ b/service/commander/api_op_PutResourcePolicy.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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 a resource policy to the specified response plan. +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, addOperationPutResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutResourcePolicyInput struct { + + // Details of the resource policy. + // + // This member is required. + Policy *string + + // The Amazon Resource Name (ARN) of the response plan you're adding the resource + // policy to. + // + // This member is required. + ResourceArn *string +} + +type PutResourcePolicyOutput struct { + + // The ID of the resource policy. + // + // This member is required. + PolicyId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func 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: "ssm-incidents", + OperationName: "PutResourcePolicy", + } +} diff --git a/service/commander/api_op_StartIncident.go b/service/commander/api_op_StartIncident.go new file mode 100644 index 00000000000..7b05438d3c0 --- /dev/null +++ b/service/commander/api_op_StartIncident.go @@ -0,0 +1,192 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Used to start an incident from CloudWatch alarms, EventBridge events, or +// manually. +func (c *Client) StartIncident(ctx context.Context, params *StartIncidentInput, optFns ...func(*Options)) (*StartIncidentOutput, error) { + if params == nil { + params = &StartIncidentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartIncident", params, optFns, addOperationStartIncidentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartIncidentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartIncidentInput struct { + + // The Amazon Resource Name (ARN) of the response plan that pre-defines summary, + // chat channels, SNS topics, runbooks, title, and impact of the incident. + // + // This member is required. + ResponsePlanArn *string + + // A token ensuring that the action is called only once with the specified details. + ClientToken *string + + // Defines the impact to the customers. Providing an impact overwrites the impact + // provided by a response plan. Possible impacts: + // + // * 1 - Critical impact, this + // typically relates to full application failure that impacts many to all + // customers. + // + // * 2 - High impact, partial application failure with impact to many + // customers. + // + // * 3 - Medium impact, the application is providing reduced service to + // customers. + // + // * 4 - Low impact, customer might aren't impacted by the problem + // yet. + // + // * 5 - No impact, customers aren't currently impacted but urgent action is + // needed to avoid impact. + Impact *int32 + + // Add related items to the incident for other responders to use. Related items are + // AWS resources, external links, or files uploaded to an S3 bucket. + RelatedItems []types.RelatedItem + + // Provide a title for the incident. Providing a title overwrites the title + // provided by the response plan. + Title *string + + // Details of what created the incident record in Incident Manager. + TriggerDetails *types.TriggerDetails +} + +type StartIncidentOutput struct { + + // The ARN of the newly created incident record. + // + // This member is required. + IncidentRecordArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationStartIncidentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartIncident{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartIncident{}, 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_opStartIncidentMiddleware(stack, options); err != nil { + return err + } + if err = addOpStartIncidentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartIncident(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_initializeOpStartIncident struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpStartIncident) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpStartIncident) 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.(*StartIncidentInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *StartIncidentInput ") + } + + 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_opStartIncidentMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpStartIncident{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opStartIncident(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "StartIncident", + } +} diff --git a/service/commander/api_op_TagResource.go b/service/commander/api_op_TagResource.go new file mode 100644 index 00000000000..87384d0439d --- /dev/null +++ b/service/commander/api_op_TagResource.go @@ -0,0 +1,117 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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 a tag to a response plan. +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, 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 response plan you're adding the tags to. + // + // This member is required. + ResourceArn *string + + // A list of tags that you are adding to the response plan. + // + // This member is required. + Tags map[string]string +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func 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: "ssm-incidents", + OperationName: "TagResource", + } +} diff --git a/service/commander/api_op_UntagResource.go b/service/commander/api_op_UntagResource.go new file mode 100644 index 00000000000..ab1de030c21 --- /dev/null +++ b/service/commander/api_op_UntagResource.go @@ -0,0 +1,117 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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 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, 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 response plan you're removing a tag from. + // + // This member is required. + ResourceArn *string + + // The name of the tag you're removing from the response plan. + // + // This member is required. + TagKeys []string +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func 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: "ssm-incidents", + OperationName: "UntagResource", + } +} diff --git a/service/commander/api_op_UpdateDeletionProtection.go b/service/commander/api_op_UpdateDeletionProtection.go new file mode 100644 index 00000000000..c254d0c9fb8 --- /dev/null +++ b/service/commander/api_op_UpdateDeletionProtection.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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" +) + +// Update deletion protection to either allow or deny deletion of the final Region +// in a replication set. +func (c *Client) UpdateDeletionProtection(ctx context.Context, params *UpdateDeletionProtectionInput, optFns ...func(*Options)) (*UpdateDeletionProtectionOutput, error) { + if params == nil { + params = &UpdateDeletionProtectionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateDeletionProtection", params, optFns, addOperationUpdateDeletionProtectionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateDeletionProtectionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateDeletionProtectionInput struct { + + // The Amazon Resource Name (ARN) of the replication set you're updating. + // + // This member is required. + Arn *string + + // Details if deletion protection is enabled or disabled in your account. + // + // This member is required. + DeletionProtected *bool + + // A token ensuring that the action is called only once with the specified details. + ClientToken *string +} + +type UpdateDeletionProtectionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationUpdateDeletionProtectionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateDeletionProtection{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateDeletionProtection{}, 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_opUpdateDeletionProtectionMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateDeletionProtectionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDeletionProtection(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_initializeOpUpdateDeletionProtection struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateDeletionProtection) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateDeletionProtection) 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.(*UpdateDeletionProtectionInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateDeletionProtectionInput ") + } + + 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_opUpdateDeletionProtectionMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateDeletionProtection{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateDeletionProtection(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "UpdateDeletionProtection", + } +} diff --git a/service/commander/api_op_UpdateIncidentRecord.go b/service/commander/api_op_UpdateIncidentRecord.go new file mode 100644 index 00000000000..0ea3d2ef352 --- /dev/null +++ b/service/commander/api_op_UpdateIncidentRecord.go @@ -0,0 +1,194 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update the details of an incident record. You can use this action to update an +// incident record from the defined chat channel. For more information about using +// actions in chat channels, see Interacting through chat +// (https://docs.aws.amazon.com/incident-manager/latest/userguide/chat.html#chat-interact). +func (c *Client) UpdateIncidentRecord(ctx context.Context, params *UpdateIncidentRecordInput, optFns ...func(*Options)) (*UpdateIncidentRecordOutput, error) { + if params == nil { + params = &UpdateIncidentRecordInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateIncidentRecord", params, optFns, addOperationUpdateIncidentRecordMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateIncidentRecordOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateIncidentRecordInput struct { + + // The Amazon Resource Name (ARN) of the incident record you are updating. + // + // This member is required. + Arn *string + + // The AWS Chatbot chat channel for responders to collaborate in. + ChatChannel types.ChatChannel + + // A token ensuring that the action is called only once with the specified details. + ClientToken *string + + // Defines the impact to customers and applications. Providing an impact overwrites + // the impact provided by the response plan. Possible impacts: + // + // * 1 - Critical + // impact, this typically relates to full application failure that impacts many to + // all customers. + // + // * 2 - High impact, partial application failure with impact to + // many customers. + // + // * 3 - Medium impact, the application is providing reduced + // service to customers. + // + // * 4 - Low impact, customer might aren't impacted by the + // problem yet. + // + // * 5 - No impact, customers aren't currently impacted but urgent + // action is needed to avoid impact. + Impact *int32 + + // The SNS targets that AWS Chatbot uses to notify the chat channel of updates to + // an incident. You can also make updates to the incident through the chat channel + // using the SNS topics. Using multiple SNS topics creates redundancy in the case + // that a Region is down during the incident. + NotificationTargets []types.NotificationTargetItem + + // The status of the incident. An incident can be Open or Resolved. + Status types.IncidentRecordStatus + + // The summary describes what has happened during the incident. + Summary *string + + // The title of the incident is a brief and easily recognizable. + Title *string +} + +type UpdateIncidentRecordOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationUpdateIncidentRecordMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateIncidentRecord{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateIncidentRecord{}, 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_opUpdateIncidentRecordMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateIncidentRecordValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateIncidentRecord(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_initializeOpUpdateIncidentRecord struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateIncidentRecord) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateIncidentRecord) 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.(*UpdateIncidentRecordInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateIncidentRecordInput ") + } + + 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_opUpdateIncidentRecordMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateIncidentRecord{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateIncidentRecord(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "UpdateIncidentRecord", + } +} diff --git a/service/commander/api_op_UpdateRelatedItems.go b/service/commander/api_op_UpdateRelatedItems.go new file mode 100644 index 00000000000..b8887cbe2d9 --- /dev/null +++ b/service/commander/api_op_UpdateRelatedItems.go @@ -0,0 +1,159 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Add or remove related items from the related items tab of an incident record. +func (c *Client) UpdateRelatedItems(ctx context.Context, params *UpdateRelatedItemsInput, optFns ...func(*Options)) (*UpdateRelatedItemsOutput, error) { + if params == nil { + params = &UpdateRelatedItemsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateRelatedItems", params, optFns, addOperationUpdateRelatedItemsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateRelatedItemsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateRelatedItemsInput struct { + + // The Amazon Resource Name (ARN) of the incident record you are updating related + // items in. + // + // This member is required. + IncidentRecordArn *string + + // Details about the item you are adding or deleting. + // + // This member is required. + RelatedItemsUpdate types.RelatedItemsUpdate + + // A token ensuring that the action is called only once with the specified details. + ClientToken *string +} + +type UpdateRelatedItemsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationUpdateRelatedItemsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateRelatedItems{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateRelatedItems{}, 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_opUpdateRelatedItemsMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateRelatedItemsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRelatedItems(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_initializeOpUpdateRelatedItems struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateRelatedItems) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateRelatedItems) 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.(*UpdateRelatedItemsInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateRelatedItemsInput ") + } + + 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_opUpdateRelatedItemsMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateRelatedItems{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateRelatedItems(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "UpdateRelatedItems", + } +} diff --git a/service/commander/api_op_UpdateReplicationSet.go b/service/commander/api_op_UpdateReplicationSet.go new file mode 100644 index 00000000000..d34f11ad237 --- /dev/null +++ b/service/commander/api_op_UpdateReplicationSet.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Add or delete Regions from your replication set. +func (c *Client) UpdateReplicationSet(ctx context.Context, params *UpdateReplicationSetInput, optFns ...func(*Options)) (*UpdateReplicationSetOutput, error) { + if params == nil { + params = &UpdateReplicationSetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateReplicationSet", params, optFns, addOperationUpdateReplicationSetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateReplicationSetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateReplicationSetInput struct { + + // An action to add or delete a Region. + // + // This member is required. + Actions []types.UpdateReplicationSetAction + + // The Amazon Resource Name (ARN) of the replication set you're updating. + // + // This member is required. + Arn *string + + // A token ensuring that the action is called only once with the specified details. + ClientToken *string +} + +type UpdateReplicationSetOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationUpdateReplicationSetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateReplicationSet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateReplicationSet{}, 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_opUpdateReplicationSetMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateReplicationSetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateReplicationSet(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_initializeOpUpdateReplicationSet struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateReplicationSet) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateReplicationSet) 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.(*UpdateReplicationSetInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateReplicationSetInput ") + } + + 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_opUpdateReplicationSetMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateReplicationSet{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateReplicationSet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "UpdateReplicationSet", + } +} diff --git a/service/commander/api_op_UpdateResponsePlan.go b/service/commander/api_op_UpdateResponsePlan.go new file mode 100644 index 00000000000..e5f1126da85 --- /dev/null +++ b/service/commander/api_op_UpdateResponsePlan.go @@ -0,0 +1,195 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the specified response plan. +func (c *Client) UpdateResponsePlan(ctx context.Context, params *UpdateResponsePlanInput, optFns ...func(*Options)) (*UpdateResponsePlanOutput, error) { + if params == nil { + params = &UpdateResponsePlanInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateResponsePlan", params, optFns, addOperationUpdateResponsePlanMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateResponsePlanOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateResponsePlanInput struct { + + // The Amazon Resource Name (ARN) of the response plan. + // + // This member is required. + Arn *string + + // The actions that this response plan takes at the beginning of an incident. + Actions []types.Action + + // The AWS Chatbot chat channel used for collaboration during an incident. + ChatChannel types.ChatChannel + + // A token ensuring that the action is called only once with the specified details. + ClientToken *string + + // The long format name of the response plan. Can't contain spaces. + DisplayName *string + + // The contacts and escalation plans that Incident Manager engages at the start of + // the incident. + Engagements []string + + // Used to create only one incident record for an incident. + IncidentTemplateDedupeString *string + + // Defines the impact to the customers. Providing an impact overwrites the impact + // provided by a response plan. Possible impacts: + // + // * 5 - Severe impact + // + // * 4 - High + // impact + // + // * 3 - Medium impact + // + // * 2 - Low impact + // + // * 1 - No impact + IncidentTemplateImpact *int32 + + // The SNS targets that AWS Chatbot uses to notify the chat channels and perform + // actions on the incident record. + IncidentTemplateNotificationTargets []types.NotificationTargetItem + + // A brief summary of the incident. This typically contains what has happened, + // what's currently happening, and next steps. + IncidentTemplateSummary *string + + // The short format name of the incident. Can't contain spaces. + IncidentTemplateTitle *string +} + +type UpdateResponsePlanOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationUpdateResponsePlanMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateResponsePlan{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateResponsePlan{}, 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_opUpdateResponsePlanMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateResponsePlanValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateResponsePlan(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_initializeOpUpdateResponsePlan struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateResponsePlan) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateResponsePlan) 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.(*UpdateResponsePlanInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateResponsePlanInput ") + } + + 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_opUpdateResponsePlanMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateResponsePlan{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateResponsePlan(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "UpdateResponsePlan", + } +} diff --git a/service/commander/api_op_UpdateTimelineEvent.go b/service/commander/api_op_UpdateTimelineEvent.go new file mode 100644 index 00000000000..a0707b2c287 --- /dev/null +++ b/service/commander/api_op_UpdateTimelineEvent.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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" + "time" +) + +// Updates a timeline event. You can update events of type Custom Event. +func (c *Client) UpdateTimelineEvent(ctx context.Context, params *UpdateTimelineEventInput, optFns ...func(*Options)) (*UpdateTimelineEventOutput, error) { + if params == nil { + params = &UpdateTimelineEventInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateTimelineEvent", params, optFns, addOperationUpdateTimelineEventMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateTimelineEventOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateTimelineEventInput struct { + + // A token ensuring that the action is called only once with the specified details. + // + // This member is required. + ClientToken *string + + // The ID of the event you are updating. You can find this by using + // ListTimelineEvents. + // + // This member is required. + EventId *string + + // The Amazon Resource Name (ARN) of the incident that the timeline event is part + // of. + // + // This member is required. + IncidentRecordArn *string + + // A short description of the event. + EventData *string + + // The time that the event occurred. + EventTime *time.Time + + // The type of the event. You can update events of type Custom Event. + EventType *string +} + +type UpdateTimelineEventOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationUpdateTimelineEventMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateTimelineEvent{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateTimelineEvent{}, 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_opUpdateTimelineEventMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateTimelineEventValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTimelineEvent(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_initializeOpUpdateTimelineEvent struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateTimelineEvent) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateTimelineEvent) 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.(*UpdateTimelineEventInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateTimelineEventInput ") + } + + 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_opUpdateTimelineEventMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateTimelineEvent{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateTimelineEvent(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-incidents", + OperationName: "UpdateTimelineEvent", + } +} diff --git a/service/commander/deserializers.go b/service/commander/deserializers.go new file mode 100644 index 00000000000..1eef312668a --- /dev/null +++ b/service/commander/deserializers.go @@ -0,0 +1,6365 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/commander/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" + "strings" +) + +type awsRestjson1_deserializeOpCreateReplicationSet struct { +} + +func (*awsRestjson1_deserializeOpCreateReplicationSet) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateReplicationSet) HandleDeserialize(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_deserializeOpErrorCreateReplicationSet(response, &metadata) + } + output := &CreateReplicationSetOutput{} + 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_deserializeOpDocumentCreateReplicationSetOutput(&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_deserializeOpErrorCreateReplicationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentCreateReplicationSetOutput(v **CreateReplicationSetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateReplicationSetOutput + if *v == nil { + sv = &CreateReplicationSetOutput{} + } 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateResponsePlan struct { +} + +func (*awsRestjson1_deserializeOpCreateResponsePlan) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateResponsePlan) HandleDeserialize(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_deserializeOpErrorCreateResponsePlan(response, &metadata) + } + output := &CreateResponsePlanOutput{} + 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_deserializeOpDocumentCreateResponsePlanOutput(&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_deserializeOpErrorCreateResponsePlan(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentCreateResponsePlanOutput(v **CreateResponsePlanOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateResponsePlanOutput + if *v == nil { + sv = &CreateResponsePlanOutput{} + } 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateTimelineEvent struct { +} + +func (*awsRestjson1_deserializeOpCreateTimelineEvent) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateTimelineEvent) HandleDeserialize(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_deserializeOpErrorCreateTimelineEvent(response, &metadata) + } + output := &CreateTimelineEventOutput{} + 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_deserializeOpDocumentCreateTimelineEventOutput(&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_deserializeOpErrorCreateTimelineEvent(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentCreateTimelineEventOutput(v **CreateTimelineEventOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateTimelineEventOutput + if *v == nil { + sv = &CreateTimelineEventOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + 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) + } + + case "incidentRecordArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.IncidentRecordArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteIncidentRecord struct { +} + +func (*awsRestjson1_deserializeOpDeleteIncidentRecord) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteIncidentRecord) HandleDeserialize(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_deserializeOpErrorDeleteIncidentRecord(response, &metadata) + } + output := &DeleteIncidentRecordOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteIncidentRecord(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 + + } +} + +type awsRestjson1_deserializeOpDeleteReplicationSet struct { +} + +func (*awsRestjson1_deserializeOpDeleteReplicationSet) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteReplicationSet) HandleDeserialize(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_deserializeOpErrorDeleteReplicationSet(response, &metadata) + } + output := &DeleteReplicationSetOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteReplicationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_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_deserializeOpDeleteResponsePlan struct { +} + +func (*awsRestjson1_deserializeOpDeleteResponsePlan) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteResponsePlan) HandleDeserialize(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_deserializeOpErrorDeleteResponsePlan(response, &metadata) + } + output := &DeleteResponsePlanOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteResponsePlan(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 + + } +} + +type awsRestjson1_deserializeOpDeleteTimelineEvent struct { +} + +func (*awsRestjson1_deserializeOpDeleteTimelineEvent) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteTimelineEvent) HandleDeserialize(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_deserializeOpErrorDeleteTimelineEvent(response, &metadata) + } + output := &DeleteTimelineEventOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteTimelineEvent(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 + + } +} + +type awsRestjson1_deserializeOpGetIncidentRecord struct { +} + +func (*awsRestjson1_deserializeOpGetIncidentRecord) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetIncidentRecord) HandleDeserialize(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_deserializeOpErrorGetIncidentRecord(response, &metadata) + } + output := &GetIncidentRecordOutput{} + 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_deserializeOpDocumentGetIncidentRecordOutput(&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_deserializeOpErrorGetIncidentRecord(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentGetIncidentRecordOutput(v **GetIncidentRecordOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetIncidentRecordOutput + if *v == nil { + sv = &GetIncidentRecordOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "incidentRecord": + if err := awsRestjson1_deserializeDocumentIncidentRecord(&sv.IncidentRecord, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetReplicationSet struct { +} + +func (*awsRestjson1_deserializeOpGetReplicationSet) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetReplicationSet) HandleDeserialize(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_deserializeOpErrorGetReplicationSet(response, &metadata) + } + output := &GetReplicationSetOutput{} + 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_deserializeOpDocumentGetReplicationSetOutput(&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_deserializeOpErrorGetReplicationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentGetReplicationSetOutput(v **GetReplicationSetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetReplicationSetOutput + if *v == nil { + sv = &GetReplicationSetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "replicationSet": + if err := awsRestjson1_deserializeDocumentReplicationSet(&sv.ReplicationSet, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetResourcePolicies struct { +} + +func (*awsRestjson1_deserializeOpGetResourcePolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetResourcePolicies) HandleDeserialize(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_deserializeOpErrorGetResourcePolicies(response, &metadata) + } + output := &GetResourcePoliciesOutput{} + 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_deserializeOpDocumentGetResourcePoliciesOutput(&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_deserializeOpErrorGetResourcePolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentGetResourcePoliciesOutput(v **GetResourcePoliciesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetResourcePoliciesOutput + if *v == nil { + sv = &GetResourcePoliciesOutput{} + } 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 "resourcePolicies": + if err := awsRestjson1_deserializeDocumentResourcePolicyList(&sv.ResourcePolicies, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetResponsePlan struct { +} + +func (*awsRestjson1_deserializeOpGetResponsePlan) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetResponsePlan) HandleDeserialize(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_deserializeOpErrorGetResponsePlan(response, &metadata) + } + output := &GetResponsePlanOutput{} + 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_deserializeOpDocumentGetResponsePlanOutput(&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_deserializeOpErrorGetResponsePlan(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentGetResponsePlanOutput(v **GetResponsePlanOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetResponsePlanOutput + if *v == nil { + sv = &GetResponsePlanOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "actions": + if err := awsRestjson1_deserializeDocumentActionsList(&sv.Actions, 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.Arn = ptr.String(jtv) + } + + case "chatChannel": + if err := awsRestjson1_deserializeDocumentChatChannel(&sv.ChatChannel, value); err != nil { + return err + } + + case "displayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResponsePlanDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "engagements": + if err := awsRestjson1_deserializeDocumentEngagementSet(&sv.Engagements, value); err != nil { + return err + } + + case "incidentTemplate": + if err := awsRestjson1_deserializeDocumentIncidentTemplate(&sv.IncidentTemplate, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResponsePlanName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetTimelineEvent struct { +} + +func (*awsRestjson1_deserializeOpGetTimelineEvent) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetTimelineEvent) HandleDeserialize(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_deserializeOpErrorGetTimelineEvent(response, &metadata) + } + output := &GetTimelineEventOutput{} + 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_deserializeOpDocumentGetTimelineEventOutput(&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_deserializeOpErrorGetTimelineEvent(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentGetTimelineEventOutput(v **GetTimelineEventOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetTimelineEventOutput + if *v == nil { + sv = &GetTimelineEventOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "event": + if err := awsRestjson1_deserializeDocumentTimelineEvent(&sv.Event, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListIncidentRecords struct { +} + +func (*awsRestjson1_deserializeOpListIncidentRecords) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListIncidentRecords) HandleDeserialize(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_deserializeOpErrorListIncidentRecords(response, &metadata) + } + output := &ListIncidentRecordsOutput{} + 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_deserializeOpDocumentListIncidentRecordsOutput(&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_deserializeOpErrorListIncidentRecords(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentListIncidentRecordsOutput(v **ListIncidentRecordsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListIncidentRecordsOutput + if *v == nil { + sv = &ListIncidentRecordsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "incidentRecordSummaries": + if err := awsRestjson1_deserializeDocumentIncidentRecordSummaryList(&sv.IncidentRecordSummaries, 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_deserializeOpListRelatedItems struct { +} + +func (*awsRestjson1_deserializeOpListRelatedItems) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListRelatedItems) HandleDeserialize(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_deserializeOpErrorListRelatedItems(response, &metadata) + } + output := &ListRelatedItemsOutput{} + 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_deserializeOpDocumentListRelatedItemsOutput(&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_deserializeOpErrorListRelatedItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentListRelatedItemsOutput(v **ListRelatedItemsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListRelatedItemsOutput + if *v == nil { + sv = &ListRelatedItemsOutput{} + } 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 "relatedItems": + if err := awsRestjson1_deserializeDocumentRelatedItemList(&sv.RelatedItems, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListReplicationSets struct { +} + +func (*awsRestjson1_deserializeOpListReplicationSets) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListReplicationSets) HandleDeserialize(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_deserializeOpErrorListReplicationSets(response, &metadata) + } + output := &ListReplicationSetsOutput{} + 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_deserializeOpDocumentListReplicationSetsOutput(&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_deserializeOpErrorListReplicationSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentListReplicationSetsOutput(v **ListReplicationSetsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListReplicationSetsOutput + if *v == nil { + sv = &ListReplicationSetsOutput{} + } 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 "replicationSetArns": + if err := awsRestjson1_deserializeDocumentReplicationSetArnList(&sv.ReplicationSetArns, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListResponsePlans struct { +} + +func (*awsRestjson1_deserializeOpListResponsePlans) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListResponsePlans) HandleDeserialize(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_deserializeOpErrorListResponsePlans(response, &metadata) + } + output := &ListResponsePlansOutput{} + 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_deserializeOpDocumentListResponsePlansOutput(&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_deserializeOpErrorListResponsePlans(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentListResponsePlansOutput(v **ListResponsePlansOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListResponsePlansOutput + if *v == nil { + sv = &ListResponsePlansOutput{} + } 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 "responsePlanSummaries": + if err := awsRestjson1_deserializeDocumentResponsePlanSummaryList(&sv.ResponsePlanSummaries, 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("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_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_deserializeOpListTimelineEvents struct { +} + +func (*awsRestjson1_deserializeOpListTimelineEvents) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTimelineEvents) HandleDeserialize(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_deserializeOpErrorListTimelineEvents(response, &metadata) + } + output := &ListTimelineEventsOutput{} + 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_deserializeOpDocumentListTimelineEventsOutput(&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_deserializeOpErrorListTimelineEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentListTimelineEventsOutput(v **ListTimelineEventsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTimelineEventsOutput + if *v == nil { + sv = &ListTimelineEventsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "eventSummaries": + if err := awsRestjson1_deserializeDocumentEventSummaryList(&sv.EventSummaries, 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_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 + + 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_deserializeOpDocumentPutResourcePolicyOutput(&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_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("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_deserializeOpDocumentPutResourcePolicyOutput(v **PutResourcePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutResourcePolicyOutput + if *v == nil { + sv = &PutResourcePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "policyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyId to be of type string, got %T instead", value) + } + sv.PolicyId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStartIncident struct { +} + +func (*awsRestjson1_deserializeOpStartIncident) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartIncident) HandleDeserialize(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_deserializeOpErrorStartIncident(response, &metadata) + } + output := &StartIncidentOutput{} + 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_deserializeOpDocumentStartIncidentOutput(&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_deserializeOpErrorStartIncident(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentStartIncidentOutput(v **StartIncidentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartIncidentOutput + if *v == nil { + sv = &StartIncidentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "incidentRecordArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.IncidentRecordArn = 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("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 + + } +} + +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("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_deserializeOpUpdateDeletionProtection struct { +} + +func (*awsRestjson1_deserializeOpUpdateDeletionProtection) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateDeletionProtection) HandleDeserialize(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_deserializeOpErrorUpdateDeletionProtection(response, &metadata) + } + output := &UpdateDeletionProtectionOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateDeletionProtection(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpUpdateIncidentRecord struct { +} + +func (*awsRestjson1_deserializeOpUpdateIncidentRecord) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateIncidentRecord) HandleDeserialize(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_deserializeOpErrorUpdateIncidentRecord(response, &metadata) + } + output := &UpdateIncidentRecordOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateIncidentRecord(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpUpdateRelatedItems struct { +} + +func (*awsRestjson1_deserializeOpUpdateRelatedItems) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateRelatedItems) HandleDeserialize(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_deserializeOpErrorUpdateRelatedItems(response, &metadata) + } + output := &UpdateRelatedItemsOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateRelatedItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpUpdateReplicationSet struct { +} + +func (*awsRestjson1_deserializeOpUpdateReplicationSet) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateReplicationSet) HandleDeserialize(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_deserializeOpErrorUpdateReplicationSet(response, &metadata) + } + output := &UpdateReplicationSetOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateReplicationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpUpdateResponsePlan struct { +} + +func (*awsRestjson1_deserializeOpUpdateResponsePlan) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateResponsePlan) HandleDeserialize(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_deserializeOpErrorUpdateResponsePlan(response, &metadata) + } + output := &UpdateResponsePlanOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateResponsePlan(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpUpdateTimelineEvent struct { +} + +func (*awsRestjson1_deserializeOpUpdateTimelineEvent) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateTimelineEvent) HandleDeserialize(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_deserializeOpErrorUpdateTimelineEvent(response, &metadata) + } + output := &UpdateTimelineEventOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateTimelineEvent(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_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_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 ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAction(v *types.Action, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %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.Action +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "ssmAutomation": + var mv types.SsmAutomation + destAddr := &mv + if err := awsRestjson1_deserializeDocumentSsmAutomation(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ActionMemberSsmAutomation{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentActionsList(v *[]types.Action, 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.Action + if *v == nil { + cv = []types.Action{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Action + if err := awsRestjson1_deserializeDocumentAction(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAutomationExecution(v *types.AutomationExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %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.AutomationExecution +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "ssmExecutionArn": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.AutomationExecutionMemberSsmExecutionArn{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentAutomationExecutionSet(v *[]types.AutomationExecution, 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.AutomationExecution + if *v == nil { + cv = []types.AutomationExecution{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AutomationExecution + if err := awsRestjson1_deserializeDocumentAutomationExecution(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentChatbotSnsConfigurationSet(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 SnsArn to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentChatChannel(v *types.ChatChannel, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %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.ChatChannel +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "chatbotSns": + var mv []string + if err := awsRestjson1_deserializeDocumentChatbotSnsConfigurationSet(&mv, value); err != nil { + return err + } + uv = &types.ChatChannelMemberChatbotSns{Value: mv} + break loop + + case "empty": + var mv types.EmptyChatChannel + destAddr := &mv + if err := awsRestjson1_deserializeDocumentEmptyChatChannel(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ChatChannelMemberEmpty{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + 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 ExceptionMessage 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 String 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 ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ResourceType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEmptyChatChannel(v **types.EmptyChatChannel, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EmptyChatChannel + if *v == nil { + sv = &types.EmptyChatChannel{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEngagementSet(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 SsmContactsArn to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEventSummary(v **types.EventSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EventSummary + if *v == nil { + sv = &types.EventSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + 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) + } + + case "eventTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EventTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "eventType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimelineEventType to be of type string, got %T instead", value) + } + sv.EventType = ptr.String(jtv) + } + + case "eventUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EventUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "incidentRecordArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.IncidentRecordArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEventSummaryList(v *[]types.EventSummary, 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.EventSummary + if *v == nil { + cv = []types.EventSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EventSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentEventSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIncidentRecord(v **types.IncidentRecord, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IncidentRecord + if *v == nil { + sv = &types.IncidentRecord{} + } 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 "automationExecutions": + if err := awsRestjson1_deserializeDocumentAutomationExecutionSet(&sv.AutomationExecutions, value); err != nil { + return err + } + + case "chatChannel": + if err := awsRestjson1_deserializeDocumentChatChannel(&sv.ChatChannel, value); err != nil { + return err + } + + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "dedupeString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DedupeString to be of type string, got %T instead", value) + } + sv.DedupeString = ptr.String(jtv) + } + + case "impact": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Impact to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Impact = ptr.Int32(int32(i64)) + } + + case "incidentRecordSource": + if err := awsRestjson1_deserializeDocumentIncidentRecordSource(&sv.IncidentRecordSource, value); err != nil { + return err + } + + case "lastModifiedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.LastModifiedBy = ptr.String(jtv) + } + + case "lastModifiedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "notificationTargets": + if err := awsRestjson1_deserializeDocumentNotificationTargetSet(&sv.NotificationTargets, value); err != nil { + return err + } + + case "resolvedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ResolvedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncidentRecordStatus to be of type string, got %T instead", value) + } + sv.Status = types.IncidentRecordStatus(jtv) + } + + case "summary": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncidentSummary to be of type string, got %T instead", value) + } + sv.Summary = ptr.String(jtv) + } + + case "title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncidentTitle to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIncidentRecordSource(v **types.IncidentRecordSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IncidentRecordSource + if *v == nil { + sv = &types.IncidentRecordSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "invokedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.InvokedBy = ptr.String(jtv) + } + + 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 "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncidentSource to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIncidentRecordSummary(v **types.IncidentRecordSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IncidentRecordSummary + if *v == nil { + sv = &types.IncidentRecordSummary{} + } 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 "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "impact": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Impact to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Impact = ptr.Int32(int32(i64)) + } + + case "incidentRecordSource": + if err := awsRestjson1_deserializeDocumentIncidentRecordSource(&sv.IncidentRecordSource, value); err != nil { + return err + } + + case "resolvedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ResolvedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncidentRecordStatus to be of type string, got %T instead", value) + } + sv.Status = types.IncidentRecordStatus(jtv) + } + + case "title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncidentTitle to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIncidentRecordSummaryList(v *[]types.IncidentRecordSummary, 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.IncidentRecordSummary + if *v == nil { + cv = []types.IncidentRecordSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IncidentRecordSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentIncidentRecordSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIncidentTemplate(v **types.IncidentTemplate, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IncidentTemplate + if *v == nil { + sv = &types.IncidentTemplate{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "dedupeString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DedupeString to be of type string, got %T instead", value) + } + sv.DedupeString = ptr.String(jtv) + } + + case "impact": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Impact to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Impact = ptr.Int32(int32(i64)) + } + + case "notificationTargets": + if err := awsRestjson1_deserializeDocumentNotificationTargetSet(&sv.NotificationTargets, value); err != nil { + return err + } + + case "summary": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncidentSummary to be of type string, got %T instead", value) + } + sv.Summary = ptr.String(jtv) + } + + case "title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncidentTitle to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + 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 ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentItemIdentifier(v **types.ItemIdentifier, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ItemIdentifier + if *v == nil { + sv = &types.ItemIdentifier{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ItemType to be of type string, got %T instead", value) + } + sv.Type = types.ItemType(jtv) + } + + case "value": + if err := awsRestjson1_deserializeDocumentItemValue(&sv.Value, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentItemValue(v *types.ItemValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %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.ItemValue +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "arn": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.ItemValueMemberArn{Value: mv} + break loop + + case "metricDefinition": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricDefinition to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.ItemValueMemberMetricDefinition{Value: mv} + break loop + + case "url": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.ItemValueMemberUrl{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentNotificationTargetItem(v *types.NotificationTargetItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %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.NotificationTargetItem +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "snsTopicArn": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.NotificationTargetItemMemberSnsTopicArn{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentNotificationTargetSet(v *[]types.NotificationTargetItem, 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.NotificationTargetItem + if *v == nil { + cv = []types.NotificationTargetItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.NotificationTargetItem + if err := awsRestjson1_deserializeDocumentNotificationTargetItem(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRegionInfo(v **types.RegionInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RegionInfo + if *v == nil { + sv = &types.RegionInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "sseKmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SseKmsKey to be of type string, got %T instead", value) + } + sv.SseKmsKeyId = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegionStatus to be of type string, got %T instead", value) + } + sv.Status = types.RegionStatus(jtv) + } + + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "statusUpdateDateTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StatusUpdateDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRegionInfoMap(v *map[string]types.RegionInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %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]types.RegionInfo + if *v == nil { + mv = map[string]types.RegionInfo{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.RegionInfo + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentRegionInfo(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentRelatedItem(v **types.RelatedItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RelatedItem + if *v == nil { + sv = &types.RelatedItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "identifier": + if err := awsRestjson1_deserializeDocumentItemIdentifier(&sv.Identifier, value); err != nil { + return err + } + + case "title": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Title = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRelatedItemList(v *[]types.RelatedItem, 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.RelatedItem + if *v == nil { + cv = []types.RelatedItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RelatedItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentRelatedItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentReplicationSet(v **types.ReplicationSet, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ReplicationSet + if *v == nil { + sv = &types.ReplicationSet{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "createdTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "deletionProtected": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.DeletionProtected = ptr.Bool(jtv) + } + + case "lastModifiedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.LastModifiedBy = ptr.String(jtv) + } + + case "lastModifiedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "regionMap": + if err := awsRestjson1_deserializeDocumentRegionInfoMap(&sv.RegionMap, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationSetStatus to be of type string, got %T instead", value) + } + sv.Status = types.ReplicationSetStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentReplicationSetArnList(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 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 ExceptionMessage 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 String 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 ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ResourceType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourcePolicy(v **types.ResourcePolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourcePolicy + if *v == nil { + sv = &types.ResourcePolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "policyDocument": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Policy to be of type string, got %T instead", value) + } + sv.PolicyDocument = ptr.String(jtv) + } + + case "policyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyId to be of type string, got %T instead", value) + } + sv.PolicyId = ptr.String(jtv) + } + + case "ramResourceShareRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RamResourceShareRegion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourcePolicyList(v *[]types.ResourcePolicy, 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.ResourcePolicy + if *v == nil { + cv = []types.ResourcePolicy{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourcePolicy + destAddr := &col + if err := awsRestjson1_deserializeDocumentResourcePolicy(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentResponsePlanSummary(v **types.ResponsePlanSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResponsePlanSummary + if *v == nil { + sv = &types.ResponsePlanSummary{} + } 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 "displayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResponsePlanDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResponsePlanName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResponsePlanSummaryList(v *[]types.ResponsePlanSummary, 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.ResponsePlanSummary + if *v == nil { + cv = []types.ResponsePlanSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResponsePlanSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentResponsePlanSummary(&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 ExceptionMessage 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 "resourceIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String 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 ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ResourceType(jtv) + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceCode to be of type string, got %T instead", value) + } + sv.ServiceCode = types.ServiceCode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSsmAutomation(v **types.SsmAutomation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SsmAutomation + if *v == nil { + sv = &types.SsmAutomation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "documentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DocumentName = ptr.String(jtv) + } + + case "documentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "parameters": + if err := awsRestjson1_deserializeDocumentSsmParameters(&sv.Parameters, 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 "targetAccount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmTargetAccount to be of type string, got %T instead", value) + } + sv.TargetAccount = types.SsmTargetAccount(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSsmParameters(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 + mapVar := parsedVal + if err := awsRestjson1_deserializeDocumentSsmParameterValues(&mapVar, value); err != nil { + return err + } + parsedVal = mapVar + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentSsmParameterValues(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 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 ExceptionMessage 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 ServiceCode to be of type string, got %T instead", value) + } + sv.ServiceCode = types.ServiceCode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTimelineEvent(v **types.TimelineEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TimelineEvent + if *v == nil { + sv = &types.TimelineEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "eventData": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventData to be of type string, got %T instead", value) + } + sv.EventData = 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) + } + + case "eventTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EventTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "eventType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimelineEventType to be of type string, got %T instead", value) + } + sv.EventType = ptr.String(jtv) + } + + case "eventUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EventUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "incidentRecordArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.IncidentRecordArn = 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 ExceptionMessage 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/commander/doc.go b/service/commander/doc.go new file mode 100644 index 00000000000..67b00e02c04 --- /dev/null +++ b/service/commander/doc.go @@ -0,0 +1,14 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package commander provides the API client, operations, and parameter types for +// Incident Manager. +// +// AWS Systems Manager Incident Manager is an incident management console designed +// to help users mitigate and recover from incidents affecting their AWS-hosted +// applications. An incident is any unplanned interruption or reduction in quality +// of services. Incident Manager increases incident resolution by notifying +// responders of impact, highlighting relevant troubleshooting data, and providing +// collaboration tools to get services back up and running. To achieve the primary +// goal of reducing the time-to-resolution of critical incidents, Incident Manager +// automates response plans and enables responder team escalation. +package commander diff --git a/service/commander/endpoints.go b/service/commander/endpoints.go new file mode 100644 index 00000000000..fb4479d29bf --- /dev/null +++ b/service/commander/endpoints.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +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/commander/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" +) + +// 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") + } + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), m.Options) + 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 = "ssm-incidents" + } + 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.EndpointResolver + 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) + 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) +} + +// 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. +// awsResolver and fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver { + return &wrappedEndpointResolver{ + awsResolver: awsResolver, + resolver: fallbackResolver, + } +} diff --git a/service/commander/generated.json b/service/commander/generated.json new file mode 100644 index 00000000000..48fa81fc18e --- /dev/null +++ b/service/commander/generated.json @@ -0,0 +1,55 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/smithy-go": "v1.4.0", + "github.com/jmespath/go-jmespath": "v0.4.0" + }, + "files": [ + "api_client.go", + "api_op_CreateReplicationSet.go", + "api_op_CreateResponsePlan.go", + "api_op_CreateTimelineEvent.go", + "api_op_DeleteIncidentRecord.go", + "api_op_DeleteReplicationSet.go", + "api_op_DeleteResourcePolicy.go", + "api_op_DeleteResponsePlan.go", + "api_op_DeleteTimelineEvent.go", + "api_op_GetIncidentRecord.go", + "api_op_GetReplicationSet.go", + "api_op_GetResourcePolicies.go", + "api_op_GetResponsePlan.go", + "api_op_GetTimelineEvent.go", + "api_op_ListIncidentRecords.go", + "api_op_ListRelatedItems.go", + "api_op_ListReplicationSets.go", + "api_op_ListResponsePlans.go", + "api_op_ListTagsForResource.go", + "api_op_ListTimelineEvents.go", + "api_op_PutResourcePolicy.go", + "api_op_StartIncident.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "api_op_UpdateDeletionProtection.go", + "api_op_UpdateIncidentRecord.go", + "api_op_UpdateRelatedItems.go", + "api_op_UpdateReplicationSet.go", + "api_op_UpdateResponsePlan.go", + "api_op_UpdateTimelineEvent.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/commander", + "unstable": false +} diff --git a/service/commander/go.mod b/service/commander/go.mod new file mode 100644 index 00000000000..93adef17198 --- /dev/null +++ b/service/commander/go.mod @@ -0,0 +1,11 @@ +module github.com/aws/aws-sdk-go-v2/service/commander + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.4.0 + github.com/aws/smithy-go v1.4.0 + github.com/jmespath/go-jmespath v0.4.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/commander/go.sum b/service/commander/go.sum new file mode 100644 index 00000000000..fa92f609f9c --- /dev/null +++ b/service/commander/go.sum @@ -0,0 +1,19 @@ +github.com/aws/smithy-go v1.4.0 h1:3rsQpgRe+OoQgJhEwGNpIkosl0fJLdmQqF4gSFRjg+4= +github.com/aws/smithy-go v1.4.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +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 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/commander/go_module_metadata.go b/service/commander/go_module_metadata.go new file mode 100644 index 00000000000..613d5847b92 --- /dev/null +++ b/service/commander/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package commander + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/commander/internal/endpoints/endpoints.go b/service/commander/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..bdcfb7cb4bc --- /dev/null +++ b/service/commander/internal/endpoints/endpoints.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + DisableHTTPS bool +} + +// Resolver Commander 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 := endpoints.Options{ + DisableHTTPS: options.DisableHTTPS, + } + 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: endpoints.Endpoint{ + Hostname: "ssm-incidents.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: endpoints.Endpoint{ + Hostname: "ssm-incidents.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: endpoints.Endpoint{ + Hostname: "ssm-incidents.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: endpoints.Endpoint{ + Hostname: "ssm-incidents.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: endpoints.Endpoint{ + Hostname: "ssm-incidents.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/commander/internal/endpoints/endpoints_test.go b/service/commander/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/commander/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/commander/protocol_test.go b/service/commander/protocol_test.go new file mode 100644 index 00000000000..c82feeb47c4 --- /dev/null +++ b/service/commander/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander diff --git a/service/commander/serializers.go b/service/commander/serializers.go new file mode 100644 index 00000000000..1a6cbd10273 --- /dev/null +++ b/service/commander/serializers.go @@ -0,0 +1,2812 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/commander/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" +) + +type awsRestjson1_serializeOpCreateReplicationSet struct { +} + +func (*awsRestjson1_serializeOpCreateReplicationSet) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateReplicationSet) 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.(*CreateReplicationSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/createReplicationSet") + 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_serializeOpDocumentCreateReplicationSetInput(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_serializeOpHttpBindingsCreateReplicationSetInput(v *CreateReplicationSetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateReplicationSetInput(v *CreateReplicationSetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Regions != nil { + ok := object.Key("regions") + if err := awsRestjson1_serializeDocumentRegionMapInput(v.Regions, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateResponsePlan struct { +} + +func (*awsRestjson1_serializeOpCreateResponsePlan) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateResponsePlan) 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.(*CreateResponsePlanInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/createResponsePlan") + 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_serializeOpDocumentCreateResponsePlanInput(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_serializeOpHttpBindingsCreateResponsePlanInput(v *CreateResponsePlanInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateResponsePlanInput(v *CreateResponsePlanInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Actions != nil { + ok := object.Key("actions") + if err := awsRestjson1_serializeDocumentActionsList(v.Actions, ok); err != nil { + return err + } + } + + if v.ChatChannel != nil { + ok := object.Key("chatChannel") + if err := awsRestjson1_serializeDocumentChatChannel(v.ChatChannel, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.DisplayName != nil { + ok := object.Key("displayName") + ok.String(*v.DisplayName) + } + + if v.Engagements != nil { + ok := object.Key("engagements") + if err := awsRestjson1_serializeDocumentEngagementSet(v.Engagements, ok); err != nil { + return err + } + } + + if v.IncidentTemplate != nil { + ok := object.Key("incidentTemplate") + if err := awsRestjson1_serializeDocumentIncidentTemplate(v.IncidentTemplate, 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_serializeOpCreateTimelineEvent struct { +} + +func (*awsRestjson1_serializeOpCreateTimelineEvent) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateTimelineEvent) 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.(*CreateTimelineEventInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/createTimelineEvent") + 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_serializeOpDocumentCreateTimelineEventInput(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_serializeOpHttpBindingsCreateTimelineEventInput(v *CreateTimelineEventInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateTimelineEventInput(v *CreateTimelineEventInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.EventData != nil { + ok := object.Key("eventData") + ok.String(*v.EventData) + } + + if v.EventTime != nil { + ok := object.Key("eventTime") + ok.Double(smithytime.FormatEpochSeconds(*v.EventTime)) + } + + if v.EventType != nil { + ok := object.Key("eventType") + ok.String(*v.EventType) + } + + if v.IncidentRecordArn != nil { + ok := object.Key("incidentRecordArn") + ok.String(*v.IncidentRecordArn) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteIncidentRecord struct { +} + +func (*awsRestjson1_serializeOpDeleteIncidentRecord) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteIncidentRecord) 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.(*DeleteIncidentRecordInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/deleteIncidentRecord") + 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_serializeOpDocumentDeleteIncidentRecordInput(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_serializeOpHttpBindingsDeleteIncidentRecordInput(v *DeleteIncidentRecordInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteIncidentRecordInput(v *DeleteIncidentRecordInput, 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_serializeOpDeleteReplicationSet struct { +} + +func (*awsRestjson1_serializeOpDeleteReplicationSet) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteReplicationSet) 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.(*DeleteReplicationSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/deleteReplicationSet") + 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_serializeOpHttpBindingsDeleteReplicationSetInput(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_serializeOpHttpBindingsDeleteReplicationSetInput(v *DeleteReplicationSetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Arn != nil { + encoder.SetQuery("arn").String(*v.Arn) + } + + 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("/deleteResourcePolicy") + 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_serializeOpDocumentDeleteResourcePolicyInput(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_serializeOpHttpBindingsDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PolicyId != nil { + ok := object.Key("policyId") + ok.String(*v.PolicyId) + } + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteResponsePlan struct { +} + +func (*awsRestjson1_serializeOpDeleteResponsePlan) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteResponsePlan) 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.(*DeleteResponsePlanInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/deleteResponsePlan") + 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_serializeOpDocumentDeleteResponsePlanInput(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_serializeOpHttpBindingsDeleteResponsePlanInput(v *DeleteResponsePlanInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteResponsePlanInput(v *DeleteResponsePlanInput, 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_serializeOpDeleteTimelineEvent struct { +} + +func (*awsRestjson1_serializeOpDeleteTimelineEvent) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteTimelineEvent) 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.(*DeleteTimelineEventInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/deleteTimelineEvent") + 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_serializeOpDocumentDeleteTimelineEventInput(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_serializeOpHttpBindingsDeleteTimelineEventInput(v *DeleteTimelineEventInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteTimelineEventInput(v *DeleteTimelineEventInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EventId != nil { + ok := object.Key("eventId") + ok.String(*v.EventId) + } + + if v.IncidentRecordArn != nil { + ok := object.Key("incidentRecordArn") + ok.String(*v.IncidentRecordArn) + } + + return nil +} + +type awsRestjson1_serializeOpGetIncidentRecord struct { +} + +func (*awsRestjson1_serializeOpGetIncidentRecord) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetIncidentRecord) 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.(*GetIncidentRecordInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/getIncidentRecord") + 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_serializeOpHttpBindingsGetIncidentRecordInput(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_serializeOpHttpBindingsGetIncidentRecordInput(v *GetIncidentRecordInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Arn != nil { + encoder.SetQuery("arn").String(*v.Arn) + } + + return nil +} + +type awsRestjson1_serializeOpGetReplicationSet struct { +} + +func (*awsRestjson1_serializeOpGetReplicationSet) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetReplicationSet) 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.(*GetReplicationSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/getReplicationSet") + 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_serializeOpHttpBindingsGetReplicationSetInput(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_serializeOpHttpBindingsGetReplicationSetInput(v *GetReplicationSetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Arn != nil { + encoder.SetQuery("arn").String(*v.Arn) + } + + return nil +} + +type awsRestjson1_serializeOpGetResourcePolicies struct { +} + +func (*awsRestjson1_serializeOpGetResourcePolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetResourcePolicies) 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.(*GetResourcePoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/getResourcePolicies") + 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_serializeOpHttpBindingsGetResourcePoliciesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetResourcePoliciesInput(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_serializeOpHttpBindingsGetResourcePoliciesInput(v *GetResourcePoliciesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn != nil { + encoder.SetQuery("resourceArn").String(*v.ResourceArn) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetResourcePoliciesInput(v *GetResourcePoliciesInput, 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_serializeOpGetResponsePlan struct { +} + +func (*awsRestjson1_serializeOpGetResponsePlan) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetResponsePlan) 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.(*GetResponsePlanInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/getResponsePlan") + 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_serializeOpHttpBindingsGetResponsePlanInput(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_serializeOpHttpBindingsGetResponsePlanInput(v *GetResponsePlanInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Arn != nil { + encoder.SetQuery("arn").String(*v.Arn) + } + + return nil +} + +type awsRestjson1_serializeOpGetTimelineEvent struct { +} + +func (*awsRestjson1_serializeOpGetTimelineEvent) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetTimelineEvent) 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.(*GetTimelineEventInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/getTimelineEvent") + 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_serializeOpHttpBindingsGetTimelineEventInput(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_serializeOpHttpBindingsGetTimelineEventInput(v *GetTimelineEventInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EventId != nil { + encoder.SetQuery("eventId").String(*v.EventId) + } + + if v.IncidentRecordArn != nil { + encoder.SetQuery("incidentRecordArn").String(*v.IncidentRecordArn) + } + + return nil +} + +type awsRestjson1_serializeOpListIncidentRecords struct { +} + +func (*awsRestjson1_serializeOpListIncidentRecords) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListIncidentRecords) 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.(*ListIncidentRecordsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/listIncidentRecords") + 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_serializeOpDocumentListIncidentRecordsInput(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_serializeOpHttpBindingsListIncidentRecordsInput(v *ListIncidentRecordsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListIncidentRecordsInput(v *ListIncidentRecordsInput, 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 + } + } + + 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_serializeOpListRelatedItems struct { +} + +func (*awsRestjson1_serializeOpListRelatedItems) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListRelatedItems) 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.(*ListRelatedItemsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/listRelatedItems") + 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_serializeOpDocumentListRelatedItemsInput(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_serializeOpHttpBindingsListRelatedItemsInput(v *ListRelatedItemsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListRelatedItemsInput(v *ListRelatedItemsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IncidentRecordArn != nil { + ok := object.Key("incidentRecordArn") + ok.String(*v.IncidentRecordArn) + } + + 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_serializeOpListReplicationSets struct { +} + +func (*awsRestjson1_serializeOpListReplicationSets) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListReplicationSets) 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.(*ListReplicationSetsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/listReplicationSets") + 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_serializeOpDocumentListReplicationSetsInput(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_serializeOpHttpBindingsListReplicationSetsInput(v *ListReplicationSetsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListReplicationSetsInput(v *ListReplicationSetsInput, 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_serializeOpListResponsePlans struct { +} + +func (*awsRestjson1_serializeOpListResponsePlans) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListResponsePlans) 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.(*ListResponsePlansInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/listResponsePlans") + 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_serializeOpDocumentListResponsePlansInput(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_serializeOpHttpBindingsListResponsePlansInput(v *ListResponsePlansInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListResponsePlansInput(v *ListResponsePlansInput, 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_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_serializeOpListTimelineEvents struct { +} + +func (*awsRestjson1_serializeOpListTimelineEvents) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTimelineEvents) 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.(*ListTimelineEventsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/listTimelineEvents") + 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_serializeOpDocumentListTimelineEventsInput(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_serializeOpHttpBindingsListTimelineEventsInput(v *ListTimelineEventsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListTimelineEventsInput(v *ListTimelineEventsInput, 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 + } + } + + if v.IncidentRecordArn != nil { + ok := object.Key("incidentRecordArn") + ok.String(*v.IncidentRecordArn) + } + + 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.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 +} + +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("/putResourcePolicy") + 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_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_serializeOpStartIncident struct { +} + +func (*awsRestjson1_serializeOpStartIncident) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartIncident) 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.(*StartIncidentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/startIncident") + 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_serializeOpDocumentStartIncidentInput(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_serializeOpHttpBindingsStartIncidentInput(v *StartIncidentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartIncidentInput(v *StartIncidentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Impact != nil { + ok := object.Key("impact") + ok.Integer(*v.Impact) + } + + if v.RelatedItems != nil { + ok := object.Key("relatedItems") + if err := awsRestjson1_serializeDocumentRelatedItemList(v.RelatedItems, ok); err != nil { + return err + } + } + + if v.ResponsePlanArn != nil { + ok := object.Key("responsePlanArn") + ok.String(*v.ResponsePlanArn) + } + + if v.Title != nil { + ok := object.Key("title") + ok.String(*v.Title) + } + + if v.TriggerDetails != nil { + ok := object.Key("triggerDetails") + if err := awsRestjson1_serializeDocumentTriggerDetails(v.TriggerDetails, 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_serializeOpUpdateDeletionProtection struct { +} + +func (*awsRestjson1_serializeOpUpdateDeletionProtection) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateDeletionProtection) 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.(*UpdateDeletionProtectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/updateDeletionProtection") + 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_serializeOpDocumentUpdateDeletionProtectionInput(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_serializeOpHttpBindingsUpdateDeletionProtectionInput(v *UpdateDeletionProtectionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateDeletionProtectionInput(v *UpdateDeletionProtectionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.DeletionProtected != nil { + ok := object.Key("deletionProtected") + ok.Boolean(*v.DeletionProtected) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateIncidentRecord struct { +} + +func (*awsRestjson1_serializeOpUpdateIncidentRecord) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateIncidentRecord) 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.(*UpdateIncidentRecordInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/updateIncidentRecord") + 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_serializeOpDocumentUpdateIncidentRecordInput(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_serializeOpHttpBindingsUpdateIncidentRecordInput(v *UpdateIncidentRecordInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateIncidentRecordInput(v *UpdateIncidentRecordInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + if v.ChatChannel != nil { + ok := object.Key("chatChannel") + if err := awsRestjson1_serializeDocumentChatChannel(v.ChatChannel, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Impact != nil { + ok := object.Key("impact") + ok.Integer(*v.Impact) + } + + if v.NotificationTargets != nil { + ok := object.Key("notificationTargets") + if err := awsRestjson1_serializeDocumentNotificationTargetSet(v.NotificationTargets, ok); err != nil { + return err + } + } + + if len(v.Status) > 0 { + ok := object.Key("status") + ok.String(string(v.Status)) + } + + if v.Summary != nil { + ok := object.Key("summary") + ok.String(*v.Summary) + } + + if v.Title != nil { + ok := object.Key("title") + ok.String(*v.Title) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateRelatedItems struct { +} + +func (*awsRestjson1_serializeOpUpdateRelatedItems) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateRelatedItems) 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.(*UpdateRelatedItemsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/updateRelatedItems") + 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_serializeOpDocumentUpdateRelatedItemsInput(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_serializeOpHttpBindingsUpdateRelatedItemsInput(v *UpdateRelatedItemsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateRelatedItemsInput(v *UpdateRelatedItemsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.IncidentRecordArn != nil { + ok := object.Key("incidentRecordArn") + ok.String(*v.IncidentRecordArn) + } + + if v.RelatedItemsUpdate != nil { + ok := object.Key("relatedItemsUpdate") + if err := awsRestjson1_serializeDocumentRelatedItemsUpdate(v.RelatedItemsUpdate, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateReplicationSet struct { +} + +func (*awsRestjson1_serializeOpUpdateReplicationSet) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateReplicationSet) 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.(*UpdateReplicationSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/updateReplicationSet") + 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_serializeOpDocumentUpdateReplicationSetInput(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_serializeOpHttpBindingsUpdateReplicationSetInput(v *UpdateReplicationSetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateReplicationSetInput(v *UpdateReplicationSetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Actions != nil { + ok := object.Key("actions") + if err := awsRestjson1_serializeDocumentUpdateActionList(v.Actions, ok); err != nil { + return err + } + } + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateResponsePlan struct { +} + +func (*awsRestjson1_serializeOpUpdateResponsePlan) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateResponsePlan) 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.(*UpdateResponsePlanInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/updateResponsePlan") + 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_serializeOpDocumentUpdateResponsePlanInput(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_serializeOpHttpBindingsUpdateResponsePlanInput(v *UpdateResponsePlanInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateResponsePlanInput(v *UpdateResponsePlanInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Actions != nil { + ok := object.Key("actions") + if err := awsRestjson1_serializeDocumentActionsList(v.Actions, ok); err != nil { + return err + } + } + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + if v.ChatChannel != nil { + ok := object.Key("chatChannel") + if err := awsRestjson1_serializeDocumentChatChannel(v.ChatChannel, ok); err != nil { + return err + } + } + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.DisplayName != nil { + ok := object.Key("displayName") + ok.String(*v.DisplayName) + } + + if v.Engagements != nil { + ok := object.Key("engagements") + if err := awsRestjson1_serializeDocumentEngagementSet(v.Engagements, ok); err != nil { + return err + } + } + + if v.IncidentTemplateDedupeString != nil { + ok := object.Key("incidentTemplateDedupeString") + ok.String(*v.IncidentTemplateDedupeString) + } + + if v.IncidentTemplateImpact != nil { + ok := object.Key("incidentTemplateImpact") + ok.Integer(*v.IncidentTemplateImpact) + } + + if v.IncidentTemplateNotificationTargets != nil { + ok := object.Key("incidentTemplateNotificationTargets") + if err := awsRestjson1_serializeDocumentNotificationTargetSet(v.IncidentTemplateNotificationTargets, ok); err != nil { + return err + } + } + + if v.IncidentTemplateSummary != nil { + ok := object.Key("incidentTemplateSummary") + ok.String(*v.IncidentTemplateSummary) + } + + if v.IncidentTemplateTitle != nil { + ok := object.Key("incidentTemplateTitle") + ok.String(*v.IncidentTemplateTitle) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateTimelineEvent struct { +} + +func (*awsRestjson1_serializeOpUpdateTimelineEvent) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateTimelineEvent) 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.(*UpdateTimelineEventInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/updateTimelineEvent") + 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_serializeOpDocumentUpdateTimelineEventInput(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_serializeOpHttpBindingsUpdateTimelineEventInput(v *UpdateTimelineEventInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateTimelineEventInput(v *UpdateTimelineEventInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.EventData != nil { + ok := object.Key("eventData") + ok.String(*v.EventData) + } + + if v.EventId != nil { + ok := object.Key("eventId") + ok.String(*v.EventId) + } + + if v.EventTime != nil { + ok := object.Key("eventTime") + ok.Double(smithytime.FormatEpochSeconds(*v.EventTime)) + } + + if v.EventType != nil { + ok := object.Key("eventType") + ok.String(*v.EventType) + } + + if v.IncidentRecordArn != nil { + ok := object.Key("incidentRecordArn") + ok.String(*v.IncidentRecordArn) + } + + return nil +} + +func awsRestjson1_serializeDocumentAction(v types.Action, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ActionMemberSsmAutomation: + av := object.Key("ssmAutomation") + if err := awsRestjson1_serializeDocumentSsmAutomation(&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_serializeDocumentActionsList(v []types.Action, 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_serializeDocumentAction(v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentAddRegionAction(v *types.AddRegionAction, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RegionName != nil { + ok := object.Key("regionName") + ok.String(*v.RegionName) + } + + if v.SseKmsKeyId != nil { + ok := object.Key("sseKmsKeyId") + ok.String(*v.SseKmsKeyId) + } + + return nil +} + +func awsRestjson1_serializeDocumentAttributeValueList(v types.AttributeValueList, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.AttributeValueListMemberIntegerValues: + av := object.Key("integerValues") + if err := awsRestjson1_serializeDocumentIntegerList(uv.Value, av); err != nil { + return err + } + + case *types.AttributeValueListMemberStringValues: + av := object.Key("stringValues") + if err := awsRestjson1_serializeDocumentStringList(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_serializeDocumentChatbotSnsConfigurationSet(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_serializeDocumentChatChannel(v types.ChatChannel, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ChatChannelMemberChatbotSns: + av := object.Key("chatbotSns") + if err := awsRestjson1_serializeDocumentChatbotSnsConfigurationSet(uv.Value, av); err != nil { + return err + } + + case *types.ChatChannelMemberEmpty: + av := object.Key("empty") + if err := awsRestjson1_serializeDocumentEmptyChatChannel(&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_serializeDocumentCondition(v types.Condition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ConditionMemberAfter: + av := object.Key("after") + av.Double(smithytime.FormatEpochSeconds(uv.Value)) + + case *types.ConditionMemberBefore: + av := object.Key("before") + av.Double(smithytime.FormatEpochSeconds(uv.Value)) + + case *types.ConditionMemberEquals: + av := object.Key("equals") + if err := awsRestjson1_serializeDocumentAttributeValueList(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_serializeDocumentDeleteRegionAction(v *types.DeleteRegionAction, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RegionName != nil { + ok := object.Key("regionName") + ok.String(*v.RegionName) + } + + return nil +} + +func awsRestjson1_serializeDocumentEmptyChatChannel(v *types.EmptyChatChannel, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + +func awsRestjson1_serializeDocumentEngagementSet(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_serializeDocumentFilter(v *types.Filter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Condition != nil { + ok := object.Key("condition") + if err := awsRestjson1_serializeDocumentCondition(v.Condition, ok); err != nil { + return err + } + } + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + 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_serializeDocumentIncidentTemplate(v *types.IncidentTemplate, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DedupeString != nil { + ok := object.Key("dedupeString") + ok.String(*v.DedupeString) + } + + if v.Impact != nil { + ok := object.Key("impact") + ok.Integer(*v.Impact) + } + + if v.NotificationTargets != nil { + ok := object.Key("notificationTargets") + if err := awsRestjson1_serializeDocumentNotificationTargetSet(v.NotificationTargets, ok); err != nil { + return err + } + } + + if v.Summary != nil { + ok := object.Key("summary") + ok.String(*v.Summary) + } + + if v.Title != nil { + ok := object.Key("title") + ok.String(*v.Title) + } + + return nil +} + +func awsRestjson1_serializeDocumentIntegerList(v []int32, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.Integer(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentItemIdentifier(v *types.ItemIdentifier, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + if v.Value != nil { + ok := object.Key("value") + if err := awsRestjson1_serializeDocumentItemValue(v.Value, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentItemValue(v types.ItemValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ItemValueMemberArn: + av := object.Key("arn") + av.String(uv.Value) + + case *types.ItemValueMemberMetricDefinition: + av := object.Key("metricDefinition") + av.String(uv.Value) + + case *types.ItemValueMemberUrl: + av := object.Key("url") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsRestjson1_serializeDocumentNotificationTargetItem(v types.NotificationTargetItem, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.NotificationTargetItemMemberSnsTopicArn: + av := object.Key("snsTopicArn") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsRestjson1_serializeDocumentNotificationTargetSet(v []types.NotificationTargetItem, 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_serializeDocumentNotificationTargetItem(v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRegionMapInput(v map[string]types.RegionMapInputValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentRegionMapInputValue(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRegionMapInputValue(v *types.RegionMapInputValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SseKmsKeyId != nil { + ok := object.Key("sseKmsKeyId") + ok.String(*v.SseKmsKeyId) + } + + return nil +} + +func awsRestjson1_serializeDocumentRelatedItem(v *types.RelatedItem, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + if err := awsRestjson1_serializeDocumentItemIdentifier(v.Identifier, ok); err != nil { + return err + } + } + + if v.Title != nil { + ok := object.Key("title") + ok.String(*v.Title) + } + + return nil +} + +func awsRestjson1_serializeDocumentRelatedItemList(v []types.RelatedItem, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentRelatedItem(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRelatedItemsUpdate(v types.RelatedItemsUpdate, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.RelatedItemsUpdateMemberItemToAdd: + av := object.Key("itemToAdd") + if err := awsRestjson1_serializeDocumentRelatedItem(&uv.Value, av); err != nil { + return err + } + + case *types.RelatedItemsUpdateMemberItemToRemove: + av := object.Key("itemToRemove") + if err := awsRestjson1_serializeDocumentItemIdentifier(&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_serializeDocumentSsmAutomation(v *types.SsmAutomation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DocumentName != nil { + ok := object.Key("documentName") + ok.String(*v.DocumentName) + } + + if v.DocumentVersion != nil { + ok := object.Key("documentVersion") + ok.String(*v.DocumentVersion) + } + + if v.Parameters != nil { + ok := object.Key("parameters") + if err := awsRestjson1_serializeDocumentSsmParameters(v.Parameters, ok); err != nil { + return err + } + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + if len(v.TargetAccount) > 0 { + ok := object.Key("targetAccount") + ok.String(string(v.TargetAccount)) + } + + return nil +} + +func awsRestjson1_serializeDocumentSsmParameters(v map[string][]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentSsmParameterValues(v[key], om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentSsmParameterValues(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_serializeDocumentStringList(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_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_serializeDocumentTriggerDetails(v *types.TriggerDetails, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RawData != nil { + ok := object.Key("rawData") + ok.String(*v.RawData) + } + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + if v.Timestamp != nil { + ok := object.Key("timestamp") + ok.Double(smithytime.FormatEpochSeconds(*v.Timestamp)) + } + + if v.TriggerArn != nil { + ok := object.Key("triggerArn") + ok.String(*v.TriggerArn) + } + + return nil +} + +func awsRestjson1_serializeDocumentUpdateActionList(v []types.UpdateReplicationSetAction, 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_serializeDocumentUpdateReplicationSetAction(v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentUpdateReplicationSetAction(v types.UpdateReplicationSetAction, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.UpdateReplicationSetActionMemberAddRegionAction: + av := object.Key("addRegionAction") + if err := awsRestjson1_serializeDocumentAddRegionAction(&uv.Value, av); err != nil { + return err + } + + case *types.UpdateReplicationSetActionMemberDeleteRegionAction: + av := object.Key("deleteRegionAction") + if err := awsRestjson1_serializeDocumentDeleteRegionAction(&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 +} diff --git a/service/commander/types/enums.go b/service/commander/types/enums.go new file mode 100644 index 00000000000..843741ae913 --- /dev/null +++ b/service/commander/types/enums.go @@ -0,0 +1,195 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type IncidentRecordStatus string + +// Enum values for IncidentRecordStatus +const ( + IncidentRecordStatusOpen IncidentRecordStatus = "OPEN" + IncidentRecordStatusResolved IncidentRecordStatus = "RESOLVED" +) + +// Values returns all known values for IncidentRecordStatus. 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 (IncidentRecordStatus) Values() []IncidentRecordStatus { + return []IncidentRecordStatus{ + "OPEN", + "RESOLVED", + } +} + +type ItemType string + +// Enum values for ItemType +const ( + ItemTypeAnalysis ItemType = "ANALYSIS" + ItemTypeIncident ItemType = "INCIDENT" + ItemTypeMetric ItemType = "METRIC" + ItemTypeParent ItemType = "PARENT" + ItemTypeAttachment ItemType = "ATTACHMENT" + ItemTypeOther ItemType = "OTHER" +) + +// Values returns all known values for ItemType. 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 (ItemType) Values() []ItemType { + return []ItemType{ + "ANALYSIS", + "INCIDENT", + "METRIC", + "PARENT", + "ATTACHMENT", + "OTHER", + } +} + +type RegionStatus string + +// Enum values for RegionStatus +const ( + // All operations have completed successfully and the region is ready to use + RegionStatusActive RegionStatus = "ACTIVE" + // The region is in the process of being created. + RegionStatusCreating RegionStatus = "CREATING" + // The region is in the process of being deleted. + RegionStatusDeleting RegionStatus = "DELETING" + // The region is not healthy and we cannot automatically fix it. + RegionStatusFailed RegionStatus = "FAILED" +) + +// Values returns all known values for RegionStatus. 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 (RegionStatus) Values() []RegionStatus { + return []RegionStatus{ + "ACTIVE", + "CREATING", + "DELETING", + "FAILED", + } +} + +type ReplicationSetStatus string + +// Enum values for ReplicationSetStatus +const ( + // All operations have completed successfully and the replication set is ready to + // use + ReplicationSetStatusActive ReplicationSetStatus = "ACTIVE" + // Replication set is in the process of being created. + ReplicationSetStatusCreating ReplicationSetStatus = "CREATING" + // Replication set is in the process of being updated. + ReplicationSetStatusUpdating ReplicationSetStatus = "UPDATING" + // Replication set is in the process of being deleted. + ReplicationSetStatusDeleting ReplicationSetStatus = "DELETING" + // Replication set is not healthy and we cannot fix it. + ReplicationSetStatusFailed ReplicationSetStatus = "FAILED" +) + +// Values returns all known values for ReplicationSetStatus. 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 (ReplicationSetStatus) Values() []ReplicationSetStatus { + return []ReplicationSetStatus{ + "ACTIVE", + "CREATING", + "UPDATING", + "DELETING", + "FAILED", + } +} + +type ResourceType string + +// Enum values for ResourceType +const ( + ResourceTypeResponsePlan ResourceType = "RESPONSE_PLAN" + ResourceTypeIncidentRecord ResourceType = "INCIDENT_RECORD" + ResourceTypeTimelineEvent ResourceType = "TIMELINE_EVENT" + ResourceTypeReplicationSet ResourceType = "REPLICATION_SET" + ResourceTypeResourcePolicy ResourceType = "RESOURCE_POLICY" +) + +// 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{ + "RESPONSE_PLAN", + "INCIDENT_RECORD", + "TIMELINE_EVENT", + "REPLICATION_SET", + "RESOURCE_POLICY", + } +} + +type ServiceCode string + +// Enum values for ServiceCode +const ( + ServiceCodeSsmIncidents ServiceCode = "ssm-incidents" +) + +// Values returns all known values for ServiceCode. 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 (ServiceCode) Values() []ServiceCode { + return []ServiceCode{ + "ssm-incidents", + } +} + +type SortOrder string + +// Enum values for SortOrder +const ( + SortOrderAscending SortOrder = "ASCENDING" + SortOrderDescending SortOrder = "DESCENDING" +) + +// 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{ + "ASCENDING", + "DESCENDING", + } +} + +type SsmTargetAccount string + +// Enum values for SsmTargetAccount +const ( + SsmTargetAccountResponsePlanOwnerAccount SsmTargetAccount = "RESPONSE_PLAN_OWNER_ACCOUNT" + SsmTargetAccountImpactedAccount SsmTargetAccount = "IMPACTED_ACCOUNT" +) + +// Values returns all known values for SsmTargetAccount. 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 (SsmTargetAccount) Values() []SsmTargetAccount { + return []SsmTargetAccount{ + "RESPONSE_PLAN_OWNER_ACCOUNT", + "IMPACTED_ACCOUNT", + } +} + +type TimelineEventSort string + +// Enum values for TimelineEventSort +const ( + TimelineEventSortEventTime TimelineEventSort = "EVENT_TIME" +) + +// Values returns all known values for TimelineEventSort. 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 (TimelineEventSort) Values() []TimelineEventSort { + return []TimelineEventSort{ + "EVENT_TIME", + } +} diff --git a/service/commander/types/errors.go b/service/commander/types/errors.go new file mode 100644 index 00000000000..87bf74d4b5d --- /dev/null +++ b/service/commander/types/errors.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// You don't have sufficient access to perform this action. +type AccessDeniedException struct { + Message *string +} + +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 causes an inconsistent state. +type ConflictException struct { + Message *string + + ResourceIdentifier *string + ResourceType ResourceType +} + +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 { + Message *string +} + +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 } + +// Request references a resource which does not exist. +type ResourceNotFoundException struct { + Message *string + + ResourceIdentifier *string + ResourceType ResourceType +} + +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 } + +// Request would cause a service quota to be exceeded. +type ServiceQuotaExceededException struct { + Message *string + + ResourceIdentifier *string + ResourceType ResourceType + ServiceCode ServiceCode + QuotaCode *string +} + +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 + + ServiceCode ServiceCode + QuotaCode *string +} + +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 fails to satisfy the constraints specified by an AWS service. +type ValidationException struct { + Message *string +} + +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/commander/types/types.go b/service/commander/types/types.go new file mode 100644 index 00000000000..32c4cbeeaf8 --- /dev/null +++ b/service/commander/types/types.go @@ -0,0 +1,690 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "time" +) + +// The action that starts at the beginning of an incident. The response plan +// defines the action. +// +// The following types satisfy this interface: +// ActionMemberSsmAutomation +type Action interface { + isAction() +} + +// The Systems Manager automation document to start as the runbook at the beginning +// of the incident. +type ActionMemberSsmAutomation struct { + Value SsmAutomation +} + +func (*ActionMemberSsmAutomation) isAction() {} + +// Defines the Region and KMS key to add to the replication set. +type AddRegionAction struct { + + // The Region name to add to the replication set. + // + // This member is required. + RegionName *string + + // The KMS key ID to use to encrypt your replication set. + SseKmsKeyId *string +} + +// Use the AttributeValueList to filter by string or integer values. +// +// The following types satisfy this interface: +// AttributeValueListMemberStringValues +// AttributeValueListMemberIntegerValues +type AttributeValueList interface { + isAttributeValueList() +} + +// The list of string values that the filter matches. +type AttributeValueListMemberStringValues struct { + Value []string +} + +func (*AttributeValueListMemberStringValues) isAttributeValueList() {} + +// The list of integer values that the filter matches. +type AttributeValueListMemberIntegerValues struct { + Value []int32 +} + +func (*AttributeValueListMemberIntegerValues) isAttributeValueList() {} + +// The Systems Manager automation document process to start as the runbook at the +// beginning of the incident. +// +// The following types satisfy this interface: +// AutomationExecutionMemberSsmExecutionArn +type AutomationExecution interface { + isAutomationExecution() +} + +// The Amazon Resource Name (ARN) of the automation process. +type AutomationExecutionMemberSsmExecutionArn struct { + Value string +} + +func (*AutomationExecutionMemberSsmExecutionArn) isAutomationExecution() {} + +// The AWS Chatbot chat channel used for collaboration during an incident. +// +// The following types satisfy this interface: +// ChatChannelMemberEmpty +// ChatChannelMemberChatbotSns +type ChatChannel interface { + isChatChannel() +} + +// Used to remove the chat channel from an incident record or response plan. +type ChatChannelMemberEmpty struct { + Value EmptyChatChannel +} + +func (*ChatChannelMemberEmpty) isChatChannel() {} + +// The SNS targets that AWS Chatbot uses to notify the chat channel of updates to +// an incident. You can also make updates to the incident through the chat channel +// by using the SNS topics. +type ChatChannelMemberChatbotSns struct { + Value []string +} + +func (*ChatChannelMemberChatbotSns) isChatChannel() {} + +// A conditional statement with which to compare a value, after a timestamp, before +// a timestamp, or equal to a string or integer. If multiple conditions are +// specified, the conditionals become an ANDed statement. If multiple values are +// specified for a conditional, the values are ORd. +// +// The following types satisfy this interface: +// ConditionMemberBefore +// ConditionMemberAfter +// ConditionMemberEquals +type Condition interface { + isCondition() +} + +// Before the specified timestamp +type ConditionMemberBefore struct { + Value time.Time +} + +func (*ConditionMemberBefore) isCondition() {} + +// After the specified timestamp. +type ConditionMemberAfter struct { + Value time.Time +} + +func (*ConditionMemberAfter) isCondition() {} + +// The value is equal to the provided string or integer. +type ConditionMemberEquals struct { + Value AttributeValueList +} + +func (*ConditionMemberEquals) isCondition() {} + +// Defines the information about the Region you're deleting from your replication +// set. +type DeleteRegionAction struct { + + // The name of the Region you're deleting from the replication set. + // + // This member is required. + RegionName *string +} + +// Used to remove the chat channel from an incident record or response plan. +type EmptyChatChannel struct { +} + +// Details about a timeline event during an incident. +type EventSummary struct { + + // The timeline event ID. + // + // This member is required. + EventId *string + + // The time that the event occurred. + // + // This member is required. + EventTime *time.Time + + // The type of event. The timeline event must be Custom Event. + // + // This member is required. + EventType *string + + // The time that the timeline event was last updated. + // + // This member is required. + EventUpdatedTime *time.Time + + // The Amazon Resource Name (ARN) of the incident that the event happened during. + // + // This member is required. + IncidentRecordArn *string +} + +// Filter the selection by using a condition. +type Filter struct { + + // The condition accepts before or after a specified time, equal to a string, or + // equal to an integer. + // + // This member is required. + Condition Condition + + // The key that you're filtering on. + // + // This member is required. + Key *string +} + +// The record of the incident that's created when an incident occurs. +type IncidentRecord struct { + + // The Amazon Resource Name (ARN) of the incident record. + // + // This member is required. + Arn *string + + // The time that Incident Manager created the incident record. + // + // This member is required. + CreationTime *time.Time + + // The string Incident Manager uses to prevent duplicate incidents from being + // created by the same incident. + // + // This member is required. + DedupeString *string + + // The impact of the incident on customers and applications. + // + // This member is required. + Impact *int32 + + // Details about the action that started the incident. + // + // This member is required. + IncidentRecordSource *IncidentRecordSource + + // Who modified the incident most recently. + // + // This member is required. + LastModifiedBy *string + + // The time at which the incident was most recently modified. + // + // This member is required. + LastModifiedTime *time.Time + + // The current status of the incident. + // + // This member is required. + Status IncidentRecordStatus + + // The title of the incident. + // + // This member is required. + Title *string + + // The runbook, or automation document, that's run at the beginning of the + // incident. + AutomationExecutions []AutomationExecution + + // The chat channel used for collaboration during an incident. + ChatChannel ChatChannel + + // The SNS targets that AWS Chatbot uses to notify the chat channels and perform + // actions on the incident record. + NotificationTargets []NotificationTargetItem + + // The time at which the incident was resolved. This appears as a timeline event. + ResolvedTime *time.Time + + // The summary of the incident. The summary is a brief synopsis of what occurred, + // what is currently happening, and context. + Summary *string +} + +// Details about how the incident record was created and when. +type IncidentRecordSource struct { + + // The principal that started the incident. + // + // This member is required. + CreatedBy *string + + // The service that started the incident. This can be manually created from + // Incident Manager, automatically created using an AWS CloudWatch alarm, or Amazon + // EventBridge event. + // + // This member is required. + Source *string + + // The principal the assumed the role specified of the createdBy. + InvokedBy *string + + // The resource that caused the incident to be created. + ResourceArn *string +} + +// Details describing an incident record. +type IncidentRecordSummary struct { + + // The Amazon Resource Name (ARN) of the incident. + // + // This member is required. + Arn *string + + // The time the incident was created. + // + // This member is required. + CreationTime *time.Time + + // Defines the impact to customers and applications. + // + // This member is required. + Impact *int32 + + // What caused Incident Manager to create the incident. + // + // This member is required. + IncidentRecordSource *IncidentRecordSource + + // The current status of the incident. + // + // This member is required. + Status IncidentRecordStatus + + // The title of the incident. This value is either provided by the response plan or + // overwritten on creation. + // + // This member is required. + Title *string + + // The time the incident was resolved. + ResolvedTime *time.Time +} + +// Basic details used in creating a response plan. The response plan is then used +// to create an incident record. +type IncidentTemplate struct { + + // The impact of the incident on your customers and applications. + // + // This member is required. + Impact *int32 + + // The title of the incident. + // + // This member is required. + Title *string + + // Used to stop Incident Manager from creating multiple incident records for the + // same incident. + DedupeString *string + + // The SNS targets that AWS Chatbot uses to notify the chat channel of updates to + // an incident. You can also make updates to the incident through the chat channel + // using the SNS topics. + NotificationTargets []NotificationTargetItem + + // The summary of the incident. The summary is a brief synopsis of what occurred, + // what's currently happening, and context. + Summary *string +} + +// Details and type of a related item. +type ItemIdentifier struct { + + // The type of related item. Incident Manager supports the following types: + // + // * + // ANALYSIS + // + // * INCIDENT + // + // * METRIC + // + // * PARENT + // + // * ATTACHMENT + // + // * OTHER + // + // This member is required. + Type ItemType + + // Details about the related item. + // + // This member is required. + Value ItemValue +} + +// Describes a related item. +// +// The following types satisfy this interface: +// ItemValueMemberArn +// ItemValueMemberUrl +// ItemValueMemberMetricDefinition +type ItemValue interface { + isItemValue() +} + +// The Amazon Resource Name (ARN) of the related item, if the related item is an +// Amazon resource. +type ItemValueMemberArn struct { + Value string +} + +func (*ItemValueMemberArn) isItemValue() {} + +// The URL, if the related item is a non-AWS resource. +type ItemValueMemberUrl struct { + Value string +} + +func (*ItemValueMemberUrl) isItemValue() {} + +// The metric definition, if the related item is a metric in CloudWatch. +type ItemValueMemberMetricDefinition struct { + Value string +} + +func (*ItemValueMemberMetricDefinition) isItemValue() {} + +// The SNS topic that's used by AWS Chatbot to notify the incidents chat channel. +// +// The following types satisfy this interface: +// NotificationTargetItemMemberSnsTopicArn +type NotificationTargetItem interface { + isNotificationTargetItem() +} + +// The Amazon Resource Name (ARN) of the SNS topic. +type NotificationTargetItemMemberSnsTopicArn struct { + Value string +} + +func (*NotificationTargetItemMemberSnsTopicArn) isNotificationTargetItem() {} + +// Information about a Region in your replication set. +type RegionInfo struct { + + // The status of the Region in the replication set. + // + // This member is required. + Status RegionStatus + + // The most recent date and time that the Region's status was updated. + // + // This member is required. + StatusUpdateDateTime *time.Time + + // The ID of the KMS key used to encrypt the data in this Region. + SseKmsKeyId *string + + // Information displayed about the status of the Region. + StatusMessage *string +} + +// The mapping between a Region and the key that's used to encrypt the data. +type RegionMapInputValue struct { + + // The KMS key used to encrypt the data in your replication set. + SseKmsKeyId *string +} + +// Resources that responders use to triage and mitigate the incident. +type RelatedItem struct { + + // Details about the related item. + // + // This member is required. + Identifier *ItemIdentifier + + // The title of the related item. + Title *string +} + +// Details about the related item you're adding. +// +// The following types satisfy this interface: +// RelatedItemsUpdateMemberItemToAdd +// RelatedItemsUpdateMemberItemToRemove +type RelatedItemsUpdate interface { + isRelatedItemsUpdate() +} + +// Details about the related item you're adding. +type RelatedItemsUpdateMemberItemToAdd struct { + Value RelatedItem +} + +func (*RelatedItemsUpdateMemberItemToAdd) isRelatedItemsUpdate() {} + +// Details about the related item you're deleting. +type RelatedItemsUpdateMemberItemToRemove struct { + Value ItemIdentifier +} + +func (*RelatedItemsUpdateMemberItemToRemove) isRelatedItemsUpdate() {} + +// The set of Regions that your Incident Manager data will be replicated to and the +// KMS key used to encrypt the data. +type ReplicationSet struct { + + // Details about who created the replication set. + // + // This member is required. + CreatedBy *string + + // When the replication set was created. + // + // This member is required. + CreatedTime *time.Time + + // Determines if the replication set deletion protection is enabled or not. If + // deletion protection is enabled, you can't delete the last Region in the + // replication set. + // + // This member is required. + DeletionProtected *bool + + // Who last modified the replication set. + // + // This member is required. + LastModifiedBy *string + + // When the replication set was last updated. + // + // This member is required. + LastModifiedTime *time.Time + + // The map between each Region in your replication set and the KMS key that is used + // to encrypt the data in that Region. + // + // This member is required. + RegionMap map[string]RegionInfo + + // The status of the replication set. If the replication set is still pending, you + // can't use Incident Manager functionality. + // + // This member is required. + Status ReplicationSetStatus +} + +// The resource policy that allows Incident Manager to perform actions on resources +// on your behalf. +type ResourcePolicy struct { + + // The JSON blob that describes the policy. + // + // This member is required. + PolicyDocument *string + + // The ID of the resource policy. + // + // This member is required. + PolicyId *string + + // The Region that policy allows resources to be used in. + // + // This member is required. + RamResourceShareRegion *string +} + +// Details of the response plan that are used when creating an incident. +type ResponsePlanSummary struct { + + // The Amazon Resource Name (ARN) of the response plan. + // + // This member is required. + Arn *string + + // The name of the response plan. This can't include spaces. + // + // This member is required. + Name *string + + // The human readable name of the response plan. This can include spaces. + DisplayName *string +} + +// Details about the Systems Manager automation document that will be used as a +// runbook during an incident. +type SsmAutomation struct { + + // The automation document's name. + // + // This member is required. + DocumentName *string + + // The Amazon Resource Name (ARN) of the role that the automation document will + // assume when running commands. + // + // This member is required. + RoleArn *string + + // The automation document's version to use when running. + DocumentVersion *string + + // The key-value pair parameters to use when running the automation document. + Parameters map[string][]string + + // The account that the automation document will be run in. This can be in either + // the management account or an application account. + TargetAccount SsmTargetAccount +} + +// A significant event that happened during the incident. +type TimelineEvent struct { + + // A short description of the event. + // + // This member is required. + EventData *string + + // The ID of the timeline event. + // + // This member is required. + EventId *string + + // The time that the event occurred. + // + // This member is required. + EventTime *time.Time + + // The type of event that occurred. Currently Incident Manager supports only the + // Custom Event type. + // + // This member is required. + EventType *string + + // The time that the timeline event was last updated. + // + // This member is required. + EventUpdatedTime *time.Time + + // The Amazon Resource Name (ARN) of the incident that the event occurred during. + // + // This member is required. + IncidentRecordArn *string +} + +// Details about what caused the incident to be created in Incident Manager. +type TriggerDetails struct { + + // Identifies the service that sourced the event. All events sourced from within + // AWS begin with "aws." Customer-generated events can have any value here, as long + // as it doesn't begin with "aws." We recommend the use of Java package-name style + // reverse domain-name strings. + // + // This member is required. + Source *string + + // The time that the incident was detected. + // + // This member is required. + Timestamp *time.Time + + // Raw data passed from either EventBridge, CloudWatch, or Incident Manager when an + // incident is created. + RawData *string + + // The ARN of the source that detected the incident. + TriggerArn *string +} + +// Details used when updating the replication set. +// +// The following types satisfy this interface: +// UpdateReplicationSetActionMemberAddRegionAction +// UpdateReplicationSetActionMemberDeleteRegionAction +type UpdateReplicationSetAction interface { + isUpdateReplicationSetAction() +} + +// Details about the Region that you're adding to the replication set. +type UpdateReplicationSetActionMemberAddRegionAction struct { + Value AddRegionAction +} + +func (*UpdateReplicationSetActionMemberAddRegionAction) isUpdateReplicationSetAction() {} + +// Details about the Region that you're deleting to the replication set. +type UpdateReplicationSetActionMemberDeleteRegionAction struct { + Value DeleteRegionAction +} + +func (*UpdateReplicationSetActionMemberDeleteRegionAction) isUpdateReplicationSetAction() {} + +// UnknownUnionMember is returned when a union member is returned over the wire, +// but has an unknown tag. +type UnknownUnionMember struct { + Tag string + Value []byte +} + +func (*UnknownUnionMember) isAction() {} +func (*UnknownUnionMember) isAttributeValueList() {} +func (*UnknownUnionMember) isAutomationExecution() {} +func (*UnknownUnionMember) isChatChannel() {} +func (*UnknownUnionMember) isCondition() {} +func (*UnknownUnionMember) isItemValue() {} +func (*UnknownUnionMember) isNotificationTargetItem() {} +func (*UnknownUnionMember) isRelatedItemsUpdate() {} +func (*UnknownUnionMember) isUpdateReplicationSetAction() {} diff --git a/service/commander/types/types_exported_test.go b/service/commander/types/types_exported_test.go new file mode 100644 index 00000000000..e771be72598 --- /dev/null +++ b/service/commander/types/types_exported_test.go @@ -0,0 +1,202 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/commander/types" + "time" +) + +func ExampleAction_outputUsage() { + var union types.Action + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ActionMemberSsmAutomation: + _ = v.Value // Value is types.SsmAutomation + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.SsmAutomation + +func ExampleAttributeValueList_outputUsage() { + var union types.AttributeValueList + // type switches can be used to check the union value + switch v := union.(type) { + case *types.AttributeValueListMemberIntegerValues: + _ = v.Value // Value is []int32 + + case *types.AttributeValueListMemberStringValues: + _ = 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 _ []int32 + +func ExampleAutomationExecution_outputUsage() { + var union types.AutomationExecution + // type switches can be used to check the union value + switch v := union.(type) { + case *types.AutomationExecutionMemberSsmExecutionArn: + _ = 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 + +func ExampleChatChannel_outputUsage() { + var union types.ChatChannel + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ChatChannelMemberChatbotSns: + _ = v.Value // Value is []string + + case *types.ChatChannelMemberEmpty: + _ = v.Value // Value is types.EmptyChatChannel + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.EmptyChatChannel +var _ []string + +func ExampleCondition_outputUsage() { + var union types.Condition + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ConditionMemberAfter: + _ = v.Value // Value is time.Time + + case *types.ConditionMemberBefore: + _ = v.Value // Value is time.Time + + case *types.ConditionMemberEquals: + _ = v.Value // Value is types.AttributeValueList + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *time.Time +var _ types.AttributeValueList + +func ExampleItemValue_outputUsage() { + var union types.ItemValue + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ItemValueMemberArn: + _ = v.Value // Value is string + + case *types.ItemValueMemberMetricDefinition: + _ = v.Value // Value is string + + case *types.ItemValueMemberUrl: + _ = 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 _ *string +var _ *string + +func ExampleNotificationTargetItem_outputUsage() { + var union types.NotificationTargetItem + // type switches can be used to check the union value + switch v := union.(type) { + case *types.NotificationTargetItemMemberSnsTopicArn: + _ = 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 + +func ExampleRelatedItemsUpdate_outputUsage() { + var union types.RelatedItemsUpdate + // type switches can be used to check the union value + switch v := union.(type) { + case *types.RelatedItemsUpdateMemberItemToAdd: + _ = v.Value // Value is types.RelatedItem + + case *types.RelatedItemsUpdateMemberItemToRemove: + _ = v.Value // Value is types.ItemIdentifier + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.RelatedItem +var _ *types.ItemIdentifier + +func ExampleUpdateReplicationSetAction_outputUsage() { + var union types.UpdateReplicationSetAction + // type switches can be used to check the union value + switch v := union.(type) { + case *types.UpdateReplicationSetActionMemberAddRegionAction: + _ = v.Value // Value is types.AddRegionAction + + case *types.UpdateReplicationSetActionMemberDeleteRegionAction: + _ = v.Value // Value is types.DeleteRegionAction + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.DeleteRegionAction +var _ *types.AddRegionAction diff --git a/service/commander/validators.go b/service/commander/validators.go new file mode 100644 index 00000000000..6f81230584a --- /dev/null +++ b/service/commander/validators.go @@ -0,0 +1,1425 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package commander + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/commander/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpCreateReplicationSet struct { +} + +func (*validateOpCreateReplicationSet) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateReplicationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateReplicationSetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateReplicationSetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateResponsePlan struct { +} + +func (*validateOpCreateResponsePlan) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateResponsePlan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateResponsePlanInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateResponsePlanInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateTimelineEvent struct { +} + +func (*validateOpCreateTimelineEvent) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateTimelineEvent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateTimelineEventInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateTimelineEventInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteIncidentRecord struct { +} + +func (*validateOpDeleteIncidentRecord) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteIncidentRecord) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteIncidentRecordInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteIncidentRecordInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteReplicationSet struct { +} + +func (*validateOpDeleteReplicationSet) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteReplicationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteReplicationSetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteReplicationSetInput(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 validateOpDeleteResponsePlan struct { +} + +func (*validateOpDeleteResponsePlan) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteResponsePlan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteResponsePlanInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteResponsePlanInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteTimelineEvent struct { +} + +func (*validateOpDeleteTimelineEvent) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteTimelineEvent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteTimelineEventInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteTimelineEventInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetIncidentRecord struct { +} + +func (*validateOpGetIncidentRecord) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetIncidentRecord) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetIncidentRecordInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetIncidentRecordInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetReplicationSet struct { +} + +func (*validateOpGetReplicationSet) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetReplicationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetReplicationSetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetReplicationSetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetResourcePolicies struct { +} + +func (*validateOpGetResourcePolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetResourcePolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetResourcePoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetResourcePoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetResponsePlan struct { +} + +func (*validateOpGetResponsePlan) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetResponsePlan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetResponsePlanInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetResponsePlanInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetTimelineEvent struct { +} + +func (*validateOpGetTimelineEvent) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetTimelineEvent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetTimelineEventInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetTimelineEventInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListIncidentRecords struct { +} + +func (*validateOpListIncidentRecords) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListIncidentRecords) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListIncidentRecordsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListIncidentRecordsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListRelatedItems struct { +} + +func (*validateOpListRelatedItems) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListRelatedItems) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListRelatedItemsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListRelatedItemsInput(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 validateOpListTimelineEvents struct { +} + +func (*validateOpListTimelineEvents) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTimelineEvents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTimelineEventsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTimelineEventsInput(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 validateOpStartIncident struct { +} + +func (*validateOpStartIncident) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartIncident) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartIncidentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartIncidentInput(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 validateOpUpdateDeletionProtection struct { +} + +func (*validateOpUpdateDeletionProtection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDeletionProtection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDeletionProtectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDeletionProtectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateIncidentRecord struct { +} + +func (*validateOpUpdateIncidentRecord) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateIncidentRecord) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateIncidentRecordInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateIncidentRecordInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateRelatedItems struct { +} + +func (*validateOpUpdateRelatedItems) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateRelatedItems) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateRelatedItemsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateRelatedItemsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateReplicationSet struct { +} + +func (*validateOpUpdateReplicationSet) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateReplicationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateReplicationSetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateReplicationSetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateResponsePlan struct { +} + +func (*validateOpUpdateResponsePlan) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateResponsePlan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateResponsePlanInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateResponsePlanInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateTimelineEvent struct { +} + +func (*validateOpUpdateTimelineEvent) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateTimelineEvent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateTimelineEventInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateTimelineEventInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpCreateReplicationSetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateReplicationSet{}, middleware.After) +} + +func addOpCreateResponsePlanValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateResponsePlan{}, middleware.After) +} + +func addOpCreateTimelineEventValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateTimelineEvent{}, middleware.After) +} + +func addOpDeleteIncidentRecordValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteIncidentRecord{}, middleware.After) +} + +func addOpDeleteReplicationSetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteReplicationSet{}, middleware.After) +} + +func addOpDeleteResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResourcePolicy{}, middleware.After) +} + +func addOpDeleteResponsePlanValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResponsePlan{}, middleware.After) +} + +func addOpDeleteTimelineEventValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteTimelineEvent{}, middleware.After) +} + +func addOpGetIncidentRecordValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetIncidentRecord{}, middleware.After) +} + +func addOpGetReplicationSetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetReplicationSet{}, middleware.After) +} + +func addOpGetResourcePoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResourcePolicies{}, middleware.After) +} + +func addOpGetResponsePlanValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResponsePlan{}, middleware.After) +} + +func addOpGetTimelineEventValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetTimelineEvent{}, middleware.After) +} + +func addOpListIncidentRecordsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListIncidentRecords{}, middleware.After) +} + +func addOpListRelatedItemsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListRelatedItems{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpListTimelineEventsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTimelineEvents{}, middleware.After) +} + +func addOpPutResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutResourcePolicy{}, middleware.After) +} + +func addOpStartIncidentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartIncident{}, 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 addOpUpdateDeletionProtectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDeletionProtection{}, middleware.After) +} + +func addOpUpdateIncidentRecordValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateIncidentRecord{}, middleware.After) +} + +func addOpUpdateRelatedItemsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateRelatedItems{}, middleware.After) +} + +func addOpUpdateReplicationSetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateReplicationSet{}, middleware.After) +} + +func addOpUpdateResponsePlanValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateResponsePlan{}, middleware.After) +} + +func addOpUpdateTimelineEventValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateTimelineEvent{}, middleware.After) +} + +func validateAction(v types.Action) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Action"} + switch uv := v.(type) { + case *types.ActionMemberSsmAutomation: + if err := validateSsmAutomation(&uv.Value); err != nil { + invalidParams.AddNested("[ssmAutomation]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateActionsList(v []types.Action) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ActionsList"} + for i := range v { + if err := validateAction(v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAddRegionAction(v *types.AddRegionAction) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddRegionAction"} + if v.RegionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RegionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDeleteRegionAction(v *types.DeleteRegionAction) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteRegionAction"} + if v.RegionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("RegionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFilter(v *types.Filter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Filter"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Condition == nil { + invalidParams.Add(smithy.NewErrParamRequired("Condition")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFilterList(v []types.Filter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FilterList"} + for i := range v { + if err := validateFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateIncidentTemplate(v *types.IncidentTemplate) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "IncidentTemplate"} + if v.Title == nil { + invalidParams.Add(smithy.NewErrParamRequired("Title")) + } + if v.Impact == nil { + invalidParams.Add(smithy.NewErrParamRequired("Impact")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateItemIdentifier(v *types.ItemIdentifier) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ItemIdentifier"} + 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 validateRelatedItem(v *types.RelatedItem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RelatedItem"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } else if v.Identifier != nil { + if err := validateItemIdentifier(v.Identifier); err != nil { + invalidParams.AddNested("Identifier", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRelatedItemList(v []types.RelatedItem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RelatedItemList"} + for i := range v { + if err := validateRelatedItem(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRelatedItemsUpdate(v types.RelatedItemsUpdate) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RelatedItemsUpdate"} + switch uv := v.(type) { + case *types.RelatedItemsUpdateMemberItemToAdd: + if err := validateRelatedItem(&uv.Value); err != nil { + invalidParams.AddNested("[itemToAdd]", err.(smithy.InvalidParamsError)) + } + + case *types.RelatedItemsUpdateMemberItemToRemove: + if err := validateItemIdentifier(&uv.Value); err != nil { + invalidParams.AddNested("[itemToRemove]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSsmAutomation(v *types.SsmAutomation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SsmAutomation"} + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if v.DocumentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DocumentName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTriggerDetails(v *types.TriggerDetails) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TriggerDetails"} + if v.Source == nil { + invalidParams.Add(smithy.NewErrParamRequired("Source")) + } + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateUpdateActionList(v []types.UpdateReplicationSetAction) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateActionList"} + for i := range v { + if err := validateUpdateReplicationSetAction(v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateUpdateReplicationSetAction(v types.UpdateReplicationSetAction) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateReplicationSetAction"} + switch uv := v.(type) { + case *types.UpdateReplicationSetActionMemberAddRegionAction: + if err := validateAddRegionAction(&uv.Value); err != nil { + invalidParams.AddNested("[addRegionAction]", err.(smithy.InvalidParamsError)) + } + + case *types.UpdateReplicationSetActionMemberDeleteRegionAction: + if err := validateDeleteRegionAction(&uv.Value); err != nil { + invalidParams.AddNested("[deleteRegionAction]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateReplicationSetInput(v *CreateReplicationSetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateReplicationSetInput"} + if v.Regions == nil { + invalidParams.Add(smithy.NewErrParamRequired("Regions")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateResponsePlanInput(v *CreateResponsePlanInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateResponsePlanInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.IncidentTemplate == nil { + invalidParams.Add(smithy.NewErrParamRequired("IncidentTemplate")) + } else if v.IncidentTemplate != nil { + if err := validateIncidentTemplate(v.IncidentTemplate); err != nil { + invalidParams.AddNested("IncidentTemplate", err.(smithy.InvalidParamsError)) + } + } + if v.Actions != nil { + if err := validateActionsList(v.Actions); err != nil { + invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateTimelineEventInput(v *CreateTimelineEventInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateTimelineEventInput"} + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + } + if v.IncidentRecordArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("IncidentRecordArn")) + } + if v.EventTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("EventTime")) + } + if v.EventType == nil { + invalidParams.Add(smithy.NewErrParamRequired("EventType")) + } + if v.EventData == nil { + invalidParams.Add(smithy.NewErrParamRequired("EventData")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteIncidentRecordInput(v *DeleteIncidentRecordInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteIncidentRecordInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteReplicationSetInput(v *DeleteReplicationSetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteReplicationSetInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + 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.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.PolicyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteResponsePlanInput(v *DeleteResponsePlanInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteResponsePlanInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteTimelineEventInput(v *DeleteTimelineEventInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteTimelineEventInput"} + if v.IncidentRecordArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("IncidentRecordArn")) + } + if v.EventId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EventId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetIncidentRecordInput(v *GetIncidentRecordInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetIncidentRecordInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetReplicationSetInput(v *GetReplicationSetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetReplicationSetInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetResourcePoliciesInput(v *GetResourcePoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetResourcePoliciesInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetResponsePlanInput(v *GetResponsePlanInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetResponsePlanInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetTimelineEventInput(v *GetTimelineEventInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetTimelineEventInput"} + if v.IncidentRecordArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("IncidentRecordArn")) + } + if v.EventId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EventId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListIncidentRecordsInput(v *ListIncidentRecordsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListIncidentRecordsInput"} + if v.Filters != nil { + if err := validateFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListRelatedItemsInput(v *ListRelatedItemsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListRelatedItemsInput"} + if v.IncidentRecordArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("IncidentRecordArn")) + } + 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 validateOpListTimelineEventsInput(v *ListTimelineEventsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTimelineEventsInput"} + if v.IncidentRecordArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("IncidentRecordArn")) + } + if v.Filters != nil { + if err := validateFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + 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 validateOpStartIncidentInput(v *StartIncidentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartIncidentInput"} + if v.ResponsePlanArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResponsePlanArn")) + } + if v.TriggerDetails != nil { + if err := validateTriggerDetails(v.TriggerDetails); err != nil { + invalidParams.AddNested("TriggerDetails", err.(smithy.InvalidParamsError)) + } + } + if v.RelatedItems != nil { + if err := validateRelatedItemList(v.RelatedItems); err != nil { + invalidParams.AddNested("RelatedItems", 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 validateOpUpdateDeletionProtectionInput(v *UpdateDeletionProtectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateDeletionProtectionInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if v.DeletionProtected == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeletionProtected")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateIncidentRecordInput(v *UpdateIncidentRecordInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateIncidentRecordInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateRelatedItemsInput(v *UpdateRelatedItemsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateRelatedItemsInput"} + if v.IncidentRecordArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("IncidentRecordArn")) + } + if v.RelatedItemsUpdate == nil { + invalidParams.Add(smithy.NewErrParamRequired("RelatedItemsUpdate")) + } else if v.RelatedItemsUpdate != nil { + if err := validateRelatedItemsUpdate(v.RelatedItemsUpdate); err != nil { + invalidParams.AddNested("RelatedItemsUpdate", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateReplicationSetInput(v *UpdateReplicationSetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateReplicationSetInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if v.Actions == nil { + invalidParams.Add(smithy.NewErrParamRequired("Actions")) + } else if v.Actions != nil { + if err := validateUpdateActionList(v.Actions); err != nil { + invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateResponsePlanInput(v *UpdateResponsePlanInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateResponsePlanInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if v.Actions != nil { + if err := validateActionsList(v.Actions); err != nil { + invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateTimelineEventInput(v *UpdateTimelineEventInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateTimelineEventInput"} + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + } + if v.IncidentRecordArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("IncidentRecordArn")) + } + if v.EventId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EventId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/configservice/api_op_DescribeAggregateComplianceByConfigRules.go b/service/configservice/api_op_DescribeAggregateComplianceByConfigRules.go index 3a8e768a41e..d3dcf29c7ca 100644 --- a/service/configservice/api_op_DescribeAggregateComplianceByConfigRules.go +++ b/service/configservice/api_op_DescribeAggregateComplianceByConfigRules.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -124,6 +125,92 @@ func addOperationDescribeAggregateComplianceByConfigRulesMiddlewares(stack *midd return nil } +// DescribeAggregateComplianceByConfigRulesAPIClient is a client that implements +// the DescribeAggregateComplianceByConfigRules operation. +type DescribeAggregateComplianceByConfigRulesAPIClient interface { + DescribeAggregateComplianceByConfigRules(context.Context, *DescribeAggregateComplianceByConfigRulesInput, ...func(*Options)) (*DescribeAggregateComplianceByConfigRulesOutput, error) +} + +var _ DescribeAggregateComplianceByConfigRulesAPIClient = (*Client)(nil) + +// DescribeAggregateComplianceByConfigRulesPaginatorOptions is the paginator +// options for DescribeAggregateComplianceByConfigRules +type DescribeAggregateComplianceByConfigRulesPaginatorOptions struct { + // The maximum number of evaluation results returned on each page. The default is + // maximum. If you specify 0, AWS Config uses the default. + 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 +} + +// DescribeAggregateComplianceByConfigRulesPaginator is a paginator for +// DescribeAggregateComplianceByConfigRules +type DescribeAggregateComplianceByConfigRulesPaginator struct { + options DescribeAggregateComplianceByConfigRulesPaginatorOptions + client DescribeAggregateComplianceByConfigRulesAPIClient + params *DescribeAggregateComplianceByConfigRulesInput + nextToken *string + firstPage bool +} + +// NewDescribeAggregateComplianceByConfigRulesPaginator returns a new +// DescribeAggregateComplianceByConfigRulesPaginator +func NewDescribeAggregateComplianceByConfigRulesPaginator(client DescribeAggregateComplianceByConfigRulesAPIClient, params *DescribeAggregateComplianceByConfigRulesInput, optFns ...func(*DescribeAggregateComplianceByConfigRulesPaginatorOptions)) *DescribeAggregateComplianceByConfigRulesPaginator { + if params == nil { + params = &DescribeAggregateComplianceByConfigRulesInput{} + } + + options := DescribeAggregateComplianceByConfigRulesPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeAggregateComplianceByConfigRulesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeAggregateComplianceByConfigRulesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeAggregateComplianceByConfigRules page. +func (p *DescribeAggregateComplianceByConfigRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAggregateComplianceByConfigRulesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeAggregateComplianceByConfigRules(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_opDescribeAggregateComplianceByConfigRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeAggregateComplianceByConformancePacks.go b/service/configservice/api_op_DescribeAggregateComplianceByConformancePacks.go index ea96f33ba01..4a1be9c84fb 100644 --- a/service/configservice/api_op_DescribeAggregateComplianceByConformancePacks.go +++ b/service/configservice/api_op_DescribeAggregateComplianceByConformancePacks.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -127,6 +128,92 @@ func addOperationDescribeAggregateComplianceByConformancePacksMiddlewares(stack return nil } +// DescribeAggregateComplianceByConformancePacksAPIClient is a client that +// implements the DescribeAggregateComplianceByConformancePacks operation. +type DescribeAggregateComplianceByConformancePacksAPIClient interface { + DescribeAggregateComplianceByConformancePacks(context.Context, *DescribeAggregateComplianceByConformancePacksInput, ...func(*Options)) (*DescribeAggregateComplianceByConformancePacksOutput, error) +} + +var _ DescribeAggregateComplianceByConformancePacksAPIClient = (*Client)(nil) + +// DescribeAggregateComplianceByConformancePacksPaginatorOptions is the paginator +// options for DescribeAggregateComplianceByConformancePacks +type DescribeAggregateComplianceByConformancePacksPaginatorOptions struct { + // The maximum number of conformance packs compliance details returned on each + // page. The default is maximum. If you specify 0, AWS Config uses the default. + 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 +} + +// DescribeAggregateComplianceByConformancePacksPaginator is a paginator for +// DescribeAggregateComplianceByConformancePacks +type DescribeAggregateComplianceByConformancePacksPaginator struct { + options DescribeAggregateComplianceByConformancePacksPaginatorOptions + client DescribeAggregateComplianceByConformancePacksAPIClient + params *DescribeAggregateComplianceByConformancePacksInput + nextToken *string + firstPage bool +} + +// NewDescribeAggregateComplianceByConformancePacksPaginator returns a new +// DescribeAggregateComplianceByConformancePacksPaginator +func NewDescribeAggregateComplianceByConformancePacksPaginator(client DescribeAggregateComplianceByConformancePacksAPIClient, params *DescribeAggregateComplianceByConformancePacksInput, optFns ...func(*DescribeAggregateComplianceByConformancePacksPaginatorOptions)) *DescribeAggregateComplianceByConformancePacksPaginator { + if params == nil { + params = &DescribeAggregateComplianceByConformancePacksInput{} + } + + options := DescribeAggregateComplianceByConformancePacksPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeAggregateComplianceByConformancePacksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeAggregateComplianceByConformancePacksPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeAggregateComplianceByConformancePacks page. +func (p *DescribeAggregateComplianceByConformancePacksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAggregateComplianceByConformancePacksOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeAggregateComplianceByConformancePacks(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_opDescribeAggregateComplianceByConformancePacks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeAggregationAuthorizations.go b/service/configservice/api_op_DescribeAggregationAuthorizations.go index a0f601c777f..352614adf33 100644 --- a/service/configservice/api_op_DescribeAggregationAuthorizations.go +++ b/service/configservice/api_op_DescribeAggregationAuthorizations.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -113,6 +114,92 @@ func addOperationDescribeAggregationAuthorizationsMiddlewares(stack *middleware. return nil } +// DescribeAggregationAuthorizationsAPIClient is a client that implements the +// DescribeAggregationAuthorizations operation. +type DescribeAggregationAuthorizationsAPIClient interface { + DescribeAggregationAuthorizations(context.Context, *DescribeAggregationAuthorizationsInput, ...func(*Options)) (*DescribeAggregationAuthorizationsOutput, error) +} + +var _ DescribeAggregationAuthorizationsAPIClient = (*Client)(nil) + +// DescribeAggregationAuthorizationsPaginatorOptions is the paginator options for +// DescribeAggregationAuthorizations +type DescribeAggregationAuthorizationsPaginatorOptions struct { + // The maximum number of AggregationAuthorizations returned on each page. The + // default is maximum. If you specify 0, AWS Config uses the default. + 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 +} + +// DescribeAggregationAuthorizationsPaginator is a paginator for +// DescribeAggregationAuthorizations +type DescribeAggregationAuthorizationsPaginator struct { + options DescribeAggregationAuthorizationsPaginatorOptions + client DescribeAggregationAuthorizationsAPIClient + params *DescribeAggregationAuthorizationsInput + nextToken *string + firstPage bool +} + +// NewDescribeAggregationAuthorizationsPaginator returns a new +// DescribeAggregationAuthorizationsPaginator +func NewDescribeAggregationAuthorizationsPaginator(client DescribeAggregationAuthorizationsAPIClient, params *DescribeAggregationAuthorizationsInput, optFns ...func(*DescribeAggregationAuthorizationsPaginatorOptions)) *DescribeAggregationAuthorizationsPaginator { + if params == nil { + params = &DescribeAggregationAuthorizationsInput{} + } + + options := DescribeAggregationAuthorizationsPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeAggregationAuthorizationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeAggregationAuthorizationsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeAggregationAuthorizations page. +func (p *DescribeAggregationAuthorizationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAggregationAuthorizationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeAggregationAuthorizations(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_opDescribeAggregationAuthorizations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeComplianceByConfigRule.go b/service/configservice/api_op_DescribeComplianceByConfigRule.go index c1f856fabed..39919ae6724 100644 --- a/service/configservice/api_op_DescribeComplianceByConfigRule.go +++ b/service/configservice/api_op_DescribeComplianceByConfigRule.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -137,6 +138,83 @@ func addOperationDescribeComplianceByConfigRuleMiddlewares(stack *middleware.Sta return nil } +// DescribeComplianceByConfigRuleAPIClient is a client that implements the +// DescribeComplianceByConfigRule operation. +type DescribeComplianceByConfigRuleAPIClient interface { + DescribeComplianceByConfigRule(context.Context, *DescribeComplianceByConfigRuleInput, ...func(*Options)) (*DescribeComplianceByConfigRuleOutput, error) +} + +var _ DescribeComplianceByConfigRuleAPIClient = (*Client)(nil) + +// DescribeComplianceByConfigRulePaginatorOptions is the paginator options for +// DescribeComplianceByConfigRule +type DescribeComplianceByConfigRulePaginatorOptions 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 +} + +// DescribeComplianceByConfigRulePaginator is a paginator for +// DescribeComplianceByConfigRule +type DescribeComplianceByConfigRulePaginator struct { + options DescribeComplianceByConfigRulePaginatorOptions + client DescribeComplianceByConfigRuleAPIClient + params *DescribeComplianceByConfigRuleInput + nextToken *string + firstPage bool +} + +// NewDescribeComplianceByConfigRulePaginator returns a new +// DescribeComplianceByConfigRulePaginator +func NewDescribeComplianceByConfigRulePaginator(client DescribeComplianceByConfigRuleAPIClient, params *DescribeComplianceByConfigRuleInput, optFns ...func(*DescribeComplianceByConfigRulePaginatorOptions)) *DescribeComplianceByConfigRulePaginator { + if params == nil { + params = &DescribeComplianceByConfigRuleInput{} + } + + options := DescribeComplianceByConfigRulePaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeComplianceByConfigRulePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeComplianceByConfigRulePaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeComplianceByConfigRule page. +func (p *DescribeComplianceByConfigRulePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeComplianceByConfigRuleOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.DescribeComplianceByConfigRule(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_opDescribeComplianceByConfigRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeComplianceByResource.go b/service/configservice/api_op_DescribeComplianceByResource.go index 9d401b41b38..f380ade6b34 100644 --- a/service/configservice/api_op_DescribeComplianceByResource.go +++ b/service/configservice/api_op_DescribeComplianceByResource.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -151,6 +152,93 @@ func addOperationDescribeComplianceByResourceMiddlewares(stack *middleware.Stack return nil } +// DescribeComplianceByResourceAPIClient is a client that implements the +// DescribeComplianceByResource operation. +type DescribeComplianceByResourceAPIClient interface { + DescribeComplianceByResource(context.Context, *DescribeComplianceByResourceInput, ...func(*Options)) (*DescribeComplianceByResourceOutput, error) +} + +var _ DescribeComplianceByResourceAPIClient = (*Client)(nil) + +// DescribeComplianceByResourcePaginatorOptions is the paginator options for +// DescribeComplianceByResource +type DescribeComplianceByResourcePaginatorOptions struct { + // The maximum number of evaluation results returned on each page. The default is + // 10. You cannot specify a number greater than 100. If you specify 0, AWS Config + // uses the default. + 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 +} + +// DescribeComplianceByResourcePaginator is a paginator for +// DescribeComplianceByResource +type DescribeComplianceByResourcePaginator struct { + options DescribeComplianceByResourcePaginatorOptions + client DescribeComplianceByResourceAPIClient + params *DescribeComplianceByResourceInput + nextToken *string + firstPage bool +} + +// NewDescribeComplianceByResourcePaginator returns a new +// DescribeComplianceByResourcePaginator +func NewDescribeComplianceByResourcePaginator(client DescribeComplianceByResourceAPIClient, params *DescribeComplianceByResourceInput, optFns ...func(*DescribeComplianceByResourcePaginatorOptions)) *DescribeComplianceByResourcePaginator { + if params == nil { + params = &DescribeComplianceByResourceInput{} + } + + options := DescribeComplianceByResourcePaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeComplianceByResourcePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeComplianceByResourcePaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeComplianceByResource page. +func (p *DescribeComplianceByResourcePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeComplianceByResourceOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeComplianceByResource(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_opDescribeComplianceByResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go b/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go index 187b897d5c1..0541631d0b7 100644 --- a/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go +++ b/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -125,6 +126,96 @@ func addOperationDescribeConfigRuleEvaluationStatusMiddlewares(stack *middleware return nil } +// DescribeConfigRuleEvaluationStatusAPIClient is a client that implements the +// DescribeConfigRuleEvaluationStatus operation. +type DescribeConfigRuleEvaluationStatusAPIClient interface { + DescribeConfigRuleEvaluationStatus(context.Context, *DescribeConfigRuleEvaluationStatusInput, ...func(*Options)) (*DescribeConfigRuleEvaluationStatusOutput, error) +} + +var _ DescribeConfigRuleEvaluationStatusAPIClient = (*Client)(nil) + +// DescribeConfigRuleEvaluationStatusPaginatorOptions is the paginator options for +// DescribeConfigRuleEvaluationStatus +type DescribeConfigRuleEvaluationStatusPaginatorOptions struct { + // The number of rule evaluation results that you want returned. This parameter is + // required if the rule limit for your account is more than the default of 150 + // rules. For information about requesting a rule limit increase, see AWS Config + // Limits + // (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config) + // in the AWS General Reference Guide. + 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 +} + +// DescribeConfigRuleEvaluationStatusPaginator is a paginator for +// DescribeConfigRuleEvaluationStatus +type DescribeConfigRuleEvaluationStatusPaginator struct { + options DescribeConfigRuleEvaluationStatusPaginatorOptions + client DescribeConfigRuleEvaluationStatusAPIClient + params *DescribeConfigRuleEvaluationStatusInput + nextToken *string + firstPage bool +} + +// NewDescribeConfigRuleEvaluationStatusPaginator returns a new +// DescribeConfigRuleEvaluationStatusPaginator +func NewDescribeConfigRuleEvaluationStatusPaginator(client DescribeConfigRuleEvaluationStatusAPIClient, params *DescribeConfigRuleEvaluationStatusInput, optFns ...func(*DescribeConfigRuleEvaluationStatusPaginatorOptions)) *DescribeConfigRuleEvaluationStatusPaginator { + if params == nil { + params = &DescribeConfigRuleEvaluationStatusInput{} + } + + options := DescribeConfigRuleEvaluationStatusPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeConfigRuleEvaluationStatusPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeConfigRuleEvaluationStatusPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeConfigRuleEvaluationStatus page. +func (p *DescribeConfigRuleEvaluationStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeConfigRuleEvaluationStatusOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeConfigRuleEvaluationStatus(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_opDescribeConfigRuleEvaluationStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConfigRules.go b/service/configservice/api_op_DescribeConfigRules.go index 6067607bb6f..ee4a5118997 100644 --- a/service/configservice/api_op_DescribeConfigRules.go +++ b/service/configservice/api_op_DescribeConfigRules.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -113,6 +114,81 @@ func addOperationDescribeConfigRulesMiddlewares(stack *middleware.Stack, options return nil } +// DescribeConfigRulesAPIClient is a client that implements the DescribeConfigRules +// operation. +type DescribeConfigRulesAPIClient interface { + DescribeConfigRules(context.Context, *DescribeConfigRulesInput, ...func(*Options)) (*DescribeConfigRulesOutput, error) +} + +var _ DescribeConfigRulesAPIClient = (*Client)(nil) + +// DescribeConfigRulesPaginatorOptions is the paginator options for +// DescribeConfigRules +type DescribeConfigRulesPaginatorOptions 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 +} + +// DescribeConfigRulesPaginator is a paginator for DescribeConfigRules +type DescribeConfigRulesPaginator struct { + options DescribeConfigRulesPaginatorOptions + client DescribeConfigRulesAPIClient + params *DescribeConfigRulesInput + nextToken *string + firstPage bool +} + +// NewDescribeConfigRulesPaginator returns a new DescribeConfigRulesPaginator +func NewDescribeConfigRulesPaginator(client DescribeConfigRulesAPIClient, params *DescribeConfigRulesInput, optFns ...func(*DescribeConfigRulesPaginatorOptions)) *DescribeConfigRulesPaginator { + if params == nil { + params = &DescribeConfigRulesInput{} + } + + options := DescribeConfigRulesPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeConfigRulesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeConfigRulesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeConfigRules page. +func (p *DescribeConfigRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeConfigRulesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.DescribeConfigRules(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_opDescribeConfigRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConfigurationAggregatorSourcesStatus.go b/service/configservice/api_op_DescribeConfigurationAggregatorSourcesStatus.go index 3fe73b3bc2e..3cb3f671d7b 100644 --- a/service/configservice/api_op_DescribeConfigurationAggregatorSourcesStatus.go +++ b/service/configservice/api_op_DescribeConfigurationAggregatorSourcesStatus.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -133,6 +134,92 @@ func addOperationDescribeConfigurationAggregatorSourcesStatusMiddlewares(stack * return nil } +// DescribeConfigurationAggregatorSourcesStatusAPIClient is a client that +// implements the DescribeConfigurationAggregatorSourcesStatus operation. +type DescribeConfigurationAggregatorSourcesStatusAPIClient interface { + DescribeConfigurationAggregatorSourcesStatus(context.Context, *DescribeConfigurationAggregatorSourcesStatusInput, ...func(*Options)) (*DescribeConfigurationAggregatorSourcesStatusOutput, error) +} + +var _ DescribeConfigurationAggregatorSourcesStatusAPIClient = (*Client)(nil) + +// DescribeConfigurationAggregatorSourcesStatusPaginatorOptions is the paginator +// options for DescribeConfigurationAggregatorSourcesStatus +type DescribeConfigurationAggregatorSourcesStatusPaginatorOptions struct { + // The maximum number of AggregatorSourceStatus returned on each page. The default + // is maximum. If you specify 0, AWS Config uses the default. + 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 +} + +// DescribeConfigurationAggregatorSourcesStatusPaginator is a paginator for +// DescribeConfigurationAggregatorSourcesStatus +type DescribeConfigurationAggregatorSourcesStatusPaginator struct { + options DescribeConfigurationAggregatorSourcesStatusPaginatorOptions + client DescribeConfigurationAggregatorSourcesStatusAPIClient + params *DescribeConfigurationAggregatorSourcesStatusInput + nextToken *string + firstPage bool +} + +// NewDescribeConfigurationAggregatorSourcesStatusPaginator returns a new +// DescribeConfigurationAggregatorSourcesStatusPaginator +func NewDescribeConfigurationAggregatorSourcesStatusPaginator(client DescribeConfigurationAggregatorSourcesStatusAPIClient, params *DescribeConfigurationAggregatorSourcesStatusInput, optFns ...func(*DescribeConfigurationAggregatorSourcesStatusPaginatorOptions)) *DescribeConfigurationAggregatorSourcesStatusPaginator { + if params == nil { + params = &DescribeConfigurationAggregatorSourcesStatusInput{} + } + + options := DescribeConfigurationAggregatorSourcesStatusPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeConfigurationAggregatorSourcesStatusPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeConfigurationAggregatorSourcesStatusPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeConfigurationAggregatorSourcesStatus page. +func (p *DescribeConfigurationAggregatorSourcesStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeConfigurationAggregatorSourcesStatusOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeConfigurationAggregatorSourcesStatus(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_opDescribeConfigurationAggregatorSourcesStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConfigurationAggregators.go b/service/configservice/api_op_DescribeConfigurationAggregators.go index c69c6ae42b3..7629b4cfdd2 100644 --- a/service/configservice/api_op_DescribeConfigurationAggregators.go +++ b/service/configservice/api_op_DescribeConfigurationAggregators.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -116,6 +117,92 @@ func addOperationDescribeConfigurationAggregatorsMiddlewares(stack *middleware.S return nil } +// DescribeConfigurationAggregatorsAPIClient is a client that implements the +// DescribeConfigurationAggregators operation. +type DescribeConfigurationAggregatorsAPIClient interface { + DescribeConfigurationAggregators(context.Context, *DescribeConfigurationAggregatorsInput, ...func(*Options)) (*DescribeConfigurationAggregatorsOutput, error) +} + +var _ DescribeConfigurationAggregatorsAPIClient = (*Client)(nil) + +// DescribeConfigurationAggregatorsPaginatorOptions is the paginator options for +// DescribeConfigurationAggregators +type DescribeConfigurationAggregatorsPaginatorOptions struct { + // The maximum number of configuration aggregators returned on each page. The + // default is maximum. If you specify 0, AWS Config uses the default. + 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 +} + +// DescribeConfigurationAggregatorsPaginator is a paginator for +// DescribeConfigurationAggregators +type DescribeConfigurationAggregatorsPaginator struct { + options DescribeConfigurationAggregatorsPaginatorOptions + client DescribeConfigurationAggregatorsAPIClient + params *DescribeConfigurationAggregatorsInput + nextToken *string + firstPage bool +} + +// NewDescribeConfigurationAggregatorsPaginator returns a new +// DescribeConfigurationAggregatorsPaginator +func NewDescribeConfigurationAggregatorsPaginator(client DescribeConfigurationAggregatorsAPIClient, params *DescribeConfigurationAggregatorsInput, optFns ...func(*DescribeConfigurationAggregatorsPaginatorOptions)) *DescribeConfigurationAggregatorsPaginator { + if params == nil { + params = &DescribeConfigurationAggregatorsInput{} + } + + options := DescribeConfigurationAggregatorsPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeConfigurationAggregatorsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeConfigurationAggregatorsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeConfigurationAggregators page. +func (p *DescribeConfigurationAggregatorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeConfigurationAggregatorsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeConfigurationAggregators(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_opDescribeConfigurationAggregators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConformancePackCompliance.go b/service/configservice/api_op_DescribeConformancePackCompliance.go index 3e4396fd222..a5e35d42c06 100644 --- a/service/configservice/api_op_DescribeConformancePackCompliance.go +++ b/service/configservice/api_op_DescribeConformancePackCompliance.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -130,6 +131,92 @@ func addOperationDescribeConformancePackComplianceMiddlewares(stack *middleware. return nil } +// DescribeConformancePackComplianceAPIClient is a client that implements the +// DescribeConformancePackCompliance operation. +type DescribeConformancePackComplianceAPIClient interface { + DescribeConformancePackCompliance(context.Context, *DescribeConformancePackComplianceInput, ...func(*Options)) (*DescribeConformancePackComplianceOutput, error) +} + +var _ DescribeConformancePackComplianceAPIClient = (*Client)(nil) + +// DescribeConformancePackCompliancePaginatorOptions is the paginator options for +// DescribeConformancePackCompliance +type DescribeConformancePackCompliancePaginatorOptions struct { + // The maximum number of AWS Config rules within a conformance pack are returned on + // each 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 +} + +// DescribeConformancePackCompliancePaginator is a paginator for +// DescribeConformancePackCompliance +type DescribeConformancePackCompliancePaginator struct { + options DescribeConformancePackCompliancePaginatorOptions + client DescribeConformancePackComplianceAPIClient + params *DescribeConformancePackComplianceInput + nextToken *string + firstPage bool +} + +// NewDescribeConformancePackCompliancePaginator returns a new +// DescribeConformancePackCompliancePaginator +func NewDescribeConformancePackCompliancePaginator(client DescribeConformancePackComplianceAPIClient, params *DescribeConformancePackComplianceInput, optFns ...func(*DescribeConformancePackCompliancePaginatorOptions)) *DescribeConformancePackCompliancePaginator { + if params == nil { + params = &DescribeConformancePackComplianceInput{} + } + + options := DescribeConformancePackCompliancePaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeConformancePackCompliancePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeConformancePackCompliancePaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeConformancePackCompliance page. +func (p *DescribeConformancePackCompliancePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeConformancePackComplianceOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeConformancePackCompliance(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_opDescribeConformancePackCompliance(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConformancePackStatus.go b/service/configservice/api_op_DescribeConformancePackStatus.go index cdbcfd6c057..6ad7969bbdd 100644 --- a/service/configservice/api_op_DescribeConformancePackStatus.go +++ b/service/configservice/api_op_DescribeConformancePackStatus.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -114,6 +115,91 @@ func addOperationDescribeConformancePackStatusMiddlewares(stack *middleware.Stac return nil } +// DescribeConformancePackStatusAPIClient is a client that implements the +// DescribeConformancePackStatus operation. +type DescribeConformancePackStatusAPIClient interface { + DescribeConformancePackStatus(context.Context, *DescribeConformancePackStatusInput, ...func(*Options)) (*DescribeConformancePackStatusOutput, error) +} + +var _ DescribeConformancePackStatusAPIClient = (*Client)(nil) + +// DescribeConformancePackStatusPaginatorOptions is the paginator options for +// DescribeConformancePackStatus +type DescribeConformancePackStatusPaginatorOptions struct { + // The maximum number of conformance packs status returned on each 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 +} + +// DescribeConformancePackStatusPaginator is a paginator for +// DescribeConformancePackStatus +type DescribeConformancePackStatusPaginator struct { + options DescribeConformancePackStatusPaginatorOptions + client DescribeConformancePackStatusAPIClient + params *DescribeConformancePackStatusInput + nextToken *string + firstPage bool +} + +// NewDescribeConformancePackStatusPaginator returns a new +// DescribeConformancePackStatusPaginator +func NewDescribeConformancePackStatusPaginator(client DescribeConformancePackStatusAPIClient, params *DescribeConformancePackStatusInput, optFns ...func(*DescribeConformancePackStatusPaginatorOptions)) *DescribeConformancePackStatusPaginator { + if params == nil { + params = &DescribeConformancePackStatusInput{} + } + + options := DescribeConformancePackStatusPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeConformancePackStatusPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeConformancePackStatusPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeConformancePackStatus page. +func (p *DescribeConformancePackStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeConformancePackStatusOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeConformancePackStatus(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_opDescribeConformancePackStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConformancePacks.go b/service/configservice/api_op_DescribeConformancePacks.go index c73c5eb90c8..6fac47b5ce2 100644 --- a/service/configservice/api_op_DescribeConformancePacks.go +++ b/service/configservice/api_op_DescribeConformancePacks.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -115,6 +116,90 @@ func addOperationDescribeConformancePacksMiddlewares(stack *middleware.Stack, op return nil } +// DescribeConformancePacksAPIClient is a client that implements the +// DescribeConformancePacks operation. +type DescribeConformancePacksAPIClient interface { + DescribeConformancePacks(context.Context, *DescribeConformancePacksInput, ...func(*Options)) (*DescribeConformancePacksOutput, error) +} + +var _ DescribeConformancePacksAPIClient = (*Client)(nil) + +// DescribeConformancePacksPaginatorOptions is the paginator options for +// DescribeConformancePacks +type DescribeConformancePacksPaginatorOptions struct { + // The maximum number of conformance packs returned on each 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 +} + +// DescribeConformancePacksPaginator is a paginator for DescribeConformancePacks +type DescribeConformancePacksPaginator struct { + options DescribeConformancePacksPaginatorOptions + client DescribeConformancePacksAPIClient + params *DescribeConformancePacksInput + nextToken *string + firstPage bool +} + +// NewDescribeConformancePacksPaginator returns a new +// DescribeConformancePacksPaginator +func NewDescribeConformancePacksPaginator(client DescribeConformancePacksAPIClient, params *DescribeConformancePacksInput, optFns ...func(*DescribeConformancePacksPaginatorOptions)) *DescribeConformancePacksPaginator { + if params == nil { + params = &DescribeConformancePacksInput{} + } + + options := DescribeConformancePacksPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeConformancePacksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeConformancePacksPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeConformancePacks page. +func (p *DescribeConformancePacksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeConformancePacksOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeConformancePacks(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_opDescribeConformancePacks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeOrganizationConfigRuleStatuses.go b/service/configservice/api_op_DescribeOrganizationConfigRuleStatuses.go index d01a69dcf80..ed171445081 100644 --- a/service/configservice/api_op_DescribeOrganizationConfigRuleStatuses.go +++ b/service/configservice/api_op_DescribeOrganizationConfigRuleStatuses.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -122,6 +123,92 @@ func addOperationDescribeOrganizationConfigRuleStatusesMiddlewares(stack *middle return nil } +// DescribeOrganizationConfigRuleStatusesAPIClient is a client that implements the +// DescribeOrganizationConfigRuleStatuses operation. +type DescribeOrganizationConfigRuleStatusesAPIClient interface { + DescribeOrganizationConfigRuleStatuses(context.Context, *DescribeOrganizationConfigRuleStatusesInput, ...func(*Options)) (*DescribeOrganizationConfigRuleStatusesOutput, error) +} + +var _ DescribeOrganizationConfigRuleStatusesAPIClient = (*Client)(nil) + +// DescribeOrganizationConfigRuleStatusesPaginatorOptions is the paginator options +// for DescribeOrganizationConfigRuleStatuses +type DescribeOrganizationConfigRuleStatusesPaginatorOptions struct { + // The maximum number of OrganizationConfigRuleStatuses returned on each page. If + // you do no specify a number, AWS Config uses the default. The default 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 +} + +// DescribeOrganizationConfigRuleStatusesPaginator is a paginator for +// DescribeOrganizationConfigRuleStatuses +type DescribeOrganizationConfigRuleStatusesPaginator struct { + options DescribeOrganizationConfigRuleStatusesPaginatorOptions + client DescribeOrganizationConfigRuleStatusesAPIClient + params *DescribeOrganizationConfigRuleStatusesInput + nextToken *string + firstPage bool +} + +// NewDescribeOrganizationConfigRuleStatusesPaginator returns a new +// DescribeOrganizationConfigRuleStatusesPaginator +func NewDescribeOrganizationConfigRuleStatusesPaginator(client DescribeOrganizationConfigRuleStatusesAPIClient, params *DescribeOrganizationConfigRuleStatusesInput, optFns ...func(*DescribeOrganizationConfigRuleStatusesPaginatorOptions)) *DescribeOrganizationConfigRuleStatusesPaginator { + if params == nil { + params = &DescribeOrganizationConfigRuleStatusesInput{} + } + + options := DescribeOrganizationConfigRuleStatusesPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeOrganizationConfigRuleStatusesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeOrganizationConfigRuleStatusesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeOrganizationConfigRuleStatuses page. +func (p *DescribeOrganizationConfigRuleStatusesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeOrganizationConfigRuleStatusesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeOrganizationConfigRuleStatuses(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_opDescribeOrganizationConfigRuleStatuses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeOrganizationConfigRules.go b/service/configservice/api_op_DescribeOrganizationConfigRules.go index f39bfb11cb3..508357fe694 100644 --- a/service/configservice/api_op_DescribeOrganizationConfigRules.go +++ b/service/configservice/api_op_DescribeOrganizationConfigRules.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -119,6 +120,92 @@ func addOperationDescribeOrganizationConfigRulesMiddlewares(stack *middleware.St return nil } +// DescribeOrganizationConfigRulesAPIClient is a client that implements the +// DescribeOrganizationConfigRules operation. +type DescribeOrganizationConfigRulesAPIClient interface { + DescribeOrganizationConfigRules(context.Context, *DescribeOrganizationConfigRulesInput, ...func(*Options)) (*DescribeOrganizationConfigRulesOutput, error) +} + +var _ DescribeOrganizationConfigRulesAPIClient = (*Client)(nil) + +// DescribeOrganizationConfigRulesPaginatorOptions is the paginator options for +// DescribeOrganizationConfigRules +type DescribeOrganizationConfigRulesPaginatorOptions struct { + // The maximum number of organization config rules returned on each page. If you do + // no specify a number, AWS Config uses the default. The default 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 +} + +// DescribeOrganizationConfigRulesPaginator is a paginator for +// DescribeOrganizationConfigRules +type DescribeOrganizationConfigRulesPaginator struct { + options DescribeOrganizationConfigRulesPaginatorOptions + client DescribeOrganizationConfigRulesAPIClient + params *DescribeOrganizationConfigRulesInput + nextToken *string + firstPage bool +} + +// NewDescribeOrganizationConfigRulesPaginator returns a new +// DescribeOrganizationConfigRulesPaginator +func NewDescribeOrganizationConfigRulesPaginator(client DescribeOrganizationConfigRulesAPIClient, params *DescribeOrganizationConfigRulesInput, optFns ...func(*DescribeOrganizationConfigRulesPaginatorOptions)) *DescribeOrganizationConfigRulesPaginator { + if params == nil { + params = &DescribeOrganizationConfigRulesInput{} + } + + options := DescribeOrganizationConfigRulesPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeOrganizationConfigRulesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeOrganizationConfigRulesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeOrganizationConfigRules page. +func (p *DescribeOrganizationConfigRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeOrganizationConfigRulesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeOrganizationConfigRules(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_opDescribeOrganizationConfigRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeOrganizationConformancePackStatuses.go b/service/configservice/api_op_DescribeOrganizationConformancePackStatuses.go index 0ff5608b6fb..a4dfd0420a2 100644 --- a/service/configservice/api_op_DescribeOrganizationConformancePackStatuses.go +++ b/service/configservice/api_op_DescribeOrganizationConformancePackStatuses.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -122,6 +123,92 @@ func addOperationDescribeOrganizationConformancePackStatusesMiddlewares(stack *m return nil } +// DescribeOrganizationConformancePackStatusesAPIClient is a client that implements +// the DescribeOrganizationConformancePackStatuses operation. +type DescribeOrganizationConformancePackStatusesAPIClient interface { + DescribeOrganizationConformancePackStatuses(context.Context, *DescribeOrganizationConformancePackStatusesInput, ...func(*Options)) (*DescribeOrganizationConformancePackStatusesOutput, error) +} + +var _ DescribeOrganizationConformancePackStatusesAPIClient = (*Client)(nil) + +// DescribeOrganizationConformancePackStatusesPaginatorOptions is the paginator +// options for DescribeOrganizationConformancePackStatuses +type DescribeOrganizationConformancePackStatusesPaginatorOptions struct { + // The maximum number of OrganizationConformancePackStatuses returned on each page. + // If you do no specify a number, AWS Config uses the default. The default 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 +} + +// DescribeOrganizationConformancePackStatusesPaginator is a paginator for +// DescribeOrganizationConformancePackStatuses +type DescribeOrganizationConformancePackStatusesPaginator struct { + options DescribeOrganizationConformancePackStatusesPaginatorOptions + client DescribeOrganizationConformancePackStatusesAPIClient + params *DescribeOrganizationConformancePackStatusesInput + nextToken *string + firstPage bool +} + +// NewDescribeOrganizationConformancePackStatusesPaginator returns a new +// DescribeOrganizationConformancePackStatusesPaginator +func NewDescribeOrganizationConformancePackStatusesPaginator(client DescribeOrganizationConformancePackStatusesAPIClient, params *DescribeOrganizationConformancePackStatusesInput, optFns ...func(*DescribeOrganizationConformancePackStatusesPaginatorOptions)) *DescribeOrganizationConformancePackStatusesPaginator { + if params == nil { + params = &DescribeOrganizationConformancePackStatusesInput{} + } + + options := DescribeOrganizationConformancePackStatusesPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeOrganizationConformancePackStatusesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeOrganizationConformancePackStatusesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeOrganizationConformancePackStatuses page. +func (p *DescribeOrganizationConformancePackStatusesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeOrganizationConformancePackStatusesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeOrganizationConformancePackStatuses(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_opDescribeOrganizationConformancePackStatuses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeOrganizationConformancePacks.go b/service/configservice/api_op_DescribeOrganizationConformancePacks.go index 2d25785750f..c54c0720185 100644 --- a/service/configservice/api_op_DescribeOrganizationConformancePacks.go +++ b/service/configservice/api_op_DescribeOrganizationConformancePacks.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -117,6 +118,92 @@ func addOperationDescribeOrganizationConformancePacksMiddlewares(stack *middlewa return nil } +// DescribeOrganizationConformancePacksAPIClient is a client that implements the +// DescribeOrganizationConformancePacks operation. +type DescribeOrganizationConformancePacksAPIClient interface { + DescribeOrganizationConformancePacks(context.Context, *DescribeOrganizationConformancePacksInput, ...func(*Options)) (*DescribeOrganizationConformancePacksOutput, error) +} + +var _ DescribeOrganizationConformancePacksAPIClient = (*Client)(nil) + +// DescribeOrganizationConformancePacksPaginatorOptions is the paginator options +// for DescribeOrganizationConformancePacks +type DescribeOrganizationConformancePacksPaginatorOptions struct { + // The maximum number of organization config packs returned on each page. If you do + // no specify a number, AWS Config uses the default. The default 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 +} + +// DescribeOrganizationConformancePacksPaginator is a paginator for +// DescribeOrganizationConformancePacks +type DescribeOrganizationConformancePacksPaginator struct { + options DescribeOrganizationConformancePacksPaginatorOptions + client DescribeOrganizationConformancePacksAPIClient + params *DescribeOrganizationConformancePacksInput + nextToken *string + firstPage bool +} + +// NewDescribeOrganizationConformancePacksPaginator returns a new +// DescribeOrganizationConformancePacksPaginator +func NewDescribeOrganizationConformancePacksPaginator(client DescribeOrganizationConformancePacksAPIClient, params *DescribeOrganizationConformancePacksInput, optFns ...func(*DescribeOrganizationConformancePacksPaginatorOptions)) *DescribeOrganizationConformancePacksPaginator { + if params == nil { + params = &DescribeOrganizationConformancePacksInput{} + } + + options := DescribeOrganizationConformancePacksPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeOrganizationConformancePacksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeOrganizationConformancePacksPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeOrganizationConformancePacks page. +func (p *DescribeOrganizationConformancePacksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeOrganizationConformancePacksOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribeOrganizationConformancePacks(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_opDescribeOrganizationConformancePacks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribePendingAggregationRequests.go b/service/configservice/api_op_DescribePendingAggregationRequests.go index a2e271718b6..4a774db19be 100644 --- a/service/configservice/api_op_DescribePendingAggregationRequests.go +++ b/service/configservice/api_op_DescribePendingAggregationRequests.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -111,6 +112,92 @@ func addOperationDescribePendingAggregationRequestsMiddlewares(stack *middleware return nil } +// DescribePendingAggregationRequestsAPIClient is a client that implements the +// DescribePendingAggregationRequests operation. +type DescribePendingAggregationRequestsAPIClient interface { + DescribePendingAggregationRequests(context.Context, *DescribePendingAggregationRequestsInput, ...func(*Options)) (*DescribePendingAggregationRequestsOutput, error) +} + +var _ DescribePendingAggregationRequestsAPIClient = (*Client)(nil) + +// DescribePendingAggregationRequestsPaginatorOptions is the paginator options for +// DescribePendingAggregationRequests +type DescribePendingAggregationRequestsPaginatorOptions struct { + // The maximum number of evaluation results returned on each page. The default is + // maximum. If you specify 0, AWS Config uses the default. + 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 +} + +// DescribePendingAggregationRequestsPaginator is a paginator for +// DescribePendingAggregationRequests +type DescribePendingAggregationRequestsPaginator struct { + options DescribePendingAggregationRequestsPaginatorOptions + client DescribePendingAggregationRequestsAPIClient + params *DescribePendingAggregationRequestsInput + nextToken *string + firstPage bool +} + +// NewDescribePendingAggregationRequestsPaginator returns a new +// DescribePendingAggregationRequestsPaginator +func NewDescribePendingAggregationRequestsPaginator(client DescribePendingAggregationRequestsAPIClient, params *DescribePendingAggregationRequestsInput, optFns ...func(*DescribePendingAggregationRequestsPaginatorOptions)) *DescribePendingAggregationRequestsPaginator { + if params == nil { + params = &DescribePendingAggregationRequestsInput{} + } + + options := DescribePendingAggregationRequestsPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribePendingAggregationRequestsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribePendingAggregationRequestsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribePendingAggregationRequests page. +func (p *DescribePendingAggregationRequestsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePendingAggregationRequestsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.DescribePendingAggregationRequests(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_opDescribePendingAggregationRequests(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeRetentionConfigurations.go b/service/configservice/api_op_DescribeRetentionConfigurations.go index 982cd5d839c..b45f6807065 100644 --- a/service/configservice/api_op_DescribeRetentionConfigurations.go +++ b/service/configservice/api_op_DescribeRetentionConfigurations.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -116,6 +117,83 @@ func addOperationDescribeRetentionConfigurationsMiddlewares(stack *middleware.St return nil } +// DescribeRetentionConfigurationsAPIClient is a client that implements the +// DescribeRetentionConfigurations operation. +type DescribeRetentionConfigurationsAPIClient interface { + DescribeRetentionConfigurations(context.Context, *DescribeRetentionConfigurationsInput, ...func(*Options)) (*DescribeRetentionConfigurationsOutput, error) +} + +var _ DescribeRetentionConfigurationsAPIClient = (*Client)(nil) + +// DescribeRetentionConfigurationsPaginatorOptions is the paginator options for +// DescribeRetentionConfigurations +type DescribeRetentionConfigurationsPaginatorOptions 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 +} + +// DescribeRetentionConfigurationsPaginator is a paginator for +// DescribeRetentionConfigurations +type DescribeRetentionConfigurationsPaginator struct { + options DescribeRetentionConfigurationsPaginatorOptions + client DescribeRetentionConfigurationsAPIClient + params *DescribeRetentionConfigurationsInput + nextToken *string + firstPage bool +} + +// NewDescribeRetentionConfigurationsPaginator returns a new +// DescribeRetentionConfigurationsPaginator +func NewDescribeRetentionConfigurationsPaginator(client DescribeRetentionConfigurationsAPIClient, params *DescribeRetentionConfigurationsInput, optFns ...func(*DescribeRetentionConfigurationsPaginatorOptions)) *DescribeRetentionConfigurationsPaginator { + if params == nil { + params = &DescribeRetentionConfigurationsInput{} + } + + options := DescribeRetentionConfigurationsPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeRetentionConfigurationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeRetentionConfigurationsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeRetentionConfigurations page. +func (p *DescribeRetentionConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeRetentionConfigurationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.DescribeRetentionConfigurations(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_opDescribeRetentionConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetAggregateComplianceDetailsByConfigRule.go b/service/configservice/api_op_GetAggregateComplianceDetailsByConfigRule.go index bf382f18ce4..d7f9617658a 100644 --- a/service/configservice/api_op_GetAggregateComplianceDetailsByConfigRule.go +++ b/service/configservice/api_op_GetAggregateComplianceDetailsByConfigRule.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -145,6 +146,93 @@ func addOperationGetAggregateComplianceDetailsByConfigRuleMiddlewares(stack *mid return nil } +// GetAggregateComplianceDetailsByConfigRuleAPIClient is a client that implements +// the GetAggregateComplianceDetailsByConfigRule operation. +type GetAggregateComplianceDetailsByConfigRuleAPIClient interface { + GetAggregateComplianceDetailsByConfigRule(context.Context, *GetAggregateComplianceDetailsByConfigRuleInput, ...func(*Options)) (*GetAggregateComplianceDetailsByConfigRuleOutput, error) +} + +var _ GetAggregateComplianceDetailsByConfigRuleAPIClient = (*Client)(nil) + +// GetAggregateComplianceDetailsByConfigRulePaginatorOptions is the paginator +// options for GetAggregateComplianceDetailsByConfigRule +type GetAggregateComplianceDetailsByConfigRulePaginatorOptions struct { + // The maximum number of evaluation results returned on each page. The default is + // 50. You cannot specify a number greater than 100. If you specify 0, AWS Config + // uses the default. + 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 +} + +// GetAggregateComplianceDetailsByConfigRulePaginator is a paginator for +// GetAggregateComplianceDetailsByConfigRule +type GetAggregateComplianceDetailsByConfigRulePaginator struct { + options GetAggregateComplianceDetailsByConfigRulePaginatorOptions + client GetAggregateComplianceDetailsByConfigRuleAPIClient + params *GetAggregateComplianceDetailsByConfigRuleInput + nextToken *string + firstPage bool +} + +// NewGetAggregateComplianceDetailsByConfigRulePaginator returns a new +// GetAggregateComplianceDetailsByConfigRulePaginator +func NewGetAggregateComplianceDetailsByConfigRulePaginator(client GetAggregateComplianceDetailsByConfigRuleAPIClient, params *GetAggregateComplianceDetailsByConfigRuleInput, optFns ...func(*GetAggregateComplianceDetailsByConfigRulePaginatorOptions)) *GetAggregateComplianceDetailsByConfigRulePaginator { + if params == nil { + params = &GetAggregateComplianceDetailsByConfigRuleInput{} + } + + options := GetAggregateComplianceDetailsByConfigRulePaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetAggregateComplianceDetailsByConfigRulePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetAggregateComplianceDetailsByConfigRulePaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetAggregateComplianceDetailsByConfigRule page. +func (p *GetAggregateComplianceDetailsByConfigRulePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetAggregateComplianceDetailsByConfigRuleOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.GetAggregateComplianceDetailsByConfigRule(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_opGetAggregateComplianceDetailsByConfigRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetAggregateConfigRuleComplianceSummary.go b/service/configservice/api_op_GetAggregateConfigRuleComplianceSummary.go index af21b4ed757..bef865e8622 100644 --- a/service/configservice/api_op_GetAggregateConfigRuleComplianceSummary.go +++ b/service/configservice/api_op_GetAggregateConfigRuleComplianceSummary.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -131,6 +132,93 @@ func addOperationGetAggregateConfigRuleComplianceSummaryMiddlewares(stack *middl return nil } +// GetAggregateConfigRuleComplianceSummaryAPIClient is a client that implements the +// GetAggregateConfigRuleComplianceSummary operation. +type GetAggregateConfigRuleComplianceSummaryAPIClient interface { + GetAggregateConfigRuleComplianceSummary(context.Context, *GetAggregateConfigRuleComplianceSummaryInput, ...func(*Options)) (*GetAggregateConfigRuleComplianceSummaryOutput, error) +} + +var _ GetAggregateConfigRuleComplianceSummaryAPIClient = (*Client)(nil) + +// GetAggregateConfigRuleComplianceSummaryPaginatorOptions is the paginator options +// for GetAggregateConfigRuleComplianceSummary +type GetAggregateConfigRuleComplianceSummaryPaginatorOptions struct { + // The maximum number of evaluation results returned on each page. The default is + // 1000. You cannot specify a number greater than 1000. If you specify 0, AWS + // Config uses the default. + 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 +} + +// GetAggregateConfigRuleComplianceSummaryPaginator is a paginator for +// GetAggregateConfigRuleComplianceSummary +type GetAggregateConfigRuleComplianceSummaryPaginator struct { + options GetAggregateConfigRuleComplianceSummaryPaginatorOptions + client GetAggregateConfigRuleComplianceSummaryAPIClient + params *GetAggregateConfigRuleComplianceSummaryInput + nextToken *string + firstPage bool +} + +// NewGetAggregateConfigRuleComplianceSummaryPaginator returns a new +// GetAggregateConfigRuleComplianceSummaryPaginator +func NewGetAggregateConfigRuleComplianceSummaryPaginator(client GetAggregateConfigRuleComplianceSummaryAPIClient, params *GetAggregateConfigRuleComplianceSummaryInput, optFns ...func(*GetAggregateConfigRuleComplianceSummaryPaginatorOptions)) *GetAggregateConfigRuleComplianceSummaryPaginator { + if params == nil { + params = &GetAggregateConfigRuleComplianceSummaryInput{} + } + + options := GetAggregateConfigRuleComplianceSummaryPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetAggregateConfigRuleComplianceSummaryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetAggregateConfigRuleComplianceSummaryPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetAggregateConfigRuleComplianceSummary page. +func (p *GetAggregateConfigRuleComplianceSummaryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetAggregateConfigRuleComplianceSummaryOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.GetAggregateConfigRuleComplianceSummary(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_opGetAggregateConfigRuleComplianceSummary(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetAggregateConformancePackComplianceSummary.go b/service/configservice/api_op_GetAggregateConformancePackComplianceSummary.go index d46dc03dc9e..487cd44cee0 100644 --- a/service/configservice/api_op_GetAggregateConformancePackComplianceSummary.go +++ b/service/configservice/api_op_GetAggregateConformancePackComplianceSummary.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -132,6 +133,92 @@ func addOperationGetAggregateConformancePackComplianceSummaryMiddlewares(stack * return nil } +// GetAggregateConformancePackComplianceSummaryAPIClient is a client that +// implements the GetAggregateConformancePackComplianceSummary operation. +type GetAggregateConformancePackComplianceSummaryAPIClient interface { + GetAggregateConformancePackComplianceSummary(context.Context, *GetAggregateConformancePackComplianceSummaryInput, ...func(*Options)) (*GetAggregateConformancePackComplianceSummaryOutput, error) +} + +var _ GetAggregateConformancePackComplianceSummaryAPIClient = (*Client)(nil) + +// GetAggregateConformancePackComplianceSummaryPaginatorOptions is the paginator +// options for GetAggregateConformancePackComplianceSummary +type GetAggregateConformancePackComplianceSummaryPaginatorOptions struct { + // The maximum number of results returned on each page. The default is maximum. If + // you specify 0, AWS Config uses the default. + 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 +} + +// GetAggregateConformancePackComplianceSummaryPaginator is a paginator for +// GetAggregateConformancePackComplianceSummary +type GetAggregateConformancePackComplianceSummaryPaginator struct { + options GetAggregateConformancePackComplianceSummaryPaginatorOptions + client GetAggregateConformancePackComplianceSummaryAPIClient + params *GetAggregateConformancePackComplianceSummaryInput + nextToken *string + firstPage bool +} + +// NewGetAggregateConformancePackComplianceSummaryPaginator returns a new +// GetAggregateConformancePackComplianceSummaryPaginator +func NewGetAggregateConformancePackComplianceSummaryPaginator(client GetAggregateConformancePackComplianceSummaryAPIClient, params *GetAggregateConformancePackComplianceSummaryInput, optFns ...func(*GetAggregateConformancePackComplianceSummaryPaginatorOptions)) *GetAggregateConformancePackComplianceSummaryPaginator { + if params == nil { + params = &GetAggregateConformancePackComplianceSummaryInput{} + } + + options := GetAggregateConformancePackComplianceSummaryPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetAggregateConformancePackComplianceSummaryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetAggregateConformancePackComplianceSummaryPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetAggregateConformancePackComplianceSummary page. +func (p *GetAggregateConformancePackComplianceSummaryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetAggregateConformancePackComplianceSummaryOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.GetAggregateConformancePackComplianceSummary(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_opGetAggregateConformancePackComplianceSummary(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetAggregateDiscoveredResourceCounts.go b/service/configservice/api_op_GetAggregateDiscoveredResourceCounts.go index 6e2ca3a981f..627b580c7c8 100644 --- a/service/configservice/api_op_GetAggregateDiscoveredResourceCounts.go +++ b/service/configservice/api_op_GetAggregateDiscoveredResourceCounts.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -142,6 +143,93 @@ func addOperationGetAggregateDiscoveredResourceCountsMiddlewares(stack *middlewa return nil } +// GetAggregateDiscoveredResourceCountsAPIClient is a client that implements the +// GetAggregateDiscoveredResourceCounts operation. +type GetAggregateDiscoveredResourceCountsAPIClient interface { + GetAggregateDiscoveredResourceCounts(context.Context, *GetAggregateDiscoveredResourceCountsInput, ...func(*Options)) (*GetAggregateDiscoveredResourceCountsOutput, error) +} + +var _ GetAggregateDiscoveredResourceCountsAPIClient = (*Client)(nil) + +// GetAggregateDiscoveredResourceCountsPaginatorOptions is the paginator options +// for GetAggregateDiscoveredResourceCounts +type GetAggregateDiscoveredResourceCountsPaginatorOptions struct { + // The maximum number of GroupedResourceCount objects returned on each page. The + // default is 1000. You cannot specify a number greater than 1000. If you specify + // 0, AWS Config uses the default. + 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 +} + +// GetAggregateDiscoveredResourceCountsPaginator is a paginator for +// GetAggregateDiscoveredResourceCounts +type GetAggregateDiscoveredResourceCountsPaginator struct { + options GetAggregateDiscoveredResourceCountsPaginatorOptions + client GetAggregateDiscoveredResourceCountsAPIClient + params *GetAggregateDiscoveredResourceCountsInput + nextToken *string + firstPage bool +} + +// NewGetAggregateDiscoveredResourceCountsPaginator returns a new +// GetAggregateDiscoveredResourceCountsPaginator +func NewGetAggregateDiscoveredResourceCountsPaginator(client GetAggregateDiscoveredResourceCountsAPIClient, params *GetAggregateDiscoveredResourceCountsInput, optFns ...func(*GetAggregateDiscoveredResourceCountsPaginatorOptions)) *GetAggregateDiscoveredResourceCountsPaginator { + if params == nil { + params = &GetAggregateDiscoveredResourceCountsInput{} + } + + options := GetAggregateDiscoveredResourceCountsPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetAggregateDiscoveredResourceCountsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetAggregateDiscoveredResourceCountsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetAggregateDiscoveredResourceCounts page. +func (p *GetAggregateDiscoveredResourceCountsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetAggregateDiscoveredResourceCountsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.GetAggregateDiscoveredResourceCounts(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_opGetAggregateDiscoveredResourceCounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetComplianceDetailsByConfigRule.go b/service/configservice/api_op_GetComplianceDetailsByConfigRule.go index a3d71eef779..6cd2fea1aa0 100644 --- a/service/configservice/api_op_GetComplianceDetailsByConfigRule.go +++ b/service/configservice/api_op_GetComplianceDetailsByConfigRule.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -128,6 +129,93 @@ func addOperationGetComplianceDetailsByConfigRuleMiddlewares(stack *middleware.S return nil } +// GetComplianceDetailsByConfigRuleAPIClient is a client that implements the +// GetComplianceDetailsByConfigRule operation. +type GetComplianceDetailsByConfigRuleAPIClient interface { + GetComplianceDetailsByConfigRule(context.Context, *GetComplianceDetailsByConfigRuleInput, ...func(*Options)) (*GetComplianceDetailsByConfigRuleOutput, error) +} + +var _ GetComplianceDetailsByConfigRuleAPIClient = (*Client)(nil) + +// GetComplianceDetailsByConfigRulePaginatorOptions is the paginator options for +// GetComplianceDetailsByConfigRule +type GetComplianceDetailsByConfigRulePaginatorOptions struct { + // The maximum number of evaluation results returned on each page. The default is + // 10. You cannot specify a number greater than 100. If you specify 0, AWS Config + // uses the default. + 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 +} + +// GetComplianceDetailsByConfigRulePaginator is a paginator for +// GetComplianceDetailsByConfigRule +type GetComplianceDetailsByConfigRulePaginator struct { + options GetComplianceDetailsByConfigRulePaginatorOptions + client GetComplianceDetailsByConfigRuleAPIClient + params *GetComplianceDetailsByConfigRuleInput + nextToken *string + firstPage bool +} + +// NewGetComplianceDetailsByConfigRulePaginator returns a new +// GetComplianceDetailsByConfigRulePaginator +func NewGetComplianceDetailsByConfigRulePaginator(client GetComplianceDetailsByConfigRuleAPIClient, params *GetComplianceDetailsByConfigRuleInput, optFns ...func(*GetComplianceDetailsByConfigRulePaginatorOptions)) *GetComplianceDetailsByConfigRulePaginator { + if params == nil { + params = &GetComplianceDetailsByConfigRuleInput{} + } + + options := GetComplianceDetailsByConfigRulePaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetComplianceDetailsByConfigRulePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetComplianceDetailsByConfigRulePaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetComplianceDetailsByConfigRule page. +func (p *GetComplianceDetailsByConfigRulePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetComplianceDetailsByConfigRuleOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.GetComplianceDetailsByConfigRule(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_opGetComplianceDetailsByConfigRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetComplianceDetailsByResource.go b/service/configservice/api_op_GetComplianceDetailsByResource.go index e823386516b..68c20f66a8a 100644 --- a/service/configservice/api_op_GetComplianceDetailsByResource.go +++ b/service/configservice/api_op_GetComplianceDetailsByResource.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -128,6 +129,83 @@ func addOperationGetComplianceDetailsByResourceMiddlewares(stack *middleware.Sta return nil } +// GetComplianceDetailsByResourceAPIClient is a client that implements the +// GetComplianceDetailsByResource operation. +type GetComplianceDetailsByResourceAPIClient interface { + GetComplianceDetailsByResource(context.Context, *GetComplianceDetailsByResourceInput, ...func(*Options)) (*GetComplianceDetailsByResourceOutput, error) +} + +var _ GetComplianceDetailsByResourceAPIClient = (*Client)(nil) + +// GetComplianceDetailsByResourcePaginatorOptions is the paginator options for +// GetComplianceDetailsByResource +type GetComplianceDetailsByResourcePaginatorOptions 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 +} + +// GetComplianceDetailsByResourcePaginator is a paginator for +// GetComplianceDetailsByResource +type GetComplianceDetailsByResourcePaginator struct { + options GetComplianceDetailsByResourcePaginatorOptions + client GetComplianceDetailsByResourceAPIClient + params *GetComplianceDetailsByResourceInput + nextToken *string + firstPage bool +} + +// NewGetComplianceDetailsByResourcePaginator returns a new +// GetComplianceDetailsByResourcePaginator +func NewGetComplianceDetailsByResourcePaginator(client GetComplianceDetailsByResourceAPIClient, params *GetComplianceDetailsByResourceInput, optFns ...func(*GetComplianceDetailsByResourcePaginatorOptions)) *GetComplianceDetailsByResourcePaginator { + if params == nil { + params = &GetComplianceDetailsByResourceInput{} + } + + options := GetComplianceDetailsByResourcePaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &GetComplianceDetailsByResourcePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetComplianceDetailsByResourcePaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetComplianceDetailsByResource page. +func (p *GetComplianceDetailsByResourcePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetComplianceDetailsByResourceOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.GetComplianceDetailsByResource(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_opGetComplianceDetailsByResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetConformancePackComplianceDetails.go b/service/configservice/api_op_GetConformancePackComplianceDetails.go index 1444938df11..e7cdf0de979 100644 --- a/service/configservice/api_op_GetConformancePackComplianceDetails.go +++ b/service/configservice/api_op_GetConformancePackComplianceDetails.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -128,6 +129,92 @@ func addOperationGetConformancePackComplianceDetailsMiddlewares(stack *middlewar return nil } +// GetConformancePackComplianceDetailsAPIClient is a client that implements the +// GetConformancePackComplianceDetails operation. +type GetConformancePackComplianceDetailsAPIClient interface { + GetConformancePackComplianceDetails(context.Context, *GetConformancePackComplianceDetailsInput, ...func(*Options)) (*GetConformancePackComplianceDetailsOutput, error) +} + +var _ GetConformancePackComplianceDetailsAPIClient = (*Client)(nil) + +// GetConformancePackComplianceDetailsPaginatorOptions is the paginator options for +// GetConformancePackComplianceDetails +type GetConformancePackComplianceDetailsPaginatorOptions struct { + // The maximum number of evaluation results returned on each page. If you do no + // specify a number, AWS Config uses the default. The default 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 +} + +// GetConformancePackComplianceDetailsPaginator is a paginator for +// GetConformancePackComplianceDetails +type GetConformancePackComplianceDetailsPaginator struct { + options GetConformancePackComplianceDetailsPaginatorOptions + client GetConformancePackComplianceDetailsAPIClient + params *GetConformancePackComplianceDetailsInput + nextToken *string + firstPage bool +} + +// NewGetConformancePackComplianceDetailsPaginator returns a new +// GetConformancePackComplianceDetailsPaginator +func NewGetConformancePackComplianceDetailsPaginator(client GetConformancePackComplianceDetailsAPIClient, params *GetConformancePackComplianceDetailsInput, optFns ...func(*GetConformancePackComplianceDetailsPaginatorOptions)) *GetConformancePackComplianceDetailsPaginator { + if params == nil { + params = &GetConformancePackComplianceDetailsInput{} + } + + options := GetConformancePackComplianceDetailsPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetConformancePackComplianceDetailsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetConformancePackComplianceDetailsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetConformancePackComplianceDetails page. +func (p *GetConformancePackComplianceDetailsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetConformancePackComplianceDetailsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.GetConformancePackComplianceDetails(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_opGetConformancePackComplianceDetails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetConformancePackComplianceSummary.go b/service/configservice/api_op_GetConformancePackComplianceSummary.go index 6710e6dde56..166f295f53a 100644 --- a/service/configservice/api_op_GetConformancePackComplianceSummary.go +++ b/service/configservice/api_op_GetConformancePackComplianceSummary.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -119,6 +120,91 @@ func addOperationGetConformancePackComplianceSummaryMiddlewares(stack *middlewar return nil } +// GetConformancePackComplianceSummaryAPIClient is a client that implements the +// GetConformancePackComplianceSummary operation. +type GetConformancePackComplianceSummaryAPIClient interface { + GetConformancePackComplianceSummary(context.Context, *GetConformancePackComplianceSummaryInput, ...func(*Options)) (*GetConformancePackComplianceSummaryOutput, error) +} + +var _ GetConformancePackComplianceSummaryAPIClient = (*Client)(nil) + +// GetConformancePackComplianceSummaryPaginatorOptions is the paginator options for +// GetConformancePackComplianceSummary +type GetConformancePackComplianceSummaryPaginatorOptions struct { + // The maximum number of conformance packs returned on each 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 +} + +// GetConformancePackComplianceSummaryPaginator is a paginator for +// GetConformancePackComplianceSummary +type GetConformancePackComplianceSummaryPaginator struct { + options GetConformancePackComplianceSummaryPaginatorOptions + client GetConformancePackComplianceSummaryAPIClient + params *GetConformancePackComplianceSummaryInput + nextToken *string + firstPage bool +} + +// NewGetConformancePackComplianceSummaryPaginator returns a new +// GetConformancePackComplianceSummaryPaginator +func NewGetConformancePackComplianceSummaryPaginator(client GetConformancePackComplianceSummaryAPIClient, params *GetConformancePackComplianceSummaryInput, optFns ...func(*GetConformancePackComplianceSummaryPaginatorOptions)) *GetConformancePackComplianceSummaryPaginator { + if params == nil { + params = &GetConformancePackComplianceSummaryInput{} + } + + options := GetConformancePackComplianceSummaryPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetConformancePackComplianceSummaryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetConformancePackComplianceSummaryPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetConformancePackComplianceSummary page. +func (p *GetConformancePackComplianceSummaryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetConformancePackComplianceSummaryOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.GetConformancePackComplianceSummary(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_opGetConformancePackComplianceSummary(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetDiscoveredResourceCounts.go b/service/configservice/api_op_GetDiscoveredResourceCounts.go index 9dac34939e4..477be4567ec 100644 --- a/service/configservice/api_op_GetDiscoveredResourceCounts.go +++ b/service/configservice/api_op_GetDiscoveredResourceCounts.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -175,6 +176,93 @@ func addOperationGetDiscoveredResourceCountsMiddlewares(stack *middleware.Stack, return nil } +// GetDiscoveredResourceCountsAPIClient is a client that implements the +// GetDiscoveredResourceCounts operation. +type GetDiscoveredResourceCountsAPIClient interface { + GetDiscoveredResourceCounts(context.Context, *GetDiscoveredResourceCountsInput, ...func(*Options)) (*GetDiscoveredResourceCountsOutput, error) +} + +var _ GetDiscoveredResourceCountsAPIClient = (*Client)(nil) + +// GetDiscoveredResourceCountsPaginatorOptions is the paginator options for +// GetDiscoveredResourceCounts +type GetDiscoveredResourceCountsPaginatorOptions struct { + // The maximum number of ResourceCount objects returned on each page. The default + // is 100. You cannot specify a number greater than 100. If you specify 0, AWS + // Config uses the default. + 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 +} + +// GetDiscoveredResourceCountsPaginator is a paginator for +// GetDiscoveredResourceCounts +type GetDiscoveredResourceCountsPaginator struct { + options GetDiscoveredResourceCountsPaginatorOptions + client GetDiscoveredResourceCountsAPIClient + params *GetDiscoveredResourceCountsInput + nextToken *string + firstPage bool +} + +// NewGetDiscoveredResourceCountsPaginator returns a new +// GetDiscoveredResourceCountsPaginator +func NewGetDiscoveredResourceCountsPaginator(client GetDiscoveredResourceCountsAPIClient, params *GetDiscoveredResourceCountsInput, optFns ...func(*GetDiscoveredResourceCountsPaginatorOptions)) *GetDiscoveredResourceCountsPaginator { + if params == nil { + params = &GetDiscoveredResourceCountsInput{} + } + + options := GetDiscoveredResourceCountsPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetDiscoveredResourceCountsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetDiscoveredResourceCountsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetDiscoveredResourceCounts page. +func (p *GetDiscoveredResourceCountsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetDiscoveredResourceCountsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.GetDiscoveredResourceCounts(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_opGetDiscoveredResourceCounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetOrganizationConfigRuleDetailedStatus.go b/service/configservice/api_op_GetOrganizationConfigRuleDetailedStatus.go index ced01c9cc56..0565c6cc85d 100644 --- a/service/configservice/api_op_GetOrganizationConfigRuleDetailedStatus.go +++ b/service/configservice/api_op_GetOrganizationConfigRuleDetailedStatus.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -125,6 +126,93 @@ func addOperationGetOrganizationConfigRuleDetailedStatusMiddlewares(stack *middl return nil } +// GetOrganizationConfigRuleDetailedStatusAPIClient is a client that implements the +// GetOrganizationConfigRuleDetailedStatus operation. +type GetOrganizationConfigRuleDetailedStatusAPIClient interface { + GetOrganizationConfigRuleDetailedStatus(context.Context, *GetOrganizationConfigRuleDetailedStatusInput, ...func(*Options)) (*GetOrganizationConfigRuleDetailedStatusOutput, error) +} + +var _ GetOrganizationConfigRuleDetailedStatusAPIClient = (*Client)(nil) + +// GetOrganizationConfigRuleDetailedStatusPaginatorOptions is the paginator options +// for GetOrganizationConfigRuleDetailedStatus +type GetOrganizationConfigRuleDetailedStatusPaginatorOptions struct { + // The maximum number of OrganizationConfigRuleDetailedStatus returned on each + // page. If you do not specify a number, AWS Config uses the default. The default + // 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 +} + +// GetOrganizationConfigRuleDetailedStatusPaginator is a paginator for +// GetOrganizationConfigRuleDetailedStatus +type GetOrganizationConfigRuleDetailedStatusPaginator struct { + options GetOrganizationConfigRuleDetailedStatusPaginatorOptions + client GetOrganizationConfigRuleDetailedStatusAPIClient + params *GetOrganizationConfigRuleDetailedStatusInput + nextToken *string + firstPage bool +} + +// NewGetOrganizationConfigRuleDetailedStatusPaginator returns a new +// GetOrganizationConfigRuleDetailedStatusPaginator +func NewGetOrganizationConfigRuleDetailedStatusPaginator(client GetOrganizationConfigRuleDetailedStatusAPIClient, params *GetOrganizationConfigRuleDetailedStatusInput, optFns ...func(*GetOrganizationConfigRuleDetailedStatusPaginatorOptions)) *GetOrganizationConfigRuleDetailedStatusPaginator { + if params == nil { + params = &GetOrganizationConfigRuleDetailedStatusInput{} + } + + options := GetOrganizationConfigRuleDetailedStatusPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetOrganizationConfigRuleDetailedStatusPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetOrganizationConfigRuleDetailedStatusPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetOrganizationConfigRuleDetailedStatus page. +func (p *GetOrganizationConfigRuleDetailedStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetOrganizationConfigRuleDetailedStatusOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.GetOrganizationConfigRuleDetailedStatus(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_opGetOrganizationConfigRuleDetailedStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetOrganizationConformancePackDetailedStatus.go b/service/configservice/api_op_GetOrganizationConformancePackDetailedStatus.go index 5b8da38b9c9..a3e0303fdb0 100644 --- a/service/configservice/api_op_GetOrganizationConformancePackDetailedStatus.go +++ b/service/configservice/api_op_GetOrganizationConformancePackDetailedStatus.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -125,6 +126,93 @@ func addOperationGetOrganizationConformancePackDetailedStatusMiddlewares(stack * return nil } +// GetOrganizationConformancePackDetailedStatusAPIClient is a client that +// implements the GetOrganizationConformancePackDetailedStatus operation. +type GetOrganizationConformancePackDetailedStatusAPIClient interface { + GetOrganizationConformancePackDetailedStatus(context.Context, *GetOrganizationConformancePackDetailedStatusInput, ...func(*Options)) (*GetOrganizationConformancePackDetailedStatusOutput, error) +} + +var _ GetOrganizationConformancePackDetailedStatusAPIClient = (*Client)(nil) + +// GetOrganizationConformancePackDetailedStatusPaginatorOptions is the paginator +// options for GetOrganizationConformancePackDetailedStatus +type GetOrganizationConformancePackDetailedStatusPaginatorOptions struct { + // The maximum number of OrganizationConformancePackDetailedStatuses returned on + // each page. If you do not specify a number, AWS Config uses the default. The + // default 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 +} + +// GetOrganizationConformancePackDetailedStatusPaginator is a paginator for +// GetOrganizationConformancePackDetailedStatus +type GetOrganizationConformancePackDetailedStatusPaginator struct { + options GetOrganizationConformancePackDetailedStatusPaginatorOptions + client GetOrganizationConformancePackDetailedStatusAPIClient + params *GetOrganizationConformancePackDetailedStatusInput + nextToken *string + firstPage bool +} + +// NewGetOrganizationConformancePackDetailedStatusPaginator returns a new +// GetOrganizationConformancePackDetailedStatusPaginator +func NewGetOrganizationConformancePackDetailedStatusPaginator(client GetOrganizationConformancePackDetailedStatusAPIClient, params *GetOrganizationConformancePackDetailedStatusInput, optFns ...func(*GetOrganizationConformancePackDetailedStatusPaginatorOptions)) *GetOrganizationConformancePackDetailedStatusPaginator { + if params == nil { + params = &GetOrganizationConformancePackDetailedStatusInput{} + } + + options := GetOrganizationConformancePackDetailedStatusPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetOrganizationConformancePackDetailedStatusPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetOrganizationConformancePackDetailedStatusPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetOrganizationConformancePackDetailedStatus page. +func (p *GetOrganizationConformancePackDetailedStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetOrganizationConformancePackDetailedStatusOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.GetOrganizationConformancePackDetailedStatus(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_opGetOrganizationConformancePackDetailedStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_ListAggregateDiscoveredResources.go b/service/configservice/api_op_ListAggregateDiscoveredResources.go index 50a465f00ba..75f668b01be 100644 --- a/service/configservice/api_op_ListAggregateDiscoveredResources.go +++ b/service/configservice/api_op_ListAggregateDiscoveredResources.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -136,6 +137,93 @@ func addOperationListAggregateDiscoveredResourcesMiddlewares(stack *middleware.S return nil } +// ListAggregateDiscoveredResourcesAPIClient is a client that implements the +// ListAggregateDiscoveredResources operation. +type ListAggregateDiscoveredResourcesAPIClient interface { + ListAggregateDiscoveredResources(context.Context, *ListAggregateDiscoveredResourcesInput, ...func(*Options)) (*ListAggregateDiscoveredResourcesOutput, error) +} + +var _ ListAggregateDiscoveredResourcesAPIClient = (*Client)(nil) + +// ListAggregateDiscoveredResourcesPaginatorOptions is the paginator options for +// ListAggregateDiscoveredResources +type ListAggregateDiscoveredResourcesPaginatorOptions struct { + // The maximum number of resource identifiers returned on each page. You cannot + // specify a number greater than 100. If you specify 0, AWS Config uses the + // default. + 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 +} + +// ListAggregateDiscoveredResourcesPaginator is a paginator for +// ListAggregateDiscoveredResources +type ListAggregateDiscoveredResourcesPaginator struct { + options ListAggregateDiscoveredResourcesPaginatorOptions + client ListAggregateDiscoveredResourcesAPIClient + params *ListAggregateDiscoveredResourcesInput + nextToken *string + firstPage bool +} + +// NewListAggregateDiscoveredResourcesPaginator returns a new +// ListAggregateDiscoveredResourcesPaginator +func NewListAggregateDiscoveredResourcesPaginator(client ListAggregateDiscoveredResourcesAPIClient, params *ListAggregateDiscoveredResourcesInput, optFns ...func(*ListAggregateDiscoveredResourcesPaginatorOptions)) *ListAggregateDiscoveredResourcesPaginator { + if params == nil { + params = &ListAggregateDiscoveredResourcesInput{} + } + + options := ListAggregateDiscoveredResourcesPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAggregateDiscoveredResourcesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAggregateDiscoveredResourcesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListAggregateDiscoveredResources page. +func (p *ListAggregateDiscoveredResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAggregateDiscoveredResourcesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.ListAggregateDiscoveredResources(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_opListAggregateDiscoveredResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_ListDiscoveredResources.go b/service/configservice/api_op_ListDiscoveredResources.go index 309b7d4a42f..3d11c451fcf 100644 --- a/service/configservice/api_op_ListDiscoveredResources.go +++ b/service/configservice/api_op_ListDiscoveredResources.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -147,6 +148,92 @@ func addOperationListDiscoveredResourcesMiddlewares(stack *middleware.Stack, opt return nil } +// ListDiscoveredResourcesAPIClient is a client that implements the +// ListDiscoveredResources operation. +type ListDiscoveredResourcesAPIClient interface { + ListDiscoveredResources(context.Context, *ListDiscoveredResourcesInput, ...func(*Options)) (*ListDiscoveredResourcesOutput, error) +} + +var _ ListDiscoveredResourcesAPIClient = (*Client)(nil) + +// ListDiscoveredResourcesPaginatorOptions is the paginator options for +// ListDiscoveredResources +type ListDiscoveredResourcesPaginatorOptions struct { + // The maximum number of resource identifiers returned on each page. The default is + // 100. You cannot specify a number greater than 100. If you specify 0, AWS Config + // uses the default. + 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 +} + +// ListDiscoveredResourcesPaginator is a paginator for ListDiscoveredResources +type ListDiscoveredResourcesPaginator struct { + options ListDiscoveredResourcesPaginatorOptions + client ListDiscoveredResourcesAPIClient + params *ListDiscoveredResourcesInput + nextToken *string + firstPage bool +} + +// NewListDiscoveredResourcesPaginator returns a new +// ListDiscoveredResourcesPaginator +func NewListDiscoveredResourcesPaginator(client ListDiscoveredResourcesAPIClient, params *ListDiscoveredResourcesInput, optFns ...func(*ListDiscoveredResourcesPaginatorOptions)) *ListDiscoveredResourcesPaginator { + if params == nil { + params = &ListDiscoveredResourcesInput{} + } + + options := ListDiscoveredResourcesPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListDiscoveredResourcesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListDiscoveredResourcesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListDiscoveredResources page. +func (p *ListDiscoveredResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDiscoveredResourcesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.ListDiscoveredResources(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_opListDiscoveredResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_ListTagsForResource.go b/service/configservice/api_op_ListTagsForResource.go index d1331fbeb6e..4054471c58b 100644 --- a/service/configservice/api_op_ListTagsForResource.go +++ b/service/configservice/api_op_ListTagsForResource.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -122,6 +123,91 @@ func addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options return 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 returned on each page. The limit maximum is 50. You + // cannot specify a number greater than 50. If you specify 0, AWS Config uses the + // default. + 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.Limit != 0 { + options.Limit = params.Limit + } + + 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 + + params.Limit = p.options.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, diff --git a/service/configservice/api_op_SelectAggregateResourceConfig.go b/service/configservice/api_op_SelectAggregateResourceConfig.go index 96d6e44f26e..168b39cab52 100644 --- a/service/configservice/api_op_SelectAggregateResourceConfig.go +++ b/service/configservice/api_op_SelectAggregateResourceConfig.go @@ -148,8 +148,7 @@ var _ SelectAggregateResourceConfigAPIClient = (*Client)(nil) // SelectAggregateResourceConfigPaginatorOptions is the paginator options for // SelectAggregateResourceConfig type SelectAggregateResourceConfigPaginatorOptions struct { - // The maximum number of query results returned on each page. AWS Config also - // allows the Limit request parameter. + // The maximum number of query results returned on each page. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -175,8 +174,8 @@ func NewSelectAggregateResourceConfigPaginator(client SelectAggregateResourceCon } options := SelectAggregateResourceConfigPaginatorOptions{} - if params.MaxResults != 0 { - options.Limit = params.MaxResults + if params.Limit != 0 { + options.Limit = params.Limit } for _, fn := range optFns { @@ -205,7 +204,7 @@ func (p *SelectAggregateResourceConfigPaginator) NextPage(ctx context.Context, o params := *p.params params.NextToken = p.nextToken - params.MaxResults = p.options.Limit + params.Limit = p.options.Limit result, err := p.client.SelectAggregateResourceConfig(ctx, ¶ms, optFns...) if err != nil { diff --git a/service/configservice/api_op_SelectResourceConfig.go b/service/configservice/api_op_SelectResourceConfig.go index f2e8a860685..65dfba5aae1 100644 --- a/service/configservice/api_op_SelectResourceConfig.go +++ b/service/configservice/api_op_SelectResourceConfig.go @@ -4,6 +4,7 @@ package configservice 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/configservice/types" @@ -126,6 +127,89 @@ func addOperationSelectResourceConfigMiddlewares(stack *middleware.Stack, option return nil } +// SelectResourceConfigAPIClient is a client that implements the +// SelectResourceConfig operation. +type SelectResourceConfigAPIClient interface { + SelectResourceConfig(context.Context, *SelectResourceConfigInput, ...func(*Options)) (*SelectResourceConfigOutput, error) +} + +var _ SelectResourceConfigAPIClient = (*Client)(nil) + +// SelectResourceConfigPaginatorOptions is the paginator options for +// SelectResourceConfig +type SelectResourceConfigPaginatorOptions struct { + // The maximum number of query results returned on each 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 +} + +// SelectResourceConfigPaginator is a paginator for SelectResourceConfig +type SelectResourceConfigPaginator struct { + options SelectResourceConfigPaginatorOptions + client SelectResourceConfigAPIClient + params *SelectResourceConfigInput + nextToken *string + firstPage bool +} + +// NewSelectResourceConfigPaginator returns a new SelectResourceConfigPaginator +func NewSelectResourceConfigPaginator(client SelectResourceConfigAPIClient, params *SelectResourceConfigInput, optFns ...func(*SelectResourceConfigPaginatorOptions)) *SelectResourceConfigPaginator { + if params == nil { + params = &SelectResourceConfigInput{} + } + + options := SelectResourceConfigPaginatorOptions{} + if params.Limit != 0 { + options.Limit = params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &SelectResourceConfigPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *SelectResourceConfigPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next SelectResourceConfig page. +func (p *SelectResourceConfigPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SelectResourceConfigOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.Limit = p.options.Limit + + result, err := p.client.SelectResourceConfig(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_opSelectResourceConfig(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_CreateInstance.go b/service/connect/api_op_CreateInstance.go index 3e3c3857c02..f75084ddc68 100644 --- a/service/connect/api_op_CreateInstance.go +++ b/service/connect/api_op_CreateInstance.go @@ -15,7 +15,11 @@ import ( // Initiates an Amazon Connect instance with all the supported channels enabled. It // does not attach any storage, such as Amazon Simple Storage Service (Amazon S3) // or Amazon Kinesis. It also does not allow for any configurations on features, -// such as Contact Lens for Amazon Connect. +// such as Contact Lens for Amazon Connect. Amazon Connect enforces a limit on the +// total number of instances that you can create or delete in 30 days. If you +// exceed this limit, you will get an error message indicating there has been an +// excessive number of attempts at creating or deleting instances. You must wait 30 +// days before you can restart creating and deleting instances in your account. func (c *Client) CreateInstance(ctx context.Context, params *CreateInstanceInput, optFns ...func(*Options)) (*CreateInstanceOutput, error) { if params == nil { params = &CreateInstanceInput{} diff --git a/service/connect/api_op_CreateIntegrationAssociation.go b/service/connect/api_op_CreateIntegrationAssociation.go index afe93e97ecd..345647b4bd6 100644 --- a/service/connect/api_op_CreateIntegrationAssociation.go +++ b/service/connect/api_op_CreateIntegrationAssociation.go @@ -11,7 +11,6 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This API is in preview release for Amazon Connect and is subject to change. // Create an AppIntegration association with an Amazon Connect instance. func (c *Client) CreateIntegrationAssociation(ctx context.Context, params *CreateIntegrationAssociationInput, optFns ...func(*Options)) (*CreateIntegrationAssociationOutput, error) { if params == nil { @@ -59,6 +58,9 @@ type CreateIntegrationAssociationInput struct { // // This member is required. SourceType types.SourceType + + // One or more tags. + Tags map[string]string } type CreateIntegrationAssociationOutput struct { diff --git a/service/connect/api_op_CreateUseCase.go b/service/connect/api_op_CreateUseCase.go index c622b722eb0..429003ec4a9 100644 --- a/service/connect/api_op_CreateUseCase.go +++ b/service/connect/api_op_CreateUseCase.go @@ -11,7 +11,6 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This API is in preview release for Amazon Connect and is subject to change. // Creates a use case for an AppIntegration association. func (c *Client) CreateUseCase(ctx context.Context, params *CreateUseCaseInput, optFns ...func(*Options)) (*CreateUseCaseOutput, error) { if params == nil { @@ -45,6 +44,9 @@ type CreateUseCaseInput struct { // // This member is required. UseCaseType types.UseCaseType + + // One or more tags. + Tags map[string]string } type CreateUseCaseOutput struct { diff --git a/service/connect/api_op_DeleteInstance.go b/service/connect/api_op_DeleteInstance.go index 5e7db897c3a..94806e0193c 100644 --- a/service/connect/api_op_DeleteInstance.go +++ b/service/connect/api_op_DeleteInstance.go @@ -11,7 +11,11 @@ import ( ) // This API is in preview release for Amazon Connect and is subject to change. -// Deletes the Amazon Connect instance. +// Deletes the Amazon Connect instance. Amazon Connect enforces a limit on the +// total number of instances that you can create or delete in 30 days. If you +// exceed this limit, you will get an error message indicating there has been an +// excessive number of attempts at creating or deleting instances. You must wait 30 +// days before you can restart creating and deleting instances in your account. func (c *Client) DeleteInstance(ctx context.Context, params *DeleteInstanceInput, optFns ...func(*Options)) (*DeleteInstanceOutput, error) { if params == nil { params = &DeleteInstanceInput{} diff --git a/service/connect/api_op_DeleteIntegrationAssociation.go b/service/connect/api_op_DeleteIntegrationAssociation.go index 79ab27c3875..fdd7f6fccfd 100644 --- a/service/connect/api_op_DeleteIntegrationAssociation.go +++ b/service/connect/api_op_DeleteIntegrationAssociation.go @@ -10,7 +10,6 @@ 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 AppIntegration association from an Amazon Connect instance. The // association must not have any use cases associated with it. func (c *Client) DeleteIntegrationAssociation(ctx context.Context, params *DeleteIntegrationAssociationInput, optFns ...func(*Options)) (*DeleteIntegrationAssociationOutput, error) { diff --git a/service/connect/api_op_DeleteUseCase.go b/service/connect/api_op_DeleteUseCase.go index 03f8b1f177e..c5b1ebeb5ef 100644 --- a/service/connect/api_op_DeleteUseCase.go +++ b/service/connect/api_op_DeleteUseCase.go @@ -10,7 +10,6 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This API is in preview release for Amazon Connect and is subject to change. // Deletes a use case from an AppIntegration association. func (c *Client) DeleteUseCase(ctx context.Context, params *DeleteUseCaseInput, optFns ...func(*Options)) (*DeleteUseCaseOutput, error) { if params == nil { diff --git a/service/connect/api_op_GetFederationToken.go b/service/connect/api_op_GetFederationToken.go index 2650ac6acd5..672f89dc059 100644 --- a/service/connect/api_op_GetFederationToken.go +++ b/service/connect/api_op_GetFederationToken.go @@ -11,7 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves a token for federation. +// Retrieves a token for federation. This API doesn't support root users. If you +// try to invoke GetFederationToken with root credentials, an error message similar +// to the following one appears: Provided identity: Principal: .... User: .... +// cannot be used for federation with Amazon Connect func (c *Client) GetFederationToken(ctx context.Context, params *GetFederationTokenInput, optFns ...func(*Options)) (*GetFederationTokenOutput, error) { if params == nil { params = &GetFederationTokenInput{} diff --git a/service/connect/api_op_GetMetricData.go b/service/connect/api_op_GetMetricData.go index 93d532cea85..a601f15c62f 100644 --- a/service/connect/api_op_GetMetricData.go +++ b/service/connect/api_op_GetMetricData.go @@ -46,7 +46,8 @@ type GetMetricDataInput struct { // The queues, up to 100, or channels, to use to filter the metrics returned. // Metric data is retrieved only for the resources associated with the queues or // channels included in the filter. You can include both queue IDs and queue ARNs - // in the same request. VOICE, CHAT, and TASK channels are supported. + // in the same request. VOICE, CHAT, and TASK channels are supported. To filter by + // Queues, enter the queue ID/ARN, not the name of the queue. // // This member is required. Filters *types.Filters @@ -72,9 +73,10 @@ type GetMetricDataInput struct { // INTERACTION_AND_HOLD_TIME Unit: SECONDS Statistic: AVG INTERACTION_TIME Unit: // SECONDS Statistic: AVG OCCUPANCY Unit: PERCENT Statistic: AVG QUEUE_ANSWER_TIME // Unit: SECONDS Statistic: AVG QUEUED_TIME Unit: SECONDS Statistic: MAX - // SERVICE_LEVEL Unit: PERCENT Statistic: AVG Threshold: Only "Less than" - // comparisons are supported, with the following service level thresholds: 15, 20, - // 25, 30, 45, 60, 90, 120, 180, 240, 300, 600 + // SERVICE_LEVEL You can include up to 20 SERVICE_LEVEL metrics in a request. Unit: + // PERCENT Statistic: AVG Threshold: For ThresholdValue, enter any whole number + // from 1 to 604800 (inclusive), in seconds. For Comparison, you must enter LT (for + // "Less than"). // // This member is required. HistoricalMetrics []types.HistoricalMetric @@ -95,9 +97,8 @@ type GetMetricDataInput struct { // The grouping applied to the metrics returned. For example, when results are // grouped by queue, the metrics returned are grouped by queue. The values returned - // apply to the metrics for each queue rather than aggregated for all queues. The - // only supported grouping is QUEUE. If no grouping is specified, a summary of - // metrics for all queues is returned. + // apply to the metrics for each queue rather than aggregated for all queues. If no + // grouping is specified, a summary of metrics for all queues is returned. Groupings []types.Grouping // The maximum number of results to return per page. diff --git a/service/connect/api_op_ListIntegrationAssociations.go b/service/connect/api_op_ListIntegrationAssociations.go index 9154dbe8ec2..93a1c471b41 100644 --- a/service/connect/api_op_ListIntegrationAssociations.go +++ b/service/connect/api_op_ListIntegrationAssociations.go @@ -12,7 +12,6 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This API is in preview release for Amazon Connect and is subject to change. // Provides summary information about the AppIntegration associations for the // specified Amazon Connect instance. func (c *Client) ListIntegrationAssociations(ctx context.Context, params *ListIntegrationAssociationsInput, optFns ...func(*Options)) (*ListIntegrationAssociationsOutput, error) { diff --git a/service/connect/api_op_ListQueues.go b/service/connect/api_op_ListQueues.go index 0036d002dcf..885d0f5c8d4 100644 --- a/service/connect/api_op_ListQueues.go +++ b/service/connect/api_op_ListQueues.go @@ -13,6 +13,9 @@ import ( ) // Provides information about the queues for the specified Amazon Connect instance. +// If you do not specify a QueueTypes parameter, both standard and agent queues are +// returned. This might cause an unexpected truncation of results if you have more +// than 1000 agents and you limit the number of results of the API call in code. // For more information about queues, see Queues: Standard and Agent // (https://docs.aws.amazon.com/connect/latest/adminguide/concepts-queues-standard-and-agent.html) // in the Amazon Connect Administrator Guide. diff --git a/service/connect/api_op_ListUseCases.go b/service/connect/api_op_ListUseCases.go index 8a85adf3bfe..e257c1b994d 100644 --- a/service/connect/api_op_ListUseCases.go +++ b/service/connect/api_op_ListUseCases.go @@ -12,7 +12,6 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// This API is in preview release for Amazon Connect and is subject to change. // Lists the use cases. func (c *Client) ListUseCases(ctx context.Context, params *ListUseCasesInput, optFns ...func(*Options)) (*ListUseCasesOutput, error) { if params == nil { diff --git a/service/connect/api_op_StartChatContact.go b/service/connect/api_op_StartChatContact.go index 1eb2a47e6f7..64a44fe5f2c 100644 --- a/service/connect/api_op_StartChatContact.go +++ b/service/connect/api_op_StartChatContact.go @@ -25,10 +25,9 @@ import ( // situations: // // * API rate limit is exceeded. API TPS throttling returns a -// TooManyRequests exception from the API Gateway. +// TooManyRequests exception. // -// * The quota for concurrent -// active chats +// * The quota for concurrent active chats // (https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html) // is exceeded. Active chat throttling returns a LimitExceededException. // diff --git a/service/connect/api_op_UpdateContactAttributes.go b/service/connect/api_op_UpdateContactAttributes.go index 6558c19086d..d80985af973 100644 --- a/service/connect/api_op_UpdateContactAttributes.go +++ b/service/connect/api_op_UpdateContactAttributes.go @@ -10,22 +10,25 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates or updates the contact attributes associated with the specified contact. -// You can add or update attributes for both ongoing and completed contacts. For -// example, while the call is active, you can update the customer's name or the -// reason the customer called. You can add notes about steps that the agent took -// during the call that display to the next agent that takes the call. You can also -// update attributes for a contact using data from your CRM application and save -// the data with the contact in Amazon Connect. You could also flag calls for -// additional analysis, such as legal review or to identify abusive callers. -// Contact attributes are available in Amazon Connect for 24 months, and are then -// deleted. Important: You cannot use the operation to update attributes for -// contacts that occurred prior to the release of the API, which was September 12, -// 2018. You can update attributes only for contacts that started after the release -// of the API. If you attempt to update attributes for a contact that occurred -// prior to the release of the API, a 400 error is returned. This applies also to -// queued callbacks that were initiated prior to the release of the API but are -// still active in your instance. +// Creates or updates user-defined contact attributes associated with the specified +// contact. You can create or update user-defined attributes for both ongoing and +// completed contacts. For example, while the call is active, you can update the +// customer's name or the reason the customer called. You can add notes about steps +// that the agent took during the call that display to the next agent that takes +// the call. You can also update attributes for a contact using data from your CRM +// application and save the data with the contact in Amazon Connect. You could also +// flag calls for additional analysis, such as legal review or to identify abusive +// callers. Contact attributes are available in Amazon Connect for 24 months, and +// are then deleted. For information about CTR retention and the maximum size of +// the CTR attributes section, see Feature specifications +// (https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html#feature-limits) +// in the Amazon Connect Administrator Guide. Important: You cannot use the +// operation to update attributes for contacts that occurred prior to the release +// of the API, which was September 12, 2018. You can update attributes only for +// contacts that started after the release of the API. If you attempt to update +// attributes for a contact that occurred prior to the release of the API, a 400 +// error is returned. This applies also to queued callbacks that were initiated +// prior to the release of the API but are still active in your instance. func (c *Client) UpdateContactAttributes(ctx context.Context, params *UpdateContactAttributesInput, optFns ...func(*Options)) (*UpdateContactAttributesOutput, error) { if params == nil { params = &UpdateContactAttributesInput{} diff --git a/service/connect/serializers.go b/service/connect/serializers.go index 8906ad61884..ff76b71fd95 100644 --- a/service/connect/serializers.go +++ b/service/connect/serializers.go @@ -907,6 +907,13 @@ func awsRestjson1_serializeOpDocumentCreateIntegrationAssociationInput(v *Create ok.String(string(v.SourceType)) } + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + return nil } @@ -1321,6 +1328,13 @@ func awsRestjson1_serializeOpDocumentCreateUseCaseInput(v *CreateUseCaseInput, v 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 + } + } + if len(v.UseCaseType) > 0 { ok := object.Key("UseCaseType") ok.String(string(v.UseCaseType)) diff --git a/service/connect/types/types.go b/service/connect/types/types.go index f9d1d1dd951..87a6cd2904e 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -555,7 +555,10 @@ type MediaConcurrency struct { // This member is required. Channel Channel - // The number of contacts an agent can have on a channel simultaneously. + // The number of contacts an agent can have on a channel simultaneously. Valid + // Range for VOICE: Minimum value of 1. Maximum value of 1. Valid Range for CHAT: + // Minimum value of 1. Maximum value of 5. Valid Range for TASK: Minimum value of + // 1. Maximum value of 10. // // This member is required. Concurrency int32 diff --git a/service/ec2/api_op_DescribeReservedInstances.go b/service/ec2/api_op_DescribeReservedInstances.go index 7515c9003bc..8b1d8bb77d1 100644 --- a/service/ec2/api_op_DescribeReservedInstances.go +++ b/service/ec2/api_op_DescribeReservedInstances.go @@ -65,33 +65,33 @@ type DescribeReservedInstancesInput struct { // platform description will only be displayed to EC2-Classic account holders and // are for use with Amazon VPC (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | // SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux - // (Amazon VPC) | Red Hat Enterprise Linux with HA (Amazon VPC) | Windows | Windows - // (Amazon VPC) | Windows with SQL Server Standard | Windows with SQL Server - // Standard (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server - // Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server - // Enterprise (Amazon VPC)). + // (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server Standard + // | Windows with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | + // Windows with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | + // Windows with SQL Server Enterprise (Amazon VPC)). // - // * reserved-instances-id - The ID of the Reserved - // Instance. + // * reserved-instances-id - The + // ID of the Reserved Instance. // - // * start - The time at which the Reserved Instance purchase request - // was placed (for example, 2014-08-07T11:54:42.000Z). + // * start - The time at which the Reserved Instance + // purchase request was placed (for example, 2014-08-07T11:54:42.000Z). // - // * state - The state of the - // Reserved Instance (payment-pending | active | payment-failed | retired). + // * state - + // The state of the Reserved Instance (payment-pending | active | payment-failed | + // retired). // - // * 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: - 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. + // * + // 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. // - // * usage-price - // - The usage price of the Reserved Instance, per hour (for example, 0.84). + // * + // usage-price - The usage price of the Reserved Instance, per hour (for example, + // 0.84). Filters []types.Filter // Describes whether the Reserved Instance is Standard or Convertible. diff --git a/service/ec2/api_op_DescribeReservedInstancesOfferings.go b/service/ec2/api_op_DescribeReservedInstancesOfferings.go index 58a983ca0a8..60712062a1b 100644 --- a/service/ec2/api_op_DescribeReservedInstancesOfferings.go +++ b/service/ec2/api_op_DescribeReservedInstancesOfferings.go @@ -74,20 +74,19 @@ type DescribeReservedInstancesOfferingsInput struct { // description will only be displayed to EC2-Classic account holders and are for // use with Amazon VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE // Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon - // VPC) | Red Hat Enterprise Linux with HA (Amazon VPC) | Windows | Windows (Amazon - // VPC) | Windows with SQL Server Standard | Windows with SQL Server Standard - // (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server Web - // (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server - // Enterprise (Amazon VPC)) + // VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | + // Windows with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | + // Windows with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | + // Windows with SQL Server Enterprise (Amazon VPC)) // - // * reserved-instances-offering-id - The Reserved - // Instances offering ID. + // * + // reserved-instances-offering-id - The Reserved Instances offering ID. // - // * scope - The scope of the Reserved Instance - // (Availability Zone or Region). + // * scope - + // The scope of the Reserved Instance (Availability Zone or Region). // - // * usage-price - The usage price of the Reserved - // Instance, per hour (for example, 0.84). + // * usage-price + // - The usage price of the Reserved Instance, per hour (for example, 0.84). Filters []types.Filter // Include Reserved Instance Marketplace offerings in the response. diff --git a/service/ec2/types/enums.go b/service/ec2/types/enums.go index d10e218a39b..665ad896f1f 100644 --- a/service/ec2/types/enums.go +++ b/service/ec2/types/enums.go @@ -2084,404 +2084,408 @@ type InstanceType string // Enum values for InstanceType const ( - InstanceTypeT1Micro InstanceType = "t1.micro" - InstanceTypeT2Nano InstanceType = "t2.nano" - InstanceTypeT2Micro InstanceType = "t2.micro" - InstanceTypeT2Small InstanceType = "t2.small" - InstanceTypeT2Medium InstanceType = "t2.medium" - InstanceTypeT2Large InstanceType = "t2.large" - InstanceTypeT2Xlarge InstanceType = "t2.xlarge" - InstanceTypeT22xlarge InstanceType = "t2.2xlarge" - InstanceTypeT3Nano InstanceType = "t3.nano" - InstanceTypeT3Micro InstanceType = "t3.micro" - InstanceTypeT3Small InstanceType = "t3.small" - InstanceTypeT3Medium InstanceType = "t3.medium" - InstanceTypeT3Large InstanceType = "t3.large" - InstanceTypeT3Xlarge InstanceType = "t3.xlarge" - InstanceTypeT32xlarge InstanceType = "t3.2xlarge" - InstanceTypeT3aNano InstanceType = "t3a.nano" - InstanceTypeT3aMicro InstanceType = "t3a.micro" - InstanceTypeT3aSmall InstanceType = "t3a.small" - InstanceTypeT3aMedium InstanceType = "t3a.medium" - InstanceTypeT3aLarge InstanceType = "t3a.large" - InstanceTypeT3aXlarge InstanceType = "t3a.xlarge" - InstanceTypeT3a2xlarge InstanceType = "t3a.2xlarge" - InstanceTypeT4gNano InstanceType = "t4g.nano" - InstanceTypeT4gMicro InstanceType = "t4g.micro" - InstanceTypeT4gSmall InstanceType = "t4g.small" - InstanceTypeT4gMedium InstanceType = "t4g.medium" - InstanceTypeT4gLarge InstanceType = "t4g.large" - InstanceTypeT4gXlarge InstanceType = "t4g.xlarge" - InstanceTypeT4g2xlarge InstanceType = "t4g.2xlarge" - InstanceTypeM1Small InstanceType = "m1.small" - InstanceTypeM1Medium InstanceType = "m1.medium" - InstanceTypeM1Large InstanceType = "m1.large" - InstanceTypeM1Xlarge InstanceType = "m1.xlarge" - InstanceTypeM3Medium InstanceType = "m3.medium" - InstanceTypeM3Large InstanceType = "m3.large" - InstanceTypeM3Xlarge InstanceType = "m3.xlarge" - InstanceTypeM32xlarge InstanceType = "m3.2xlarge" - InstanceTypeM4Large InstanceType = "m4.large" - InstanceTypeM4Xlarge InstanceType = "m4.xlarge" - InstanceTypeM42xlarge InstanceType = "m4.2xlarge" - InstanceTypeM44xlarge InstanceType = "m4.4xlarge" - InstanceTypeM410xlarge InstanceType = "m4.10xlarge" - InstanceTypeM416xlarge InstanceType = "m4.16xlarge" - InstanceTypeM2Xlarge InstanceType = "m2.xlarge" - InstanceTypeM22xlarge InstanceType = "m2.2xlarge" - InstanceTypeM24xlarge InstanceType = "m2.4xlarge" - InstanceTypeCr18xlarge InstanceType = "cr1.8xlarge" - InstanceTypeR3Large InstanceType = "r3.large" - InstanceTypeR3Xlarge InstanceType = "r3.xlarge" - InstanceTypeR32xlarge InstanceType = "r3.2xlarge" - InstanceTypeR34xlarge InstanceType = "r3.4xlarge" - InstanceTypeR38xlarge InstanceType = "r3.8xlarge" - InstanceTypeR4Large InstanceType = "r4.large" - InstanceTypeR4Xlarge InstanceType = "r4.xlarge" - InstanceTypeR42xlarge InstanceType = "r4.2xlarge" - InstanceTypeR44xlarge InstanceType = "r4.4xlarge" - InstanceTypeR48xlarge InstanceType = "r4.8xlarge" - InstanceTypeR416xlarge InstanceType = "r4.16xlarge" - InstanceTypeR5Large InstanceType = "r5.large" - InstanceTypeR5Xlarge InstanceType = "r5.xlarge" - InstanceTypeR52xlarge InstanceType = "r5.2xlarge" - InstanceTypeR54xlarge InstanceType = "r5.4xlarge" - InstanceTypeR58xlarge InstanceType = "r5.8xlarge" - InstanceTypeR512xlarge InstanceType = "r5.12xlarge" - InstanceTypeR516xlarge InstanceType = "r5.16xlarge" - InstanceTypeR524xlarge InstanceType = "r5.24xlarge" - InstanceTypeR5Metal InstanceType = "r5.metal" - InstanceTypeR5aLarge InstanceType = "r5a.large" - InstanceTypeR5aXlarge InstanceType = "r5a.xlarge" - InstanceTypeR5a2xlarge InstanceType = "r5a.2xlarge" - InstanceTypeR5a4xlarge InstanceType = "r5a.4xlarge" - InstanceTypeR5a8xlarge InstanceType = "r5a.8xlarge" - InstanceTypeR5a12xlarge InstanceType = "r5a.12xlarge" - InstanceTypeR5a16xlarge InstanceType = "r5a.16xlarge" - InstanceTypeR5a24xlarge InstanceType = "r5a.24xlarge" - InstanceTypeR5bLarge InstanceType = "r5b.large" - InstanceTypeR5bXlarge InstanceType = "r5b.xlarge" - InstanceTypeR5b2xlarge InstanceType = "r5b.2xlarge" - InstanceTypeR5b4xlarge InstanceType = "r5b.4xlarge" - InstanceTypeR5b8xlarge InstanceType = "r5b.8xlarge" - InstanceTypeR5b12xlarge InstanceType = "r5b.12xlarge" - InstanceTypeR5b16xlarge InstanceType = "r5b.16xlarge" - InstanceTypeR5b24xlarge InstanceType = "r5b.24xlarge" - InstanceTypeR5bMetal InstanceType = "r5b.metal" - InstanceTypeR5dLarge InstanceType = "r5d.large" - InstanceTypeR5dXlarge InstanceType = "r5d.xlarge" - InstanceTypeR5d2xlarge InstanceType = "r5d.2xlarge" - InstanceTypeR5d4xlarge InstanceType = "r5d.4xlarge" - InstanceTypeR5d8xlarge InstanceType = "r5d.8xlarge" - InstanceTypeR5d12xlarge InstanceType = "r5d.12xlarge" - InstanceTypeR5d16xlarge InstanceType = "r5d.16xlarge" - InstanceTypeR5d24xlarge InstanceType = "r5d.24xlarge" - InstanceTypeR5dMetal InstanceType = "r5d.metal" - InstanceTypeR5adLarge InstanceType = "r5ad.large" - InstanceTypeR5adXlarge InstanceType = "r5ad.xlarge" - InstanceTypeR5ad2xlarge InstanceType = "r5ad.2xlarge" - InstanceTypeR5ad4xlarge InstanceType = "r5ad.4xlarge" - InstanceTypeR5ad8xlarge InstanceType = "r5ad.8xlarge" - InstanceTypeR5ad12xlarge InstanceType = "r5ad.12xlarge" - InstanceTypeR5ad16xlarge InstanceType = "r5ad.16xlarge" - InstanceTypeR5ad24xlarge InstanceType = "r5ad.24xlarge" - InstanceTypeR6gMetal InstanceType = "r6g.metal" - InstanceTypeR6gMedium InstanceType = "r6g.medium" - InstanceTypeR6gLarge InstanceType = "r6g.large" - InstanceTypeR6gXlarge InstanceType = "r6g.xlarge" - InstanceTypeR6g2xlarge InstanceType = "r6g.2xlarge" - InstanceTypeR6g4xlarge InstanceType = "r6g.4xlarge" - InstanceTypeR6g8xlarge InstanceType = "r6g.8xlarge" - InstanceTypeR6g12xlarge InstanceType = "r6g.12xlarge" - InstanceTypeR6g16xlarge InstanceType = "r6g.16xlarge" - InstanceTypeR6gdMetal InstanceType = "r6gd.metal" - InstanceTypeR6gdMedium InstanceType = "r6gd.medium" - InstanceTypeR6gdLarge InstanceType = "r6gd.large" - InstanceTypeR6gdXlarge InstanceType = "r6gd.xlarge" - InstanceTypeR6gd2xlarge InstanceType = "r6gd.2xlarge" - InstanceTypeR6gd4xlarge InstanceType = "r6gd.4xlarge" - InstanceTypeR6gd8xlarge InstanceType = "r6gd.8xlarge" - InstanceTypeR6gd12xlarge InstanceType = "r6gd.12xlarge" - InstanceTypeR6gd16xlarge InstanceType = "r6gd.16xlarge" - InstanceTypeX116xlarge InstanceType = "x1.16xlarge" - InstanceTypeX132xlarge InstanceType = "x1.32xlarge" - InstanceTypeX1eXlarge InstanceType = "x1e.xlarge" - InstanceTypeX1e2xlarge InstanceType = "x1e.2xlarge" - InstanceTypeX1e4xlarge InstanceType = "x1e.4xlarge" - InstanceTypeX1e8xlarge InstanceType = "x1e.8xlarge" - InstanceTypeX1e16xlarge InstanceType = "x1e.16xlarge" - InstanceTypeX1e32xlarge InstanceType = "x1e.32xlarge" - InstanceTypeI2Xlarge InstanceType = "i2.xlarge" - InstanceTypeI22xlarge InstanceType = "i2.2xlarge" - InstanceTypeI24xlarge InstanceType = "i2.4xlarge" - InstanceTypeI28xlarge InstanceType = "i2.8xlarge" - InstanceTypeI3Large InstanceType = "i3.large" - InstanceTypeI3Xlarge InstanceType = "i3.xlarge" - InstanceTypeI32xlarge InstanceType = "i3.2xlarge" - InstanceTypeI34xlarge InstanceType = "i3.4xlarge" - InstanceTypeI38xlarge InstanceType = "i3.8xlarge" - InstanceTypeI316xlarge InstanceType = "i3.16xlarge" - InstanceTypeI3Metal InstanceType = "i3.metal" - InstanceTypeI3enLarge InstanceType = "i3en.large" - InstanceTypeI3enXlarge InstanceType = "i3en.xlarge" - InstanceTypeI3en2xlarge InstanceType = "i3en.2xlarge" - InstanceTypeI3en3xlarge InstanceType = "i3en.3xlarge" - InstanceTypeI3en6xlarge InstanceType = "i3en.6xlarge" - InstanceTypeI3en12xlarge InstanceType = "i3en.12xlarge" - InstanceTypeI3en24xlarge InstanceType = "i3en.24xlarge" - InstanceTypeI3enMetal InstanceType = "i3en.metal" - InstanceTypeHi14xlarge InstanceType = "hi1.4xlarge" - InstanceTypeHs18xlarge InstanceType = "hs1.8xlarge" - InstanceTypeC1Medium InstanceType = "c1.medium" - InstanceTypeC1Xlarge InstanceType = "c1.xlarge" - InstanceTypeC3Large InstanceType = "c3.large" - InstanceTypeC3Xlarge InstanceType = "c3.xlarge" - InstanceTypeC32xlarge InstanceType = "c3.2xlarge" - InstanceTypeC34xlarge InstanceType = "c3.4xlarge" - InstanceTypeC38xlarge InstanceType = "c3.8xlarge" - InstanceTypeC4Large InstanceType = "c4.large" - InstanceTypeC4Xlarge InstanceType = "c4.xlarge" - InstanceTypeC42xlarge InstanceType = "c4.2xlarge" - InstanceTypeC44xlarge InstanceType = "c4.4xlarge" - InstanceTypeC48xlarge InstanceType = "c4.8xlarge" - InstanceTypeC5Large InstanceType = "c5.large" - InstanceTypeC5Xlarge InstanceType = "c5.xlarge" - InstanceTypeC52xlarge InstanceType = "c5.2xlarge" - InstanceTypeC54xlarge InstanceType = "c5.4xlarge" - InstanceTypeC59xlarge InstanceType = "c5.9xlarge" - InstanceTypeC512xlarge InstanceType = "c5.12xlarge" - InstanceTypeC518xlarge InstanceType = "c5.18xlarge" - InstanceTypeC524xlarge InstanceType = "c5.24xlarge" - InstanceTypeC5Metal InstanceType = "c5.metal" - InstanceTypeC5aLarge InstanceType = "c5a.large" - InstanceTypeC5aXlarge InstanceType = "c5a.xlarge" - InstanceTypeC5a2xlarge InstanceType = "c5a.2xlarge" - InstanceTypeC5a4xlarge InstanceType = "c5a.4xlarge" - InstanceTypeC5a8xlarge InstanceType = "c5a.8xlarge" - InstanceTypeC5a12xlarge InstanceType = "c5a.12xlarge" - InstanceTypeC5a16xlarge InstanceType = "c5a.16xlarge" - InstanceTypeC5a24xlarge InstanceType = "c5a.24xlarge" - InstanceTypeC5adLarge InstanceType = "c5ad.large" - InstanceTypeC5adXlarge InstanceType = "c5ad.xlarge" - InstanceTypeC5ad2xlarge InstanceType = "c5ad.2xlarge" - InstanceTypeC5ad4xlarge InstanceType = "c5ad.4xlarge" - InstanceTypeC5ad8xlarge InstanceType = "c5ad.8xlarge" - InstanceTypeC5ad12xlarge InstanceType = "c5ad.12xlarge" - InstanceTypeC5ad16xlarge InstanceType = "c5ad.16xlarge" - InstanceTypeC5ad24xlarge InstanceType = "c5ad.24xlarge" - InstanceTypeC5dLarge InstanceType = "c5d.large" - InstanceTypeC5dXlarge InstanceType = "c5d.xlarge" - InstanceTypeC5d2xlarge InstanceType = "c5d.2xlarge" - InstanceTypeC5d4xlarge InstanceType = "c5d.4xlarge" - InstanceTypeC5d9xlarge InstanceType = "c5d.9xlarge" - InstanceTypeC5d12xlarge InstanceType = "c5d.12xlarge" - InstanceTypeC5d18xlarge InstanceType = "c5d.18xlarge" - InstanceTypeC5d24xlarge InstanceType = "c5d.24xlarge" - InstanceTypeC5dMetal InstanceType = "c5d.metal" - InstanceTypeC5nLarge InstanceType = "c5n.large" - InstanceTypeC5nXlarge InstanceType = "c5n.xlarge" - InstanceTypeC5n2xlarge InstanceType = "c5n.2xlarge" - InstanceTypeC5n4xlarge InstanceType = "c5n.4xlarge" - InstanceTypeC5n9xlarge InstanceType = "c5n.9xlarge" - InstanceTypeC5n18xlarge InstanceType = "c5n.18xlarge" - InstanceTypeC5nMetal InstanceType = "c5n.metal" - InstanceTypeC6gMetal InstanceType = "c6g.metal" - InstanceTypeC6gMedium InstanceType = "c6g.medium" - InstanceTypeC6gLarge InstanceType = "c6g.large" - InstanceTypeC6gXlarge InstanceType = "c6g.xlarge" - InstanceTypeC6g2xlarge InstanceType = "c6g.2xlarge" - InstanceTypeC6g4xlarge InstanceType = "c6g.4xlarge" - InstanceTypeC6g8xlarge InstanceType = "c6g.8xlarge" - InstanceTypeC6g12xlarge InstanceType = "c6g.12xlarge" - InstanceTypeC6g16xlarge InstanceType = "c6g.16xlarge" - InstanceTypeC6gdMetal InstanceType = "c6gd.metal" - InstanceTypeC6gdMedium InstanceType = "c6gd.medium" - InstanceTypeC6gdLarge InstanceType = "c6gd.large" - InstanceTypeC6gdXlarge InstanceType = "c6gd.xlarge" - InstanceTypeC6gd2xlarge InstanceType = "c6gd.2xlarge" - InstanceTypeC6gd4xlarge InstanceType = "c6gd.4xlarge" - InstanceTypeC6gd8xlarge InstanceType = "c6gd.8xlarge" - InstanceTypeC6gd12xlarge InstanceType = "c6gd.12xlarge" - InstanceTypeC6gd16xlarge InstanceType = "c6gd.16xlarge" - InstanceTypeC6gnMedium InstanceType = "c6gn.medium" - InstanceTypeC6gnLarge InstanceType = "c6gn.large" - InstanceTypeC6gnXlarge InstanceType = "c6gn.xlarge" - InstanceTypeC6gn2xlarge InstanceType = "c6gn.2xlarge" - InstanceTypeC6gn4xlarge InstanceType = "c6gn.4xlarge" - InstanceTypeC6gn8xlarge InstanceType = "c6gn.8xlarge" - InstanceTypeC6gn12xlarge InstanceType = "c6gn.12xlarge" - InstanceTypeC6gn16xlarge InstanceType = "c6gn.16xlarge" - InstanceTypeCc14xlarge InstanceType = "cc1.4xlarge" - InstanceTypeCc28xlarge InstanceType = "cc2.8xlarge" - InstanceTypeG22xlarge InstanceType = "g2.2xlarge" - InstanceTypeG28xlarge InstanceType = "g2.8xlarge" - InstanceTypeG34xlarge InstanceType = "g3.4xlarge" - InstanceTypeG38xlarge InstanceType = "g3.8xlarge" - InstanceTypeG316xlarge InstanceType = "g3.16xlarge" - InstanceTypeG3sXlarge InstanceType = "g3s.xlarge" - InstanceTypeG4ad4xlarge InstanceType = "g4ad.4xlarge" - InstanceTypeG4ad8xlarge InstanceType = "g4ad.8xlarge" - InstanceTypeG4ad16xlarge InstanceType = "g4ad.16xlarge" - InstanceTypeG4dnXlarge InstanceType = "g4dn.xlarge" - InstanceTypeG4dn2xlarge InstanceType = "g4dn.2xlarge" - InstanceTypeG4dn4xlarge InstanceType = "g4dn.4xlarge" - InstanceTypeG4dn8xlarge InstanceType = "g4dn.8xlarge" - InstanceTypeG4dn12xlarge InstanceType = "g4dn.12xlarge" - InstanceTypeG4dn16xlarge InstanceType = "g4dn.16xlarge" - InstanceTypeG4dnMetal InstanceType = "g4dn.metal" - InstanceTypeCg14xlarge InstanceType = "cg1.4xlarge" - InstanceTypeP2Xlarge InstanceType = "p2.xlarge" - InstanceTypeP28xlarge InstanceType = "p2.8xlarge" - InstanceTypeP216xlarge InstanceType = "p2.16xlarge" - InstanceTypeP32xlarge InstanceType = "p3.2xlarge" - InstanceTypeP38xlarge InstanceType = "p3.8xlarge" - InstanceTypeP316xlarge InstanceType = "p3.16xlarge" - InstanceTypeP3dn24xlarge InstanceType = "p3dn.24xlarge" - InstanceTypeP4d24xlarge InstanceType = "p4d.24xlarge" - InstanceTypeD2Xlarge InstanceType = "d2.xlarge" - InstanceTypeD22xlarge InstanceType = "d2.2xlarge" - InstanceTypeD24xlarge InstanceType = "d2.4xlarge" - InstanceTypeD28xlarge InstanceType = "d2.8xlarge" - InstanceTypeD3Xlarge InstanceType = "d3.xlarge" - InstanceTypeD32xlarge InstanceType = "d3.2xlarge" - InstanceTypeD34xlarge InstanceType = "d3.4xlarge" - InstanceTypeD38xlarge InstanceType = "d3.8xlarge" - InstanceTypeD3enXlarge InstanceType = "d3en.xlarge" - InstanceTypeD3en2xlarge InstanceType = "d3en.2xlarge" - InstanceTypeD3en4xlarge InstanceType = "d3en.4xlarge" - InstanceTypeD3en6xlarge InstanceType = "d3en.6xlarge" - InstanceTypeD3en8xlarge InstanceType = "d3en.8xlarge" - InstanceTypeD3en12xlarge InstanceType = "d3en.12xlarge" - InstanceTypeF12xlarge InstanceType = "f1.2xlarge" - InstanceTypeF14xlarge InstanceType = "f1.4xlarge" - InstanceTypeF116xlarge InstanceType = "f1.16xlarge" - InstanceTypeM5Large InstanceType = "m5.large" - InstanceTypeM5Xlarge InstanceType = "m5.xlarge" - InstanceTypeM52xlarge InstanceType = "m5.2xlarge" - InstanceTypeM54xlarge InstanceType = "m5.4xlarge" - InstanceTypeM58xlarge InstanceType = "m5.8xlarge" - InstanceTypeM512xlarge InstanceType = "m5.12xlarge" - InstanceTypeM516xlarge InstanceType = "m5.16xlarge" - InstanceTypeM524xlarge InstanceType = "m5.24xlarge" - InstanceTypeM5Metal InstanceType = "m5.metal" - InstanceTypeM5aLarge InstanceType = "m5a.large" - InstanceTypeM5aXlarge InstanceType = "m5a.xlarge" - InstanceTypeM5a2xlarge InstanceType = "m5a.2xlarge" - InstanceTypeM5a4xlarge InstanceType = "m5a.4xlarge" - InstanceTypeM5a8xlarge InstanceType = "m5a.8xlarge" - InstanceTypeM5a12xlarge InstanceType = "m5a.12xlarge" - InstanceTypeM5a16xlarge InstanceType = "m5a.16xlarge" - InstanceTypeM5a24xlarge InstanceType = "m5a.24xlarge" - InstanceTypeM5dLarge InstanceType = "m5d.large" - InstanceTypeM5dXlarge InstanceType = "m5d.xlarge" - InstanceTypeM5d2xlarge InstanceType = "m5d.2xlarge" - InstanceTypeM5d4xlarge InstanceType = "m5d.4xlarge" - InstanceTypeM5d8xlarge InstanceType = "m5d.8xlarge" - InstanceTypeM5d12xlarge InstanceType = "m5d.12xlarge" - InstanceTypeM5d16xlarge InstanceType = "m5d.16xlarge" - InstanceTypeM5d24xlarge InstanceType = "m5d.24xlarge" - InstanceTypeM5dMetal InstanceType = "m5d.metal" - InstanceTypeM5adLarge InstanceType = "m5ad.large" - InstanceTypeM5adXlarge InstanceType = "m5ad.xlarge" - InstanceTypeM5ad2xlarge InstanceType = "m5ad.2xlarge" - InstanceTypeM5ad4xlarge InstanceType = "m5ad.4xlarge" - InstanceTypeM5ad8xlarge InstanceType = "m5ad.8xlarge" - InstanceTypeM5ad12xlarge InstanceType = "m5ad.12xlarge" - InstanceTypeM5ad16xlarge InstanceType = "m5ad.16xlarge" - InstanceTypeM5ad24xlarge InstanceType = "m5ad.24xlarge" - InstanceTypeM5znLarge InstanceType = "m5zn.large" - InstanceTypeM5znXlarge InstanceType = "m5zn.xlarge" - InstanceTypeM5zn2xlarge InstanceType = "m5zn.2xlarge" - InstanceTypeM5zn3xlarge InstanceType = "m5zn.3xlarge" - InstanceTypeM5zn6xlarge InstanceType = "m5zn.6xlarge" - InstanceTypeM5zn12xlarge InstanceType = "m5zn.12xlarge" - InstanceTypeM5znMetal InstanceType = "m5zn.metal" - InstanceTypeH12xlarge InstanceType = "h1.2xlarge" - InstanceTypeH14xlarge InstanceType = "h1.4xlarge" - InstanceTypeH18xlarge InstanceType = "h1.8xlarge" - InstanceTypeH116xlarge InstanceType = "h1.16xlarge" - InstanceTypeZ1dLarge InstanceType = "z1d.large" - InstanceTypeZ1dXlarge InstanceType = "z1d.xlarge" - InstanceTypeZ1d2xlarge InstanceType = "z1d.2xlarge" - InstanceTypeZ1d3xlarge InstanceType = "z1d.3xlarge" - InstanceTypeZ1d6xlarge InstanceType = "z1d.6xlarge" - InstanceTypeZ1d12xlarge InstanceType = "z1d.12xlarge" - InstanceTypeZ1dMetal InstanceType = "z1d.metal" - InstanceTypeU6tb1Metal InstanceType = "u-6tb1.metal" - InstanceTypeU9tb1Metal InstanceType = "u-9tb1.metal" - InstanceTypeU12tb1Metal InstanceType = "u-12tb1.metal" - InstanceTypeU18tb1Metal InstanceType = "u-18tb1.metal" - InstanceTypeU24tb1Metal InstanceType = "u-24tb1.metal" - InstanceTypeA1Medium InstanceType = "a1.medium" - InstanceTypeA1Large InstanceType = "a1.large" - InstanceTypeA1Xlarge InstanceType = "a1.xlarge" - InstanceTypeA12xlarge InstanceType = "a1.2xlarge" - InstanceTypeA14xlarge InstanceType = "a1.4xlarge" - InstanceTypeA1Metal InstanceType = "a1.metal" - InstanceTypeM5dnLarge InstanceType = "m5dn.large" - InstanceTypeM5dnXlarge InstanceType = "m5dn.xlarge" - InstanceTypeM5dn2xlarge InstanceType = "m5dn.2xlarge" - InstanceTypeM5dn4xlarge InstanceType = "m5dn.4xlarge" - InstanceTypeM5dn8xlarge InstanceType = "m5dn.8xlarge" - InstanceTypeM5dn12xlarge InstanceType = "m5dn.12xlarge" - InstanceTypeM5dn16xlarge InstanceType = "m5dn.16xlarge" - InstanceTypeM5dn24xlarge InstanceType = "m5dn.24xlarge" - InstanceTypeM5nLarge InstanceType = "m5n.large" - InstanceTypeM5nXlarge InstanceType = "m5n.xlarge" - InstanceTypeM5n2xlarge InstanceType = "m5n.2xlarge" - InstanceTypeM5n4xlarge InstanceType = "m5n.4xlarge" - InstanceTypeM5n8xlarge InstanceType = "m5n.8xlarge" - InstanceTypeM5n12xlarge InstanceType = "m5n.12xlarge" - InstanceTypeM5n16xlarge InstanceType = "m5n.16xlarge" - InstanceTypeM5n24xlarge InstanceType = "m5n.24xlarge" - InstanceTypeR5dnLarge InstanceType = "r5dn.large" - InstanceTypeR5dnXlarge InstanceType = "r5dn.xlarge" - InstanceTypeR5dn2xlarge InstanceType = "r5dn.2xlarge" - InstanceTypeR5dn4xlarge InstanceType = "r5dn.4xlarge" - InstanceTypeR5dn8xlarge InstanceType = "r5dn.8xlarge" - InstanceTypeR5dn12xlarge InstanceType = "r5dn.12xlarge" - InstanceTypeR5dn16xlarge InstanceType = "r5dn.16xlarge" - InstanceTypeR5dn24xlarge InstanceType = "r5dn.24xlarge" - InstanceTypeR5nLarge InstanceType = "r5n.large" - InstanceTypeR5nXlarge InstanceType = "r5n.xlarge" - InstanceTypeR5n2xlarge InstanceType = "r5n.2xlarge" - InstanceTypeR5n4xlarge InstanceType = "r5n.4xlarge" - InstanceTypeR5n8xlarge InstanceType = "r5n.8xlarge" - InstanceTypeR5n12xlarge InstanceType = "r5n.12xlarge" - InstanceTypeR5n16xlarge InstanceType = "r5n.16xlarge" - InstanceTypeR5n24xlarge InstanceType = "r5n.24xlarge" - InstanceTypeInf1Xlarge InstanceType = "inf1.xlarge" - InstanceTypeInf12xlarge InstanceType = "inf1.2xlarge" - InstanceTypeInf16xlarge InstanceType = "inf1.6xlarge" - InstanceTypeInf124xlarge InstanceType = "inf1.24xlarge" - InstanceTypeM6gMetal InstanceType = "m6g.metal" - InstanceTypeM6gMedium InstanceType = "m6g.medium" - InstanceTypeM6gLarge InstanceType = "m6g.large" - InstanceTypeM6gXlarge InstanceType = "m6g.xlarge" - InstanceTypeM6g2xlarge InstanceType = "m6g.2xlarge" - InstanceTypeM6g4xlarge InstanceType = "m6g.4xlarge" - InstanceTypeM6g8xlarge InstanceType = "m6g.8xlarge" - InstanceTypeM6g12xlarge InstanceType = "m6g.12xlarge" - InstanceTypeM6g16xlarge InstanceType = "m6g.16xlarge" - InstanceTypeM6gdMetal InstanceType = "m6gd.metal" - InstanceTypeM6gdMedium InstanceType = "m6gd.medium" - InstanceTypeM6gdLarge InstanceType = "m6gd.large" - InstanceTypeM6gdXlarge InstanceType = "m6gd.xlarge" - InstanceTypeM6gd2xlarge InstanceType = "m6gd.2xlarge" - InstanceTypeM6gd4xlarge InstanceType = "m6gd.4xlarge" - InstanceTypeM6gd8xlarge InstanceType = "m6gd.8xlarge" - InstanceTypeM6gd12xlarge InstanceType = "m6gd.12xlarge" - InstanceTypeM6gd16xlarge InstanceType = "m6gd.16xlarge" - InstanceTypeMac1Metal InstanceType = "mac1.metal" - InstanceTypeX2gdMedium InstanceType = "x2gd.medium" - InstanceTypeX2gdLarge InstanceType = "x2gd.large" - InstanceTypeX2gdXlarge InstanceType = "x2gd.xlarge" - InstanceTypeX2gd2xlarge InstanceType = "x2gd.2xlarge" - InstanceTypeX2gd4xlarge InstanceType = "x2gd.4xlarge" - InstanceTypeX2gd8xlarge InstanceType = "x2gd.8xlarge" - InstanceTypeX2gd12xlarge InstanceType = "x2gd.12xlarge" - InstanceTypeX2gd16xlarge InstanceType = "x2gd.16xlarge" - InstanceTypeX2gdMetal InstanceType = "x2gd.metal" + InstanceTypeT1Micro InstanceType = "t1.micro" + InstanceTypeT2Nano InstanceType = "t2.nano" + InstanceTypeT2Micro InstanceType = "t2.micro" + InstanceTypeT2Small InstanceType = "t2.small" + InstanceTypeT2Medium InstanceType = "t2.medium" + InstanceTypeT2Large InstanceType = "t2.large" + InstanceTypeT2Xlarge InstanceType = "t2.xlarge" + InstanceTypeT22xlarge InstanceType = "t2.2xlarge" + InstanceTypeT3Nano InstanceType = "t3.nano" + InstanceTypeT3Micro InstanceType = "t3.micro" + InstanceTypeT3Small InstanceType = "t3.small" + InstanceTypeT3Medium InstanceType = "t3.medium" + InstanceTypeT3Large InstanceType = "t3.large" + InstanceTypeT3Xlarge InstanceType = "t3.xlarge" + InstanceTypeT32xlarge InstanceType = "t3.2xlarge" + InstanceTypeT3aNano InstanceType = "t3a.nano" + InstanceTypeT3aMicro InstanceType = "t3a.micro" + InstanceTypeT3aSmall InstanceType = "t3a.small" + InstanceTypeT3aMedium InstanceType = "t3a.medium" + InstanceTypeT3aLarge InstanceType = "t3a.large" + InstanceTypeT3aXlarge InstanceType = "t3a.xlarge" + InstanceTypeT3a2xlarge InstanceType = "t3a.2xlarge" + InstanceTypeT4gNano InstanceType = "t4g.nano" + InstanceTypeT4gMicro InstanceType = "t4g.micro" + InstanceTypeT4gSmall InstanceType = "t4g.small" + InstanceTypeT4gMedium InstanceType = "t4g.medium" + InstanceTypeT4gLarge InstanceType = "t4g.large" + InstanceTypeT4gXlarge InstanceType = "t4g.xlarge" + InstanceTypeT4g2xlarge InstanceType = "t4g.2xlarge" + InstanceTypeM1Small InstanceType = "m1.small" + InstanceTypeM1Medium InstanceType = "m1.medium" + InstanceTypeM1Large InstanceType = "m1.large" + InstanceTypeM1Xlarge InstanceType = "m1.xlarge" + InstanceTypeM3Medium InstanceType = "m3.medium" + InstanceTypeM3Large InstanceType = "m3.large" + InstanceTypeM3Xlarge InstanceType = "m3.xlarge" + InstanceTypeM32xlarge InstanceType = "m3.2xlarge" + InstanceTypeM4Large InstanceType = "m4.large" + InstanceTypeM4Xlarge InstanceType = "m4.xlarge" + InstanceTypeM42xlarge InstanceType = "m4.2xlarge" + InstanceTypeM44xlarge InstanceType = "m4.4xlarge" + InstanceTypeM410xlarge InstanceType = "m4.10xlarge" + InstanceTypeM416xlarge InstanceType = "m4.16xlarge" + InstanceTypeM2Xlarge InstanceType = "m2.xlarge" + InstanceTypeM22xlarge InstanceType = "m2.2xlarge" + InstanceTypeM24xlarge InstanceType = "m2.4xlarge" + InstanceTypeCr18xlarge InstanceType = "cr1.8xlarge" + InstanceTypeR3Large InstanceType = "r3.large" + InstanceTypeR3Xlarge InstanceType = "r3.xlarge" + InstanceTypeR32xlarge InstanceType = "r3.2xlarge" + InstanceTypeR34xlarge InstanceType = "r3.4xlarge" + InstanceTypeR38xlarge InstanceType = "r3.8xlarge" + InstanceTypeR4Large InstanceType = "r4.large" + InstanceTypeR4Xlarge InstanceType = "r4.xlarge" + InstanceTypeR42xlarge InstanceType = "r4.2xlarge" + InstanceTypeR44xlarge InstanceType = "r4.4xlarge" + InstanceTypeR48xlarge InstanceType = "r4.8xlarge" + InstanceTypeR416xlarge InstanceType = "r4.16xlarge" + InstanceTypeR5Large InstanceType = "r5.large" + InstanceTypeR5Xlarge InstanceType = "r5.xlarge" + InstanceTypeR52xlarge InstanceType = "r5.2xlarge" + InstanceTypeR54xlarge InstanceType = "r5.4xlarge" + InstanceTypeR58xlarge InstanceType = "r5.8xlarge" + InstanceTypeR512xlarge InstanceType = "r5.12xlarge" + InstanceTypeR516xlarge InstanceType = "r5.16xlarge" + InstanceTypeR524xlarge InstanceType = "r5.24xlarge" + InstanceTypeR5Metal InstanceType = "r5.metal" + InstanceTypeR5aLarge InstanceType = "r5a.large" + InstanceTypeR5aXlarge InstanceType = "r5a.xlarge" + InstanceTypeR5a2xlarge InstanceType = "r5a.2xlarge" + InstanceTypeR5a4xlarge InstanceType = "r5a.4xlarge" + InstanceTypeR5a8xlarge InstanceType = "r5a.8xlarge" + InstanceTypeR5a12xlarge InstanceType = "r5a.12xlarge" + InstanceTypeR5a16xlarge InstanceType = "r5a.16xlarge" + InstanceTypeR5a24xlarge InstanceType = "r5a.24xlarge" + InstanceTypeR5bLarge InstanceType = "r5b.large" + InstanceTypeR5bXlarge InstanceType = "r5b.xlarge" + InstanceTypeR5b2xlarge InstanceType = "r5b.2xlarge" + InstanceTypeR5b4xlarge InstanceType = "r5b.4xlarge" + InstanceTypeR5b8xlarge InstanceType = "r5b.8xlarge" + InstanceTypeR5b12xlarge InstanceType = "r5b.12xlarge" + InstanceTypeR5b16xlarge InstanceType = "r5b.16xlarge" + InstanceTypeR5b24xlarge InstanceType = "r5b.24xlarge" + InstanceTypeR5bMetal InstanceType = "r5b.metal" + InstanceTypeR5dLarge InstanceType = "r5d.large" + InstanceTypeR5dXlarge InstanceType = "r5d.xlarge" + InstanceTypeR5d2xlarge InstanceType = "r5d.2xlarge" + InstanceTypeR5d4xlarge InstanceType = "r5d.4xlarge" + InstanceTypeR5d8xlarge InstanceType = "r5d.8xlarge" + InstanceTypeR5d12xlarge InstanceType = "r5d.12xlarge" + InstanceTypeR5d16xlarge InstanceType = "r5d.16xlarge" + InstanceTypeR5d24xlarge InstanceType = "r5d.24xlarge" + InstanceTypeR5dMetal InstanceType = "r5d.metal" + InstanceTypeR5adLarge InstanceType = "r5ad.large" + InstanceTypeR5adXlarge InstanceType = "r5ad.xlarge" + InstanceTypeR5ad2xlarge InstanceType = "r5ad.2xlarge" + InstanceTypeR5ad4xlarge InstanceType = "r5ad.4xlarge" + InstanceTypeR5ad8xlarge InstanceType = "r5ad.8xlarge" + InstanceTypeR5ad12xlarge InstanceType = "r5ad.12xlarge" + InstanceTypeR5ad16xlarge InstanceType = "r5ad.16xlarge" + InstanceTypeR5ad24xlarge InstanceType = "r5ad.24xlarge" + InstanceTypeR6gMetal InstanceType = "r6g.metal" + InstanceTypeR6gMedium InstanceType = "r6g.medium" + InstanceTypeR6gLarge InstanceType = "r6g.large" + InstanceTypeR6gXlarge InstanceType = "r6g.xlarge" + InstanceTypeR6g2xlarge InstanceType = "r6g.2xlarge" + InstanceTypeR6g4xlarge InstanceType = "r6g.4xlarge" + InstanceTypeR6g8xlarge InstanceType = "r6g.8xlarge" + InstanceTypeR6g12xlarge InstanceType = "r6g.12xlarge" + InstanceTypeR6g16xlarge InstanceType = "r6g.16xlarge" + InstanceTypeR6gdMetal InstanceType = "r6gd.metal" + InstanceTypeR6gdMedium InstanceType = "r6gd.medium" + InstanceTypeR6gdLarge InstanceType = "r6gd.large" + InstanceTypeR6gdXlarge InstanceType = "r6gd.xlarge" + InstanceTypeR6gd2xlarge InstanceType = "r6gd.2xlarge" + InstanceTypeR6gd4xlarge InstanceType = "r6gd.4xlarge" + InstanceTypeR6gd8xlarge InstanceType = "r6gd.8xlarge" + InstanceTypeR6gd12xlarge InstanceType = "r6gd.12xlarge" + InstanceTypeR6gd16xlarge InstanceType = "r6gd.16xlarge" + InstanceTypeX116xlarge InstanceType = "x1.16xlarge" + InstanceTypeX132xlarge InstanceType = "x1.32xlarge" + InstanceTypeX1eXlarge InstanceType = "x1e.xlarge" + InstanceTypeX1e2xlarge InstanceType = "x1e.2xlarge" + InstanceTypeX1e4xlarge InstanceType = "x1e.4xlarge" + InstanceTypeX1e8xlarge InstanceType = "x1e.8xlarge" + InstanceTypeX1e16xlarge InstanceType = "x1e.16xlarge" + InstanceTypeX1e32xlarge InstanceType = "x1e.32xlarge" + InstanceTypeI2Xlarge InstanceType = "i2.xlarge" + InstanceTypeI22xlarge InstanceType = "i2.2xlarge" + InstanceTypeI24xlarge InstanceType = "i2.4xlarge" + InstanceTypeI28xlarge InstanceType = "i2.8xlarge" + InstanceTypeI3Large InstanceType = "i3.large" + InstanceTypeI3Xlarge InstanceType = "i3.xlarge" + InstanceTypeI32xlarge InstanceType = "i3.2xlarge" + InstanceTypeI34xlarge InstanceType = "i3.4xlarge" + InstanceTypeI38xlarge InstanceType = "i3.8xlarge" + InstanceTypeI316xlarge InstanceType = "i3.16xlarge" + InstanceTypeI3Metal InstanceType = "i3.metal" + InstanceTypeI3enLarge InstanceType = "i3en.large" + InstanceTypeI3enXlarge InstanceType = "i3en.xlarge" + InstanceTypeI3en2xlarge InstanceType = "i3en.2xlarge" + InstanceTypeI3en3xlarge InstanceType = "i3en.3xlarge" + InstanceTypeI3en6xlarge InstanceType = "i3en.6xlarge" + InstanceTypeI3en12xlarge InstanceType = "i3en.12xlarge" + InstanceTypeI3en24xlarge InstanceType = "i3en.24xlarge" + InstanceTypeI3enMetal InstanceType = "i3en.metal" + InstanceTypeHi14xlarge InstanceType = "hi1.4xlarge" + InstanceTypeHs18xlarge InstanceType = "hs1.8xlarge" + InstanceTypeC1Medium InstanceType = "c1.medium" + InstanceTypeC1Xlarge InstanceType = "c1.xlarge" + InstanceTypeC3Large InstanceType = "c3.large" + InstanceTypeC3Xlarge InstanceType = "c3.xlarge" + InstanceTypeC32xlarge InstanceType = "c3.2xlarge" + InstanceTypeC34xlarge InstanceType = "c3.4xlarge" + InstanceTypeC38xlarge InstanceType = "c3.8xlarge" + InstanceTypeC4Large InstanceType = "c4.large" + InstanceTypeC4Xlarge InstanceType = "c4.xlarge" + InstanceTypeC42xlarge InstanceType = "c4.2xlarge" + InstanceTypeC44xlarge InstanceType = "c4.4xlarge" + InstanceTypeC48xlarge InstanceType = "c4.8xlarge" + InstanceTypeC5Large InstanceType = "c5.large" + InstanceTypeC5Xlarge InstanceType = "c5.xlarge" + InstanceTypeC52xlarge InstanceType = "c5.2xlarge" + InstanceTypeC54xlarge InstanceType = "c5.4xlarge" + InstanceTypeC59xlarge InstanceType = "c5.9xlarge" + InstanceTypeC512xlarge InstanceType = "c5.12xlarge" + InstanceTypeC518xlarge InstanceType = "c5.18xlarge" + InstanceTypeC524xlarge InstanceType = "c5.24xlarge" + InstanceTypeC5Metal InstanceType = "c5.metal" + InstanceTypeC5aLarge InstanceType = "c5a.large" + InstanceTypeC5aXlarge InstanceType = "c5a.xlarge" + InstanceTypeC5a2xlarge InstanceType = "c5a.2xlarge" + InstanceTypeC5a4xlarge InstanceType = "c5a.4xlarge" + InstanceTypeC5a8xlarge InstanceType = "c5a.8xlarge" + InstanceTypeC5a12xlarge InstanceType = "c5a.12xlarge" + InstanceTypeC5a16xlarge InstanceType = "c5a.16xlarge" + InstanceTypeC5a24xlarge InstanceType = "c5a.24xlarge" + InstanceTypeC5adLarge InstanceType = "c5ad.large" + InstanceTypeC5adXlarge InstanceType = "c5ad.xlarge" + InstanceTypeC5ad2xlarge InstanceType = "c5ad.2xlarge" + InstanceTypeC5ad4xlarge InstanceType = "c5ad.4xlarge" + InstanceTypeC5ad8xlarge InstanceType = "c5ad.8xlarge" + InstanceTypeC5ad12xlarge InstanceType = "c5ad.12xlarge" + InstanceTypeC5ad16xlarge InstanceType = "c5ad.16xlarge" + InstanceTypeC5ad24xlarge InstanceType = "c5ad.24xlarge" + InstanceTypeC5dLarge InstanceType = "c5d.large" + InstanceTypeC5dXlarge InstanceType = "c5d.xlarge" + InstanceTypeC5d2xlarge InstanceType = "c5d.2xlarge" + InstanceTypeC5d4xlarge InstanceType = "c5d.4xlarge" + InstanceTypeC5d9xlarge InstanceType = "c5d.9xlarge" + InstanceTypeC5d12xlarge InstanceType = "c5d.12xlarge" + InstanceTypeC5d18xlarge InstanceType = "c5d.18xlarge" + InstanceTypeC5d24xlarge InstanceType = "c5d.24xlarge" + InstanceTypeC5dMetal InstanceType = "c5d.metal" + InstanceTypeC5nLarge InstanceType = "c5n.large" + InstanceTypeC5nXlarge InstanceType = "c5n.xlarge" + InstanceTypeC5n2xlarge InstanceType = "c5n.2xlarge" + InstanceTypeC5n4xlarge InstanceType = "c5n.4xlarge" + InstanceTypeC5n9xlarge InstanceType = "c5n.9xlarge" + InstanceTypeC5n18xlarge InstanceType = "c5n.18xlarge" + InstanceTypeC5nMetal InstanceType = "c5n.metal" + InstanceTypeC6gMetal InstanceType = "c6g.metal" + InstanceTypeC6gMedium InstanceType = "c6g.medium" + InstanceTypeC6gLarge InstanceType = "c6g.large" + InstanceTypeC6gXlarge InstanceType = "c6g.xlarge" + InstanceTypeC6g2xlarge InstanceType = "c6g.2xlarge" + InstanceTypeC6g4xlarge InstanceType = "c6g.4xlarge" + InstanceTypeC6g8xlarge InstanceType = "c6g.8xlarge" + InstanceTypeC6g12xlarge InstanceType = "c6g.12xlarge" + InstanceTypeC6g16xlarge InstanceType = "c6g.16xlarge" + InstanceTypeC6gdMetal InstanceType = "c6gd.metal" + InstanceTypeC6gdMedium InstanceType = "c6gd.medium" + InstanceTypeC6gdLarge InstanceType = "c6gd.large" + InstanceTypeC6gdXlarge InstanceType = "c6gd.xlarge" + InstanceTypeC6gd2xlarge InstanceType = "c6gd.2xlarge" + InstanceTypeC6gd4xlarge InstanceType = "c6gd.4xlarge" + InstanceTypeC6gd8xlarge InstanceType = "c6gd.8xlarge" + InstanceTypeC6gd12xlarge InstanceType = "c6gd.12xlarge" + InstanceTypeC6gd16xlarge InstanceType = "c6gd.16xlarge" + InstanceTypeC6gnMedium InstanceType = "c6gn.medium" + InstanceTypeC6gnLarge InstanceType = "c6gn.large" + InstanceTypeC6gnXlarge InstanceType = "c6gn.xlarge" + InstanceTypeC6gn2xlarge InstanceType = "c6gn.2xlarge" + InstanceTypeC6gn4xlarge InstanceType = "c6gn.4xlarge" + InstanceTypeC6gn8xlarge InstanceType = "c6gn.8xlarge" + InstanceTypeC6gn12xlarge InstanceType = "c6gn.12xlarge" + InstanceTypeC6gn16xlarge InstanceType = "c6gn.16xlarge" + InstanceTypeCc14xlarge InstanceType = "cc1.4xlarge" + InstanceTypeCc28xlarge InstanceType = "cc2.8xlarge" + InstanceTypeG22xlarge InstanceType = "g2.2xlarge" + InstanceTypeG28xlarge InstanceType = "g2.8xlarge" + InstanceTypeG34xlarge InstanceType = "g3.4xlarge" + InstanceTypeG38xlarge InstanceType = "g3.8xlarge" + InstanceTypeG316xlarge InstanceType = "g3.16xlarge" + InstanceTypeG3sXlarge InstanceType = "g3s.xlarge" + InstanceTypeG4ad4xlarge InstanceType = "g4ad.4xlarge" + InstanceTypeG4ad8xlarge InstanceType = "g4ad.8xlarge" + InstanceTypeG4ad16xlarge InstanceType = "g4ad.16xlarge" + InstanceTypeG4dnXlarge InstanceType = "g4dn.xlarge" + InstanceTypeG4dn2xlarge InstanceType = "g4dn.2xlarge" + InstanceTypeG4dn4xlarge InstanceType = "g4dn.4xlarge" + InstanceTypeG4dn8xlarge InstanceType = "g4dn.8xlarge" + InstanceTypeG4dn12xlarge InstanceType = "g4dn.12xlarge" + InstanceTypeG4dn16xlarge InstanceType = "g4dn.16xlarge" + InstanceTypeG4dnMetal InstanceType = "g4dn.metal" + InstanceTypeCg14xlarge InstanceType = "cg1.4xlarge" + InstanceTypeP2Xlarge InstanceType = "p2.xlarge" + InstanceTypeP28xlarge InstanceType = "p2.8xlarge" + InstanceTypeP216xlarge InstanceType = "p2.16xlarge" + InstanceTypeP32xlarge InstanceType = "p3.2xlarge" + InstanceTypeP38xlarge InstanceType = "p3.8xlarge" + InstanceTypeP316xlarge InstanceType = "p3.16xlarge" + InstanceTypeP3dn24xlarge InstanceType = "p3dn.24xlarge" + InstanceTypeP4d24xlarge InstanceType = "p4d.24xlarge" + InstanceTypeD2Xlarge InstanceType = "d2.xlarge" + InstanceTypeD22xlarge InstanceType = "d2.2xlarge" + InstanceTypeD24xlarge InstanceType = "d2.4xlarge" + InstanceTypeD28xlarge InstanceType = "d2.8xlarge" + InstanceTypeD3Xlarge InstanceType = "d3.xlarge" + InstanceTypeD32xlarge InstanceType = "d3.2xlarge" + InstanceTypeD34xlarge InstanceType = "d3.4xlarge" + InstanceTypeD38xlarge InstanceType = "d3.8xlarge" + InstanceTypeD3enXlarge InstanceType = "d3en.xlarge" + InstanceTypeD3en2xlarge InstanceType = "d3en.2xlarge" + InstanceTypeD3en4xlarge InstanceType = "d3en.4xlarge" + InstanceTypeD3en6xlarge InstanceType = "d3en.6xlarge" + InstanceTypeD3en8xlarge InstanceType = "d3en.8xlarge" + InstanceTypeD3en12xlarge InstanceType = "d3en.12xlarge" + InstanceTypeF12xlarge InstanceType = "f1.2xlarge" + InstanceTypeF14xlarge InstanceType = "f1.4xlarge" + InstanceTypeF116xlarge InstanceType = "f1.16xlarge" + InstanceTypeM5Large InstanceType = "m5.large" + InstanceTypeM5Xlarge InstanceType = "m5.xlarge" + InstanceTypeM52xlarge InstanceType = "m5.2xlarge" + InstanceTypeM54xlarge InstanceType = "m5.4xlarge" + InstanceTypeM58xlarge InstanceType = "m5.8xlarge" + InstanceTypeM512xlarge InstanceType = "m5.12xlarge" + InstanceTypeM516xlarge InstanceType = "m5.16xlarge" + InstanceTypeM524xlarge InstanceType = "m5.24xlarge" + InstanceTypeM5Metal InstanceType = "m5.metal" + InstanceTypeM5aLarge InstanceType = "m5a.large" + InstanceTypeM5aXlarge InstanceType = "m5a.xlarge" + InstanceTypeM5a2xlarge InstanceType = "m5a.2xlarge" + InstanceTypeM5a4xlarge InstanceType = "m5a.4xlarge" + InstanceTypeM5a8xlarge InstanceType = "m5a.8xlarge" + InstanceTypeM5a12xlarge InstanceType = "m5a.12xlarge" + InstanceTypeM5a16xlarge InstanceType = "m5a.16xlarge" + InstanceTypeM5a24xlarge InstanceType = "m5a.24xlarge" + InstanceTypeM5dLarge InstanceType = "m5d.large" + InstanceTypeM5dXlarge InstanceType = "m5d.xlarge" + InstanceTypeM5d2xlarge InstanceType = "m5d.2xlarge" + InstanceTypeM5d4xlarge InstanceType = "m5d.4xlarge" + InstanceTypeM5d8xlarge InstanceType = "m5d.8xlarge" + InstanceTypeM5d12xlarge InstanceType = "m5d.12xlarge" + InstanceTypeM5d16xlarge InstanceType = "m5d.16xlarge" + InstanceTypeM5d24xlarge InstanceType = "m5d.24xlarge" + InstanceTypeM5dMetal InstanceType = "m5d.metal" + InstanceTypeM5adLarge InstanceType = "m5ad.large" + InstanceTypeM5adXlarge InstanceType = "m5ad.xlarge" + InstanceTypeM5ad2xlarge InstanceType = "m5ad.2xlarge" + InstanceTypeM5ad4xlarge InstanceType = "m5ad.4xlarge" + InstanceTypeM5ad8xlarge InstanceType = "m5ad.8xlarge" + InstanceTypeM5ad12xlarge InstanceType = "m5ad.12xlarge" + InstanceTypeM5ad16xlarge InstanceType = "m5ad.16xlarge" + InstanceTypeM5ad24xlarge InstanceType = "m5ad.24xlarge" + InstanceTypeM5znLarge InstanceType = "m5zn.large" + InstanceTypeM5znXlarge InstanceType = "m5zn.xlarge" + InstanceTypeM5zn2xlarge InstanceType = "m5zn.2xlarge" + InstanceTypeM5zn3xlarge InstanceType = "m5zn.3xlarge" + InstanceTypeM5zn6xlarge InstanceType = "m5zn.6xlarge" + InstanceTypeM5zn12xlarge InstanceType = "m5zn.12xlarge" + InstanceTypeM5znMetal InstanceType = "m5zn.metal" + InstanceTypeH12xlarge InstanceType = "h1.2xlarge" + InstanceTypeH14xlarge InstanceType = "h1.4xlarge" + InstanceTypeH18xlarge InstanceType = "h1.8xlarge" + InstanceTypeH116xlarge InstanceType = "h1.16xlarge" + InstanceTypeZ1dLarge InstanceType = "z1d.large" + InstanceTypeZ1dXlarge InstanceType = "z1d.xlarge" + InstanceTypeZ1d2xlarge InstanceType = "z1d.2xlarge" + InstanceTypeZ1d3xlarge InstanceType = "z1d.3xlarge" + InstanceTypeZ1d6xlarge InstanceType = "z1d.6xlarge" + InstanceTypeZ1d12xlarge InstanceType = "z1d.12xlarge" + InstanceTypeZ1dMetal InstanceType = "z1d.metal" + InstanceTypeU6tb156xlarge InstanceType = "u-6tb1.56xlarge" + InstanceTypeU6tb1112xlarge InstanceType = "u-6tb1.112xlarge" + InstanceTypeU9tb1112xlarge InstanceType = "u-9tb1.112xlarge" + InstanceTypeU12tb1112xlarge InstanceType = "u-12tb1.112xlarge" + InstanceTypeU6tb1Metal InstanceType = "u-6tb1.metal" + InstanceTypeU9tb1Metal InstanceType = "u-9tb1.metal" + InstanceTypeU12tb1Metal InstanceType = "u-12tb1.metal" + InstanceTypeU18tb1Metal InstanceType = "u-18tb1.metal" + InstanceTypeU24tb1Metal InstanceType = "u-24tb1.metal" + InstanceTypeA1Medium InstanceType = "a1.medium" + InstanceTypeA1Large InstanceType = "a1.large" + InstanceTypeA1Xlarge InstanceType = "a1.xlarge" + InstanceTypeA12xlarge InstanceType = "a1.2xlarge" + InstanceTypeA14xlarge InstanceType = "a1.4xlarge" + InstanceTypeA1Metal InstanceType = "a1.metal" + InstanceTypeM5dnLarge InstanceType = "m5dn.large" + InstanceTypeM5dnXlarge InstanceType = "m5dn.xlarge" + InstanceTypeM5dn2xlarge InstanceType = "m5dn.2xlarge" + InstanceTypeM5dn4xlarge InstanceType = "m5dn.4xlarge" + InstanceTypeM5dn8xlarge InstanceType = "m5dn.8xlarge" + InstanceTypeM5dn12xlarge InstanceType = "m5dn.12xlarge" + InstanceTypeM5dn16xlarge InstanceType = "m5dn.16xlarge" + InstanceTypeM5dn24xlarge InstanceType = "m5dn.24xlarge" + InstanceTypeM5nLarge InstanceType = "m5n.large" + InstanceTypeM5nXlarge InstanceType = "m5n.xlarge" + InstanceTypeM5n2xlarge InstanceType = "m5n.2xlarge" + InstanceTypeM5n4xlarge InstanceType = "m5n.4xlarge" + InstanceTypeM5n8xlarge InstanceType = "m5n.8xlarge" + InstanceTypeM5n12xlarge InstanceType = "m5n.12xlarge" + InstanceTypeM5n16xlarge InstanceType = "m5n.16xlarge" + InstanceTypeM5n24xlarge InstanceType = "m5n.24xlarge" + InstanceTypeR5dnLarge InstanceType = "r5dn.large" + InstanceTypeR5dnXlarge InstanceType = "r5dn.xlarge" + InstanceTypeR5dn2xlarge InstanceType = "r5dn.2xlarge" + InstanceTypeR5dn4xlarge InstanceType = "r5dn.4xlarge" + InstanceTypeR5dn8xlarge InstanceType = "r5dn.8xlarge" + InstanceTypeR5dn12xlarge InstanceType = "r5dn.12xlarge" + InstanceTypeR5dn16xlarge InstanceType = "r5dn.16xlarge" + InstanceTypeR5dn24xlarge InstanceType = "r5dn.24xlarge" + InstanceTypeR5nLarge InstanceType = "r5n.large" + InstanceTypeR5nXlarge InstanceType = "r5n.xlarge" + InstanceTypeR5n2xlarge InstanceType = "r5n.2xlarge" + InstanceTypeR5n4xlarge InstanceType = "r5n.4xlarge" + InstanceTypeR5n8xlarge InstanceType = "r5n.8xlarge" + InstanceTypeR5n12xlarge InstanceType = "r5n.12xlarge" + InstanceTypeR5n16xlarge InstanceType = "r5n.16xlarge" + InstanceTypeR5n24xlarge InstanceType = "r5n.24xlarge" + InstanceTypeInf1Xlarge InstanceType = "inf1.xlarge" + InstanceTypeInf12xlarge InstanceType = "inf1.2xlarge" + InstanceTypeInf16xlarge InstanceType = "inf1.6xlarge" + InstanceTypeInf124xlarge InstanceType = "inf1.24xlarge" + InstanceTypeM6gMetal InstanceType = "m6g.metal" + InstanceTypeM6gMedium InstanceType = "m6g.medium" + InstanceTypeM6gLarge InstanceType = "m6g.large" + InstanceTypeM6gXlarge InstanceType = "m6g.xlarge" + InstanceTypeM6g2xlarge InstanceType = "m6g.2xlarge" + InstanceTypeM6g4xlarge InstanceType = "m6g.4xlarge" + InstanceTypeM6g8xlarge InstanceType = "m6g.8xlarge" + InstanceTypeM6g12xlarge InstanceType = "m6g.12xlarge" + InstanceTypeM6g16xlarge InstanceType = "m6g.16xlarge" + InstanceTypeM6gdMetal InstanceType = "m6gd.metal" + InstanceTypeM6gdMedium InstanceType = "m6gd.medium" + InstanceTypeM6gdLarge InstanceType = "m6gd.large" + InstanceTypeM6gdXlarge InstanceType = "m6gd.xlarge" + InstanceTypeM6gd2xlarge InstanceType = "m6gd.2xlarge" + InstanceTypeM6gd4xlarge InstanceType = "m6gd.4xlarge" + InstanceTypeM6gd8xlarge InstanceType = "m6gd.8xlarge" + InstanceTypeM6gd12xlarge InstanceType = "m6gd.12xlarge" + InstanceTypeM6gd16xlarge InstanceType = "m6gd.16xlarge" + InstanceTypeMac1Metal InstanceType = "mac1.metal" + InstanceTypeX2gdMedium InstanceType = "x2gd.medium" + InstanceTypeX2gdLarge InstanceType = "x2gd.large" + InstanceTypeX2gdXlarge InstanceType = "x2gd.xlarge" + InstanceTypeX2gd2xlarge InstanceType = "x2gd.2xlarge" + InstanceTypeX2gd4xlarge InstanceType = "x2gd.4xlarge" + InstanceTypeX2gd8xlarge InstanceType = "x2gd.8xlarge" + InstanceTypeX2gd12xlarge InstanceType = "x2gd.12xlarge" + InstanceTypeX2gd16xlarge InstanceType = "x2gd.16xlarge" + InstanceTypeX2gdMetal InstanceType = "x2gd.metal" ) // Values returns all known values for InstanceType. Note that this can be expanded @@ -2812,6 +2816,10 @@ func (InstanceType) Values() []InstanceType { "z1d.6xlarge", "z1d.12xlarge", "z1d.metal", + "u-6tb1.56xlarge", + "u-6tb1.112xlarge", + "u-9tb1.112xlarge", + "u-12tb1.112xlarge", "u-6tb1.metal", "u-9tb1.metal", "u-12tb1.metal", diff --git a/service/ecs/api_op_CreateCluster.go b/service/ecs/api_op_CreateCluster.go index 5d902e40c03..3ee9161557f 100644 --- a/service/ecs/api_op_CreateCluster.go +++ b/service/ecs/api_op_CreateCluster.go @@ -55,7 +55,7 @@ type CreateClusterInput struct { // The name of your cluster. If you do not specify a name for your cluster, you // create a cluster named default. Up to 255 letters (uppercase and lowercase), - // numbers, and hyphens are allowed. + // numbers, underscores, and hyphens are allowed. ClusterName *string // The execute command configuration for the cluster. diff --git a/service/ecs/api_op_CreateService.go b/service/ecs/api_op_CreateService.go index 512a526d295..ee1b0dd22f0 100644 --- a/service/ecs/api_op_CreateService.go +++ b/service/ecs/api_op_CreateService.go @@ -128,9 +128,9 @@ func (c *Client) CreateService(ctx context.Context, params *CreateServiceInput, type CreateServiceInput struct { // The name of your service. Up to 255 letters (uppercase and lowercase), numbers, - // and hyphens are allowed. Service names must be unique within a cluster, but you - // can have similarly named services in multiple clusters within a Region or across - // multiple Regions. + // underscores, and hyphens are allowed. Service names must be unique within a + // cluster, but you can have similarly named services in multiple clusters within a + // Region or across multiple Regions. // // This member is required. ServiceName *string diff --git a/service/ecs/api_op_ExecuteCommand.go b/service/ecs/api_op_ExecuteCommand.go index 0d6c8b1ad5f..7a265d4a112 100644 --- a/service/ecs/api_op_ExecuteCommand.go +++ b/service/ecs/api_op_ExecuteCommand.go @@ -65,6 +65,8 @@ type ExecuteCommandOutput struct { ContainerName *string // Whether or not the execute command session is running in interactive mode. + // Amazon ECS only supports initiating interactive sessions, so you must specify + // true for this value. Interactive bool // The details of the SSM session that was created for this instance of diff --git a/service/ecs/api_op_RegisterTaskDefinition.go b/service/ecs/api_op_RegisterTaskDefinition.go index 1e7fe740e5e..fe00f7e370d 100644 --- a/service/ecs/api_op_RegisterTaskDefinition.go +++ b/service/ecs/api_op_RegisterTaskDefinition.go @@ -58,8 +58,8 @@ type RegisterTaskDefinitionInput struct { // You must specify a family for a task definition, which allows you to track // multiple versions of the same task definition. The family is used as a name for - // your task definition. Up to 255 letters (uppercase and lowercase), numbers, and - // hyphens are allowed. + // your task definition. Up to 255 letters (uppercase and lowercase), numbers, + // underscores, and hyphens are allowed. // // This member is required. Family *string diff --git a/service/ecs/types/types.go b/service/ecs/types/types.go index d768d41bb1a..e4f07e3897a 100644 --- a/service/ecs/types/types.go +++ b/service/ecs/types/types.go @@ -726,8 +726,8 @@ type ContainerDefinition struct { // need for port mappings. This parameter is only supported if the network mode of // a task definition is bridge. The name:internalName construct is analogous to // name:alias in Docker links. Up to 255 letters (uppercase and lowercase), - // numbers, and hyphens are allowed. For more information about linking Docker - // containers, go to Legacy container links + // numbers, underscores, and hyphens are allowed. For more information about + // linking Docker containers, go to Legacy container links // (https://docs.docker.com/network/links/) in the Docker documentation. This // parameter maps to Links in the Create a container // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of @@ -834,8 +834,8 @@ type ContainerDefinition struct { // The name of a container. If you are linking multiple containers together in a // task definition, the name of one container can be entered in the links of // another container to connect the containers. Up to 255 letters (uppercase and - // lowercase), numbers, and hyphens are allowed. This parameter maps to name in the - // Create a container + // lowercase), numbers, underscores, and hyphens are allowed. This parameter maps + // to name in the Create a container // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the --name // option to docker run @@ -2678,9 +2678,9 @@ type Service struct { ServiceArn *string // The name of your service. Up to 255 letters (uppercase and lowercase), numbers, - // and hyphens are allowed. Service names must be unique within a cluster, but you - // can have similarly named services in multiple clusters within a Region or across - // multiple Regions. + // underscores, and hyphens are allowed. Service names must be unique within a + // cluster, but you can have similarly named services in multiple clusters within a + // Region or across multiple Regions. ServiceName *string // The details of the service discovery registries to assign to this service. For @@ -3623,8 +3623,8 @@ type Volume struct { Host *HostVolumeProperties // The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, - // and hyphens are allowed. This name is referenced in the sourceVolume parameter - // of container definition mountPoints. + // underscores, and hyphens are allowed. This name is referenced in the + // sourceVolume parameter of container definition mountPoints. Name *string } diff --git a/service/eks/api_op_CreateNodegroup.go b/service/eks/api_op_CreateNodegroup.go index b648bd109e0..e04bc20b8a0 100644 --- a/service/eks/api_op_CreateNodegroup.go +++ b/service/eks/api_op_CreateNodegroup.go @@ -71,9 +71,7 @@ type CreateNodegroupInput struct { NodegroupName *string // The subnets to use for the Auto Scaling group that is created for your node - // group. These subnets must have the tag key kubernetes.io/cluster/CLUSTER_NAME - // with a value of shared, where CLUSTER_NAME is replaced with the name of your - // cluster. If you specify launchTemplate, then don't specify SubnetId + // group. If you specify launchTemplate, then don't specify SubnetId // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html) // in your launch template, or the node group deployment will fail. For more // information about using launch templates with Amazon EKS, see Launch template @@ -166,6 +164,9 @@ type CreateNodegroupInput struct { // 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. + Taints []types.Taint + // The Kubernetes version to use for your managed nodes. By default, the Kubernetes // version of the cluster is used, and this is the only accepted specified value. // If you specify launchTemplate, and your launch template uses a custom AMI, then diff --git a/service/eks/api_op_UpdateClusterConfig.go b/service/eks/api_op_UpdateClusterConfig.go index cac1151959d..6ad3be1e7ff 100644 --- a/service/eks/api_op_UpdateClusterConfig.go +++ b/service/eks/api_op_UpdateClusterConfig.go @@ -28,11 +28,11 @@ import ( // enabled, and private access is disabled. For more information, see Amazon EKS // Cluster Endpoint Access Control // (https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html) in the -// Amazon EKS User Guide . At this time, you can not update the subnets or security -// group IDs for an existing cluster. Cluster updates are asynchronous, and they -// should finish within a few minutes. During an update, the cluster status moves -// to UPDATING (this status transition is eventually consistent). When the update -// is complete (either Failed or Successful), the cluster status moves to Active. +// Amazon EKS User Guide . You can't update the subnets or security group IDs for +// an existing cluster. Cluster updates are asynchronous, and they should finish +// within a few minutes. During an update, the cluster status moves to UPDATING +// (this status transition is eventually consistent). When the update is complete +// (either Failed or Successful), the cluster status moves to Active. func (c *Client) UpdateClusterConfig(ctx context.Context, params *UpdateClusterConfigInput, optFns ...func(*Options)) (*UpdateClusterConfigOutput, error) { if params == nil { params = &UpdateClusterConfigInput{} diff --git a/service/eks/api_op_UpdateNodegroupConfig.go b/service/eks/api_op_UpdateNodegroupConfig.go index 4f8d87e4d55..b81a79fd478 100644 --- a/service/eks/api_op_UpdateNodegroupConfig.go +++ b/service/eks/api_op_UpdateNodegroupConfig.go @@ -54,6 +54,10 @@ type UpdateNodegroupConfigInput struct { // The scaling configuration details for the Auto Scaling group after the update. ScalingConfig *types.NodegroupScalingConfig + + // The Kubernetes taints to be applied to the nodes in the node group after the + // update. + Taints *types.UpdateTaintsPayload } type UpdateNodegroupConfigOutput struct { diff --git a/service/eks/deserializers.go b/service/eks/deserializers.go index 20db23a362c..73eaeabb2ad 100644 --- a/service/eks/deserializers.go +++ b/service/eks/deserializers.go @@ -7542,6 +7542,11 @@ func awsRestjson1_deserializeDocumentNodegroup(v **types.Nodegroup, value interf return err } + case "taints": + if err := awsRestjson1_deserializeDocumentTaintsList(&sv.Taints, value); err != nil { + return err + } + case "version": if value != nil { jtv, ok := value.(string) @@ -8423,6 +8428,98 @@ func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interfac return nil } +func awsRestjson1_deserializeDocumentTaint(v **types.Taint, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Taint + if *v == nil { + sv = &types.Taint{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "effect": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaintEffect to be of type string, got %T instead", value) + } + sv.Effect = types.TaintEffect(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected taintKey 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 taintValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTaintsList(v *[]types.Taint, 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.Taint + if *v == nil { + cv = []types.Taint{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Taint + destAddr := &col + if err := awsRestjson1_deserializeDocumentTaint(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentUnsupportedAvailabilityZoneException(v **types.UnsupportedAvailabilityZoneException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/eks/serializers.go b/service/eks/serializers.go index 2bf3fe58bb0..3fae74960d3 100644 --- a/service/eks/serializers.go +++ b/service/eks/serializers.go @@ -692,6 +692,13 @@ func awsRestjson1_serializeOpDocumentCreateNodegroupInput(v *CreateNodegroupInpu } } + if v.Taints != nil { + ok := object.Key("taints") + if err := awsRestjson1_serializeDocumentTaintsList(v.Taints, ok); err != nil { + return err + } + } + if v.Version != nil { ok := object.Key("version") ok.String(*v.Version) @@ -2516,6 +2523,13 @@ func awsRestjson1_serializeOpDocumentUpdateNodegroupConfigInput(v *UpdateNodegro } } + if v.Taints != nil { + ok := object.Key("taints") + if err := awsRestjson1_serializeDocumentUpdateTaintsPayload(v.Taints, ok); err != nil { + return err + } + } + return nil } @@ -2973,6 +2987,41 @@ func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson. return nil } +func awsRestjson1_serializeDocumentTaint(v *types.Taint, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Effect) > 0 { + ok := object.Key("effect") + ok.String(string(v.Effect)) + } + + 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_serializeDocumentTaintsList(v []types.Taint, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentTaint(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentUpdateLabelsPayload(v *types.UpdateLabelsPayload, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2994,6 +3043,27 @@ func awsRestjson1_serializeDocumentUpdateLabelsPayload(v *types.UpdateLabelsPayl return nil } +func awsRestjson1_serializeDocumentUpdateTaintsPayload(v *types.UpdateTaintsPayload, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddOrUpdateTaints != nil { + ok := object.Key("addOrUpdateTaints") + if err := awsRestjson1_serializeDocumentTaintsList(v.AddOrUpdateTaints, ok); err != nil { + return err + } + } + + if v.RemoveTaints != nil { + ok := object.Key("removeTaints") + if err := awsRestjson1_serializeDocumentTaintsList(v.RemoveTaints, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentVpcConfigRequest(v *types.VpcConfigRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/eks/types/enums.go b/service/eks/types/enums.go index b2983bd7459..2db326a32f9 100644 --- a/service/eks/types/enums.go +++ b/service/eks/types/enums.go @@ -328,6 +328,26 @@ func (ResolveConflicts) Values() []ResolveConflicts { } } +type TaintEffect string + +// Enum values for TaintEffect +const ( + TaintEffectNoSchedule TaintEffect = "NO_SCHEDULE" + TaintEffectNoExecute TaintEffect = "NO_EXECUTE" + TaintEffectPreferNoSchedule TaintEffect = "PREFER_NO_SCHEDULE" +) + +// Values returns all known values for TaintEffect. 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 (TaintEffect) Values() []TaintEffect { + return []TaintEffect{ + "NO_SCHEDULE", + "NO_EXECUTE", + "PREFER_NO_SCHEDULE", + } +} + type UpdateParamType string // Enum values for UpdateParamType @@ -340,6 +360,8 @@ const ( UpdateParamTypeDesiredSize UpdateParamType = "DesiredSize" UpdateParamTypeLabelsToAdd UpdateParamType = "LabelsToAdd" UpdateParamTypeLabelsToRemove UpdateParamType = "LabelsToRemove" + UpdateParamTypeTaintsToAdd UpdateParamType = "TaintsToAdd" + UpdateParamTypeTaintsToRemove UpdateParamType = "TaintsToRemove" UpdateParamTypeMaxSize UpdateParamType = "MaxSize" UpdateParamTypeMinSize UpdateParamType = "MinSize" UpdateParamTypeReleaseVersion UpdateParamType = "ReleaseVersion" @@ -366,6 +388,8 @@ func (UpdateParamType) Values() []UpdateParamType { "DesiredSize", "LabelsToAdd", "LabelsToRemove", + "TaintsToAdd", + "TaintsToRemove", "MaxSize", "MinSize", "ReleaseVersion", diff --git a/service/eks/types/types.go b/service/eks/types/types.go index 774c0d69ed9..20f9e6351aa 100644 --- a/service/eks/types/types.go +++ b/service/eks/types/types.go @@ -37,9 +37,9 @@ type Addon struct { // The status of the add-on. Status AddonStatus - // The metadata that you apply to the cluster to assist with categorization and + // 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. Cluster tags do not propagate to any other resources associated with + // you define. Add-on tags do not propagate to any other resources associated with // the cluster. Tags map[string]string } @@ -190,8 +190,8 @@ type Compatibility struct { // The encryption configuration for the cluster. type EncryptionConfig struct { - // AWS Key Management Service (AWS KMS) customer master key (CMK). Either the ARN - // or the alias can be used. + // AWS Key Management Service (AWS KMS) key. Either the ARN or the alias can be + // used. Provider *Provider // Specifies the resources to be encrypted. The only supported value is "secrets". @@ -569,6 +569,12 @@ type Nodegroup struct { // 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 + // created. Effect is one of NoSchedule, PreferNoSchedule, or NoExecute. Kubernetes + // taints can be used together with tolerations to control how workloads are + // scheduled to your nodes. + Taints []Taint + // The Kubernetes version of the managed node group. Version *string } @@ -593,8 +599,9 @@ type NodegroupResources struct { } // An object representing the scaling configuration details for the Auto Scaling -// group that is associated with your node group. If you specify a value for any -// property, then you must specify values for all of the properties. +// group that is associated with your node group. When creating a node group, you +// must specify all or none of the properties. When updating a node group, you can +// specify any or none of the properties. type NodegroupScalingConfig struct { // The current number of nodes that the managed node group should maintain. @@ -729,14 +736,14 @@ type OidcIdentityProviderConfigRequest struct { UsernamePrefix *string } -// Identifies the AWS Key Management Service (AWS KMS) customer master key (CMK) -// used to encrypt the secrets. +// Identifies the AWS Key Management Service (AWS KMS) key used to encrypt the +// secrets. type Provider struct { - // Amazon Resource Name (ARN) or alias of the customer master key (CMK). The CMK - // must be symmetric, created in the same region as the cluster, and if the CMK was - // created in a different account, the user must have access to the CMK. For more - // information, see Allowing Users in Other Accounts to Use a CMK + // Amazon Resource Name (ARN) or alias of the KMS key. The KMS key must be + // symmetric, created in the same region as the cluster, and if the KMS key was + // created in a different account, the user must have access to the KMS key. For + // more information, see Allowing Users in Other Accounts to Use a KMS key // (https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-modifying-external-accounts.html) // in the AWS Key Management Service Developer Guide. KeyArn *string @@ -761,6 +768,19 @@ type RemoteAccessConfig struct { SourceSecurityGroups []string } +// A property that allows a node to repel a set of pods. +type Taint struct { + + // The effect of the taint. + Effect TaintEffect + + // The key of the taint. + Key *string + + // The value of the taint. + Value *string +} + // An object representing an asynchronous update. type Update struct { @@ -803,6 +823,16 @@ type UpdateParam struct { Value *string } +// An object representing the details of an update to a taints payload. +type UpdateTaintsPayload struct { + + // Kubernetes taints to be added or updated. + AddOrUpdateTaints []Taint + + // Kubernetes taints to be removed. + RemoveTaints []Taint +} + // An object representing the VPC configuration to use for an Amazon EKS cluster. type VpcConfigRequest struct { diff --git a/service/finspace/LICENSE.txt b/service/finspace/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/finspace/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/finspace/api_client.go b/service/finspace/api_client.go new file mode 100644 index 00000000000..fe5b6b03d1e --- /dev/null +++ b/service/finspace/api_client.go @@ -0,0 +1,291 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace + +import ( + "context" + "fmt" + "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" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "strings" + "time" +) + +const ServiceID = "finspace" +const ServiceAPIVersion = "2021-03-12" + +// Client provides the API client to make operations call for FinSpace User +// Environment Management service. +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) + } + + 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 +} + +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) + 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, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "finspace", 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) +} + +type customizeRestJsonContentType struct { +} + +func (*customizeRestJsonContentType) ID() string { + return "customizeRestJsonContentType" +} + +func (m *customizeRestJsonContentType) 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) + } + + const contentType = "Content-Type" + const expectedType = "application/json" + const targetType = "application/x-amz-json-1.1" + + if strings.EqualFold(req.Header.Get(contentType), expectedType) { + req.Header.Set(contentType, targetType) + } + + return next.HandleSerialize(ctx, in) +} + +func addRestJsonContentTypeCustomization(stack *middleware.Stack) error { + return stack.Serialize.Insert(&customizeRestJsonContentType{}, "OperationSerializer", middleware.After) +} + +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/finspace/api_op_CreateEnvironment.go b/service/finspace/api_op_CreateEnvironment.go new file mode 100644 index 00000000000..edd0bf1c91f --- /dev/null +++ b/service/finspace/api_op_CreateEnvironment.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace + +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/finspace/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create a new FinSpace environment. +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, addOperationCreateEnvironmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateEnvironmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateEnvironmentInput struct { + + // The name of the FinSpace environment to be created. + // + // This member is required. + Name *string + + // The description of the FinSpace environment to be created. + Description *string + + // Authentication mode for the environment. + // + // * FEDERATED - Users access FinSpace + // through Single Sign On (SSO) via your Identity provider. + // + // * LOCAL - Users access + // FinSpace via email and password managed within the FinSpace environment. + FederationMode types.FederationMode + + // Configuration information when authentication mode is FEDERATED. + FederationParameters *types.FederationParameters + + // The KMS key id to encrypt your data in the FinSpace environment. + KmsKeyId *string + + // Add tags to your FinSpace environment. + Tags map[string]string +} + +type CreateEnvironmentOutput struct { + + // The Amazon Resource Name (ARN) of the FinSpace environment that you created. + EnvironmentArn *string + + // The unique identifier for FinSpace environment that you created. + EnvironmentId *string + + // The sign-in url for the web application of the FinSpace environment you created. + EnvironmentUrl *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func 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 = 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 = 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 +} + +func newServiceMetadataMiddleware_opCreateEnvironment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace", + OperationName: "CreateEnvironment", + } +} diff --git a/service/finspace/api_op_DeleteEnvironment.go b/service/finspace/api_op_DeleteEnvironment.go new file mode 100644 index 00000000000..611a9e96fda --- /dev/null +++ b/service/finspace/api_op_DeleteEnvironment.go @@ -0,0 +1,115 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace + +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" +) + +// Delete an FinSpace 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, addOperationDeleteEnvironmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteEnvironmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteEnvironmentInput struct { + + // The identifier for the FinSpace environment. + // + // This member is required. + EnvironmentId *string +} + +type DeleteEnvironmentOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func 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 = 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 = 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: "finspace", + OperationName: "DeleteEnvironment", + } +} diff --git a/service/finspace/api_op_GetEnvironment.go b/service/finspace/api_op_GetEnvironment.go new file mode 100644 index 00000000000..eedb137f3ed --- /dev/null +++ b/service/finspace/api_op_GetEnvironment.go @@ -0,0 +1,120 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace + +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/finspace/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the FinSpace environment object. +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, addOperationGetEnvironmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetEnvironmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetEnvironmentInput struct { + + // The identifier of the FinSpace environment. + // + // This member is required. + EnvironmentId *string +} + +type GetEnvironmentOutput struct { + + // The name of the FinSpace environment. + Environment *types.Environment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func 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 = 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 = 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: "finspace", + OperationName: "GetEnvironment", + } +} diff --git a/service/finspace/api_op_ListEnvironments.go b/service/finspace/api_op_ListEnvironments.go new file mode 100644 index 00000000000..927aaf0dc0c --- /dev/null +++ b/service/finspace/api_op_ListEnvironments.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace + +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/finspace/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// A list of all of your FinSpace environments. +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, 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 in this request. + MaxResults int32 + + // A token generated by FinSpace that specifies where to continue pagination if a + // previous request was truncated. To get the next set of pages, pass in the + // nextToken value from the response object of the previous page call. + NextToken *string +} + +type ListEnvironmentsOutput struct { + + // A list of all of your FinSpace environments. + Environments []types.Environment + + // A token that you can use in a subsequent call to retrieve the next set of + // results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func 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 = 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_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 +} + +func newServiceMetadataMiddleware_opListEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace", + OperationName: "ListEnvironments", + } +} diff --git a/service/finspace/api_op_ListTagsForResource.go b/service/finspace/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..63edaf7715f --- /dev/null +++ b/service/finspace/api_op_ListTagsForResource.go @@ -0,0 +1,119 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace + +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" +) + +// A list of all tags for a 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, addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The Amazon Resource Name of the resource. + // + // This member is required. + ResourceArn *string +} + +type ListTagsForResourceOutput struct { + + // A list of all tags for a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func 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 = 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 = 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: "finspace", + OperationName: "ListTagsForResource", + } +} diff --git a/service/finspace/api_op_TagResource.go b/service/finspace/api_op_TagResource.go new file mode 100644 index 00000000000..7918cce2f0a --- /dev/null +++ b/service/finspace/api_op_TagResource.go @@ -0,0 +1,120 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace + +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 metadata tags to a FinSpace 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, addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The Amazon Resource Name (ARN) for the resource. + // + // This member is required. + ResourceArn *string + + // One or more tags to be assigned to the resource. + // + // This member is required. + Tags map[string]string +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func 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 = 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 = 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: "finspace", + OperationName: "TagResource", + } +} diff --git a/service/finspace/api_op_UntagResource.go b/service/finspace/api_op_UntagResource.go new file mode 100644 index 00000000000..edb76404d8e --- /dev/null +++ b/service/finspace/api_op_UntagResource.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace + +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 metadata tags from a FinSpace 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, addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // A FinSpace resource from which you want to remove a tag or tags. The value for + // this parameter is an Amazon Resource Name (ARN). + // + // This member is required. + ResourceArn *string + + // The tag keys (names) of one or more tags to be removed. + // + // This member is required. + TagKeys []string +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func 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 = 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 = 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: "finspace", + OperationName: "UntagResource", + } +} diff --git a/service/finspace/api_op_UpdateEnvironment.go b/service/finspace/api_op_UpdateEnvironment.go new file mode 100644 index 00000000000..47b1914179a --- /dev/null +++ b/service/finspace/api_op_UpdateEnvironment.go @@ -0,0 +1,138 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace + +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/finspace/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update your FinSpace environment. +func (c *Client) UpdateEnvironment(ctx context.Context, params *UpdateEnvironmentInput, optFns ...func(*Options)) (*UpdateEnvironmentOutput, error) { + if params == nil { + params = &UpdateEnvironmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateEnvironment", params, optFns, addOperationUpdateEnvironmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateEnvironmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateEnvironmentInput struct { + + // The identifier of the FinSpace environment. + // + // This member is required. + EnvironmentId *string + + // The description of the environment. + Description *string + + // Authentication mode for the environment. + // + // * FEDERATED - Users access FinSpace + // through Single Sign On (SSO) via your Identity provider. + // + // * LOCAL - Users access + // FinSpace via email and password managed within the FinSpace environment. + FederationMode types.FederationMode + + // Configuration information when authentication mode is FEDERATED. + FederationParameters *types.FederationParameters + + // The name of the environment. + Name *string +} + +type UpdateEnvironmentOutput struct { + + // Returns the FinSpace environment object. + Environment *types.Environment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationUpdateEnvironmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateEnvironment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateEnvironment{}, 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 = addOpUpdateEnvironmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEnvironment(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_opUpdateEnvironment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace", + OperationName: "UpdateEnvironment", + } +} diff --git a/service/finspace/deserializers.go b/service/finspace/deserializers.go new file mode 100644 index 00000000000..39e30fbdcdf --- /dev/null +++ b/service/finspace/deserializers.go @@ -0,0 +1,1953 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/finspace/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_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("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(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 "environmentArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentArn to be of type string, got %T instead", value) + } + sv.EnvironmentArn = ptr.String(jtv) + } + + case "environmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdType to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "environmentUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected url to be of type string, got %T instead", value) + } + sv.EnvironmentUrl = ptr.String(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 + + 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("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_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("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 "environment": + if err := awsRestjson1_deserializeDocumentEnvironment(&sv.Environment, value); err != nil { + return err + } + + 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("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_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 "environments": + if err := awsRestjson1_deserializeDocumentEnvironmentList(&sv.Environments, 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_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("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_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("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 + + } +} + +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("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 + + } +} + +type awsRestjson1_deserializeOpUpdateEnvironment struct { +} + +func (*awsRestjson1_deserializeOpUpdateEnvironment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_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, awsRestjson1_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 = awsRestjson1_deserializeOpDocumentUpdateEnvironmentOutput(&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_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 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_deserializeOpDocumentUpdateEnvironmentOutput(v **UpdateEnvironmentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateEnvironmentOutput + if *v == nil { + sv = &UpdateEnvironmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "environment": + if err := awsRestjson1_deserializeDocumentEnvironment(&sv.Environment, 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{} + 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_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidRequestException{} + 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_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_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{} + 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 { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAttributeMap(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 url to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_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 "awsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdType to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + + case "dedicatedServiceAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdType to be of type string, got %T instead", value) + } + sv.DedicatedServiceAccountId = 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 "environmentArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentArn to be of type string, got %T instead", value) + } + sv.EnvironmentArn = ptr.String(jtv) + } + + case "environmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdType to be of type string, got %T instead", value) + } + sv.EnvironmentId = ptr.String(jtv) + } + + case "environmentUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected url to be of type string, got %T instead", value) + } + sv.EnvironmentUrl = ptr.String(jtv) + } + + case "federationMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FederationMode to be of type string, got %T instead", value) + } + sv.FederationMode = types.FederationMode(jtv) + } + + case "federationParameters": + if err := awsRestjson1_deserializeDocumentFederationParameters(&sv.FederationParameters, value); err != nil { + return err + } + + case "kmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + 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 "sageMakerStudioDomainUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SmsDomainUrl to be of type string, got %T instead", value) + } + sv.SageMakerStudioDomainUrl = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentStatus to be of type string, got %T instead", value) + } + sv.Status = types.EnvironmentStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEnvironmentList(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.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Environment + if *v == nil { + cv = []types.Environment{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Environment + destAddr := &col + if err := awsRestjson1_deserializeDocumentEnvironment(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFederationParameters(v **types.FederationParameters, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FederationParameters + if *v == nil { + sv = &types.FederationParameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "applicationCallBackURL": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected url to be of type string, got %T instead", value) + } + sv.ApplicationCallBackURL = ptr.String(jtv) + } + + case "attributeMap": + if err := awsRestjson1_deserializeDocumentAttributeMap(&sv.AttributeMap, value); err != nil { + return err + } + + case "federationProviderName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FederationProviderName to be of type string, got %T instead", value) + } + sv.FederationProviderName = ptr.String(jtv) + } + + case "federationURN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected urn to be of type string, got %T instead", value) + } + sv.FederationURN = ptr.String(jtv) + } + + case "samlMetadataDocument": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SamlMetadataDocument to be of type string, got %T instead", value) + } + sv.SamlMetadataDocument = ptr.String(jtv) + } + + case "samlMetadataURL": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected url to be of type string, got %T instead", value) + } + sv.SamlMetadataURL = ptr.String(jtv) + } + + 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 errorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInvalidRequestException(v **types.InvalidRequestException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidRequestException + if *v == nil { + sv = &types.InvalidRequestException{} + } 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_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LimitExceededException + if *v == nil { + sv = &types.LimitExceededException{} + } 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) + } + + 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 errorMessage 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 { + 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 errorMessage 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/finspace/doc.go b/service/finspace/doc.go new file mode 100644 index 00000000000..e21ad429511 --- /dev/null +++ b/service/finspace/doc.go @@ -0,0 +1,8 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package finspace provides the API client, operations, and parameter types for +// FinSpace User Environment Management service. +// +// The FinSpace management service provides the APIs for managing the FinSpace +// environments. +package finspace diff --git a/service/finspace/endpoints.go b/service/finspace/endpoints.go new file mode 100644 index 00000000000..fdba9b27cbb --- /dev/null +++ b/service/finspace/endpoints.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace + +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/finspace/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" +) + +// 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") + } + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), m.Options) + 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 = "finspace" + } + 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.EndpointResolver + 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) + 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) +} + +// 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. +// awsResolver and fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver { + return &wrappedEndpointResolver{ + awsResolver: awsResolver, + resolver: fallbackResolver, + } +} diff --git a/service/finspace/generated.json b/service/finspace/generated.json new file mode 100644 index 00000000000..2fd8f1b0ce3 --- /dev/null +++ b/service/finspace/generated.json @@ -0,0 +1,32 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_op_CreateEnvironment.go", + "api_op_DeleteEnvironment.go", + "api_op_GetEnvironment.go", + "api_op_ListEnvironments.go", + "api_op_ListTagsForResource.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "api_op_UpdateEnvironment.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/finspace", + "unstable": false +} diff --git a/service/finspace/go.mod b/service/finspace/go.mod new file mode 100644 index 00000000000..2bfb5628443 --- /dev/null +++ b/service/finspace/go.mod @@ -0,0 +1,10 @@ +module github.com/aws/aws-sdk-go-v2/service/finspace + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.4.0 + github.com/aws/smithy-go v1.4.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/finspace/go.sum b/service/finspace/go.sum new file mode 100644 index 00000000000..49e393e44d1 --- /dev/null +++ b/service/finspace/go.sum @@ -0,0 +1,13 @@ +github.com/aws/smithy-go v1.4.0 h1:3rsQpgRe+OoQgJhEwGNpIkosl0fJLdmQqF4gSFRjg+4= +github.com/aws/smithy-go v1.4.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 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.4/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/finspace/go_module_metadata.go b/service/finspace/go_module_metadata.go new file mode 100644 index 00000000000..4fa1e8bf0da --- /dev/null +++ b/service/finspace/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package finspace + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/finspace/internal/endpoints/endpoints.go b/service/finspace/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..2b17ed5db17 --- /dev/null +++ b/service/finspace/internal/endpoints/endpoints.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + DisableHTTPS bool +} + +// Resolver finspace 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 := endpoints.Options{ + DisableHTTPS: options.DisableHTTPS, + } + 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: endpoints.Endpoint{ + Hostname: "finspace.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: endpoints.Endpoint{ + Hostname: "finspace.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: endpoints.Endpoint{ + Hostname: "finspace.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: endpoints.Endpoint{ + Hostname: "finspace.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: endpoints.Endpoint{ + Hostname: "finspace.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/finspace/internal/endpoints/endpoints_test.go b/service/finspace/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/finspace/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/finspace/protocol_test.go b/service/finspace/protocol_test.go new file mode 100644 index 00000000000..8e2d5074a9d --- /dev/null +++ b/service/finspace/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace diff --git a/service/finspace/serializers.go b/service/finspace/serializers.go new file mode 100644 index 00000000000..bf908b84557 --- /dev/null +++ b/service/finspace/serializers.go @@ -0,0 +1,649 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/finspace/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_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("/environment") + 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.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if len(v.FederationMode) > 0 { + ok := object.Key("federationMode") + ok.String(string(v.FederationMode)) + } + + if v.FederationParameters != nil { + ok := object.Key("federationParameters") + if err := awsRestjson1_serializeDocumentFederationParameters(v.FederationParameters, 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.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); 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("/environment/{environmentId}") + 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.EnvironmentId == nil || len(*v.EnvironmentId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentId must not be empty")} + } + if v.EnvironmentId != nil { + if err := encoder.SetURI("environmentId").String(*v.EnvironmentId); 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("/environment/{environmentId}") + 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.EnvironmentId == nil || len(*v.EnvironmentId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentId must not be empty")} + } + if v.EnvironmentId != nil { + if err := encoder.SetURI("environmentId").String(*v.EnvironmentId); err != nil { + return err + } + } + + 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("/environment") + 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 != 0 { + 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} + } + + 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_serializeOpUpdateEnvironment struct { +} + +func (*awsRestjson1_serializeOpUpdateEnvironment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_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)} + } + + opPath, opQuery := httpbinding.SplitURI("/environment/{environmentId}") + 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_serializeOpHttpBindingsUpdateEnvironmentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateEnvironmentInput(v *UpdateEnvironmentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EnvironmentId == nil || len(*v.EnvironmentId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentId must not be empty")} + } + if v.EnvironmentId != nil { + if err := encoder.SetURI("environmentId").String(*v.EnvironmentId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateEnvironmentInput(v *UpdateEnvironmentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if len(v.FederationMode) > 0 { + ok := object.Key("federationMode") + ok.String(string(v.FederationMode)) + } + + if v.FederationParameters != nil { + ok := object.Key("federationParameters") + if err := awsRestjson1_serializeDocumentFederationParameters(v.FederationParameters, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + +func awsRestjson1_serializeDocumentAttributeMap(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_serializeDocumentFederationParameters(v *types.FederationParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApplicationCallBackURL != nil { + ok := object.Key("applicationCallBackURL") + ok.String(*v.ApplicationCallBackURL) + } + + if v.AttributeMap != nil { + ok := object.Key("attributeMap") + if err := awsRestjson1_serializeDocumentAttributeMap(v.AttributeMap, ok); err != nil { + return err + } + } + + if v.FederationProviderName != nil { + ok := object.Key("federationProviderName") + ok.String(*v.FederationProviderName) + } + + if v.FederationURN != nil { + ok := object.Key("federationURN") + ok.String(*v.FederationURN) + } + + if v.SamlMetadataDocument != nil { + ok := object.Key("samlMetadataDocument") + ok.String(*v.SamlMetadataDocument) + } + + if v.SamlMetadataURL != nil { + ok := object.Key("samlMetadataURL") + ok.String(*v.SamlMetadataURL) + } + + 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 +} diff --git a/service/finspace/types/enums.go b/service/finspace/types/enums.go new file mode 100644 index 00000000000..c49530cc762 --- /dev/null +++ b/service/finspace/types/enums.go @@ -0,0 +1,55 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type EnvironmentStatus string + +// Enum values for EnvironmentStatus +const ( + EnvironmentStatusCreateRequested EnvironmentStatus = "CREATE_REQUESTED" + EnvironmentStatusCreating EnvironmentStatus = "CREATING" + EnvironmentStatusCreated EnvironmentStatus = "CREATED" + EnvironmentStatusDeleteRequested EnvironmentStatus = "DELETE_REQUESTED" + EnvironmentStatusDeleting EnvironmentStatus = "DELETING" + EnvironmentStatusDeleted EnvironmentStatus = "DELETED" + EnvironmentStatusFailedCreation EnvironmentStatus = "FAILED_CREATION" + EnvironmentStatusRetryDeletion EnvironmentStatus = "RETRY_DELETION" + EnvironmentStatusFailedDeletion EnvironmentStatus = "FAILED_DELETION" + EnvironmentStatusSuspended EnvironmentStatus = "SUSPENDED" +) + +// Values returns all known values for EnvironmentStatus. 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 (EnvironmentStatus) Values() []EnvironmentStatus { + return []EnvironmentStatus{ + "CREATE_REQUESTED", + "CREATING", + "CREATED", + "DELETE_REQUESTED", + "DELETING", + "DELETED", + "FAILED_CREATION", + "RETRY_DELETION", + "FAILED_DELETION", + "SUSPENDED", + } +} + +type FederationMode string + +// Enum values for FederationMode +const ( + FederationModeFederated FederationMode = "FEDERATED" + FederationModeLocal FederationMode = "LOCAL" +) + +// Values returns all known values for FederationMode. 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 (FederationMode) Values() []FederationMode { + return []FederationMode{ + "FEDERATED", + "LOCAL", + } +} diff --git a/service/finspace/types/errors.go b/service/finspace/types/errors.go new file mode 100644 index 00000000000..66b346beb1f --- /dev/null +++ b/service/finspace/types/errors.go @@ -0,0 +1,147 @@ +// 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 +} + +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 } + +// The request processing has failed because of an unknown error, exception or +// failure. +type InternalServerException struct { + Message *string +} + +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 is invalid. Something is wrong with the input to the request. +type InvalidRequestException struct { + Message *string +} + +func (e *InvalidRequestException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidRequestException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidRequestException) ErrorCode() string { return "InvalidRequestException" } +func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A service limit or quota is exceeded. +type LimitExceededException struct { + Message *string +} + +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 +} + +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 +} + +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 +} + +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 fails to satisfy the constraints specified by an AWS service. +type ValidationException struct { + Message *string +} + +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/finspace/types/types.go b/service/finspace/types/types.go new file mode 100644 index 00000000000..801081fa1fc --- /dev/null +++ b/service/finspace/types/types.go @@ -0,0 +1,72 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +// Represents an FinSpace environment. +type Environment struct { + + // The ID of the AWS account in which the FinSpace environment is created. + AwsAccountId *string + + // The AWS account ID of the dedicated service account associated with your + // FinSpace environment. + DedicatedServiceAccountId *string + + // The description of the FinSpace environment. + Description *string + + // The Amazon Resource Name (ARN) of your FinSpace environment. + EnvironmentArn *string + + // The identifier of the FinSpace environment. + EnvironmentId *string + + // The sign-in url for the web application of your FinSpace environment. + EnvironmentUrl *string + + // The authentication mode for the environment. + FederationMode FederationMode + + // Configuration information when authentication mode is FEDERATED. + FederationParameters *FederationParameters + + // The KMS key id used to encrypt in the FinSpace environment. + KmsKeyId *string + + // The name of the FinSpace environment. + Name *string + + // The url of the integrated FinSpace notebook environment in your web application. + SageMakerStudioDomainUrl *string + + // The current status of creation of the FinSpace environment. + Status EnvironmentStatus +} + +// Configuration information when authentication mode is FEDERATED. +type FederationParameters struct { + + // The redirect or sign-in URL that should be entered into the SAML 2.0 compliant + // identity provider configuration (IdP). + ApplicationCallBackURL *string + + // SAML attribute name and value. The name must always be Email and the value + // should be set to the attribute definition in which user email is set. For + // example, name would be Email and value + // http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress. Please check + // your SAML 2.0 compliant identity provider (IdP) documentation for details. + AttributeMap map[string]string + + // Name of the identity provider (IdP). + FederationProviderName *string + + // The Uniform Resource Name (URN). Also referred as Service Provider URN or + // Audience URI or Service Provider Entity ID. + FederationURN *string + + // SAML 2.0 Metadata document from identity provider (IdP). + SamlMetadataDocument *string + + // Provide the metadata URL from your SAML 2.0 compliant identity provider (IdP). + SamlMetadataURL *string +} diff --git a/service/finspace/validators.go b/service/finspace/validators.go new file mode 100644 index 00000000000..105051e972f --- /dev/null +++ b/service/finspace/validators.go @@ -0,0 +1,289 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspace + +import ( + "context" + "fmt" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +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 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 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 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 validateOpUpdateEnvironment struct { +} + +func (*validateOpUpdateEnvironment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateEnvironment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateEnvironmentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateEnvironmentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpCreateEnvironmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateEnvironment{}, middleware.After) +} + +func addOpDeleteEnvironmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteEnvironment{}, middleware.After) +} + +func addOpGetEnvironmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetEnvironment{}, 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 addOpUpdateEnvironmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateEnvironment{}, middleware.After) +} + +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 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.EnvironmentId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentId")) + } + 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.EnvironmentId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentId")) + } + 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 validateOpUpdateEnvironmentInput(v *UpdateEnvironmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateEnvironmentInput"} + if v.EnvironmentId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/finspacedata/LICENSE.txt b/service/finspacedata/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/finspacedata/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/finspacedata/api_client.go b/service/finspacedata/api_client.go new file mode 100644 index 00000000000..482d0924617 --- /dev/null +++ b/service/finspacedata/api_client.go @@ -0,0 +1,290 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "context" + "fmt" + "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" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "strings" + "time" +) + +const ServiceID = "finspace data" +const ServiceAPIVersion = "2020-07-13" + +// Client provides the API client to make operations call for FinSpace Public API. +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) + } + + 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 +} + +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) + 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, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "finspacedata", 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) +} + +type customizeRestJsonContentType struct { +} + +func (*customizeRestJsonContentType) ID() string { + return "customizeRestJsonContentType" +} + +func (m *customizeRestJsonContentType) 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) + } + + const contentType = "Content-Type" + const expectedType = "application/json" + const targetType = "application/x-amz-json-1.1" + + if strings.EqualFold(req.Header.Get(contentType), expectedType) { + req.Header.Set(contentType, targetType) + } + + return next.HandleSerialize(ctx, in) +} + +func addRestJsonContentTypeCustomization(stack *middleware.Stack) error { + return stack.Serialize.Insert(&customizeRestJsonContentType{}, "OperationSerializer", middleware.After) +} + +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/finspacedata/api_op_CreateChangeset.go b/service/finspacedata/api_op_CreateChangeset.go new file mode 100644 index 00000000000..ce6815b2428 --- /dev/null +++ b/service/finspacedata/api_op_CreateChangeset.go @@ -0,0 +1,155 @@ +// 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" +) + +// 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{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateChangeset", params, optFns, addOperationCreateChangesetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateChangesetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateChangesetInput struct { + + // 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. + // + // * + // APPEND - Changeset will be considered as an addition to the end of all prior + // loaded changesets. + // + // This member is required. + ChangeType types.ChangeType + + // The unique identifier for the FinSpace dataset in which the changeset will be + // created. + // + // This member is required. + DatasetId *string + + // Source path from which the files to create the changeset will be sourced. + // + // This member is required. + SourceParams map[string]string + + // Type of the data source from which the files to create the changeset will be + // sourced. + // + // * S3 - Amazon S3. + // + // 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 + + // Metadata tags to apply to this changeset. + Tags map[string]string +} + +type CreateChangesetOutput struct { + + // Returns the changeset details. + Changeset *types.ChangesetInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationCreateChangesetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateChangeset{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateChangeset{}, 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 = addOpCreateChangesetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChangeset(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_opCreateChangeset(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "CreateChangeset", + } +} diff --git a/service/finspacedata/api_op_GetProgrammaticAccessCredentials.go b/service/finspacedata/api_op_GetProgrammaticAccessCredentials.go new file mode 100644 index 00000000000..0ed62925675 --- /dev/null +++ b/service/finspacedata/api_op_GetProgrammaticAccessCredentials.go @@ -0,0 +1,126 @@ +// 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" +) + +// Request programmatic credentials to use with Habanero SDK. +func (c *Client) GetProgrammaticAccessCredentials(ctx context.Context, params *GetProgrammaticAccessCredentialsInput, optFns ...func(*Options)) (*GetProgrammaticAccessCredentialsOutput, error) { + if params == nil { + params = &GetProgrammaticAccessCredentialsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetProgrammaticAccessCredentials", params, optFns, addOperationGetProgrammaticAccessCredentialsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetProgrammaticAccessCredentialsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetProgrammaticAccessCredentialsInput struct { + + // The habanero environment identifier. + // + // This member is required. + EnvironmentId *string + + // The time duration in which the credentials remain valid. + DurationInMinutes int64 +} + +type GetProgrammaticAccessCredentialsOutput struct { + + // Returns the programmatic credentials. + Credentials *types.Credentials + + // Returns the duration in which the credentials will remain valid. + DurationInMinutes int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationGetProgrammaticAccessCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetProgrammaticAccessCredentials{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetProgrammaticAccessCredentials{}, 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 = addOpGetProgrammaticAccessCredentialsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetProgrammaticAccessCredentials(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_opGetProgrammaticAccessCredentials(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "GetProgrammaticAccessCredentials", + } +} diff --git a/service/finspacedata/api_op_GetWorkingLocation.go b/service/finspacedata/api_op_GetWorkingLocation.go new file mode 100644 index 00000000000..220a7774f66 --- /dev/null +++ b/service/finspacedata/api_op_GetWorkingLocation.go @@ -0,0 +1,130 @@ +// 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" +) + +// A temporary Amazon S3 location to copy your files from a source location to +// stage or use as a scratch space in Habanero notebook. +func (c *Client) GetWorkingLocation(ctx context.Context, params *GetWorkingLocationInput, optFns ...func(*Options)) (*GetWorkingLocationOutput, error) { + if params == nil { + params = &GetWorkingLocationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetWorkingLocation", params, optFns, addOperationGetWorkingLocationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetWorkingLocationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetWorkingLocationInput struct { + + // Specify the type of the working location. + // + // * SAGEMAKER - Use the Amazon S3 + // location as a temporary location to store data content when working with + // FinSpace Notebooks that run on SageMaker studio. + // + // * 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. + LocationType types.LocationType +} + +type GetWorkingLocationOutput struct { + + // Returns the Amazon S3 bucket name for the working location. + S3Bucket *string + + // Returns the Amazon S3 Path for the working location. + S3Path *string + + // Returns the Amazon S3 URI for the working location. + S3Uri *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationGetWorkingLocationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetWorkingLocation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetWorkingLocation{}, 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_opGetWorkingLocation(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_opGetWorkingLocation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "finspace-api", + OperationName: "GetWorkingLocation", + } +} diff --git a/service/finspacedata/deserializers.go b/service/finspacedata/deserializers.go new file mode 100644 index 00000000000..f1c1e4b78c5 --- /dev/null +++ b/service/finspacedata/deserializers.go @@ -0,0 +1,1151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/finspacedata/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" + "strings" +) + +type awsRestjson1_deserializeOpCreateChangeset struct { +} + +func (*awsRestjson1_deserializeOpCreateChangeset) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateChangeset) HandleDeserialize(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_deserializeOpErrorCreateChangeset(response, &metadata) + } + output := &CreateChangesetOutput{} + 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_deserializeOpDocumentCreateChangesetOutput(&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_deserializeOpErrorCreateChangeset(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeOpDocumentCreateChangesetOutput(v **CreateChangesetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateChangesetOutput + if *v == nil { + sv = &CreateChangesetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "changeset": + if err := awsRestjson1_deserializeDocumentChangesetInfo(&sv.Changeset, value); err != nil { + return err + } + + 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) + + 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 +} + +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_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_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 errorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + 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 + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ChangesetInfo + if *v == nil { + sv = &types.ChangesetInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "changesetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected arn to be of type string, got %T instead", value) + } + sv.ChangesetArn = ptr.String(jtv) + } + + case "changesetLabels": + if err := awsRestjson1_deserializeDocumentStringMap(&sv.ChangesetLabels, value); err != nil { + return err + } + + 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 "createTimestamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreateTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + 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) + } + 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": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FormatType to be of type string, got %T instead", value) + } + sv.FormatType = types.FormatType(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdType to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "sourceParams": + if err := awsRestjson1_deserializeDocumentStringMap(&sv.SourceParams, 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 "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangesetStatus to be of type string, got %T instead", value) + } + sv.Status = types.ChangesetStatus(jtv) + } + + 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 "updatesChangesetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected stringValue to be of type string, got %T instead", value) + } + sv.UpdatesChangesetId = 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 stringValueLength1to255 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_deserializeDocumentErrorInfo(v **types.ErrorInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ErrorInfo + if *v == nil { + sv = &types.ErrorInfo{} + } 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 stringValueMaxLength1000 to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + 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 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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStringMap(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 stringMapValue 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 { + 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 errorMessage 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/finspacedata/doc.go b/service/finspacedata/doc.go new file mode 100644 index 00000000000..fa6e74a9e7a --- /dev/null +++ b/service/finspacedata/doc.go @@ -0,0 +1,7 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// 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. +package finspacedata diff --git a/service/finspacedata/endpoints.go b/service/finspacedata/endpoints.go new file mode 100644 index 00000000000..713b3b5324f --- /dev/null +++ b/service/finspacedata/endpoints.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +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/finspacedata/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" +) + +// 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") + } + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), m.Options) + 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 = "finspace-api" + } + 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.EndpointResolver + 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) + 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) +} + +// 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. +// awsResolver and fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver { + return &wrappedEndpointResolver{ + awsResolver: awsResolver, + resolver: fallbackResolver, + } +} diff --git a/service/finspacedata/generated.json b/service/finspacedata/generated.json new file mode 100644 index 00000000000..8633315d9b5 --- /dev/null +++ b/service/finspacedata/generated.json @@ -0,0 +1,27 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_op_CreateChangeset.go", + "api_op_GetProgrammaticAccessCredentials.go", + "api_op_GetWorkingLocation.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/finspacedata", + "unstable": false +} diff --git a/service/finspacedata/go.mod b/service/finspacedata/go.mod new file mode 100644 index 00000000000..6f82f93b4fb --- /dev/null +++ b/service/finspacedata/go.mod @@ -0,0 +1,10 @@ +module github.com/aws/aws-sdk-go-v2/service/finspacedata + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.4.0 + github.com/aws/smithy-go v1.4.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/finspacedata/go.sum b/service/finspacedata/go.sum new file mode 100644 index 00000000000..49e393e44d1 --- /dev/null +++ b/service/finspacedata/go.sum @@ -0,0 +1,13 @@ +github.com/aws/smithy-go v1.4.0 h1:3rsQpgRe+OoQgJhEwGNpIkosl0fJLdmQqF4gSFRjg+4= +github.com/aws/smithy-go v1.4.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 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.4/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/finspacedata/go_module_metadata.go b/service/finspacedata/go_module_metadata.go new file mode 100644 index 00000000000..4cd80e5a6d2 --- /dev/null +++ b/service/finspacedata/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package finspacedata + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/finspacedata/internal/endpoints/endpoints.go b/service/finspacedata/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..88ed180d996 --- /dev/null +++ b/service/finspacedata/internal/endpoints/endpoints.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + DisableHTTPS bool +} + +// Resolver finspace data 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 := endpoints.Options{ + DisableHTTPS: options.DisableHTTPS, + } + 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: endpoints.Endpoint{ + Hostname: "finspace-api.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: endpoints.Endpoint{ + Hostname: "finspace-api.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: endpoints.Endpoint{ + Hostname: "finspace-api.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: endpoints.Endpoint{ + Hostname: "finspace-api.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: endpoints.Endpoint{ + Hostname: "finspace-api.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/finspacedata/internal/endpoints/endpoints_test.go b/service/finspacedata/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/finspacedata/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/finspacedata/protocol_test.go b/service/finspacedata/protocol_test.go new file mode 100644 index 00000000000..e2b02578598 --- /dev/null +++ b/service/finspacedata/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata diff --git a/service/finspacedata/serializers.go b/service/finspacedata/serializers.go new file mode 100644 index 00000000000..69d5f63bbc9 --- /dev/null +++ b/service/finspacedata/serializers.go @@ -0,0 +1,262 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "bytes" + "context" + "fmt" + 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_serializeOpCreateChangeset struct { +} + +func (*awsRestjson1_serializeOpCreateChangeset) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateChangeset) 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.(*CreateChangesetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/datasets/{datasetId}/changesets") + 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_serializeOpHttpBindingsCreateChangesetInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateChangesetInput(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_serializeOpHttpBindingsCreateChangesetInput(v *CreateChangesetInput, 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_serializeOpDocumentCreateChangesetInput(v *CreateChangesetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ChangeType) > 0 { + ok := object.Key("changeType") + ok.String(string(v.ChangeType)) + } + + if v.FormatParams != nil { + ok := object.Key("formatParams") + if err := awsRestjson1_serializeDocumentStringMap(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 { + 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 +} + +func awsRestjson1_serializeDocumentStringMap(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 +} diff --git a/service/finspacedata/types/enums.go b/service/finspacedata/types/enums.go new file mode 100644 index 00000000000..d3372dbe0f8 --- /dev/null +++ b/service/finspacedata/types/enums.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +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 +const ( + ChangeTypeReplace ChangeType = "REPLACE" + ChangeTypeAppend ChangeType = "APPEND" + ChangeTypeModify ChangeType = "MODIFY" +) + +// Values returns all known values for ChangeType. 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 (ChangeType) Values() []ChangeType { + return []ChangeType{ + "REPLACE", + "APPEND", + "MODIFY", + } +} + +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" +) + +// Values returns all known values for ErrorCategory. 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 (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", + } +} + +type FormatType string + +// Enum values for FormatType +const ( + FormatTypeCsv FormatType = "CSV" + FormatTypeJson FormatType = "JSON" + FormatTypeParquet FormatType = "PARQUET" + FormatTypeXml FormatType = "XML" +) + +// 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", + } +} + +type LocationType string + +// Enum values for LocationType +const ( + LocationTypeIngestion LocationType = "INGESTION" + LocationTypeSagemaker LocationType = "SAGEMAKER" +) + +// Values returns all known values for LocationType. 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 (LocationType) Values() []LocationType { + return []LocationType{ + "INGESTION", + "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 new file mode 100644 index 00000000000..6b5a0b441a5 --- /dev/null +++ b/service/finspacedata/types/errors.go @@ -0,0 +1,94 @@ +// 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 +} + +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 } + +// The request processing has failed because of an unknown error, exception or +// failure. +type InternalServerException struct { + Message *string +} + +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 } + +// One or more resources can't be found. +type ResourceNotFoundException struct { + Message *string +} + +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 was denied due to request throttling. +type ThrottlingException struct { + Message *string +} + +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 fails to satisfy the constraints specified by an AWS service. +type ValidationException struct { + Message *string +} + +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/finspacedata/types/types.go b/service/finspacedata/types/types.go new file mode 100644 index 00000000000..ddbe5c3c4f4 --- /dev/null +++ b/service/finspacedata/types/types.go @@ -0,0 +1,111 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "time" +) + +// A changeset is unit of data in a dataset. +type ChangesetInfo struct { + + // Change type 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 ChangeType + + // The ARN identifier of the changeset. + ChangesetArn *string + + // Tags associated with the changeset. + ChangesetLabels map[string]string + + // The timestamp at which the changeset was created in FinSpace. + CreateTimestamp *time.Time + + // The unique identifier for the FinSpace dataset in which the changeset is + // created. + DatasetId *string + + // The structure with error messages. + ErrorInfo *ErrorInfo + + // 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. + SourceParams map[string]string + + // Type of the data source from which the files to create the changeset are + // sourced. + // + // * S3 - Amazon S3. + SourceType SourceType + + // The status of changeset creation operation. + Status ChangesetStatus + + // Unique identifier of the changeset that is updated a changeset. + UpdatedByChangesetId *string + + // Unique identifier of the changeset that is updated. + UpdatesChangesetId *string +} + +// Set short term API credentials. +type Credentials struct { + + // The access key identifier. + AccessKeyId *string + + // The access key. + SecretAccessKey *string + + // The session token. + SessionToken *string +} + +// Error message. +type ErrorInfo struct { + + // 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 - A user recoverable error has + // occurred. + ErrorCategory ErrorCategory + + // The text of the error message. + ErrorMessage *string +} diff --git a/service/finspacedata/validators.go b/service/finspacedata/validators.go new file mode 100644 index 00000000000..30c845d4562 --- /dev/null +++ b/service/finspacedata/validators.go @@ -0,0 +1,97 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package finspacedata + +import ( + "context" + "fmt" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpCreateChangeset struct { +} + +func (*validateOpCreateChangeset) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateChangeset) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateChangesetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateChangesetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetProgrammaticAccessCredentials struct { +} + +func (*validateOpGetProgrammaticAccessCredentials) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetProgrammaticAccessCredentials) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetProgrammaticAccessCredentialsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetProgrammaticAccessCredentialsInput(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 addOpGetProgrammaticAccessCredentialsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetProgrammaticAccessCredentials{}, middleware.After) +} + +func validateOpCreateChangesetInput(v *CreateChangesetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateChangesetInput"} + if v.DatasetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetId")) + } + 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 invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetProgrammaticAccessCredentialsInput(v *GetProgrammaticAccessCredentialsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetProgrammaticAccessCredentialsInput"} + if v.EnvironmentId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/iotwireless/api_op_UpdateWirelessGateway.go b/service/iotwireless/api_op_UpdateWirelessGateway.go index 2471f8cdf23..c868d73cc2b 100644 --- a/service/iotwireless/api_op_UpdateWirelessGateway.go +++ b/service/iotwireless/api_op_UpdateWirelessGateway.go @@ -36,8 +36,15 @@ type UpdateWirelessGatewayInput struct { // A new description of the resource. Description *string + // A list of JoinEuiRange used by LoRa gateways to filter LoRa frames. + JoinEuiFilters [][]string + // The new name of the resource. Name *string + + // A list of NetId values that are used by LoRa gateways to filter the uplink + // frames. + NetIdFilters []string } type UpdateWirelessGatewayOutput struct { diff --git a/service/iotwireless/deserializers.go b/service/iotwireless/deserializers.go index 9dab30f2857..83ee6f5546f 100644 --- a/service/iotwireless/deserializers.go +++ b/service/iotwireless/deserializers.go @@ -8293,6 +8293,74 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsRestjson1_deserializeDocumentJoinEuiFilters(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_deserializeDocumentJoinEuiRange(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentJoinEuiRange(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 JoinEui to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentLoRaWANDevice(v **types.LoRaWANDevice, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8737,6 +8805,16 @@ func awsRestjson1_deserializeDocumentLoRaWANGateway(v **types.LoRaWANGateway, va sv.GatewayEui = ptr.String(jtv) } + case "JoinEuiFilters": + if err := awsRestjson1_deserializeDocumentJoinEuiFilters(&sv.JoinEuiFilters, value); err != nil { + return err + } + + case "NetIdFilters": + if err := awsRestjson1_deserializeDocumentNetIdFilters(&sv.NetIdFilters, value); err != nil { + return err + } + case "RfRegion": if value != nil { jtv, ok := value.(string) @@ -8746,6 +8824,11 @@ func awsRestjson1_deserializeDocumentLoRaWANGateway(v **types.LoRaWANGateway, va sv.RfRegion = ptr.String(jtv) } + case "SubBands": + if err := awsRestjson1_deserializeDocumentSubBands(&sv.SubBands, value); err != nil { + return err + } + default: _, _ = key, value @@ -9331,6 +9414,42 @@ func awsRestjson1_deserializeDocumentLoRaWANUpdateGatewayTaskEntry(v **types.LoR return nil } +func awsRestjson1_deserializeDocumentNetIdFilters(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 NetId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentOtaaV1_0_x(v **types.OtaaV1_0_x, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10033,6 +10152,46 @@ func awsRestjson1_deserializeDocumentSidewalkListDevice(v **types.SidewalkListDe return nil } +func awsRestjson1_deserializeDocumentSubBands(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 SubBand 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_deserializeDocumentTag(v **types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/iotwireless/serializers.go b/service/iotwireless/serializers.go index 74fc6600384..63ae79f662a 100644 --- a/service/iotwireless/serializers.go +++ b/service/iotwireless/serializers.go @@ -3502,11 +3502,25 @@ func awsRestjson1_serializeOpDocumentUpdateWirelessGatewayInput(v *UpdateWireles ok.String(*v.Description) } + if v.JoinEuiFilters != nil { + ok := object.Key("JoinEuiFilters") + if err := awsRestjson1_serializeDocumentJoinEuiFilters(v.JoinEuiFilters, ok); err != nil { + return err + } + } + if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } + if v.NetIdFilters != nil { + ok := object.Key("NetIdFilters") + if err := awsRestjson1_serializeDocumentNetIdFilters(v.NetIdFilters, ok); err != nil { + return err + } + } + return nil } @@ -3559,6 +3573,33 @@ func awsRestjson1_serializeDocumentFactoryPresetFreqsList(v []int32, value smith return nil } +func awsRestjson1_serializeDocumentJoinEuiFilters(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_serializeDocumentJoinEuiRange(v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentJoinEuiRange(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_serializeDocumentLoRaWANDevice(v *types.LoRaWANDevice, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3722,11 +3763,32 @@ func awsRestjson1_serializeDocumentLoRaWANGateway(v *types.LoRaWANGateway, value ok.String(*v.GatewayEui) } + if v.JoinEuiFilters != nil { + ok := object.Key("JoinEuiFilters") + if err := awsRestjson1_serializeDocumentJoinEuiFilters(v.JoinEuiFilters, ok); err != nil { + return err + } + } + + if v.NetIdFilters != nil { + ok := object.Key("NetIdFilters") + if err := awsRestjson1_serializeDocumentNetIdFilters(v.NetIdFilters, ok); err != nil { + return err + } + } + if v.RfRegion != nil { ok := object.Key("RfRegion") ok.String(*v.RfRegion) } + if v.SubBands != nil { + ok := object.Key("SubBands") + if err := awsRestjson1_serializeDocumentSubBands(v.SubBands, ok); err != nil { + return err + } + } + return nil } @@ -3824,6 +3886,17 @@ func awsRestjson1_serializeDocumentLoRaWANUpdateGatewayTaskCreate(v *types.LoRaW return nil } +func awsRestjson1_serializeDocumentNetIdFilters(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_serializeDocumentOtaaV1_0_x(v *types.OtaaV1_0_x, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3953,6 +4026,17 @@ func awsRestjson1_serializeDocumentSidewalkUpdateAccount(v *types.SidewalkUpdate return nil } +func awsRestjson1_serializeDocumentSubBands(v []int32, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.Integer(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/iotwireless/types/types.go b/service/iotwireless/types/types.go index 47fbfbd7c37..4c12966d292 100644 --- a/service/iotwireless/types/types.go +++ b/service/iotwireless/types/types.go @@ -186,8 +186,18 @@ type LoRaWANGateway struct { // The gateway's EUI value. GatewayEui *string + // A list of JoinEuiRange used by LoRa gateways to filter LoRa frames. + JoinEuiFilters [][]string + + // A list of NetId values that are used by LoRa gateways to filter the uplink + // frames. + NetIdFilters []string + // The frequency band (RFRegion) value. RfRegion *string + + // A list of integer indicating which sub bands are supported by LoRa gateway. + SubBands []int32 } // LoRaWANGatewayCurrentVersion object. diff --git a/service/kinesisanalyticsv2/api_op_DescribeApplicationVersion.go b/service/kinesisanalyticsv2/api_op_DescribeApplicationVersion.go new file mode 100644 index 00000000000..6974a519af4 --- /dev/null +++ b/service/kinesisanalyticsv2/api_op_DescribeApplicationVersion.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package kinesisanalyticsv2 + +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/kinesisanalyticsv2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Provides a detailed description of a specified version of the application. To +// see a list of all the versions of an application, invoke the +// ListApplicationVersions operation. This operation is supported only for Amazon +// Kinesis Data Analytics for Apache Flink. +func (c *Client) DescribeApplicationVersion(ctx context.Context, params *DescribeApplicationVersionInput, optFns ...func(*Options)) (*DescribeApplicationVersionOutput, error) { + if params == nil { + params = &DescribeApplicationVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeApplicationVersion", params, optFns, addOperationDescribeApplicationVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeApplicationVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeApplicationVersionInput struct { + + // The name of the application for which you want to get the version description. + // + // This member is required. + ApplicationName *string + + // The ID of the application version for which you want to get the description. + // + // This member is required. + ApplicationVersionId *int64 +} + +type DescribeApplicationVersionOutput struct { + + // Describes the application, including the application Amazon Resource Name (ARN), + // status, latest version, and input and output configurations. + ApplicationVersionDetail *types.ApplicationDetail + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationDescribeApplicationVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeApplicationVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeApplicationVersion{}, 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 = addOpDescribeApplicationVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplicationVersion(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_opDescribeApplicationVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "kinesisanalytics", + OperationName: "DescribeApplicationVersion", + } +} diff --git a/service/kinesisanalyticsv2/api_op_ListApplicationVersions.go b/service/kinesisanalyticsv2/api_op_ListApplicationVersions.go new file mode 100644 index 00000000000..4f805430f7d --- /dev/null +++ b/service/kinesisanalyticsv2/api_op_ListApplicationVersions.go @@ -0,0 +1,140 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package kinesisanalyticsv2 + +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/kinesisanalyticsv2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the versions for the specified application, including versions that +// were rolled back. The response also includes a summary of the configuration +// associated with each version. To get the complete description of a specific +// application version, invoke the DescribeApplicationVersion operation. This +// operation is supported only for Amazon Kinesis Data Analytics for Apache Flink. +func (c *Client) ListApplicationVersions(ctx context.Context, params *ListApplicationVersionsInput, optFns ...func(*Options)) (*ListApplicationVersionsOutput, error) { + if params == nil { + params = &ListApplicationVersionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListApplicationVersions", params, optFns, addOperationListApplicationVersionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListApplicationVersionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListApplicationVersionsInput struct { + + // The name of the application for which you want to list all versions. + // + // This member is required. + ApplicationName *string + + // The maximum number of versions to list in this invocation of the operation. + Limit *int32 + + // If a previous invocation of this operation returned a pagination token, pass it + // into this value to retrieve the next set of results. For more information about + // pagination, see Using the AWS Command Line Interface's Pagination Options + // (https://docs.aws.amazon.com/cli/latest/userguide/pagination.html). + NextToken *string +} + +type ListApplicationVersionsOutput struct { + + // A list of the application versions and the associated configuration summaries. + // The list includes application versions that were rolled back. To get the + // complete description of a specific application version, invoke the + // DescribeApplicationVersion operation. + ApplicationVersionSummaries []types.ApplicationVersionSummary + + // The pagination token for the next set of results, or null if there are no + // additional results. To retrieve the next set of items, pass this token into a + // subsequent invocation of this operation. For more information about pagination, + // see Using the AWS Command Line Interface's Pagination Options + // (https://docs.aws.amazon.com/cli/latest/userguide/pagination.html). + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListApplicationVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListApplicationVersions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListApplicationVersions{}, 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 = addOpListApplicationVersionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationVersions(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_opListApplicationVersions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "kinesisanalytics", + OperationName: "ListApplicationVersions", + } +} diff --git a/service/kinesisanalyticsv2/api_op_UpdateApplicationMaintenanceConfiguration.go b/service/kinesisanalyticsv2/api_op_UpdateApplicationMaintenanceConfiguration.go index ee66d9bf70a..0986ac2fe13 100644 --- a/service/kinesisanalyticsv2/api_op_UpdateApplicationMaintenanceConfiguration.go +++ b/service/kinesisanalyticsv2/api_op_UpdateApplicationMaintenanceConfiguration.go @@ -11,10 +11,23 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the configuration for the automatic maintenance that Kinesis Data -// Analytics performs on the application. For information about automatic -// application maintenance, see Kinesis Data Analytics for Apache Flink Maintenance +// Updates the maintenance configuration of the Kinesis Data Analytics application. +// You can invoke this operation on an application that is in one of the two +// following states: READY or RUNNING. If you invoke it when the application is in +// a state other than these two states, it throws a ResourceInUseException. The +// service makes use of the updated configuration the next time it schedules +// maintenance for the application. If you invoke this operation after the service +// schedules maintenance, the service will apply the configuration update the next +// time it schedules maintenance for the application. This means that you might not +// see the maintenance configuration update applied to the maintenance process that +// follows a successful invocation of this operation, but to the following +// maintenance process instead. To see the current maintenance configuration of +// your application, invoke the DescribeApplication operation. For information +// about application maintenance, see Kinesis Data Analytics for Apache Flink +// Maintenance // (https://docs.aws.amazon.com/kinesisanalytics/latest/java/maintenance.html). +// This operation is supported only for Amazon Kinesis Data Analytics for Apache +// Flink. func (c *Client) UpdateApplicationMaintenanceConfiguration(ctx context.Context, params *UpdateApplicationMaintenanceConfigurationInput, optFns ...func(*Options)) (*UpdateApplicationMaintenanceConfigurationOutput, error) { if params == nil { params = &UpdateApplicationMaintenanceConfigurationInput{} @@ -37,8 +50,8 @@ type UpdateApplicationMaintenanceConfigurationInput struct { // This member is required. ApplicationMaintenanceConfigurationUpdate *types.ApplicationMaintenanceConfigurationUpdate - // The name of the application for which you want to update the maintenance time - // window. + // The name of the application for which you want to update the maintenance + // configuration. // // This member is required. ApplicationName *string diff --git a/service/kinesisanalyticsv2/deserializers.go b/service/kinesisanalyticsv2/deserializers.go index 736094697fd..e7c11513d14 100644 --- a/service/kinesisanalyticsv2/deserializers.go +++ b/service/kinesisanalyticsv2/deserializers.go @@ -2239,6 +2239,123 @@ func awsAwsjson11_deserializeOpErrorDescribeApplicationSnapshot(response *smithy } } +type awsAwsjson11_deserializeOpDescribeApplicationVersion struct { +} + +func (*awsAwsjson11_deserializeOpDescribeApplicationVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeApplicationVersion) HandleDeserialize(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_deserializeOpErrorDescribeApplicationVersion(response, &metadata) + } + output := &DescribeApplicationVersionOutput{} + 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_deserializeOpDocumentDescribeApplicationVersionOutput(&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_deserializeOpErrorDescribeApplicationVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InvalidArgumentException", errorCode): + return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDiscoverInputSchema struct { } @@ -2587,6 +2704,123 @@ func awsAwsjson11_deserializeOpErrorListApplicationSnapshots(response *smithyhtt } } +type awsAwsjson11_deserializeOpListApplicationVersions struct { +} + +func (*awsAwsjson11_deserializeOpListApplicationVersions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListApplicationVersions) HandleDeserialize(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_deserializeOpErrorListApplicationVersions(response, &metadata) + } + output := &ListApplicationVersionsOutput{} + 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_deserializeOpDocumentListApplicationVersionsOutput(&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_deserializeOpErrorListApplicationVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InvalidArgumentException", errorCode): + return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpListTagsForResource struct { } @@ -4240,6 +4474,19 @@ func awsAwsjson11_deserializeDocumentApplicationDetail(v **types.ApplicationDeta sv.ApplicationVersionRolledBackFrom = ptr.Int64(i64) } + case "ApplicationVersionRolledBackTo": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ApplicationVersionRolledBackTo = ptr.Int64(i64) + } + case "ApplicationVersionUpdatedFrom": if value != nil { jtv, ok := value.(json.Number) @@ -4572,6 +4819,93 @@ func awsAwsjson11_deserializeDocumentApplicationSummary(v **types.ApplicationSum return nil } +func awsAwsjson11_deserializeDocumentApplicationVersionSummaries(v *[]types.ApplicationVersionSummary, 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.ApplicationVersionSummary + if *v == nil { + cv = []types.ApplicationVersionSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ApplicationVersionSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentApplicationVersionSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentApplicationVersionSummary(v **types.ApplicationVersionSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ApplicationVersionSummary + if *v == nil { + sv = &types.ApplicationVersionSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationStatus to be of type string, got %T instead", value) + } + sv.ApplicationStatus = types.ApplicationStatus(jtv) + } + + case "ApplicationVersionId": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ApplicationVersionId = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentCheckpointConfigurationDescription(v **types.CheckpointConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8417,6 +8751,42 @@ func awsAwsjson11_deserializeOpDocumentDescribeApplicationSnapshotOutput(v **Des return nil } +func awsAwsjson11_deserializeOpDocumentDescribeApplicationVersionOutput(v **DescribeApplicationVersionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeApplicationVersionOutput + if *v == nil { + sv = &DescribeApplicationVersionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationVersionDetail": + if err := awsAwsjson11_deserializeDocumentApplicationDetail(&sv.ApplicationVersionDetail, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDiscoverInputSchemaOutput(v **DiscoverInputSchemaOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8558,6 +8928,51 @@ func awsAwsjson11_deserializeOpDocumentListApplicationsOutput(v **ListApplicatio return nil } +func awsAwsjson11_deserializeOpDocumentListApplicationVersionsOutput(v **ListApplicationVersionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListApplicationVersionsOutput + if *v == nil { + sv = &ListApplicationVersionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationVersionSummaries": + if err := awsAwsjson11_deserializeDocumentApplicationVersionSummaries(&sv.ApplicationVersionSummaries, 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_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/kinesisanalyticsv2/generated.json b/service/kinesisanalyticsv2/generated.json index c40acaf89c1..57ef12abb8f 100644 --- a/service/kinesisanalyticsv2/generated.json +++ b/service/kinesisanalyticsv2/generated.json @@ -23,8 +23,10 @@ "api_op_DeleteApplicationVpcConfiguration.go", "api_op_DescribeApplication.go", "api_op_DescribeApplicationSnapshot.go", + "api_op_DescribeApplicationVersion.go", "api_op_DiscoverInputSchema.go", "api_op_ListApplicationSnapshots.go", + "api_op_ListApplicationVersions.go", "api_op_ListApplications.go", "api_op_ListTagsForResource.go", "api_op_RollbackApplication.go", diff --git a/service/kinesisanalyticsv2/serializers.go b/service/kinesisanalyticsv2/serializers.go index cdcd954de61..36f798bd59d 100644 --- a/service/kinesisanalyticsv2/serializers.go +++ b/service/kinesisanalyticsv2/serializers.go @@ -861,6 +861,53 @@ func (m *awsAwsjson11_serializeOpDescribeApplicationSnapshot) HandleSerialize(ct return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribeApplicationVersion struct { +} + +func (*awsAwsjson11_serializeOpDescribeApplicationVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeApplicationVersion) 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.(*DescribeApplicationVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("KinesisAnalytics_20180523.DescribeApplicationVersion") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeApplicationVersionInput(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_serializeOpDiscoverInputSchema struct { } @@ -1002,6 +1049,53 @@ func (m *awsAwsjson11_serializeOpListApplicationSnapshots) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListApplicationVersions struct { +} + +func (*awsAwsjson11_serializeOpListApplicationVersions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListApplicationVersions) 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.(*ListApplicationVersionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("KinesisAnalytics_20180523.ListApplicationVersions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListApplicationVersionsInput(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_serializeOpListTagsForResource struct { } @@ -3462,6 +3556,23 @@ func awsAwsjson11_serializeOpDocumentDescribeApplicationSnapshotInput(v *Describ return nil } +func awsAwsjson11_serializeOpDocumentDescribeApplicationVersionInput(v *DescribeApplicationVersionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApplicationName != nil { + ok := object.Key("ApplicationName") + ok.String(*v.ApplicationName) + } + + if v.ApplicationVersionId != nil { + ok := object.Key("ApplicationVersionId") + ok.Long(*v.ApplicationVersionId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDiscoverInputSchemaInput(v *DiscoverInputSchemaInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3539,6 +3650,28 @@ func awsAwsjson11_serializeOpDocumentListApplicationSnapshotsInput(v *ListApplic return nil } +func awsAwsjson11_serializeOpDocumentListApplicationVersionsInput(v *ListApplicationVersionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApplicationName != nil { + ok := object.Key("ApplicationName") + ok.String(*v.ApplicationName) + } + + if v.Limit != nil { + ok := object.Key("Limit") + ok.Integer(*v.Limit) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/kinesisanalyticsv2/types/enums.go b/service/kinesisanalyticsv2/types/enums.go index 6e6217fb365..6a4f10cd244 100644 --- a/service/kinesisanalyticsv2/types/enums.go +++ b/service/kinesisanalyticsv2/types/enums.go @@ -36,6 +36,7 @@ const ( ApplicationStatusForceStopping ApplicationStatus = "FORCE_STOPPING" ApplicationStatusMaintenance ApplicationStatus = "MAINTENANCE" ApplicationStatusRollingBack ApplicationStatus = "ROLLING_BACK" + ApplicationStatusRolledBack ApplicationStatus = "ROLLED_BACK" ) // Values returns all known values for ApplicationStatus. Note that this can be @@ -53,6 +54,7 @@ func (ApplicationStatus) Values() []ApplicationStatus { "FORCE_STOPPING", "MAINTENANCE", "ROLLING_BACK", + "ROLLED_BACK", } } diff --git a/service/kinesisanalyticsv2/types/types.go b/service/kinesisanalyticsv2/types/types.go index 851f3527600..1a2fbb52cb5 100644 --- a/service/kinesisanalyticsv2/types/types.go +++ b/service/kinesisanalyticsv2/types/types.go @@ -169,13 +169,16 @@ type ApplicationDetail struct { // The description of the application. ApplicationDescription *string - // Describes the time window for automatic application maintenance. + // The details of the maintenance configuration for the application. ApplicationMaintenanceConfigurationDescription *ApplicationMaintenanceConfigurationDescription // If you reverted the application using RollbackApplication, the application // version when RollbackApplication was called. ApplicationVersionRolledBackFrom *int64 + // The version to which you want to roll back the application. + ApplicationVersionRolledBackTo *int64 + // The previous application version before the latest application update. // RollbackApplication reverts the application to this version. ApplicationVersionUpdatedFrom *int64 @@ -196,24 +199,24 @@ type ApplicationDetail struct { ServiceExecutionRole *string } -// Describes the time window for automatic application maintenance. +// The details of the maintenance configuration for the application. type ApplicationMaintenanceConfigurationDescription struct { - // The end time for the automatic maintenance window. + // The end time for the maintenance window. // // This member is required. ApplicationMaintenanceWindowEndTime *string - // The start time for the automatic maintenance window. + // The start time for the maintenance window. // // This member is required. ApplicationMaintenanceWindowStartTime *string } -// Describes the updated time window for automatic application maintenance. +// Describes the updated maintenance configuration for the application. type ApplicationMaintenanceConfigurationUpdate struct { - // The updated start time for the automatic maintenance window. + // The updated start time for the maintenance window. // // This member is required. ApplicationMaintenanceWindowStartTimeUpdate *string @@ -298,6 +301,21 @@ type ApplicationSummary struct { RuntimeEnvironment RuntimeEnvironment } +// The summary of the application version. +type ApplicationVersionSummary struct { + + // The status of the application. + // + // This member is required. + ApplicationStatus ApplicationStatus + + // The ID of the application version. Kinesis Data Analytics updates the + // ApplicationVersionId each time you update the application. + // + // This member is required. + ApplicationVersionId *int64 +} + // Describes an application's checkpointing configuration. Checkpointing is the // process of persisting application state for fault tolerance. For more // information, see Checkpoints for Fault Tolerance diff --git a/service/kinesisanalyticsv2/validators.go b/service/kinesisanalyticsv2/validators.go index 7feca9fcbd0..3d14500f8af 100644 --- a/service/kinesisanalyticsv2/validators.go +++ b/service/kinesisanalyticsv2/validators.go @@ -370,6 +370,26 @@ func (m *validateOpDescribeApplicationSnapshot) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpDescribeApplicationVersion struct { +} + +func (*validateOpDescribeApplicationVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeApplicationVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeApplicationVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeApplicationVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDiscoverInputSchema struct { } @@ -410,6 +430,26 @@ func (m *validateOpListApplicationSnapshots) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpListApplicationVersions struct { +} + +func (*validateOpListApplicationVersions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListApplicationVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListApplicationVersionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListApplicationVersionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTagsForResource struct { } @@ -642,6 +682,10 @@ func addOpDescribeApplicationSnapshotValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpDescribeApplicationSnapshot{}, middleware.After) } +func addOpDescribeApplicationVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeApplicationVersion{}, middleware.After) +} + func addOpDiscoverInputSchemaValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDiscoverInputSchema{}, middleware.After) } @@ -650,6 +694,10 @@ func addOpListApplicationSnapshotsValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpListApplicationSnapshots{}, middleware.After) } +func addOpListApplicationVersionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListApplicationVersions{}, middleware.After) +} + func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } @@ -2416,6 +2464,24 @@ func validateOpDescribeApplicationSnapshotInput(v *DescribeApplicationSnapshotIn } } +func validateOpDescribeApplicationVersionInput(v *DescribeApplicationVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeApplicationVersionInput"} + if v.ApplicationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) + } + if v.ApplicationVersionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationVersionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDiscoverInputSchemaInput(v *DiscoverInputSchemaInput) error { if v == nil { return nil @@ -2456,6 +2522,21 @@ func validateOpListApplicationSnapshotsInput(v *ListApplicationSnapshotsInput) e } } +func validateOpListApplicationVersionsInput(v *ListApplicationVersionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListApplicationVersionsInput"} + if v.ApplicationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil diff --git a/service/lakeformation/api_op_AddLFTagsToResource.go b/service/lakeformation/api_op_AddLFTagsToResource.go new file mode 100644 index 00000000000..e52ee989b8f --- /dev/null +++ b/service/lakeformation/api_op_AddLFTagsToResource.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lakeformation + +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/lakeformation/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Attaches one or more tags to an existing resource. +func (c *Client) AddLFTagsToResource(ctx context.Context, params *AddLFTagsToResourceInput, optFns ...func(*Options)) (*AddLFTagsToResourceOutput, error) { + if params == nil { + params = &AddLFTagsToResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddLFTagsToResource", params, optFns, addOperationAddLFTagsToResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddLFTagsToResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AddLFTagsToResourceInput struct { + + // The tags to attach to the resource. + // + // This member is required. + LFTags []types.LFTagPair + + // The resource to which to attach a tag. + // + // This member is required. + Resource *types.Resource + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string +} + +type AddLFTagsToResourceOutput struct { + + // A list of failures to tag the resource. + Failures []types.LFTagError + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationAddLFTagsToResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpAddLFTagsToResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAddLFTagsToResource{}, 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 = addOpAddLFTagsToResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddLFTagsToResource(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_opAddLFTagsToResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "lakeformation", + OperationName: "AddLFTagsToResource", + } +} diff --git a/service/lakeformation/api_op_CreateLFTag.go b/service/lakeformation/api_op_CreateLFTag.go new file mode 100644 index 00000000000..5952263ab01 --- /dev/null +++ b/service/lakeformation/api_op_CreateLFTag.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lakeformation + +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" +) + +// Creates a tag with the specified name and values. +func (c *Client) CreateLFTag(ctx context.Context, params *CreateLFTagInput, optFns ...func(*Options)) (*CreateLFTagOutput, error) { + if params == nil { + params = &CreateLFTagInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateLFTag", params, optFns, addOperationCreateLFTagMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateLFTagOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateLFTagInput struct { + + // The key-name for the tag. + // + // This member is required. + TagKey *string + + // A list of possible values an attribute can take. + // + // This member is required. + TagValues []string + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string +} + +type CreateLFTagOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationCreateLFTagMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateLFTag{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateLFTag{}, 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 = addOpCreateLFTagValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLFTag(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_opCreateLFTag(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "lakeformation", + OperationName: "CreateLFTag", + } +} diff --git a/service/lakeformation/api_op_DeleteLFTag.go b/service/lakeformation/api_op_DeleteLFTag.go new file mode 100644 index 00000000000..ffd0bb4c860 --- /dev/null +++ b/service/lakeformation/api_op_DeleteLFTag.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lakeformation + +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 specified tag key name. If the attribute key does not exist or the +// tag does not exist, then the operation will not do anything. If the attribute +// key exists, then the operation checks if any resources are tagged with this +// attribute key, if yes, the API throws a 400 Exception with the message "Delete +// not allowed" as the tag key is still attached with resources. You can consider +// untagging resources with this tag key. +func (c *Client) DeleteLFTag(ctx context.Context, params *DeleteLFTagInput, optFns ...func(*Options)) (*DeleteLFTagOutput, error) { + if params == nil { + params = &DeleteLFTagInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteLFTag", params, optFns, addOperationDeleteLFTagMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteLFTagOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteLFTagInput struct { + + // The key-name for the tag to delete. + // + // This member is required. + TagKey *string + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string +} + +type DeleteLFTagOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationDeleteLFTagMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteLFTag{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteLFTag{}, 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 = addOpDeleteLFTagValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLFTag(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_opDeleteLFTag(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "lakeformation", + OperationName: "DeleteLFTag", + } +} diff --git a/service/lakeformation/api_op_GetLFTag.go b/service/lakeformation/api_op_GetLFTag.go new file mode 100644 index 00000000000..d6bb2f3bee9 --- /dev/null +++ b/service/lakeformation/api_op_GetLFTag.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lakeformation + +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" +) + +// Returns a tag definition. +func (c *Client) GetLFTag(ctx context.Context, params *GetLFTagInput, optFns ...func(*Options)) (*GetLFTagOutput, error) { + if params == nil { + params = &GetLFTagInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLFTag", params, optFns, addOperationGetLFTagMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLFTagOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLFTagInput struct { + + // The key-name for the tag. + // + // This member is required. + TagKey *string + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string +} + +type GetLFTagOutput struct { + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string + + // The key-name for the tag. + TagKey *string + + // A list of possible values an attribute can take. + TagValues []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationGetLFTagMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetLFTag{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetLFTag{}, 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 = addOpGetLFTagValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLFTag(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_opGetLFTag(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "lakeformation", + OperationName: "GetLFTag", + } +} diff --git a/service/lakeformation/api_op_GetResourceLFTags.go b/service/lakeformation/api_op_GetResourceLFTags.go new file mode 100644 index 00000000000..db2f70da59c --- /dev/null +++ b/service/lakeformation/api_op_GetResourceLFTags.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lakeformation + +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/lakeformation/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the tags applied to a resource. +func (c *Client) GetResourceLFTags(ctx context.Context, params *GetResourceLFTagsInput, optFns ...func(*Options)) (*GetResourceLFTagsOutput, error) { + if params == nil { + params = &GetResourceLFTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResourceLFTags", params, optFns, addOperationGetResourceLFTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResourceLFTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResourceLFTagsInput struct { + + // The resource for which you want to return tags. + // + // This member is required. + Resource *types.Resource + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string + + // Indicates whether to show the assigned tags. + ShowAssignedLFTags *bool +} + +type GetResourceLFTagsOutput struct { + + // A list of tags applied to a database resource. + LFTagOnDatabase []types.LFTagPair + + // A list of tags applied to a column resource. + LFTagsOnColumns []types.ColumnLFTag + + // A list of tags applied to a table resource. + LFTagsOnTable []types.LFTagPair + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationGetResourceLFTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetResourceLFTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetResourceLFTags{}, 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 = addOpGetResourceLFTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourceLFTags(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_opGetResourceLFTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "lakeformation", + OperationName: "GetResourceLFTags", + } +} diff --git a/service/lakeformation/api_op_ListLFTags.go b/service/lakeformation/api_op_ListLFTags.go new file mode 100644 index 00000000000..d385b56b52a --- /dev/null +++ b/service/lakeformation/api_op_ListLFTags.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lakeformation + +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/lakeformation/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists tags that the requester has permission to view. +func (c *Client) ListLFTags(ctx context.Context, params *ListLFTagsInput, optFns ...func(*Options)) (*ListLFTagsOutput, error) { + if params == nil { + params = &ListLFTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListLFTags", params, optFns, addOperationListLFTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListLFTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListLFTagsInput struct { + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string + + // The maximum number of results to return. + MaxResults *int32 + + // A continuation token, if this is not the first call to retrieve this list. + NextToken *string + + // If resource share type is ALL, returns both in-account tags and shared tags that + // the requester has permission to view. If resource share type is FOREIGN, returns + // all share tags that the requester can view. If no resource share type is passed, + // lists tags in the given catalog ID that the requester has permission to view. + ResourceShareType types.ResourceShareType +} + +type ListLFTagsOutput struct { + + // A list of tags that the requested has permission to view. + LFTags []types.LFTagPair + + // A continuation token, present if the current list segment is not the last. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListLFTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListLFTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListLFTags{}, 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_opListLFTags(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_opListLFTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "lakeformation", + OperationName: "ListLFTags", + } +} diff --git a/service/lakeformation/api_op_RemoveLFTagsFromResource.go b/service/lakeformation/api_op_RemoveLFTagsFromResource.go new file mode 100644 index 00000000000..09b1ea810fb --- /dev/null +++ b/service/lakeformation/api_op_RemoveLFTagsFromResource.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lakeformation + +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/lakeformation/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes a tag from the resource. Only database, table, or tableWithColumns +// resource are allowed. To tag columns, use the column inclusion list in +// tableWithColumns to specify column input. +func (c *Client) RemoveLFTagsFromResource(ctx context.Context, params *RemoveLFTagsFromResourceInput, optFns ...func(*Options)) (*RemoveLFTagsFromResourceOutput, error) { + if params == nil { + params = &RemoveLFTagsFromResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RemoveLFTagsFromResource", params, optFns, addOperationRemoveLFTagsFromResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RemoveLFTagsFromResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RemoveLFTagsFromResourceInput struct { + + // The tags to be removed from the resource. + // + // This member is required. + LFTags []types.LFTagPair + + // The resource where you want to remove a tag. + // + // This member is required. + Resource *types.Resource + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string +} + +type RemoveLFTagsFromResourceOutput struct { + + // A list of failures to untag a resource. + Failures []types.LFTagError + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationRemoveLFTagsFromResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpRemoveLFTagsFromResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRemoveLFTagsFromResource{}, 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 = addOpRemoveLFTagsFromResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveLFTagsFromResource(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_opRemoveLFTagsFromResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "lakeformation", + OperationName: "RemoveLFTagsFromResource", + } +} diff --git a/service/lakeformation/api_op_SearchDatabasesByLFTags.go b/service/lakeformation/api_op_SearchDatabasesByLFTags.go new file mode 100644 index 00000000000..fe7e7bbe5cf --- /dev/null +++ b/service/lakeformation/api_op_SearchDatabasesByLFTags.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lakeformation + +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/lakeformation/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This operation allows a search on DATABASE resources by TagCondition. This +// operation is used by admins who want to grant user permissions on certain +// TagConditions. Before making a grant, the admin can use SearchDatabasesByTags to +// find all resources where the given TagConditions are valid to verify whether the +// returned resources can be shared. +func (c *Client) SearchDatabasesByLFTags(ctx context.Context, params *SearchDatabasesByLFTagsInput, optFns ...func(*Options)) (*SearchDatabasesByLFTagsOutput, error) { + if params == nil { + params = &SearchDatabasesByLFTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchDatabasesByLFTags", params, optFns, addOperationSearchDatabasesByLFTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchDatabasesByLFTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchDatabasesByLFTagsInput struct { + + // A list of conditions (LFTag structures) to search for in database resources. + // + // This member is required. + Expression []types.LFTag + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string + + // The maximum number of results to return. + MaxResults *int32 + + // A continuation token, if this is not the first call to retrieve this list. + NextToken *string +} + +type SearchDatabasesByLFTagsOutput struct { + + // A list of databases that meet the tag conditions. + DatabaseList []types.TaggedDatabase + + // A continuation token, present if the current list segment is not the last. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationSearchDatabasesByLFTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpSearchDatabasesByLFTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpSearchDatabasesByLFTags{}, 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 = addOpSearchDatabasesByLFTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchDatabasesByLFTags(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_opSearchDatabasesByLFTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "lakeformation", + OperationName: "SearchDatabasesByLFTags", + } +} diff --git a/service/lakeformation/api_op_SearchTablesByLFTags.go b/service/lakeformation/api_op_SearchTablesByLFTags.go new file mode 100644 index 00000000000..ea50f37fc69 --- /dev/null +++ b/service/lakeformation/api_op_SearchTablesByLFTags.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lakeformation + +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/lakeformation/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This operation allows a search on TABLE resources by LFTags. This will be used +// by admins who want to grant user permissions on certain LFTags. Before making a +// grant, the admin can use SearchTablesByLFTags to find all resources where the +// given LFTags are valid to verify whether the returned resources can be shared. +func (c *Client) SearchTablesByLFTags(ctx context.Context, params *SearchTablesByLFTagsInput, optFns ...func(*Options)) (*SearchTablesByLFTagsOutput, error) { + if params == nil { + params = &SearchTablesByLFTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SearchTablesByLFTags", params, optFns, addOperationSearchTablesByLFTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SearchTablesByLFTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SearchTablesByLFTagsInput struct { + + // A list of conditions (LFTag structures) to search for in table resources. + // + // This member is required. + Expression []types.LFTag + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string + + // The maximum number of results to return. + MaxResults *int32 + + // A continuation token, if this is not the first call to retrieve this list. + NextToken *string +} + +type SearchTablesByLFTagsOutput struct { + + // A continuation token, present if the current list segment is not the last. + NextToken *string + + // A list of tables that meet the tag conditions. + TableList []types.TaggedTable + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationSearchTablesByLFTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpSearchTablesByLFTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpSearchTablesByLFTags{}, 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 = addOpSearchTablesByLFTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchTablesByLFTags(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_opSearchTablesByLFTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "lakeformation", + OperationName: "SearchTablesByLFTags", + } +} diff --git a/service/lakeformation/api_op_UpdateLFTag.go b/service/lakeformation/api_op_UpdateLFTag.go new file mode 100644 index 00000000000..6c745d76000 --- /dev/null +++ b/service/lakeformation/api_op_UpdateLFTag.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lakeformation + +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 the list of possible values for the specified tag key. If the tag does +// not exist, the operation throws an EntityNotFoundException. The values in the +// delete key values will be deleted from list of possible values. If any value in +// the delete key values is attached to a resource, then API errors out with a 400 +// Exception - "Update not allowed". Untag the attribute before deleting the tag +// key's value. +func (c *Client) UpdateLFTag(ctx context.Context, params *UpdateLFTagInput, optFns ...func(*Options)) (*UpdateLFTagOutput, error) { + if params == nil { + params = &UpdateLFTagInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateLFTag", params, optFns, addOperationUpdateLFTagMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateLFTagOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateLFTagInput struct { + + // The key-name for the tag for which to add or delete values. + // + // This member is required. + TagKey *string + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string + + // A list of tag values to add from the tag. + TagValuesToAdd []string + + // A list of tag values to delete from the tag. + TagValuesToDelete []string +} + +type UpdateLFTagOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationUpdateLFTagMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateLFTag{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateLFTag{}, 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 = addOpUpdateLFTagValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLFTag(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_opUpdateLFTag(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "lakeformation", + OperationName: "UpdateLFTag", + } +} diff --git a/service/lakeformation/deserializers.go b/service/lakeformation/deserializers.go index 2d304823224..102562a5b5a 100644 --- a/service/lakeformation/deserializers.go +++ b/service/lakeformation/deserializers.go @@ -19,14 +19,14 @@ import ( "strings" ) -type awsAwsjson11_deserializeOpBatchGrantPermissions struct { +type awsAwsjson11_deserializeOpAddLFTagsToResource struct { } -func (*awsAwsjson11_deserializeOpBatchGrantPermissions) ID() string { +func (*awsAwsjson11_deserializeOpAddLFTagsToResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpBatchGrantPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpAddLFTagsToResource) HandleDeserialize(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 *awsAwsjson11_deserializeOpBatchGrantPermissions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorBatchGrantPermissions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorAddLFTagsToResource(response, &metadata) } - output := &BatchGrantPermissionsOutput{} + output := &AddLFTagsToResourceOutput{} out.Result = output var buff [1024]byte @@ -62,7 +62,7 @@ func (m *awsAwsjson11_deserializeOpBatchGrantPermissions) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentBatchGrantPermissionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentAddLFTagsToResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -76,7 +76,7 @@ func (m *awsAwsjson11_deserializeOpBatchGrantPermissions) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorBatchGrantPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorAddLFTagsToResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -117,6 +117,18 @@ func awsAwsjson11_deserializeOpErrorBatchGrantPermissions(response *smithyhttp.R } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) @@ -133,14 +145,14 @@ func awsAwsjson11_deserializeOpErrorBatchGrantPermissions(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpBatchRevokePermissions struct { +type awsAwsjson11_deserializeOpBatchGrantPermissions struct { } -func (*awsAwsjson11_deserializeOpBatchRevokePermissions) ID() string { +func (*awsAwsjson11_deserializeOpBatchGrantPermissions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpBatchRevokePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpBatchGrantPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -154,9 +166,9 @@ func (m *awsAwsjson11_deserializeOpBatchRevokePermissions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorBatchRevokePermissions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorBatchGrantPermissions(response, &metadata) } - output := &BatchRevokePermissionsOutput{} + output := &BatchGrantPermissionsOutput{} out.Result = output var buff [1024]byte @@ -176,7 +188,7 @@ func (m *awsAwsjson11_deserializeOpBatchRevokePermissions) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentBatchRevokePermissionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentBatchGrantPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -190,7 +202,7 @@ func (m *awsAwsjson11_deserializeOpBatchRevokePermissions) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorBatchRevokePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorBatchGrantPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -247,14 +259,14 @@ func awsAwsjson11_deserializeOpErrorBatchRevokePermissions(response *smithyhttp. } } -type awsAwsjson11_deserializeOpDeregisterResource struct { +type awsAwsjson11_deserializeOpBatchRevokePermissions struct { } -func (*awsAwsjson11_deserializeOpDeregisterResource) ID() string { +func (*awsAwsjson11_deserializeOpBatchRevokePermissions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeregisterResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpBatchRevokePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -268,9 +280,9 @@ func (m *awsAwsjson11_deserializeOpDeregisterResource) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeregisterResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorBatchRevokePermissions(response, &metadata) } - output := &DeregisterResourceOutput{} + output := &BatchRevokePermissionsOutput{} out.Result = output var buff [1024]byte @@ -290,7 +302,7 @@ func (m *awsAwsjson11_deserializeOpDeregisterResource) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeregisterResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentBatchRevokePermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -304,7 +316,7 @@ func (m *awsAwsjson11_deserializeOpDeregisterResource) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeregisterResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorBatchRevokePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -345,12 +357,6 @@ func awsAwsjson11_deserializeOpErrorDeregisterResource(response *smithyhttp.Resp } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) @@ -367,14 +373,14 @@ func awsAwsjson11_deserializeOpErrorDeregisterResource(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpDescribeResource struct { +type awsAwsjson11_deserializeOpCreateLFTag struct { } -func (*awsAwsjson11_deserializeOpDescribeResource) ID() string { +func (*awsAwsjson11_deserializeOpCreateLFTag) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpCreateLFTag) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -388,9 +394,9 @@ func (m *awsAwsjson11_deserializeOpDescribeResource) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorCreateLFTag(response, &metadata) } - output := &DescribeResourceOutput{} + output := &CreateLFTagOutput{} out.Result = output var buff [1024]byte @@ -410,7 +416,7 @@ func (m *awsAwsjson11_deserializeOpDescribeResource) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentCreateLFTagOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -424,7 +430,7 @@ func (m *awsAwsjson11_deserializeOpDescribeResource) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorCreateLFTag(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -465,6 +471,9 @@ func awsAwsjson11_deserializeOpErrorDescribeResource(response *smithyhttp.Respon } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -477,6 +486,9 @@ func awsAwsjson11_deserializeOpErrorDescribeResource(response *smithyhttp.Respon case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -487,14 +499,14 @@ func awsAwsjson11_deserializeOpErrorDescribeResource(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpGetDataLakeSettings struct { +type awsAwsjson11_deserializeOpDeleteLFTag struct { } -func (*awsAwsjson11_deserializeOpGetDataLakeSettings) ID() string { +func (*awsAwsjson11_deserializeOpDeleteLFTag) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetDataLakeSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteLFTag) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -508,9 +520,9 @@ func (m *awsAwsjson11_deserializeOpGetDataLakeSettings) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetDataLakeSettings(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteLFTag(response, &metadata) } - output := &GetDataLakeSettingsOutput{} + output := &DeleteLFTagOutput{} out.Result = output var buff [1024]byte @@ -530,7 +542,7 @@ func (m *awsAwsjson11_deserializeOpGetDataLakeSettings) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetDataLakeSettingsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteLFTagOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -544,7 +556,7 @@ func (m *awsAwsjson11_deserializeOpGetDataLakeSettings) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetDataLakeSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteLFTag(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -585,6 +597,9 @@ func awsAwsjson11_deserializeOpErrorGetDataLakeSettings(response *smithyhttp.Res } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -594,6 +609,9 @@ func awsAwsjson11_deserializeOpErrorGetDataLakeSettings(response *smithyhttp.Res case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -604,14 +622,14 @@ func awsAwsjson11_deserializeOpErrorGetDataLakeSettings(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpGetEffectivePermissionsForPath struct { +type awsAwsjson11_deserializeOpDeregisterResource struct { } -func (*awsAwsjson11_deserializeOpGetEffectivePermissionsForPath) ID() string { +func (*awsAwsjson11_deserializeOpDeregisterResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetEffectivePermissionsForPath) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeregisterResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -625,9 +643,9 @@ func (m *awsAwsjson11_deserializeOpGetEffectivePermissionsForPath) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetEffectivePermissionsForPath(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeregisterResource(response, &metadata) } - output := &GetEffectivePermissionsForPathOutput{} + output := &DeregisterResourceOutput{} out.Result = output var buff [1024]byte @@ -647,7 +665,7 @@ func (m *awsAwsjson11_deserializeOpGetEffectivePermissionsForPath) HandleDeseria return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetEffectivePermissionsForPathOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeregisterResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -661,7 +679,7 @@ func (m *awsAwsjson11_deserializeOpGetEffectivePermissionsForPath) HandleDeseria return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetEffectivePermissionsForPath(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeregisterResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -724,14 +742,14 @@ func awsAwsjson11_deserializeOpErrorGetEffectivePermissionsForPath(response *smi } } -type awsAwsjson11_deserializeOpGrantPermissions struct { +type awsAwsjson11_deserializeOpDescribeResource struct { } -func (*awsAwsjson11_deserializeOpGrantPermissions) ID() string { +func (*awsAwsjson11_deserializeOpDescribeResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGrantPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -745,9 +763,9 @@ func (m *awsAwsjson11_deserializeOpGrantPermissions) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGrantPermissions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeResource(response, &metadata) } - output := &GrantPermissionsOutput{} + output := &DescribeResourceOutput{} out.Result = output var buff [1024]byte @@ -767,7 +785,7 @@ func (m *awsAwsjson11_deserializeOpGrantPermissions) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGrantPermissionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -781,7 +799,7 @@ func (m *awsAwsjson11_deserializeOpGrantPermissions) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGrantPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -822,15 +840,18 @@ func awsAwsjson11_deserializeOpErrorGrantPermissions(response *smithyhttp.Respon } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -841,14 +862,14 @@ func awsAwsjson11_deserializeOpErrorGrantPermissions(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpListPermissions struct { +type awsAwsjson11_deserializeOpGetDataLakeSettings struct { } -func (*awsAwsjson11_deserializeOpListPermissions) ID() string { +func (*awsAwsjson11_deserializeOpGetDataLakeSettings) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetDataLakeSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -862,9 +883,9 @@ func (m *awsAwsjson11_deserializeOpListPermissions) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListPermissions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetDataLakeSettings(response, &metadata) } - output := &ListPermissionsOutput{} + output := &GetDataLakeSettingsOutput{} out.Result = output var buff [1024]byte @@ -884,7 +905,7 @@ func (m *awsAwsjson11_deserializeOpListPermissions) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListPermissionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetDataLakeSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -898,7 +919,7 @@ func (m *awsAwsjson11_deserializeOpListPermissions) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetDataLakeSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -939,15 +960,15 @@ func awsAwsjson11_deserializeOpErrorListPermissions(response *smithyhttp.Respons } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -958,14 +979,14 @@ func awsAwsjson11_deserializeOpErrorListPermissions(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpListResources struct { +type awsAwsjson11_deserializeOpGetEffectivePermissionsForPath struct { } -func (*awsAwsjson11_deserializeOpListResources) ID() string { +func (*awsAwsjson11_deserializeOpGetEffectivePermissionsForPath) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetEffectivePermissionsForPath) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -979,9 +1000,9 @@ func (m *awsAwsjson11_deserializeOpListResources) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListResources(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetEffectivePermissionsForPath(response, &metadata) } - output := &ListResourcesOutput{} + output := &GetEffectivePermissionsForPathOutput{} out.Result = output var buff [1024]byte @@ -1001,7 +1022,7 @@ func (m *awsAwsjson11_deserializeOpListResources) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListResourcesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetEffectivePermissionsForPathOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1015,7 +1036,7 @@ func (m *awsAwsjson11_deserializeOpListResources) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetEffectivePermissionsForPath(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1056,6 +1077,9 @@ func awsAwsjson11_deserializeOpErrorListResources(response *smithyhttp.Response, } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -1075,14 +1099,14 @@ func awsAwsjson11_deserializeOpErrorListResources(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpPutDataLakeSettings struct { +type awsAwsjson11_deserializeOpGetLFTag struct { } -func (*awsAwsjson11_deserializeOpPutDataLakeSettings) ID() string { +func (*awsAwsjson11_deserializeOpGetLFTag) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutDataLakeSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetLFTag) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1096,9 +1120,9 @@ func (m *awsAwsjson11_deserializeOpPutDataLakeSettings) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutDataLakeSettings(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetLFTag(response, &metadata) } - output := &PutDataLakeSettingsOutput{} + output := &GetLFTagOutput{} out.Result = output var buff [1024]byte @@ -1118,7 +1142,7 @@ func (m *awsAwsjson11_deserializeOpPutDataLakeSettings) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutDataLakeSettingsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetLFTagOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1132,7 +1156,7 @@ func (m *awsAwsjson11_deserializeOpPutDataLakeSettings) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutDataLakeSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetLFTag(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1173,12 +1197,21 @@ func awsAwsjson11_deserializeOpErrorPutDataLakeSettings(response *smithyhttp.Res } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1189,14 +1222,14 @@ func awsAwsjson11_deserializeOpErrorPutDataLakeSettings(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpRegisterResource struct { +type awsAwsjson11_deserializeOpGetResourceLFTags struct { } -func (*awsAwsjson11_deserializeOpRegisterResource) ID() string { +func (*awsAwsjson11_deserializeOpGetResourceLFTags) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRegisterResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetResourceLFTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1210,9 +1243,9 @@ func (m *awsAwsjson11_deserializeOpRegisterResource) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRegisterResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetResourceLFTags(response, &metadata) } - output := &RegisterResourceOutput{} + output := &GetResourceLFTagsOutput{} out.Result = output var buff [1024]byte @@ -1232,7 +1265,7 @@ func (m *awsAwsjson11_deserializeOpRegisterResource) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRegisterResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetResourceLFTagsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1246,7 +1279,7 @@ func (m *awsAwsjson11_deserializeOpRegisterResource) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRegisterResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetResourceLFTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1287,8 +1320,14 @@ func awsAwsjson11_deserializeOpErrorRegisterResource(response *smithyhttp.Respon } switch { - case strings.EqualFold("AlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -1309,14 +1348,14 @@ func awsAwsjson11_deserializeOpErrorRegisterResource(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpRevokePermissions struct { +type awsAwsjson11_deserializeOpGrantPermissions struct { } -func (*awsAwsjson11_deserializeOpRevokePermissions) ID() string { +func (*awsAwsjson11_deserializeOpGrantPermissions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRevokePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGrantPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1330,9 +1369,9 @@ func (m *awsAwsjson11_deserializeOpRevokePermissions) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRevokePermissions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGrantPermissions(response, &metadata) } - output := &RevokePermissionsOutput{} + output := &GrantPermissionsOutput{} out.Result = output var buff [1024]byte @@ -1352,7 +1391,7 @@ func (m *awsAwsjson11_deserializeOpRevokePermissions) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRevokePermissionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGrantPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1366,7 +1405,7 @@ func (m *awsAwsjson11_deserializeOpRevokePermissions) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRevokePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGrantPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1426,14 +1465,14 @@ func awsAwsjson11_deserializeOpErrorRevokePermissions(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpUpdateResource struct { +type awsAwsjson11_deserializeOpListLFTags struct { } -func (*awsAwsjson11_deserializeOpUpdateResource) ID() string { +func (*awsAwsjson11_deserializeOpListLFTags) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListLFTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1447,9 +1486,9 @@ func (m *awsAwsjson11_deserializeOpUpdateResource) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListLFTags(response, &metadata) } - output := &UpdateResourceOutput{} + output := &ListLFTagsOutput{} out.Result = output var buff [1024]byte @@ -1469,7 +1508,7 @@ func (m *awsAwsjson11_deserializeOpUpdateResource) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListLFTagsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1483,7 +1522,7 @@ func (m *awsAwsjson11_deserializeOpUpdateResource) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListLFTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1546,11 +1585,36 @@ func awsAwsjson11_deserializeOpErrorUpdateResource(response *smithyhttp.Response } } -func awsAwsjson11_deserializeErrorAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +type awsAwsjson11_deserializeOpListPermissions struct { +} + +func (*awsAwsjson11_deserializeOpListPermissions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListPermissions) HandleDeserialize(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_deserializeOpErrorListPermissions(response, &metadata) + } + output := &ListPermissionsOutput{} + 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{} @@ -1561,12 +1625,10 @@ func awsAwsjson11_deserializeErrorAlreadyExistsException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.AlreadyExistsException{} - err := awsAwsjson11_deserializeDocumentAlreadyExistsException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentListPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1574,22 +1636,35 @@ func awsAwsjson11_deserializeErrorAlreadyExistsException(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_deserializeErrorConcurrentModificationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorListPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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{ @@ -1599,9 +1674,113 @@ func awsAwsjson11_deserializeErrorConcurrentModificationException(response *smit return err } - output := &types.ConcurrentModificationException{} - err := awsAwsjson11_deserializeDocumentConcurrentModificationException(&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 awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListResources struct { +} + +func (*awsAwsjson11_deserializeOpListResources) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListResources) HandleDeserialize(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_deserializeOpErrorListResources(response, &metadata) + } + output := &ListResourcesOutput{} + 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_deserializeOpDocumentListResourcesOutput(&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_deserializeOpErrorListResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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) @@ -1613,18 +1792,113 @@ func awsAwsjson11_deserializeErrorConcurrentModificationException(response *smit } 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("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsAwsjson11_deserializeErrorEntityNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +type awsAwsjson11_deserializeOpPutDataLakeSettings struct { +} + +func (*awsAwsjson11_deserializeOpPutDataLakeSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutDataLakeSettings) HandleDeserialize(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_deserializeOpErrorPutDataLakeSettings(response, &metadata) + } + output := &PutDataLakeSettingsOutput{} + 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{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var 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_deserializeOpDocumentPutDataLakeSettingsOutput(&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_deserializeOpErrorPutDataLakeSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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{ @@ -1634,129 +1908,2358 @@ func awsAwsjson11_deserializeErrorEntityNotFoundException(response *smithyhttp.R return err } - output := &types.EntityNotFoundException{} - err := awsAwsjson11_deserializeDocumentEntityNotFoundException(&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 awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpRegisterResource struct { +} + +func (*awsAwsjson11_deserializeOpRegisterResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpRegisterResource) HandleDeserialize(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_deserializeOpErrorRegisterResource(response, &metadata) + } + output := &RegisterResourceOutput{} + 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_deserializeOpDocumentRegisterResourceOutput(&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_deserializeOpErrorRegisterResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("AlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpRemoveLFTagsFromResource struct { +} + +func (*awsAwsjson11_deserializeOpRemoveLFTagsFromResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpRemoveLFTagsFromResource) HandleDeserialize(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_deserializeOpErrorRemoveLFTagsFromResource(response, &metadata) + } + output := &RemoveLFTagsFromResourceOutput{} + 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_deserializeOpDocumentRemoveLFTagsFromResourceOutput(&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_deserializeOpErrorRemoveLFTagsFromResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpRevokePermissions struct { +} + +func (*awsAwsjson11_deserializeOpRevokePermissions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpRevokePermissions) HandleDeserialize(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_deserializeOpErrorRevokePermissions(response, &metadata) + } + output := &RevokePermissionsOutput{} + 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_deserializeOpDocumentRevokePermissionsOutput(&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_deserializeOpErrorRevokePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpSearchDatabasesByLFTags struct { +} + +func (*awsAwsjson11_deserializeOpSearchDatabasesByLFTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpSearchDatabasesByLFTags) HandleDeserialize(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_deserializeOpErrorSearchDatabasesByLFTags(response, &metadata) + } + output := &SearchDatabasesByLFTagsOutput{} + 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_deserializeOpDocumentSearchDatabasesByLFTagsOutput(&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_deserializeOpErrorSearchDatabasesByLFTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpSearchTablesByLFTags struct { +} + +func (*awsAwsjson11_deserializeOpSearchTablesByLFTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpSearchTablesByLFTags) HandleDeserialize(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_deserializeOpErrorSearchTablesByLFTags(response, &metadata) + } + output := &SearchTablesByLFTagsOutput{} + 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_deserializeOpDocumentSearchTablesByLFTagsOutput(&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_deserializeOpErrorSearchTablesByLFTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateLFTag struct { +} + +func (*awsAwsjson11_deserializeOpUpdateLFTag) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateLFTag) HandleDeserialize(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_deserializeOpErrorUpdateLFTag(response, &metadata) + } + output := &UpdateLFTagOutput{} + 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_deserializeOpDocumentUpdateLFTagOutput(&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_deserializeOpErrorUpdateLFTag(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateResource struct { +} + +func (*awsAwsjson11_deserializeOpUpdateResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateResource) HandleDeserialize(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_deserializeOpErrorUpdateResource(response, &metadata) + } + output := &UpdateResourceOutput{} + 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_deserializeOpDocumentUpdateResourceOutput(&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_deserializeOpErrorUpdateResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson11_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 := awsAwsjson11_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 awsAwsjson11_deserializeErrorAlreadyExistsException(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.AlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentAlreadyExistsException(&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_deserializeErrorConcurrentModificationException(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.ConcurrentModificationException{} + err := awsAwsjson11_deserializeDocumentConcurrentModificationException(&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_deserializeErrorEntityNotFoundException(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.EntityNotFoundException{} + err := awsAwsjson11_deserializeDocumentEntityNotFoundException(&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_deserializeErrorGlueEncryptionException(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.GlueEncryptionException{} + err := awsAwsjson11_deserializeDocumentGlueEncryptionException(&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_deserializeErrorInternalServiceException(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.InternalServiceException{} + err := awsAwsjson11_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 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_deserializeErrorOperationTimeoutException(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.OperationTimeoutException{} + err := awsAwsjson11_deserializeDocumentOperationTimeoutException(&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_deserializeErrorResourceNumberLimitExceededException(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.ResourceNumberLimitExceededException{} + err := awsAwsjson11_deserializeDocumentResourceNumberLimitExceededException(&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_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 MessageString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAlreadyExistsException(v **types.AlreadyExistsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AlreadyExistsException + if *v == nil { + sv = &types.AlreadyExistsException{} + } 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 MessageString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBatchPermissionsFailureEntry(v **types.BatchPermissionsFailureEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BatchPermissionsFailureEntry + if *v == nil { + sv = &types.BatchPermissionsFailureEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Error": + if err := awsAwsjson11_deserializeDocumentErrorDetail(&sv.Error, value); err != nil { + return err + } + + case "RequestEntry": + if err := awsAwsjson11_deserializeDocumentBatchPermissionsRequestEntry(&sv.RequestEntry, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBatchPermissionsFailureList(v *[]types.BatchPermissionsFailureEntry, 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.BatchPermissionsFailureEntry + if *v == nil { + cv = []types.BatchPermissionsFailureEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchPermissionsFailureEntry + destAddr := &col + if err := awsAwsjson11_deserializeDocumentBatchPermissionsFailureEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentBatchPermissionsRequestEntry(v **types.BatchPermissionsRequestEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BatchPermissionsRequestEntry + if *v == nil { + sv = &types.BatchPermissionsRequestEntry{} + } 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 Identifier to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "Permissions": + if err := awsAwsjson11_deserializeDocumentPermissionList(&sv.Permissions, value); err != nil { + return err + } + + case "PermissionsWithGrantOption": + if err := awsAwsjson11_deserializeDocumentPermissionList(&sv.PermissionsWithGrantOption, value); err != nil { + return err + } + + case "Principal": + if err := awsAwsjson11_deserializeDocumentDataLakePrincipal(&sv.Principal, value); err != nil { + return err + } + + case "Resource": + if err := awsAwsjson11_deserializeDocumentResource(&sv.Resource, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCatalogResource(v **types.CatalogResource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CatalogResource + if *v == nil { + sv = &types.CatalogResource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentColumnLFTag(v **types.ColumnLFTag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ColumnLFTag + if *v == nil { + sv = &types.ColumnLFTag{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LFTags": + if err := awsAwsjson11_deserializeDocumentLFTagsList(&sv.LFTags, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentColumnLFTagsList(v *[]types.ColumnLFTag, 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.ColumnLFTag + if *v == nil { + cv = []types.ColumnLFTag{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ColumnLFTag + destAddr := &col + if err := awsAwsjson11_deserializeDocumentColumnLFTag(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentColumnNames(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 NameString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentColumnWildcard(v **types.ColumnWildcard, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ColumnWildcard + if *v == nil { + sv = &types.ColumnWildcard{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ExcludedColumnNames": + if err := awsAwsjson11_deserializeDocumentColumnNames(&sv.ExcludedColumnNames, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentConcurrentModificationException(v **types.ConcurrentModificationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConcurrentModificationException + if *v == nil { + sv = &types.ConcurrentModificationException{} + } 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 MessageString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDatabaseLFTagsList(v *[]types.TaggedDatabase, 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.TaggedDatabase + if *v == nil { + cv = []types.TaggedDatabase{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TaggedDatabase + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTaggedDatabase(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDatabaseResource(v **types.DatabaseResource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DatabaseResource + if *v == nil { + sv = &types.DatabaseResource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CatalogId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) + } + sv.CatalogId = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDataLakePrincipal(v **types.DataLakePrincipal, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DataLakePrincipal + if *v == nil { + sv = &types.DataLakePrincipal{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DataLakePrincipalIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataLakePrincipalString to be of type string, got %T instead", value) + } + sv.DataLakePrincipalIdentifier = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDataLakePrincipalList(v *[]types.DataLakePrincipal, 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.DataLakePrincipal + if *v == nil { + cv = []types.DataLakePrincipal{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DataLakePrincipal + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDataLakePrincipal(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDataLakeSettings(v **types.DataLakeSettings, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DataLakeSettings + if *v == nil { + sv = &types.DataLakeSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreateDatabaseDefaultPermissions": + if err := awsAwsjson11_deserializeDocumentPrincipalPermissionsList(&sv.CreateDatabaseDefaultPermissions, value); err != nil { + return err + } + + case "CreateTableDefaultPermissions": + if err := awsAwsjson11_deserializeDocumentPrincipalPermissionsList(&sv.CreateTableDefaultPermissions, value); err != nil { + return err + } + + case "DataLakeAdmins": + if err := awsAwsjson11_deserializeDocumentDataLakePrincipalList(&sv.DataLakeAdmins, value); err != nil { + return err + } + + case "TrustedResourceOwners": + if err := awsAwsjson11_deserializeDocumentTrustedResourceOwners(&sv.TrustedResourceOwners, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDataLocationResource(v **types.DataLocationResource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DataLocationResource + if *v == nil { + sv = &types.DataLocationResource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CatalogId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) + } + sv.CatalogId = ptr.String(jtv) + } + + case "ResourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArnString to be of type string, got %T instead", value) + } + sv.ResourceArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDetailsMap(v **types.DetailsMap, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DetailsMap + if *v == nil { + sv = &types.DetailsMap{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ResourceShare": + if err := awsAwsjson11_deserializeDocumentResourceShareList(&sv.ResourceShare, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEntityNotFoundException(v **types.EntityNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EntityNotFoundException + if *v == nil { + sv = &types.EntityNotFoundException{} + } 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 MessageString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentErrorDetail(v **types.ErrorDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ErrorDetail + if *v == nil { + sv = &types.ErrorDetail{} + } 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 NameString 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 DescriptionString to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentExpression(v *[]types.LFTag, 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.LFTag + if *v == nil { + cv = []types.LFTag{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LFTag + destAddr := &col + if err := awsAwsjson11_deserializeDocumentLFTag(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentGlueEncryptionException(v **types.GlueEncryptionException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.GlueEncryptionException + if *v == nil { + sv = &types.GlueEncryptionException{} + } 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 MessageString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_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 MessageString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidInputException(v **types.InvalidInputException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidInputException + if *v == nil { + sv = &types.InvalidInputException{} + } 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 MessageString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLFTag(v **types.LFTag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LFTag + if *v == nil { + sv = &types.LFTag{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "TagKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LFTagKey to be of type string, got %T instead", value) + } + sv.TagKey = ptr.String(jtv) + } + + case "TagValues": + if err := awsAwsjson11_deserializeDocumentTagValueList(&sv.TagValues, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLFTagError(v **types.LFTagError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LFTagError + if *v == nil { + sv = &types.LFTagError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Error": + if err := awsAwsjson11_deserializeDocumentErrorDetail(&sv.Error, value); err != nil { + return err + } + + case "LFTag": + if err := awsAwsjson11_deserializeDocumentLFTagPair(&sv.LFTag, 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 } - - errorBody.Seek(0, io.SeekStart) - return output + *v = sv + return nil } -func awsAwsjson11_deserializeErrorInternalServiceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) +func awsAwsjson11_deserializeDocumentLFTagErrors(v *[]types.LFTagError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - 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 + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - output := &types.InternalServiceException{} - err := awsAwsjson11_deserializeDocumentInternalServiceException(&output, shape) + var cv []types.LFTagError + if *v == nil { + cv = []types.LFTagError{} + } else { + cv = *v + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + for _, value := range shape { + var col types.LFTagError + destAddr := &col + if err := awsAwsjson11_deserializeDocumentLFTagError(&destAddr, value); err != nil { + return err } - return err - } + col = *destAddr + cv = append(cv, col) - errorBody.Seek(0, io.SeekStart) - return output + } + *v = cv + return nil } -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 +func awsAwsjson11_deserializeDocumentLFTagKeyResource(v **types.LFTagKeyResource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - output := &types.InvalidInputException{} - err := awsAwsjson11_deserializeDocumentInvalidInputException(&output, shape) + shape, ok := value.(map[string]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 sv *types.LFTagKeyResource + if *v == nil { + sv = &types.LFTagKeyResource{} + } else { + sv = *v } - errorBody.Seek(0, io.SeekStart) - return output -} + for key, value := range shape { + switch key { + case "CatalogId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) + } + sv.CatalogId = ptr.String(jtv) + } -func awsAwsjson11_deserializeErrorOperationTimeoutException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case "TagKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.TagKey = ptr.String(jtv) + } - 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 "TagValues": + if err := awsAwsjson11_deserializeDocumentTagValueList(&sv.TagValues, value); err != nil { + return err + } - output := &types.OperationTimeoutException{} - err := awsAwsjson11_deserializeDocumentOperationTimeoutException(&output, shape) + 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 } - - errorBody.Seek(0, io.SeekStart) - return output + *v = sv + return nil } -func awsAwsjson11_deserializeDocumentAlreadyExistsException(v **types.AlreadyExistsException, value interface{}) error { +func awsAwsjson11_deserializeDocumentLFTagPair(v **types.LFTagPair, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1769,22 +4272,36 @@ func awsAwsjson11_deserializeDocumentAlreadyExistsException(v **types.AlreadyExi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AlreadyExistsException + var sv *types.LFTagPair if *v == nil { - sv = &types.AlreadyExistsException{} + sv = &types.LFTagPair{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "CatalogId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MessageString to be of type string, got %T instead", value) + return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.CatalogId = ptr.String(jtv) + } + + case "TagKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LFTagKey to be of type string, got %T instead", value) + } + sv.TagKey = ptr.String(jtv) + } + + case "TagValues": + if err := awsAwsjson11_deserializeDocumentTagValueList(&sv.TagValues, value); err != nil { + return err } default: @@ -1796,7 +4313,7 @@ func awsAwsjson11_deserializeDocumentAlreadyExistsException(v **types.AlreadyExi return nil } -func awsAwsjson11_deserializeDocumentBatchPermissionsFailureEntry(v **types.BatchPermissionsFailureEntry, value interface{}) error { +func awsAwsjson11_deserializeDocumentLFTagPolicyResource(v **types.LFTagPolicyResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1809,25 +4326,38 @@ func awsAwsjson11_deserializeDocumentBatchPermissionsFailureEntry(v **types.Batc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BatchPermissionsFailureEntry + var sv *types.LFTagPolicyResource if *v == nil { - sv = &types.BatchPermissionsFailureEntry{} + sv = &types.LFTagPolicyResource{} } else { sv = *v } for key, value := range shape { switch key { - case "Error": - if err := awsAwsjson11_deserializeDocumentErrorDetail(&sv.Error, value); err != nil { - return err + case "CatalogId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) + } + sv.CatalogId = ptr.String(jtv) } - case "RequestEntry": - if err := awsAwsjson11_deserializeDocumentBatchPermissionsRequestEntry(&sv.RequestEntry, value); err != nil { + case "Expression": + if err := awsAwsjson11_deserializeDocumentExpression(&sv.Expression, 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) + } + default: _, _ = key, value @@ -1837,7 +4367,7 @@ func awsAwsjson11_deserializeDocumentBatchPermissionsFailureEntry(v **types.Batc return nil } -func awsAwsjson11_deserializeDocumentBatchPermissionsFailureList(v *[]types.BatchPermissionsFailureEntry, value interface{}) error { +func awsAwsjson11_deserializeDocumentLFTagsList(v *[]types.LFTagPair, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1850,17 +4380,17 @@ func awsAwsjson11_deserializeDocumentBatchPermissionsFailureList(v *[]types.Batc return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.BatchPermissionsFailureEntry + var cv []types.LFTagPair if *v == nil { - cv = []types.BatchPermissionsFailureEntry{} + cv = []types.LFTagPair{} } else { cv = *v } for _, value := range shape { - var col types.BatchPermissionsFailureEntry + var col types.LFTagPair destAddr := &col - if err := awsAwsjson11_deserializeDocumentBatchPermissionsFailureEntry(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentLFTagPair(&destAddr, value); err != nil { return err } col = *destAddr @@ -1871,7 +4401,7 @@ func awsAwsjson11_deserializeDocumentBatchPermissionsFailureList(v *[]types.Batc return nil } -func awsAwsjson11_deserializeDocumentBatchPermissionsRequestEntry(v **types.BatchPermissionsRequestEntry, value interface{}) error { +func awsAwsjson11_deserializeDocumentOperationTimeoutException(v **types.OperationTimeoutException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1884,54 +4414,70 @@ func awsAwsjson11_deserializeDocumentBatchPermissionsRequestEntry(v **types.Batc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BatchPermissionsRequestEntry + var sv *types.OperationTimeoutException if *v == nil { - sv = &types.BatchPermissionsRequestEntry{} + sv = &types.OperationTimeoutException{} } else { sv = *v } for key, value := range shape { switch key { - case "Id": + case "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Identifier to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageString to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "Permissions": - if err := awsAwsjson11_deserializeDocumentPermissionList(&sv.Permissions, value); err != nil { - return err - } + default: + _, _ = key, value - case "PermissionsWithGrantOption": - if err := awsAwsjson11_deserializeDocumentPermissionList(&sv.PermissionsWithGrantOption, value); err != nil { - return err - } + } + } + *v = sv + return nil +} - case "Principal": - if err := awsAwsjson11_deserializeDocumentDataLakePrincipal(&sv.Principal, value); err != nil { - return err - } +func awsAwsjson11_deserializeDocumentPermissionList(v *[]types.Permission, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "Resource": - if err := awsAwsjson11_deserializeDocumentResource(&sv.Resource, value); err != nil { - return err - } + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - default: - _, _ = key, value + var cv []types.Permission + if *v == nil { + cv = []types.Permission{} + } else { + cv = *v + } + for _, value := range shape { + var col types.Permission + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Permission to be of type string, got %T instead", value) + } + col = types.Permission(jtv) } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentCatalogResource(v **types.CatalogResource, value interface{}) error { +func awsAwsjson11_deserializeDocumentPrincipalPermissions(v **types.PrincipalPermissions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1944,15 +4490,25 @@ func awsAwsjson11_deserializeDocumentCatalogResource(v **types.CatalogResource, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CatalogResource + var sv *types.PrincipalPermissions if *v == nil { - sv = &types.CatalogResource{} + sv = &types.PrincipalPermissions{} } else { sv = *v } for key, value := range shape { switch key { + case "Permissions": + if err := awsAwsjson11_deserializeDocumentPermissionList(&sv.Permissions, value); err != nil { + return err + } + + case "Principal": + if err := awsAwsjson11_deserializeDocumentDataLakePrincipal(&sv.Principal, value); err != nil { + return err + } + default: _, _ = key, value @@ -1962,7 +4518,7 @@ func awsAwsjson11_deserializeDocumentCatalogResource(v **types.CatalogResource, return nil } -func awsAwsjson11_deserializeDocumentColumnNames(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentPrincipalPermissionsList(v *[]types.PrincipalPermissions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1975,22 +4531,20 @@ func awsAwsjson11_deserializeDocumentColumnNames(v *[]string, value interface{}) return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.PrincipalPermissions if *v == nil { - cv = []string{} + cv = []types.PrincipalPermissions{} } else { cv = *v } for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) - } - col = jtv + var col types.PrincipalPermissions + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPrincipalPermissions(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -1998,7 +4552,7 @@ func awsAwsjson11_deserializeDocumentColumnNames(v *[]string, value interface{}) return nil } -func awsAwsjson11_deserializeDocumentColumnWildcard(v **types.ColumnWildcard, value interface{}) error { +func awsAwsjson11_deserializeDocumentPrincipalResourcePermissions(v **types.PrincipalResourcePermissions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2011,17 +4565,37 @@ func awsAwsjson11_deserializeDocumentColumnWildcard(v **types.ColumnWildcard, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ColumnWildcard + var sv *types.PrincipalResourcePermissions if *v == nil { - sv = &types.ColumnWildcard{} + sv = &types.PrincipalResourcePermissions{} } else { sv = *v } for key, value := range shape { switch key { - case "ExcludedColumnNames": - if err := awsAwsjson11_deserializeDocumentColumnNames(&sv.ExcludedColumnNames, value); err != nil { + case "AdditionalDetails": + if err := awsAwsjson11_deserializeDocumentDetailsMap(&sv.AdditionalDetails, value); err != nil { + return err + } + + case "Permissions": + if err := awsAwsjson11_deserializeDocumentPermissionList(&sv.Permissions, value); err != nil { + return err + } + + case "PermissionsWithGrantOption": + if err := awsAwsjson11_deserializeDocumentPermissionList(&sv.PermissionsWithGrantOption, value); err != nil { + return err + } + + case "Principal": + if err := awsAwsjson11_deserializeDocumentDataLakePrincipal(&sv.Principal, value); err != nil { + return err + } + + case "Resource": + if err := awsAwsjson11_deserializeDocumentResource(&sv.Resource, value); err != nil { return err } @@ -2034,7 +4608,7 @@ func awsAwsjson11_deserializeDocumentColumnWildcard(v **types.ColumnWildcard, va return nil } -func awsAwsjson11_deserializeDocumentConcurrentModificationException(v **types.ConcurrentModificationException, value interface{}) error { +func awsAwsjson11_deserializeDocumentPrincipalResourcePermissionsList(v *[]types.PrincipalResourcePermissions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2042,39 +4616,33 @@ func awsAwsjson11_deserializeDocumentConcurrentModificationException(v **types.C 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.ConcurrentModificationException + var cv []types.PrincipalResourcePermissions if *v == nil { - sv = &types.ConcurrentModificationException{} + cv = []types.PrincipalResourcePermissions{} } 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 MessageString to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.PrincipalResourcePermissions + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPrincipalResourcePermissions(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentDatabaseResource(v **types.DatabaseResource, value interface{}) error { +func awsAwsjson11_deserializeDocumentResource(v **types.Resource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2087,31 +4655,48 @@ func awsAwsjson11_deserializeDocumentDatabaseResource(v **types.DatabaseResource return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DatabaseResource + var sv *types.Resource if *v == nil { - sv = &types.DatabaseResource{} + sv = &types.Resource{} } else { sv = *v } for key, value := range shape { switch key { - case "CatalogId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) - } - sv.CatalogId = ptr.String(jtv) + case "Catalog": + if err := awsAwsjson11_deserializeDocumentCatalogResource(&sv.Catalog, value); err != nil { + return err } - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) + case "Database": + if err := awsAwsjson11_deserializeDocumentDatabaseResource(&sv.Database, value); err != nil { + return err + } + + case "DataLocation": + if err := awsAwsjson11_deserializeDocumentDataLocationResource(&sv.DataLocation, value); err != nil { + return err + } + + case "LFTag": + if err := awsAwsjson11_deserializeDocumentLFTagKeyResource(&sv.LFTag, value); err != nil { + return err + } + + case "LFTagPolicy": + if err := awsAwsjson11_deserializeDocumentLFTagPolicyResource(&sv.LFTagPolicy, value); err != nil { + return err + } + + case "Table": + if err := awsAwsjson11_deserializeDocumentTableResource(&sv.Table, value); err != nil { + return err + } + + case "TableWithColumns": + if err := awsAwsjson11_deserializeDocumentTableWithColumnsResource(&sv.TableWithColumns, value); err != nil { + return err } default: @@ -2123,7 +4708,7 @@ func awsAwsjson11_deserializeDocumentDatabaseResource(v **types.DatabaseResource return nil } -func awsAwsjson11_deserializeDocumentDataLakePrincipal(v **types.DataLakePrincipal, value interface{}) error { +func awsAwsjson11_deserializeDocumentResourceInfo(v **types.ResourceInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2136,22 +4721,44 @@ func awsAwsjson11_deserializeDocumentDataLakePrincipal(v **types.DataLakePrincip return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DataLakePrincipal + var sv *types.ResourceInfo if *v == nil { - sv = &types.DataLakePrincipal{} + sv = &types.ResourceInfo{} } else { sv = *v } for key, value := range shape { switch key { - case "DataLakePrincipalIdentifier": + case "LastModified": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LastModifiedTimestamp to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "ResourceArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DataLakePrincipalString to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceArnString to be of type string, got %T instead", value) } - sv.DataLakePrincipalIdentifier = ptr.String(jtv) + sv.ResourceArn = ptr.String(jtv) + } + + case "RoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IAMRoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) } default: @@ -2163,7 +4770,7 @@ func awsAwsjson11_deserializeDocumentDataLakePrincipal(v **types.DataLakePrincip return nil } -func awsAwsjson11_deserializeDocumentDataLakePrincipalList(v *[]types.DataLakePrincipal, value interface{}) error { +func awsAwsjson11_deserializeDocumentResourceInfoList(v *[]types.ResourceInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2176,79 +4783,28 @@ func awsAwsjson11_deserializeDocumentDataLakePrincipalList(v *[]types.DataLakePr return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.DataLakePrincipal - if *v == nil { - cv = []types.DataLakePrincipal{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.DataLakePrincipal - destAddr := &col - if err := awsAwsjson11_deserializeDocumentDataLakePrincipal(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentDataLakeSettings(v **types.DataLakeSettings, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.DataLakeSettings - if *v == nil { - sv = &types.DataLakeSettings{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "CreateDatabaseDefaultPermissions": - if err := awsAwsjson11_deserializeDocumentPrincipalPermissionsList(&sv.CreateDatabaseDefaultPermissions, value); err != nil { - return err - } - - case "CreateTableDefaultPermissions": - if err := awsAwsjson11_deserializeDocumentPrincipalPermissionsList(&sv.CreateTableDefaultPermissions, value); err != nil { - return err - } - - case "DataLakeAdmins": - if err := awsAwsjson11_deserializeDocumentDataLakePrincipalList(&sv.DataLakeAdmins, value); err != nil { - return err - } - - case "TrustedResourceOwners": - if err := awsAwsjson11_deserializeDocumentTrustedResourceOwners(&sv.TrustedResourceOwners, value); err != nil { - return err - } - - default: - _, _ = key, value + var cv []types.ResourceInfo + if *v == nil { + cv = []types.ResourceInfo{} + } else { + cv = *v + } + for _, value := range shape { + var col types.ResourceInfo + destAddr := &col + if err := awsAwsjson11_deserializeDocumentResourceInfo(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentDataLocationResource(v **types.DataLocationResource, value interface{}) error { +func awsAwsjson11_deserializeDocumentResourceNumberLimitExceededException(v **types.ResourceNumberLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2261,31 +4817,22 @@ func awsAwsjson11_deserializeDocumentDataLocationResource(v **types.DataLocation return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DataLocationResource + var sv *types.ResourceNumberLimitExceededException if *v == nil { - sv = &types.DataLocationResource{} + sv = &types.ResourceNumberLimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { - case "CatalogId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) - } - sv.CatalogId = ptr.String(jtv) - } - - case "ResourceArn": + case "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceArnString to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageString to be of type string, got %T instead", value) } - sv.ResourceArn = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -2297,7 +4844,7 @@ func awsAwsjson11_deserializeDocumentDataLocationResource(v **types.DataLocation return nil } -func awsAwsjson11_deserializeDocumentDetailsMap(v **types.DetailsMap, value interface{}) error { +func awsAwsjson11_deserializeDocumentResourceShareList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2305,35 +4852,35 @@ func awsAwsjson11_deserializeDocumentDetailsMap(v **types.DetailsMap, value inte 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.DetailsMap + var cv []string if *v == nil { - sv = &types.DetailsMap{} + cv = []string{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "ResourceShare": - if err := awsAwsjson11_deserializeDocumentResourceShareList(&sv.ResourceShare, value); err != nil { - return err + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RAMResourceShareArn 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_deserializeDocumentEntityNotFoundException(v **types.EntityNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentTableLFTagsList(v *[]types.TaggedTable, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2341,39 +4888,33 @@ func awsAwsjson11_deserializeDocumentEntityNotFoundException(v **types.EntityNot 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.EntityNotFoundException + var cv []types.TaggedTable if *v == nil { - sv = &types.EntityNotFoundException{} + cv = []types.TaggedTable{} } 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 MessageString to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.TaggedTable + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTaggedTable(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentErrorDetail(v **types.ErrorDetail, value interface{}) error { +func awsAwsjson11_deserializeDocumentTableResource(v **types.TableResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2386,31 +4927,45 @@ func awsAwsjson11_deserializeDocumentErrorDetail(v **types.ErrorDetail, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ErrorDetail + var sv *types.TableResource if *v == nil { - sv = &types.ErrorDetail{} + sv = &types.TableResource{} } else { sv = *v } for key, value := range shape { switch key { - case "ErrorCode": + case "CatalogId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) + } + sv.CatalogId = ptr.String(jtv) + } + + case "DatabaseName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NameString to be of type string, got %T instead", value) } - sv.ErrorCode = ptr.String(jtv) + sv.DatabaseName = ptr.String(jtv) } - case "ErrorMessage": + case "Name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DescriptionString to be of type string, got %T instead", value) + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) } - sv.ErrorMessage = ptr.String(jtv) + sv.Name = ptr.String(jtv) + } + + case "TableWildcard": + if err := awsAwsjson11_deserializeDocumentTableWildcard(&sv.TableWildcard, value); err != nil { + return err } default: @@ -2422,7 +4977,7 @@ func awsAwsjson11_deserializeDocumentErrorDetail(v **types.ErrorDetail, value in return nil } -func awsAwsjson11_deserializeDocumentInternalServiceException(v **types.InternalServiceException, value interface{}) error { +func awsAwsjson11_deserializeDocumentTableWildcard(v **types.TableWildcard, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2435,24 +4990,15 @@ func awsAwsjson11_deserializeDocumentInternalServiceException(v **types.Internal return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InternalServiceException + var sv *types.TableWildcard if *v == nil { - sv = &types.InternalServiceException{} + sv = &types.TableWildcard{} } 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 MessageString to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - default: _, _ = key, value @@ -2462,7 +5008,7 @@ func awsAwsjson11_deserializeDocumentInternalServiceException(v **types.Internal return nil } -func awsAwsjson11_deserializeDocumentInvalidInputException(v **types.InvalidInputException, value interface{}) error { +func awsAwsjson11_deserializeDocumentTableWithColumnsResource(v **types.TableWithColumnsResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2475,22 +5021,50 @@ func awsAwsjson11_deserializeDocumentInvalidInputException(v **types.InvalidInpu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidInputException + var sv *types.TableWithColumnsResource if *v == nil { - sv = &types.InvalidInputException{} + sv = &types.TableWithColumnsResource{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "CatalogId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MessageString to be of type string, got %T instead", value) + return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.CatalogId = ptr.String(jtv) + } + + case "ColumnNames": + if err := awsAwsjson11_deserializeDocumentColumnNames(&sv.ColumnNames, value); err != nil { + return err + } + + case "ColumnWildcard": + if err := awsAwsjson11_deserializeDocumentColumnWildcard(&sv.ColumnWildcard, value); err != nil { + return err + } + + case "DatabaseName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.DatabaseName = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) } default: @@ -2502,7 +5076,7 @@ func awsAwsjson11_deserializeDocumentInvalidInputException(v **types.InvalidInpu return nil } -func awsAwsjson11_deserializeDocumentOperationTimeoutException(v **types.OperationTimeoutException, value interface{}) error { +func awsAwsjson11_deserializeDocumentTaggedDatabase(v **types.TaggedDatabase, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2515,22 +5089,23 @@ func awsAwsjson11_deserializeDocumentOperationTimeoutException(v **types.Operati return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.OperationTimeoutException + var sv *types.TaggedDatabase if *v == nil { - sv = &types.OperationTimeoutException{} + sv = &types.TaggedDatabase{} } 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 MessageString to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + case "Database": + if err := awsAwsjson11_deserializeDocumentDatabaseResource(&sv.Database, value); err != nil { + return err + } + + case "LFTags": + if err := awsAwsjson11_deserializeDocumentLFTagsList(&sv.LFTags, value); err != nil { + return err } default: @@ -2542,7 +5117,7 @@ func awsAwsjson11_deserializeDocumentOperationTimeoutException(v **types.Operati return nil } -func awsAwsjson11_deserializeDocumentPermissionList(v *[]types.Permission, value interface{}) error { +func awsAwsjson11_deserializeDocumentTaggedTable(v **types.TaggedTable, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2550,35 +5125,50 @@ func awsAwsjson11_deserializeDocumentPermissionList(v *[]types.Permission, value 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.Permission + var sv *types.TaggedTable if *v == nil { - cv = []types.Permission{} + sv = &types.TaggedTable{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.Permission - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Permission to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "LFTagOnDatabase": + if err := awsAwsjson11_deserializeDocumentLFTagsList(&sv.LFTagOnDatabase, value); err != nil { + return err } - col = types.Permission(jtv) - } - cv = append(cv, col) + case "LFTagsOnColumns": + if err := awsAwsjson11_deserializeDocumentColumnLFTagsList(&sv.LFTagsOnColumns, value); err != nil { + return err + } + + case "LFTagsOnTable": + if err := awsAwsjson11_deserializeDocumentLFTagsList(&sv.LFTagsOnTable, value); err != nil { + return err + } + + case "Table": + if err := awsAwsjson11_deserializeDocumentTableResource(&sv.Table, value); err != nil { + return err + } + + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentPrincipalPermissions(v **types.PrincipalPermissions, value interface{}) error { +func awsAwsjson11_deserializeDocumentTagValueList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2586,40 +5176,35 @@ func awsAwsjson11_deserializeDocumentPrincipalPermissions(v **types.PrincipalPer 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.PrincipalPermissions + var cv []string if *v == nil { - sv = &types.PrincipalPermissions{} + cv = []string{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "Permissions": - if err := awsAwsjson11_deserializeDocumentPermissionList(&sv.Permissions, value); err != nil { - return err - } - - case "Principal": - if err := awsAwsjson11_deserializeDocumentDataLakePrincipal(&sv.Principal, value); err != nil { - return err - } - - default: - _, _ = key, value - + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LFTagValue to be of type string, got %T instead", value) + } + col = jtv } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentPrincipalPermissionsList(v *[]types.PrincipalPermissions, value interface{}) error { +func awsAwsjson11_deserializeDocumentTrustedResourceOwners(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2632,20 +5217,22 @@ func awsAwsjson11_deserializeDocumentPrincipalPermissionsList(v *[]types.Princip return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.PrincipalPermissions + var cv []string if *v == nil { - cv = []types.PrincipalPermissions{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.PrincipalPermissions - destAddr := &col - if err := awsAwsjson11_deserializeDocumentPrincipalPermissions(&destAddr, value); err != nil { - return err + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) + } + col = jtv } - col = *destAddr cv = append(cv, col) } @@ -2653,7 +5240,7 @@ func awsAwsjson11_deserializeDocumentPrincipalPermissionsList(v *[]types.Princip return nil } -func awsAwsjson11_deserializeDocumentPrincipalResourcePermissions(v **types.PrincipalResourcePermissions, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentAddLFTagsToResourceOutput(v **AddLFTagsToResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2666,37 +5253,17 @@ func awsAwsjson11_deserializeDocumentPrincipalResourcePermissions(v **types.Prin return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.PrincipalResourcePermissions + var sv *AddLFTagsToResourceOutput if *v == nil { - sv = &types.PrincipalResourcePermissions{} + sv = &AddLFTagsToResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AdditionalDetails": - if err := awsAwsjson11_deserializeDocumentDetailsMap(&sv.AdditionalDetails, value); err != nil { - return err - } - - case "Permissions": - if err := awsAwsjson11_deserializeDocumentPermissionList(&sv.Permissions, value); err != nil { - return err - } - - case "PermissionsWithGrantOption": - if err := awsAwsjson11_deserializeDocumentPermissionList(&sv.PermissionsWithGrantOption, value); err != nil { - return err - } - - case "Principal": - if err := awsAwsjson11_deserializeDocumentDataLakePrincipal(&sv.Principal, value); err != nil { - return err - } - - case "Resource": - if err := awsAwsjson11_deserializeDocumentResource(&sv.Resource, value); err != nil { + case "Failures": + if err := awsAwsjson11_deserializeDocumentLFTagErrors(&sv.Failures, value); err != nil { return err } @@ -2709,7 +5276,7 @@ func awsAwsjson11_deserializeDocumentPrincipalResourcePermissions(v **types.Prin return nil } -func awsAwsjson11_deserializeDocumentPrincipalResourcePermissionsList(v *[]types.PrincipalResourcePermissions, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentBatchGrantPermissionsOutput(v **BatchGrantPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2717,33 +5284,35 @@ func awsAwsjson11_deserializeDocumentPrincipalResourcePermissionsList(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.PrincipalResourcePermissions + var sv *BatchGrantPermissionsOutput if *v == nil { - cv = []types.PrincipalResourcePermissions{} + sv = &BatchGrantPermissionsOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.PrincipalResourcePermissions - destAddr := &col - if err := awsAwsjson11_deserializeDocumentPrincipalResourcePermissions(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "Failures": + if err := awsAwsjson11_deserializeDocumentBatchPermissionsFailureList(&sv.Failures, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentResource(v **types.Resource, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentBatchRevokePermissionsOutput(v **BatchRevokePermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2756,37 +5325,17 @@ func awsAwsjson11_deserializeDocumentResource(v **types.Resource, value interfac return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Resource + var sv *BatchRevokePermissionsOutput if *v == nil { - sv = &types.Resource{} + sv = &BatchRevokePermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Catalog": - if err := awsAwsjson11_deserializeDocumentCatalogResource(&sv.Catalog, value); err != nil { - return err - } - - case "Database": - if err := awsAwsjson11_deserializeDocumentDatabaseResource(&sv.Database, value); err != nil { - return err - } - - case "DataLocation": - if err := awsAwsjson11_deserializeDocumentDataLocationResource(&sv.DataLocation, value); err != nil { - return err - } - - case "Table": - if err := awsAwsjson11_deserializeDocumentTableResource(&sv.Table, value); err != nil { - return err - } - - case "TableWithColumns": - if err := awsAwsjson11_deserializeDocumentTableWithColumnsResource(&sv.TableWithColumns, value); err != nil { + case "Failures": + if err := awsAwsjson11_deserializeDocumentBatchPermissionsFailureList(&sv.Failures, value); err != nil { return err } @@ -2799,7 +5348,7 @@ func awsAwsjson11_deserializeDocumentResource(v **types.Resource, value interfac return nil } -func awsAwsjson11_deserializeDocumentResourceInfo(v **types.ResourceInfo, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentCreateLFTagOutput(v **CreateLFTagOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2812,46 +5361,15 @@ func awsAwsjson11_deserializeDocumentResourceInfo(v **types.ResourceInfo, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ResourceInfo + var sv *CreateLFTagOutput if *v == nil { - sv = &types.ResourceInfo{} + sv = &CreateLFTagOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "LastModified": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected LastModifiedTimestamp to be json.Number, got %T instead", value) - } - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) - } - - case "ResourceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceArnString to be of type string, got %T instead", value) - } - sv.ResourceArn = ptr.String(jtv) - } - - case "RoleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected IAMRoleArn to be of type string, got %T instead", value) - } - sv.RoleArn = ptr.String(jtv) - } - default: _, _ = key, value @@ -2861,7 +5379,7 @@ func awsAwsjson11_deserializeDocumentResourceInfo(v **types.ResourceInfo, value return nil } -func awsAwsjson11_deserializeDocumentResourceInfoList(v *[]types.ResourceInfo, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentDeleteLFTagOutput(v **DeleteLFTagOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2869,33 +5387,30 @@ func awsAwsjson11_deserializeDocumentResourceInfoList(v *[]types.ResourceInfo, 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.ResourceInfo + var sv *DeleteLFTagOutput if *v == nil { - cv = []types.ResourceInfo{} + sv = &DeleteLFTagOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.ResourceInfo - destAddr := &col - if err := awsAwsjson11_deserializeDocumentResourceInfo(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentResourceShareList(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentDeregisterResourceOutput(v **DeregisterResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2903,35 +5418,30 @@ func awsAwsjson11_deserializeDocumentResourceShareList(v *[]string, 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 []string + var sv *DeregisterResourceOutput if *v == nil { - cv = []string{} + sv = &DeregisterResourceOutput{} } 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 RAMResourceShareArn to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) + for key, value := range shape { + switch key { + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentTableResource(v **types.TableResource, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentDescribeResourceOutput(v **DescribeResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2944,44 +5454,53 @@ func awsAwsjson11_deserializeDocumentTableResource(v **types.TableResource, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.TableResource + var sv *DescribeResourceOutput if *v == nil { - sv = &types.TableResource{} + sv = &DescribeResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CatalogId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) - } - sv.CatalogId = ptr.String(jtv) + case "ResourceInfo": + if err := awsAwsjson11_deserializeDocumentResourceInfo(&sv.ResourceInfo, value); err != nil { + return err } - case "DatabaseName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) - } - sv.DatabaseName = ptr.String(jtv) - } + default: + _, _ = key, value - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetDataLakeSettingsOutput(v **GetDataLakeSettingsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDataLakeSettingsOutput + if *v == nil { + sv = &GetDataLakeSettingsOutput{} + } else { + sv = *v + } - case "TableWildcard": - if err := awsAwsjson11_deserializeDocumentTableWildcard(&sv.TableWildcard, value); err != nil { + for key, value := range shape { + switch key { + case "DataLakeSettings": + if err := awsAwsjson11_deserializeDocumentDataLakeSettings(&sv.DataLakeSettings, value); err != nil { return err } @@ -2994,7 +5513,7 @@ func awsAwsjson11_deserializeDocumentTableResource(v **types.TableResource, valu return nil } -func awsAwsjson11_deserializeDocumentTableWildcard(v **types.TableWildcard, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentGetEffectivePermissionsForPathOutput(v **GetEffectivePermissionsForPathOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3007,15 +5526,29 @@ func awsAwsjson11_deserializeDocumentTableWildcard(v **types.TableWildcard, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.TableWildcard + var sv *GetEffectivePermissionsForPathOutput if *v == nil { - sv = &types.TableWildcard{} + sv = &GetEffectivePermissionsForPathOutput{} } 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 "Permissions": + if err := awsAwsjson11_deserializeDocumentPrincipalResourcePermissionsList(&sv.Permissions, value); err != nil { + return err + } + default: _, _ = key, value @@ -3025,7 +5558,7 @@ func awsAwsjson11_deserializeDocumentTableWildcard(v **types.TableWildcard, valu return nil } -func awsAwsjson11_deserializeDocumentTableWithColumnsResource(v **types.TableWithColumnsResource, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentGetLFTagOutput(v **GetLFTagOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3038,9 +5571,9 @@ func awsAwsjson11_deserializeDocumentTableWithColumnsResource(v **types.TableWit return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.TableWithColumnsResource + var sv *GetLFTagOutput if *v == nil { - sv = &types.TableWithColumnsResource{} + sv = &GetLFTagOutput{} } else { sv = *v } @@ -3056,32 +5589,18 @@ func awsAwsjson11_deserializeDocumentTableWithColumnsResource(v **types.TableWit sv.CatalogId = ptr.String(jtv) } - case "ColumnNames": - if err := awsAwsjson11_deserializeDocumentColumnNames(&sv.ColumnNames, value); err != nil { - return err - } - - case "ColumnWildcard": - if err := awsAwsjson11_deserializeDocumentColumnWildcard(&sv.ColumnWildcard, value); err != nil { - return err - } - - case "DatabaseName": + case "TagKey": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + return fmt.Errorf("expected LFTagKey to be of type string, got %T instead", value) } - sv.DatabaseName = ptr.String(jtv) + sv.TagKey = ptr.String(jtv) } - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) + case "TagValues": + if err := awsAwsjson11_deserializeDocumentTagValueList(&sv.TagValues, value); err != nil { + return err } default: @@ -3093,43 +5612,7 @@ func awsAwsjson11_deserializeDocumentTableWithColumnsResource(v **types.TableWit return nil } -func awsAwsjson11_deserializeDocumentTrustedResourceOwners(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 CatalogIdString to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeOpDocumentBatchGrantPermissionsOutput(v **BatchGrantPermissionsOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentGetResourceLFTagsOutput(v **GetResourceLFTagsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3142,17 +5625,27 @@ func awsAwsjson11_deserializeOpDocumentBatchGrantPermissionsOutput(v **BatchGran return fmt.Errorf("unexpected JSON type %v", value) } - var sv *BatchGrantPermissionsOutput + var sv *GetResourceLFTagsOutput if *v == nil { - sv = &BatchGrantPermissionsOutput{} + sv = &GetResourceLFTagsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Failures": - if err := awsAwsjson11_deserializeDocumentBatchPermissionsFailureList(&sv.Failures, value); err != nil { + case "LFTagOnDatabase": + if err := awsAwsjson11_deserializeDocumentLFTagsList(&sv.LFTagOnDatabase, value); err != nil { + return err + } + + case "LFTagsOnColumns": + if err := awsAwsjson11_deserializeDocumentColumnLFTagsList(&sv.LFTagsOnColumns, value); err != nil { + return err + } + + case "LFTagsOnTable": + if err := awsAwsjson11_deserializeDocumentLFTagsList(&sv.LFTagsOnTable, value); err != nil { return err } @@ -3165,7 +5658,7 @@ func awsAwsjson11_deserializeOpDocumentBatchGrantPermissionsOutput(v **BatchGran return nil } -func awsAwsjson11_deserializeOpDocumentBatchRevokePermissionsOutput(v **BatchRevokePermissionsOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentGrantPermissionsOutput(v **GrantPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3178,20 +5671,15 @@ func awsAwsjson11_deserializeOpDocumentBatchRevokePermissionsOutput(v **BatchRev return fmt.Errorf("unexpected JSON type %v", value) } - var sv *BatchRevokePermissionsOutput + var sv *GrantPermissionsOutput if *v == nil { - sv = &BatchRevokePermissionsOutput{} + sv = &GrantPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Failures": - if err := awsAwsjson11_deserializeDocumentBatchPermissionsFailureList(&sv.Failures, value); err != nil { - return err - } - default: _, _ = key, value @@ -3201,7 +5689,7 @@ func awsAwsjson11_deserializeOpDocumentBatchRevokePermissionsOutput(v **BatchRev return nil } -func awsAwsjson11_deserializeOpDocumentDeregisterResourceOutput(v **DeregisterResourceOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentListLFTagsOutput(v **ListLFTagsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3214,15 +5702,29 @@ func awsAwsjson11_deserializeOpDocumentDeregisterResourceOutput(v **DeregisterRe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeregisterResourceOutput + var sv *ListLFTagsOutput if *v == nil { - sv = &DeregisterResourceOutput{} + sv = &ListLFTagsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "LFTags": + if err := awsAwsjson11_deserializeDocumentLFTagsList(&sv.LFTags, 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 @@ -3232,7 +5734,7 @@ func awsAwsjson11_deserializeOpDocumentDeregisterResourceOutput(v **DeregisterRe return nil } -func awsAwsjson11_deserializeOpDocumentDescribeResourceOutput(v **DescribeResourceOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentListPermissionsOutput(v **ListPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3245,17 +5747,26 @@ func awsAwsjson11_deserializeOpDocumentDescribeResourceOutput(v **DescribeResour return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeResourceOutput + var sv *ListPermissionsOutput if *v == nil { - sv = &DescribeResourceOutput{} + sv = &ListPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ResourceInfo": - if err := awsAwsjson11_deserializeDocumentResourceInfo(&sv.ResourceInfo, value); err != nil { + 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 "PrincipalResourcePermissions": + if err := awsAwsjson11_deserializeDocumentPrincipalResourcePermissionsList(&sv.PrincipalResourcePermissions, value); err != nil { return err } @@ -3268,7 +5779,7 @@ func awsAwsjson11_deserializeOpDocumentDescribeResourceOutput(v **DescribeResour return nil } -func awsAwsjson11_deserializeOpDocumentGetDataLakeSettingsOutput(v **GetDataLakeSettingsOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentListResourcesOutput(v **ListResourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3281,17 +5792,26 @@ func awsAwsjson11_deserializeOpDocumentGetDataLakeSettingsOutput(v **GetDataLake return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetDataLakeSettingsOutput + var sv *ListResourcesOutput if *v == nil { - sv = &GetDataLakeSettingsOutput{} + sv = &ListResourcesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataLakeSettings": - if err := awsAwsjson11_deserializeDocumentDataLakeSettings(&sv.DataLakeSettings, value); err != nil { + 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 "ResourceInfoList": + if err := awsAwsjson11_deserializeDocumentResourceInfoList(&sv.ResourceInfoList, value); err != nil { return err } @@ -3304,7 +5824,7 @@ func awsAwsjson11_deserializeOpDocumentGetDataLakeSettingsOutput(v **GetDataLake return nil } -func awsAwsjson11_deserializeOpDocumentGetEffectivePermissionsForPathOutput(v **GetEffectivePermissionsForPathOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentPutDataLakeSettingsOutput(v **PutDataLakeSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3317,29 +5837,15 @@ func awsAwsjson11_deserializeOpDocumentGetEffectivePermissionsForPathOutput(v ** return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetEffectivePermissionsForPathOutput + var sv *PutDataLakeSettingsOutput if *v == nil { - sv = &GetEffectivePermissionsForPathOutput{} + sv = &PutDataLakeSettingsOutput{} } 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 "Permissions": - if err := awsAwsjson11_deserializeDocumentPrincipalResourcePermissionsList(&sv.Permissions, value); err != nil { - return err - } - default: _, _ = key, value @@ -3349,7 +5855,7 @@ func awsAwsjson11_deserializeOpDocumentGetEffectivePermissionsForPathOutput(v ** return nil } -func awsAwsjson11_deserializeOpDocumentGrantPermissionsOutput(v **GrantPermissionsOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentRegisterResourceOutput(v **RegisterResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3362,9 +5868,9 @@ func awsAwsjson11_deserializeOpDocumentGrantPermissionsOutput(v **GrantPermissio return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GrantPermissionsOutput + var sv *RegisterResourceOutput if *v == nil { - sv = &GrantPermissionsOutput{} + sv = &RegisterResourceOutput{} } else { sv = *v } @@ -3380,7 +5886,7 @@ func awsAwsjson11_deserializeOpDocumentGrantPermissionsOutput(v **GrantPermissio return nil } -func awsAwsjson11_deserializeOpDocumentListPermissionsOutput(v **ListPermissionsOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentRemoveLFTagsFromResourceOutput(v **RemoveLFTagsFromResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3393,26 +5899,17 @@ func awsAwsjson11_deserializeOpDocumentListPermissionsOutput(v **ListPermissions return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListPermissionsOutput + var sv *RemoveLFTagsFromResourceOutput if *v == nil { - sv = &ListPermissionsOutput{} + sv = &RemoveLFTagsFromResourceOutput{} } 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 "PrincipalResourcePermissions": - if err := awsAwsjson11_deserializeDocumentPrincipalResourcePermissionsList(&sv.PrincipalResourcePermissions, value); err != nil { + case "Failures": + if err := awsAwsjson11_deserializeDocumentLFTagErrors(&sv.Failures, value); err != nil { return err } @@ -3425,7 +5922,7 @@ func awsAwsjson11_deserializeOpDocumentListPermissionsOutput(v **ListPermissions return nil } -func awsAwsjson11_deserializeOpDocumentListResourcesOutput(v **ListResourcesOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentRevokePermissionsOutput(v **RevokePermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3438,29 +5935,15 @@ func awsAwsjson11_deserializeOpDocumentListResourcesOutput(v **ListResourcesOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListResourcesOutput + var sv *RevokePermissionsOutput if *v == nil { - sv = &ListResourcesOutput{} + sv = &RevokePermissionsOutput{} } 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 "ResourceInfoList": - if err := awsAwsjson11_deserializeDocumentResourceInfoList(&sv.ResourceInfoList, value); err != nil { - return err - } - default: _, _ = key, value @@ -3470,7 +5953,7 @@ func awsAwsjson11_deserializeOpDocumentListResourcesOutput(v **ListResourcesOutp return nil } -func awsAwsjson11_deserializeOpDocumentPutDataLakeSettingsOutput(v **PutDataLakeSettingsOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentSearchDatabasesByLFTagsOutput(v **SearchDatabasesByLFTagsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3483,15 +5966,29 @@ func awsAwsjson11_deserializeOpDocumentPutDataLakeSettingsOutput(v **PutDataLake return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutDataLakeSettingsOutput + var sv *SearchDatabasesByLFTagsOutput if *v == nil { - sv = &PutDataLakeSettingsOutput{} + sv = &SearchDatabasesByLFTagsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "DatabaseList": + if err := awsAwsjson11_deserializeDocumentDatabaseLFTagsList(&sv.DatabaseList, 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 @@ -3501,7 +5998,7 @@ func awsAwsjson11_deserializeOpDocumentPutDataLakeSettingsOutput(v **PutDataLake return nil } -func awsAwsjson11_deserializeOpDocumentRegisterResourceOutput(v **RegisterResourceOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentSearchTablesByLFTagsOutput(v **SearchTablesByLFTagsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3514,15 +6011,29 @@ func awsAwsjson11_deserializeOpDocumentRegisterResourceOutput(v **RegisterResour return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RegisterResourceOutput + var sv *SearchTablesByLFTagsOutput if *v == nil { - sv = &RegisterResourceOutput{} + sv = &SearchTablesByLFTagsOutput{} } 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 "TableList": + if err := awsAwsjson11_deserializeDocumentTableLFTagsList(&sv.TableList, value); err != nil { + return err + } + default: _, _ = key, value @@ -3532,7 +6043,7 @@ func awsAwsjson11_deserializeOpDocumentRegisterResourceOutput(v **RegisterResour return nil } -func awsAwsjson11_deserializeOpDocumentRevokePermissionsOutput(v **RevokePermissionsOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentUpdateLFTagOutput(v **UpdateLFTagOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3545,9 +6056,9 @@ func awsAwsjson11_deserializeOpDocumentRevokePermissionsOutput(v **RevokePermiss return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RevokePermissionsOutput + var sv *UpdateLFTagOutput if *v == nil { - sv = &RevokePermissionsOutput{} + sv = &UpdateLFTagOutput{} } else { sv = *v } diff --git a/service/lakeformation/generated.json b/service/lakeformation/generated.json index bce62dcc209..94c5e8a54f8 100644 --- a/service/lakeformation/generated.json +++ b/service/lakeformation/generated.json @@ -5,18 +5,28 @@ }, "files": [ "api_client.go", + "api_op_AddLFTagsToResource.go", "api_op_BatchGrantPermissions.go", "api_op_BatchRevokePermissions.go", + "api_op_CreateLFTag.go", + "api_op_DeleteLFTag.go", "api_op_DeregisterResource.go", "api_op_DescribeResource.go", "api_op_GetDataLakeSettings.go", "api_op_GetEffectivePermissionsForPath.go", + "api_op_GetLFTag.go", + "api_op_GetResourceLFTags.go", "api_op_GrantPermissions.go", + "api_op_ListLFTags.go", "api_op_ListPermissions.go", "api_op_ListResources.go", "api_op_PutDataLakeSettings.go", "api_op_RegisterResource.go", + "api_op_RemoveLFTagsFromResource.go", "api_op_RevokePermissions.go", + "api_op_SearchDatabasesByLFTags.go", + "api_op_SearchTablesByLFTags.go", + "api_op_UpdateLFTag.go", "api_op_UpdateResource.go", "deserializers.go", "doc.go", diff --git a/service/lakeformation/serializers.go b/service/lakeformation/serializers.go index 709c2386e7f..f88497ed7de 100644 --- a/service/lakeformation/serializers.go +++ b/service/lakeformation/serializers.go @@ -14,6 +14,53 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsAwsjson11_serializeOpAddLFTagsToResource struct { +} + +func (*awsAwsjson11_serializeOpAddLFTagsToResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpAddLFTagsToResource) 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.(*AddLFTagsToResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSLakeFormation.AddLFTagsToResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentAddLFTagsToResourceInput(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_serializeOpBatchGrantPermissions struct { } @@ -108,6 +155,100 @@ func (m *awsAwsjson11_serializeOpBatchRevokePermissions) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateLFTag struct { +} + +func (*awsAwsjson11_serializeOpCreateLFTag) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateLFTag) 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.(*CreateLFTagInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSLakeFormation.CreateLFTag") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateLFTagInput(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_serializeOpDeleteLFTag struct { +} + +func (*awsAwsjson11_serializeOpDeleteLFTag) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteLFTag) 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.(*DeleteLFTagInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSLakeFormation.DeleteLFTag") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteLFTagInput(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_serializeOpDeregisterResource struct { } @@ -296,14 +437,14 @@ func (m *awsAwsjson11_serializeOpGetEffectivePermissionsForPath) HandleSerialize return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpGrantPermissions struct { +type awsAwsjson11_serializeOpGetLFTag struct { } -func (*awsAwsjson11_serializeOpGrantPermissions) ID() string { +func (*awsAwsjson11_serializeOpGetLFTag) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpGrantPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpGetLFTag) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -311,7 +452,7 @@ func (m *awsAwsjson11_serializeOpGrantPermissions) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GrantPermissionsInput) + input, ok := in.Parameters.(*GetLFTagInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -324,10 +465,10 @@ func (m *awsAwsjson11_serializeOpGrantPermissions) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSLakeFormation.GrantPermissions") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSLakeFormation.GetLFTag") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentGrantPermissionsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentGetLFTagInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -343,14 +484,14 @@ func (m *awsAwsjson11_serializeOpGrantPermissions) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpListPermissions struct { +type awsAwsjson11_serializeOpGetResourceLFTags struct { } -func (*awsAwsjson11_serializeOpListPermissions) ID() string { +func (*awsAwsjson11_serializeOpGetResourceLFTags) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpListPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpGetResourceLFTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -358,7 +499,7 @@ func (m *awsAwsjson11_serializeOpListPermissions) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListPermissionsInput) + input, ok := in.Parameters.(*GetResourceLFTagsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -371,10 +512,10 @@ func (m *awsAwsjson11_serializeOpListPermissions) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSLakeFormation.ListPermissions") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSLakeFormation.GetResourceLFTags") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListPermissionsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentGetResourceLFTagsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -390,14 +531,14 @@ func (m *awsAwsjson11_serializeOpListPermissions) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpListResources struct { +type awsAwsjson11_serializeOpGrantPermissions struct { } -func (*awsAwsjson11_serializeOpListResources) ID() string { +func (*awsAwsjson11_serializeOpGrantPermissions) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpListResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpGrantPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -405,7 +546,7 @@ func (m *awsAwsjson11_serializeOpListResources) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListResourcesInput) + input, ok := in.Parameters.(*GrantPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -418,10 +559,10 @@ func (m *awsAwsjson11_serializeOpListResources) 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("AWSLakeFormation.ListResources") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSLakeFormation.GrantPermissions") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListResourcesInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentGrantPermissionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -437,14 +578,14 @@ func (m *awsAwsjson11_serializeOpListResources) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpPutDataLakeSettings struct { +type awsAwsjson11_serializeOpListLFTags struct { } -func (*awsAwsjson11_serializeOpPutDataLakeSettings) ID() string { +func (*awsAwsjson11_serializeOpListLFTags) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpPutDataLakeSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpListLFTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -452,7 +593,7 @@ func (m *awsAwsjson11_serializeOpPutDataLakeSettings) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*PutDataLakeSettingsInput) + input, ok := in.Parameters.(*ListLFTagsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -465,10 +606,10 @@ func (m *awsAwsjson11_serializeOpPutDataLakeSettings) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSLakeFormation.PutDataLakeSettings") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSLakeFormation.ListLFTags") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentPutDataLakeSettingsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentListLFTagsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -484,14 +625,14 @@ func (m *awsAwsjson11_serializeOpPutDataLakeSettings) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpRegisterResource struct { +type awsAwsjson11_serializeOpListPermissions struct { } -func (*awsAwsjson11_serializeOpRegisterResource) ID() string { +func (*awsAwsjson11_serializeOpListPermissions) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpRegisterResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpListPermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -499,7 +640,7 @@ func (m *awsAwsjson11_serializeOpRegisterResource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RegisterResourceInput) + input, ok := in.Parameters.(*ListPermissionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -512,10 +653,10 @@ func (m *awsAwsjson11_serializeOpRegisterResource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSLakeFormation.RegisterResource") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSLakeFormation.ListPermissions") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentRegisterResourceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentListPermissionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -531,14 +672,14 @@ func (m *awsAwsjson11_serializeOpRegisterResource) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpRevokePermissions struct { +type awsAwsjson11_serializeOpListResources struct { } -func (*awsAwsjson11_serializeOpRevokePermissions) ID() string { +func (*awsAwsjson11_serializeOpListResources) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpRevokePermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpListResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -546,7 +687,7 @@ func (m *awsAwsjson11_serializeOpRevokePermissions) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RevokePermissionsInput) + input, ok := in.Parameters.(*ListResourcesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -559,10 +700,10 @@ func (m *awsAwsjson11_serializeOpRevokePermissions) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSLakeFormation.RevokePermissions") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSLakeFormation.ListResources") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentRevokePermissionsInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentListResourcesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -578,14 +719,14 @@ func (m *awsAwsjson11_serializeOpRevokePermissions) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } -type awsAwsjson11_serializeOpUpdateResource struct { +type awsAwsjson11_serializeOpPutDataLakeSettings struct { } -func (*awsAwsjson11_serializeOpUpdateResource) ID() string { +func (*awsAwsjson11_serializeOpPutDataLakeSettings) ID() string { return "OperationSerializer" } -func (m *awsAwsjson11_serializeOpUpdateResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsAwsjson11_serializeOpPutDataLakeSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -593,7 +734,7 @@ func (m *awsAwsjson11_serializeOpUpdateResource) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateResourceInput) + input, ok := in.Parameters.(*PutDataLakeSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -606,10 +747,10 @@ func (m *awsAwsjson11_serializeOpUpdateResource) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSLakeFormation.UpdateResource") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSLakeFormation.PutDataLakeSettings") jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentUpdateResourceInput(input, jsonEncoder.Value); err != nil { + if err := awsAwsjson11_serializeOpDocumentPutDataLakeSettingsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -624,51 +765,380 @@ func (m *awsAwsjson11_serializeOpUpdateResource) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } -func awsAwsjson11_serializeDocumentBatchPermissionsRequestEntry(v *types.BatchPermissionsRequestEntry, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - if v.Id != nil { - ok := object.Key("Id") - ok.String(*v.Id) +type awsAwsjson11_serializeOpRegisterResource struct { +} + +func (*awsAwsjson11_serializeOpRegisterResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpRegisterResource) 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.Permissions != nil { - ok := object.Key("Permissions") - if err := awsAwsjson11_serializeDocumentPermissionList(v.Permissions, ok); err != nil { - return err - } + input, ok := in.Parameters.(*RegisterResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - if v.PermissionsWithGrantOption != nil { - ok := object.Key("PermissionsWithGrantOption") - if err := awsAwsjson11_serializeDocumentPermissionList(v.PermissionsWithGrantOption, ok); err != nil { - return err - } + 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("AWSLakeFormation.RegisterResource") - if v.Principal != nil { - ok := object.Key("Principal") - if err := awsAwsjson11_serializeDocumentDataLakePrincipal(v.Principal, ok); err != nil { - return err - } + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentRegisterResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } - if v.Resource != nil { - ok := object.Key("Resource") - if err := awsAwsjson11_serializeDocumentResource(v.Resource, ok); err != nil { - return err - } + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } - return nil + 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_serializeDocumentBatchPermissionsRequestEntryList(v []types.BatchPermissionsRequestEntry, value smithyjson.Value) error { - array := value.Array() - defer array.Close() +type awsAwsjson11_serializeOpRemoveLFTagsFromResource struct { +} - for i := range v { +func (*awsAwsjson11_serializeOpRemoveLFTagsFromResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpRemoveLFTagsFromResource) 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.(*RemoveLFTagsFromResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSLakeFormation.RemoveLFTagsFromResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentRemoveLFTagsFromResourceInput(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_serializeOpRevokePermissions struct { +} + +func (*awsAwsjson11_serializeOpRevokePermissions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpRevokePermissions) 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.(*RevokePermissionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSLakeFormation.RevokePermissions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentRevokePermissionsInput(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_serializeOpSearchDatabasesByLFTags struct { +} + +func (*awsAwsjson11_serializeOpSearchDatabasesByLFTags) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpSearchDatabasesByLFTags) 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.(*SearchDatabasesByLFTagsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSLakeFormation.SearchDatabasesByLFTags") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentSearchDatabasesByLFTagsInput(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_serializeOpSearchTablesByLFTags struct { +} + +func (*awsAwsjson11_serializeOpSearchTablesByLFTags) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpSearchTablesByLFTags) 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.(*SearchTablesByLFTagsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSLakeFormation.SearchTablesByLFTags") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentSearchTablesByLFTagsInput(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_serializeOpUpdateLFTag struct { +} + +func (*awsAwsjson11_serializeOpUpdateLFTag) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateLFTag) 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.(*UpdateLFTagInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSLakeFormation.UpdateLFTag") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateLFTagInput(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_serializeOpUpdateResource struct { +} + +func (*awsAwsjson11_serializeOpUpdateResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateResource) 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.(*UpdateResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AWSLakeFormation.UpdateResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateResourceInput(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_serializeDocumentBatchPermissionsRequestEntry(v *types.BatchPermissionsRequestEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("Id") + ok.String(*v.Id) + } + + if v.Permissions != nil { + ok := object.Key("Permissions") + if err := awsAwsjson11_serializeDocumentPermissionList(v.Permissions, ok); err != nil { + return err + } + } + + if v.PermissionsWithGrantOption != nil { + ok := object.Key("PermissionsWithGrantOption") + if err := awsAwsjson11_serializeDocumentPermissionList(v.PermissionsWithGrantOption, ok); err != nil { + return err + } + } + + if v.Principal != nil { + ok := object.Key("Principal") + if err := awsAwsjson11_serializeDocumentDataLakePrincipal(v.Principal, ok); err != nil { + return err + } + } + + if v.Resource != nil { + ok := object.Key("Resource") + if err := awsAwsjson11_serializeDocumentResource(v.Resource, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentBatchPermissionsRequestEntryList(v []types.BatchPermissionsRequestEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentBatchPermissionsRequestEntry(&v[i], av); err != nil { return err @@ -776,9 +1246,119 @@ func awsAwsjson11_serializeDocumentDataLakeSettings(v *types.DataLakeSettings, v } } - if v.TrustedResourceOwners != nil { - ok := object.Key("TrustedResourceOwners") - if err := awsAwsjson11_serializeDocumentTrustedResourceOwners(v.TrustedResourceOwners, ok); err != nil { + if v.TrustedResourceOwners != nil { + ok := object.Key("TrustedResourceOwners") + if err := awsAwsjson11_serializeDocumentTrustedResourceOwners(v.TrustedResourceOwners, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentDataLocationResource(v *types.DataLocationResource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.ResourceArn != nil { + ok := object.Key("ResourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +func awsAwsjson11_serializeDocumentExpression(v []types.LFTag, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentLFTag(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentFilterCondition(v *types.FilterCondition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ComparisonOperator) > 0 { + ok := object.Key("ComparisonOperator") + ok.String(string(v.ComparisonOperator)) + } + + if len(v.Field) > 0 { + ok := object.Key("Field") + ok.String(string(v.Field)) + } + + if v.StringValueList != nil { + ok := object.Key("StringValueList") + if err := awsAwsjson11_serializeDocumentStringValueList(v.StringValueList, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentFilterConditionList(v []types.FilterCondition, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentFilterCondition(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentLFTag(v *types.LFTag, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TagKey != nil { + ok := object.Key("TagKey") + ok.String(*v.TagKey) + } + + if v.TagValues != nil { + ok := object.Key("TagValues") + if err := awsAwsjson11_serializeDocumentTagValueList(v.TagValues, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentLFTagKeyResource(v *types.LFTagKeyResource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.TagKey != nil { + ok := object.Key("TagKey") + ok.String(*v.TagKey) + } + + if v.TagValues != nil { + ok := object.Key("TagValues") + if err := awsAwsjson11_serializeDocumentTagValueList(v.TagValues, ok); err != nil { return err } } @@ -786,7 +1366,7 @@ func awsAwsjson11_serializeDocumentDataLakeSettings(v *types.DataLakeSettings, v return nil } -func awsAwsjson11_serializeDocumentDataLocationResource(v *types.DataLocationResource, value smithyjson.Value) error { +func awsAwsjson11_serializeDocumentLFTagPair(v *types.LFTagPair, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -795,45 +1375,52 @@ func awsAwsjson11_serializeDocumentDataLocationResource(v *types.DataLocationRes ok.String(*v.CatalogId) } - if v.ResourceArn != nil { - ok := object.Key("ResourceArn") - ok.String(*v.ResourceArn) + if v.TagKey != nil { + ok := object.Key("TagKey") + ok.String(*v.TagKey) + } + + if v.TagValues != nil { + ok := object.Key("TagValues") + if err := awsAwsjson11_serializeDocumentTagValueList(v.TagValues, ok); err != nil { + return err + } } return nil } -func awsAwsjson11_serializeDocumentFilterCondition(v *types.FilterCondition, value smithyjson.Value) error { +func awsAwsjson11_serializeDocumentLFTagPolicyResource(v *types.LFTagPolicyResource, value smithyjson.Value) error { object := value.Object() defer object.Close() - if len(v.ComparisonOperator) > 0 { - ok := object.Key("ComparisonOperator") - ok.String(string(v.ComparisonOperator)) - } - - if len(v.Field) > 0 { - ok := object.Key("Field") - ok.String(string(v.Field)) + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) } - if v.StringValueList != nil { - ok := object.Key("StringValueList") - if err := awsAwsjson11_serializeDocumentStringValueList(v.StringValueList, ok); err != nil { + if v.Expression != nil { + ok := object.Key("Expression") + if err := awsAwsjson11_serializeDocumentExpression(v.Expression, ok); err != nil { return err } } + if len(v.ResourceType) > 0 { + ok := object.Key("ResourceType") + ok.String(string(v.ResourceType)) + } + return nil } -func awsAwsjson11_serializeDocumentFilterConditionList(v []types.FilterCondition, value smithyjson.Value) error { +func awsAwsjson11_serializeDocumentLFTagsList(v []types.LFTagPair, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - if err := awsAwsjson11_serializeDocumentFilterCondition(&v[i], av); err != nil { + if err := awsAwsjson11_serializeDocumentLFTagPair(&v[i], av); err != nil { return err } } @@ -910,6 +1497,20 @@ func awsAwsjson11_serializeDocumentResource(v *types.Resource, value smithyjson. } } + if v.LFTag != nil { + ok := object.Key("LFTag") + if err := awsAwsjson11_serializeDocumentLFTagKeyResource(v.LFTag, ok); err != nil { + return err + } + } + + if v.LFTagPolicy != nil { + ok := object.Key("LFTagPolicy") + if err := awsAwsjson11_serializeDocumentLFTagPolicyResource(v.LFTagPolicy, ok); err != nil { + return err + } + } + if v.Table != nil { ok := object.Key("Table") if err := awsAwsjson11_serializeDocumentTableResource(v.Table, ok); err != nil { @@ -1010,6 +1611,17 @@ func awsAwsjson11_serializeDocumentTableWithColumnsResource(v *types.TableWithCo return nil } +func awsAwsjson11_serializeDocumentTagValueList(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_serializeDocumentTrustedResourceOwners(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -1021,6 +1633,32 @@ func awsAwsjson11_serializeDocumentTrustedResourceOwners(v []string, value smith return nil } +func awsAwsjson11_serializeOpDocumentAddLFTagsToResourceInput(v *AddLFTagsToResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.LFTags != nil { + ok := object.Key("LFTags") + if err := awsAwsjson11_serializeDocumentLFTagsList(v.LFTags, ok); err != nil { + return err + } + } + + if v.Resource != nil { + ok := object.Key("Resource") + if err := awsAwsjson11_serializeDocumentResource(v.Resource, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentBatchGrantPermissionsInput(v *BatchGrantPermissionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1059,6 +1697,47 @@ func awsAwsjson11_serializeOpDocumentBatchRevokePermissionsInput(v *BatchRevokeP return nil } +func awsAwsjson11_serializeOpDocumentCreateLFTagInput(v *CreateLFTagInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.TagKey != nil { + ok := object.Key("TagKey") + ok.String(*v.TagKey) + } + + if v.TagValues != nil { + ok := object.Key("TagValues") + if err := awsAwsjson11_serializeDocumentTagValueList(v.TagValues, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteLFTagInput(v *DeleteLFTagInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.TagKey != nil { + ok := object.Key("TagKey") + ok.String(*v.TagKey) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeregisterResourceInput(v *DeregisterResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1122,6 +1801,47 @@ func awsAwsjson11_serializeOpDocumentGetEffectivePermissionsForPathInput(v *GetE return nil } +func awsAwsjson11_serializeOpDocumentGetLFTagInput(v *GetLFTagInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.TagKey != nil { + ok := object.Key("TagKey") + ok.String(*v.TagKey) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetResourceLFTagsInput(v *GetResourceLFTagsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.Resource != nil { + ok := object.Key("Resource") + if err := awsAwsjson11_serializeDocumentResource(v.Resource, ok); err != nil { + return err + } + } + + if v.ShowAssignedLFTags != nil { + ok := object.Key("ShowAssignedLFTags") + ok.Boolean(*v.ShowAssignedLFTags) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentGrantPermissionsInput(v *GrantPermissionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1162,6 +1882,33 @@ func awsAwsjson11_serializeOpDocumentGrantPermissionsInput(v *GrantPermissionsIn return nil } +func awsAwsjson11_serializeOpDocumentListLFTagsInput(v *ListLFTagsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + 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.ResourceShareType) > 0 { + ok := object.Key("ResourceShareType") + ok.String(string(v.ResourceShareType)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListPermissionsInput(v *ListPermissionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1268,6 +2015,32 @@ func awsAwsjson11_serializeOpDocumentRegisterResourceInput(v *RegisterResourceIn return nil } +func awsAwsjson11_serializeOpDocumentRemoveLFTagsFromResourceInput(v *RemoveLFTagsFromResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.LFTags != nil { + ok := object.Key("LFTags") + if err := awsAwsjson11_serializeDocumentLFTagsList(v.LFTags, ok); err != nil { + return err + } + } + + if v.Resource != nil { + ok := object.Key("Resource") + if err := awsAwsjson11_serializeDocumentResource(v.Resource, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentRevokePermissionsInput(v *RevokePermissionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1308,6 +2081,95 @@ func awsAwsjson11_serializeOpDocumentRevokePermissionsInput(v *RevokePermissions return nil } +func awsAwsjson11_serializeOpDocumentSearchDatabasesByLFTagsInput(v *SearchDatabasesByLFTagsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.Expression != nil { + ok := object.Key("Expression") + if err := awsAwsjson11_serializeDocumentExpression(v.Expression, 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 +} + +func awsAwsjson11_serializeOpDocumentSearchTablesByLFTagsInput(v *SearchTablesByLFTagsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.Expression != nil { + ok := object.Key("Expression") + if err := awsAwsjson11_serializeDocumentExpression(v.Expression, 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 +} + +func awsAwsjson11_serializeOpDocumentUpdateLFTagInput(v *UpdateLFTagInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.TagKey != nil { + ok := object.Key("TagKey") + ok.String(*v.TagKey) + } + + if v.TagValuesToAdd != nil { + ok := object.Key("TagValuesToAdd") + if err := awsAwsjson11_serializeDocumentTagValueList(v.TagValuesToAdd, ok); err != nil { + return err + } + } + + if v.TagValuesToDelete != nil { + ok := object.Key("TagValuesToDelete") + if err := awsAwsjson11_serializeDocumentTagValueList(v.TagValuesToDelete, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentUpdateResourceInput(v *UpdateResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/lakeformation/types/enums.go b/service/lakeformation/types/enums.go index 7257ccb0189..8c04e1c82fb 100644 --- a/service/lakeformation/types/enums.go +++ b/service/lakeformation/types/enums.go @@ -42,10 +42,14 @@ type DataLakeResourceType string // Enum values for DataLakeResourceType const ( - DataLakeResourceTypeCatalog DataLakeResourceType = "CATALOG" - DataLakeResourceTypeDatabase DataLakeResourceType = "DATABASE" - DataLakeResourceTypeTable DataLakeResourceType = "TABLE" - DataLakeResourceTypeDataLocation DataLakeResourceType = "DATA_LOCATION" + DataLakeResourceTypeCatalog DataLakeResourceType = "CATALOG" + DataLakeResourceTypeDatabase DataLakeResourceType = "DATABASE" + DataLakeResourceTypeTable DataLakeResourceType = "TABLE" + DataLakeResourceTypeDataLocation DataLakeResourceType = "DATA_LOCATION" + DataLakeResourceTypeLfTag DataLakeResourceType = "LF_TAG" + DataLakeResourceTypeLfTagPolicy DataLakeResourceType = "LF_TAG_POLICY" + DataLakeResourceTypeLfTagPolicyDatabase DataLakeResourceType = "LF_TAG_POLICY_DATABASE" + DataLakeResourceTypeLfTagPolicyTable DataLakeResourceType = "LF_TAG_POLICY_TABLE" ) // Values returns all known values for DataLakeResourceType. Note that this can be @@ -57,6 +61,10 @@ func (DataLakeResourceType) Values() []DataLakeResourceType { "DATABASE", "TABLE", "DATA_LOCATION", + "LF_TAG", + "LF_TAG_POLICY", + "LF_TAG_POLICY_DATABASE", + "LF_TAG_POLICY_TABLE", } } @@ -94,6 +102,11 @@ const ( PermissionCreateDatabase Permission = "CREATE_DATABASE" PermissionCreateTable Permission = "CREATE_TABLE" PermissionDataLocationAccess Permission = "DATA_LOCATION_ACCESS" + PermissionCreateTag Permission = "CREATE_TAG" + PermissionAlterTag Permission = "ALTER_TAG" + PermissionDeleteTag Permission = "DELETE_TAG" + PermissionDescribeTag Permission = "DESCRIBE_TAG" + PermissionAssociateTag Permission = "ASSOCIATE_TAG" ) // Values returns all known values for Permission. Note that this can be expanded @@ -111,5 +124,46 @@ func (Permission) Values() []Permission { "CREATE_DATABASE", "CREATE_TABLE", "DATA_LOCATION_ACCESS", + "CREATE_TAG", + "ALTER_TAG", + "DELETE_TAG", + "DESCRIBE_TAG", + "ASSOCIATE_TAG", + } +} + +type ResourceShareType string + +// Enum values for ResourceShareType +const ( + ResourceShareTypeForeign ResourceShareType = "FOREIGN" + ResourceShareTypeAll ResourceShareType = "ALL" +) + +// Values returns all known values for ResourceShareType. 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 (ResourceShareType) Values() []ResourceShareType { + return []ResourceShareType{ + "FOREIGN", + "ALL", + } +} + +type ResourceType string + +// Enum values for ResourceType +const ( + ResourceTypeDatabase ResourceType = "DATABASE" + ResourceTypeTable ResourceType = "TABLE" +) + +// 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{ + "DATABASE", + "TABLE", } } diff --git a/service/lakeformation/types/errors.go b/service/lakeformation/types/errors.go index acccc1aa814..473b602328b 100644 --- a/service/lakeformation/types/errors.go +++ b/service/lakeformation/types/errors.go @@ -7,6 +7,23 @@ import ( smithy "github.com/aws/smithy-go" ) +// Access to a resource was denied. +type AccessDeniedException struct { + Message *string +} + +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 to be created or added already exists. type AlreadyExistsException struct { Message *string @@ -60,6 +77,23 @@ func (e *EntityNotFoundException) ErrorMessage() string { func (e *EntityNotFoundException) ErrorCode() string { return "EntityNotFoundException" } func (e *EntityNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// An encryption operation failed. +type GlueEncryptionException struct { + Message *string +} + +func (e *GlueEncryptionException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *GlueEncryptionException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *GlueEncryptionException) ErrorCode() string { return "GlueEncryptionException" } +func (e *GlueEncryptionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // An internal service error occurred. type InternalServiceException struct { Message *string @@ -110,3 +144,24 @@ func (e *OperationTimeoutException) ErrorMessage() string { } func (e *OperationTimeoutException) ErrorCode() string { return "OperationTimeoutException" } func (e *OperationTimeoutException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A resource numerical limit was exceeded. +type ResourceNumberLimitExceededException struct { + Message *string +} + +func (e *ResourceNumberLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNumberLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNumberLimitExceededException) ErrorCode() string { + return "ResourceNumberLimitExceededException" +} +func (e *ResourceNumberLimitExceededException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} diff --git a/service/lakeformation/types/types.go b/service/lakeformation/types/types.go index 4f393d4bcc4..50eeb388b78 100644 --- a/service/lakeformation/types/types.go +++ b/service/lakeformation/types/types.go @@ -41,6 +41,17 @@ type BatchPermissionsRequestEntry struct { type CatalogResource struct { } +// A structure containing the name of a column resource and the tags attached to +// it. +type ColumnLFTag struct { + + // The tags attached to a column resource. + LFTags []LFTagPair + + // The name of a column resource. + Name *string +} + // A wildcard object, consisting of an optional list of excluded column names or // indexes. type ColumnWildcard struct { @@ -111,10 +122,10 @@ type DataLocationResource struct { // A structure containing the additional details to be returned in the // AdditionalDetails attribute of PrincipalResourcePermissions. If a catalog // resource is shared through AWS Resource Access Manager (AWS RAM), then there -// will exist a corresponding RAM share resource ARN. +// will exist a corresponding RAM resource share ARN. type DetailsMap struct { - // A share resource ARN for a catalog resource shared through AWS Resource Access + // A resource share ARN for a catalog resource shared through AWS Resource Access // Manager (AWS RAM). ResourceShare []string } @@ -143,6 +154,94 @@ type FilterCondition struct { StringValueList []string } +// A structure that allows an admin to grant user permissions on certain +// conditions. For example, granting a role access to all columns not tagged 'PII' +// of tables tagged 'Prod'. +type LFTag struct { + + // The key-name for the tag. + // + // This member is required. + TagKey *string + + // A list of possible values an attribute can take. + // + // This member is required. + TagValues []string +} + +// A structure containing an error related to a TagResource or UnTagResource +// operation. +type LFTagError struct { + + // An error that occurred with the attachment or detachment of the tag. + Error *ErrorDetail + + // The key-name of the tag. + LFTag *LFTagPair +} + +// A structure containing a tag key and values for a resource. +type LFTagKeyResource struct { + + // The key-name for the tag. + // + // This member is required. + TagKey *string + + // A list of possible values an attribute can take. + // + // This member is required. + TagValues []string + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string +} + +// A structure containing a tag key-value pair. +type LFTagPair struct { + + // The key-name for the tag. + // + // This member is required. + TagKey *string + + // A list of possible values an attribute can take. + // + // This member is required. + TagValues []string + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string +} + +// A structure containing a list of tag conditions that apply to a resource's tag +// policy. +type LFTagPolicyResource struct { + + // A list of tag conditions that apply to the resource's tag policy. + // + // This member is required. + Expression []LFTag + + // The resource type for which the tag policy applies. + // + // This member is required. + ResourceType ResourceType + + // The identifier for the Data Catalog. By default, the account ID. The Data + // Catalog is the persistent metadata store. It contains database definitions, + // table definitions, and other control information to manage your AWS Lake + // Formation environment. + CatalogId *string +} + // Permissions granted to a principal. type PrincipalPermissions struct { @@ -157,7 +256,7 @@ type PrincipalPermissions struct { type PrincipalResourcePermissions struct { // This attribute can be used to return any additional details of - // PrincipalResourcePermissions. Currently returns only as a RAM share resource + // PrincipalResourcePermissions. Currently returns only as a RAM resource share // ARN. AdditionalDetails *DetailsMap @@ -192,6 +291,12 @@ type Resource struct { // and Revoke database permissions to a principal. Database *DatabaseResource + // The tag key and values attached to a resource. + LFTag *LFTagKeyResource + + // A list of tag conditions that define a resource's tag policy. + LFTagPolicy *LFTagPolicyResource + // The table for the resource. A table is a metadata definition that represents // your data. You can Grant and Revoke table privileges to a principal. Table *TableResource @@ -272,3 +377,29 @@ type TableWithColumnsResource struct { // ColumnWildcard is required. ColumnWildcard *ColumnWildcard } + +// A structure describing a database resource with tags. +type TaggedDatabase struct { + + // A database that has tags attached to it. + Database *DatabaseResource + + // A list of tags attached to the database. + LFTags []LFTagPair +} + +// A structure describing a table resource with tags. +type TaggedTable struct { + + // A list of tags attached to the database where the table resides. + LFTagOnDatabase []LFTagPair + + // A list of tags attached to columns in the table. + LFTagsOnColumns []ColumnLFTag + + // A list of tags attached to the table. + LFTagsOnTable []LFTagPair + + // A table that has tags attached to it. + Table *TableResource +} diff --git a/service/lakeformation/validators.go b/service/lakeformation/validators.go index 17dd7dc7051..694255ddfb0 100644 --- a/service/lakeformation/validators.go +++ b/service/lakeformation/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpAddLFTagsToResource struct { +} + +func (*validateOpAddLFTagsToResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddLFTagsToResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddLFTagsToResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddLFTagsToResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpBatchGrantPermissions struct { } @@ -50,6 +70,46 @@ func (m *validateOpBatchRevokePermissions) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpCreateLFTag struct { +} + +func (*validateOpCreateLFTag) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateLFTag) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateLFTagInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateLFTagInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteLFTag struct { +} + +func (*validateOpDeleteLFTag) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteLFTag) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteLFTagInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteLFTagInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeregisterResource struct { } @@ -110,6 +170,46 @@ func (m *validateOpGetEffectivePermissionsForPath) HandleInitialize(ctx context. return next.HandleInitialize(ctx, in) } +type validateOpGetLFTag struct { +} + +func (*validateOpGetLFTag) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLFTag) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLFTagInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLFTagInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetResourceLFTags struct { +} + +func (*validateOpGetResourceLFTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetResourceLFTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetResourceLFTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetResourceLFTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGrantPermissions struct { } @@ -190,6 +290,26 @@ func (m *validateOpRegisterResource) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpRemoveLFTagsFromResource struct { +} + +func (*validateOpRemoveLFTagsFromResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRemoveLFTagsFromResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RemoveLFTagsFromResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRemoveLFTagsFromResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRevokePermissions struct { } @@ -210,6 +330,66 @@ func (m *validateOpRevokePermissions) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpSearchDatabasesByLFTags struct { +} + +func (*validateOpSearchDatabasesByLFTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchDatabasesByLFTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchDatabasesByLFTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchDatabasesByLFTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSearchTablesByLFTags struct { +} + +func (*validateOpSearchTablesByLFTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSearchTablesByLFTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SearchTablesByLFTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSearchTablesByLFTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateLFTag struct { +} + +func (*validateOpUpdateLFTag) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLFTag) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLFTagInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLFTagInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateResource struct { } @@ -230,6 +410,10 @@ func (m *validateOpUpdateResource) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +func addOpAddLFTagsToResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddLFTagsToResource{}, middleware.After) +} + func addOpBatchGrantPermissionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchGrantPermissions{}, middleware.After) } @@ -238,6 +422,14 @@ func addOpBatchRevokePermissionsValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpBatchRevokePermissions{}, middleware.After) } +func addOpCreateLFTagValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLFTag{}, middleware.After) +} + +func addOpDeleteLFTagValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLFTag{}, middleware.After) +} + func addOpDeregisterResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeregisterResource{}, middleware.After) } @@ -250,6 +442,14 @@ func addOpGetEffectivePermissionsForPathValidationMiddleware(stack *middleware.S return stack.Initialize.Add(&validateOpGetEffectivePermissionsForPath{}, middleware.After) } +func addOpGetLFTagValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLFTag{}, middleware.After) +} + +func addOpGetResourceLFTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResourceLFTags{}, middleware.After) +} + func addOpGrantPermissionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGrantPermissions{}, middleware.After) } @@ -266,10 +466,26 @@ func addOpRegisterResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRegisterResource{}, middleware.After) } +func addOpRemoveLFTagsFromResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRemoveLFTagsFromResource{}, middleware.After) +} + func addOpRevokePermissionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRevokePermissions{}, middleware.After) } +func addOpSearchDatabasesByLFTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchDatabasesByLFTags{}, middleware.After) +} + +func addOpSearchTablesByLFTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSearchTablesByLFTags{}, middleware.After) +} + +func addOpUpdateLFTagValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLFTag{}, middleware.After) +} + func addOpUpdateResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateResource{}, middleware.After) } @@ -341,6 +557,116 @@ func validateDataLocationResource(v *types.DataLocationResource) error { } } +func validateExpression(v []types.LFTag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Expression"} + for i := range v { + if err := validateLFTag(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLFTag(v *types.LFTag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LFTag"} + if v.TagKey == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKey")) + } + if v.TagValues == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagValues")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLFTagKeyResource(v *types.LFTagKeyResource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LFTagKeyResource"} + if v.TagKey == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKey")) + } + if v.TagValues == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagValues")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLFTagPair(v *types.LFTagPair) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LFTagPair"} + if v.TagKey == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKey")) + } + if v.TagValues == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagValues")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLFTagPolicyResource(v *types.LFTagPolicyResource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LFTagPolicyResource"} + if len(v.ResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.Expression == nil { + invalidParams.Add(smithy.NewErrParamRequired("Expression")) + } else if v.Expression != nil { + if err := validateExpression(v.Expression); err != nil { + invalidParams.AddNested("Expression", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLFTagsList(v []types.LFTagPair) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LFTagsList"} + for i := range v { + if err := validateLFTagPair(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateResource(v *types.Resource) error { if v == nil { return nil @@ -366,6 +692,16 @@ func validateResource(v *types.Resource) error { invalidParams.AddNested("DataLocation", err.(smithy.InvalidParamsError)) } } + if v.LFTag != nil { + if err := validateLFTagKeyResource(v.LFTag); err != nil { + invalidParams.AddNested("LFTag", err.(smithy.InvalidParamsError)) + } + } + if v.LFTagPolicy != nil { + if err := validateLFTagPolicyResource(v.LFTagPolicy); err != nil { + invalidParams.AddNested("LFTagPolicy", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -406,6 +742,32 @@ func validateTableWithColumnsResource(v *types.TableWithColumnsResource) error { } } +func validateOpAddLFTagsToResourceInput(v *AddLFTagsToResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddLFTagsToResourceInput"} + if v.Resource == nil { + invalidParams.Add(smithy.NewErrParamRequired("Resource")) + } else if v.Resource != nil { + if err := validateResource(v.Resource); err != nil { + invalidParams.AddNested("Resource", err.(smithy.InvalidParamsError)) + } + } + if v.LFTags == nil { + invalidParams.Add(smithy.NewErrParamRequired("LFTags")) + } else if v.LFTags != nil { + if err := validateLFTagsList(v.LFTags); err != nil { + invalidParams.AddNested("LFTags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpBatchGrantPermissionsInput(v *BatchGrantPermissionsInput) error { if v == nil { return nil @@ -444,6 +806,39 @@ func validateOpBatchRevokePermissionsInput(v *BatchRevokePermissionsInput) error } } +func validateOpCreateLFTagInput(v *CreateLFTagInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLFTagInput"} + if v.TagKey == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKey")) + } + if v.TagValues == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagValues")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteLFTagInput(v *DeleteLFTagInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteLFTagInput"} + if v.TagKey == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKey")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeregisterResourceInput(v *DeregisterResourceInput) error { if v == nil { return nil @@ -489,6 +884,40 @@ func validateOpGetEffectivePermissionsForPathInput(v *GetEffectivePermissionsFor } } +func validateOpGetLFTagInput(v *GetLFTagInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLFTagInput"} + if v.TagKey == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKey")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetResourceLFTagsInput(v *GetResourceLFTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetResourceLFTagsInput"} + if v.Resource == nil { + invalidParams.Add(smithy.NewErrParamRequired("Resource")) + } else if v.Resource != nil { + if err := validateResource(v.Resource); err != nil { + invalidParams.AddNested("Resource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGrantPermissionsInput(v *GrantPermissionsInput) error { if v == nil { return nil @@ -561,6 +990,32 @@ func validateOpRegisterResourceInput(v *RegisterResourceInput) error { } } +func validateOpRemoveLFTagsFromResourceInput(v *RemoveLFTagsFromResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RemoveLFTagsFromResourceInput"} + if v.Resource == nil { + invalidParams.Add(smithy.NewErrParamRequired("Resource")) + } else if v.Resource != nil { + if err := validateResource(v.Resource); err != nil { + invalidParams.AddNested("Resource", err.(smithy.InvalidParamsError)) + } + } + if v.LFTags == nil { + invalidParams.Add(smithy.NewErrParamRequired("LFTags")) + } else if v.LFTags != nil { + if err := validateLFTagsList(v.LFTags); err != nil { + invalidParams.AddNested("LFTags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRevokePermissionsInput(v *RevokePermissionsInput) error { if v == nil { return nil @@ -586,6 +1041,59 @@ func validateOpRevokePermissionsInput(v *RevokePermissionsInput) error { } } +func validateOpSearchDatabasesByLFTagsInput(v *SearchDatabasesByLFTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchDatabasesByLFTagsInput"} + if v.Expression == nil { + invalidParams.Add(smithy.NewErrParamRequired("Expression")) + } else if v.Expression != nil { + if err := validateExpression(v.Expression); err != nil { + invalidParams.AddNested("Expression", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSearchTablesByLFTagsInput(v *SearchTablesByLFTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SearchTablesByLFTagsInput"} + if v.Expression == nil { + invalidParams.Add(smithy.NewErrParamRequired("Expression")) + } else if v.Expression != nil { + if err := validateExpression(v.Expression); err != nil { + invalidParams.AddNested("Expression", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateLFTagInput(v *UpdateLFTagInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLFTagInput"} + if v.TagKey == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKey")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateResourceInput(v *UpdateResourceInput) error { if v == nil { return nil diff --git a/service/lookoutmetrics/api_op_DescribeAlert.go b/service/lookoutmetrics/api_op_DescribeAlert.go index 66028621837..e02efae7a47 100644 --- a/service/lookoutmetrics/api_op_DescribeAlert.go +++ b/service/lookoutmetrics/api_op_DescribeAlert.go @@ -11,7 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Describes an alert. +// Describes an alert. Amazon Lookout for Metrics API actions are eventually +// consistent. If you do a read operation on a resource immediately after creating +// or modifying it, use retries to allow time for the write operation to complete. func (c *Client) DescribeAlert(ctx context.Context, params *DescribeAlertInput, optFns ...func(*Options)) (*DescribeAlertOutput, error) { if params == nil { params = &DescribeAlertInput{} diff --git a/service/lookoutmetrics/api_op_DescribeAnomalyDetector.go b/service/lookoutmetrics/api_op_DescribeAnomalyDetector.go index eb41f5ff3a2..9eff646bb2a 100644 --- a/service/lookoutmetrics/api_op_DescribeAnomalyDetector.go +++ b/service/lookoutmetrics/api_op_DescribeAnomalyDetector.go @@ -12,7 +12,9 @@ import ( "time" ) -// Describes a detector. +// Describes a detector. Amazon Lookout for Metrics API actions are eventually +// consistent. If you do a read operation on a resource immediately after creating +// or modifying it, use retries to allow time for the write operation to complete. func (c *Client) DescribeAnomalyDetector(ctx context.Context, params *DescribeAnomalyDetectorInput, optFns ...func(*Options)) (*DescribeAnomalyDetectorOutput, error) { if params == nil { params = &DescribeAnomalyDetectorInput{} diff --git a/service/lookoutmetrics/api_op_DescribeMetricSet.go b/service/lookoutmetrics/api_op_DescribeMetricSet.go index ad5584db083..0117e7e830b 100644 --- a/service/lookoutmetrics/api_op_DescribeMetricSet.go +++ b/service/lookoutmetrics/api_op_DescribeMetricSet.go @@ -12,7 +12,9 @@ import ( "time" ) -// Describes a dataset. +// Describes a dataset. Amazon Lookout for Metrics API actions are eventually +// consistent. If you do a read operation on a resource immediately after creating +// or modifying it, use retries to allow time for the write operation to complete. func (c *Client) DescribeMetricSet(ctx context.Context, params *DescribeMetricSetInput, optFns ...func(*Options)) (*DescribeMetricSetOutput, error) { if params == nil { params = &DescribeMetricSetInput{} diff --git a/service/lookoutmetrics/api_op_ListAlerts.go b/service/lookoutmetrics/api_op_ListAlerts.go index b41ec6a6aa7..837258324ea 100644 --- a/service/lookoutmetrics/api_op_ListAlerts.go +++ b/service/lookoutmetrics/api_op_ListAlerts.go @@ -12,7 +12,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the alerts attached to a detector. +// Lists the alerts attached to a detector. Amazon Lookout for Metrics API actions +// are eventually consistent. If you do a read operation on a resource immediately +// after creating or modifying it, use retries to allow time for the write +// operation to complete. func (c *Client) ListAlerts(ctx context.Context, params *ListAlertsInput, optFns ...func(*Options)) (*ListAlertsOutput, error) { if params == nil { params = &ListAlertsInput{} diff --git a/service/lookoutmetrics/api_op_ListAnomalyDetectors.go b/service/lookoutmetrics/api_op_ListAnomalyDetectors.go index cf47905fe7c..605c213932c 100644 --- a/service/lookoutmetrics/api_op_ListAnomalyDetectors.go +++ b/service/lookoutmetrics/api_op_ListAnomalyDetectors.go @@ -12,7 +12,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the detectors in the current AWS Region. +// Lists the detectors in the current AWS Region. Amazon Lookout for Metrics API +// actions are eventually consistent. If you do a read operation on a resource +// immediately after creating or modifying it, use retries to allow time for the +// write operation to complete. func (c *Client) ListAnomalyDetectors(ctx context.Context, params *ListAnomalyDetectorsInput, optFns ...func(*Options)) (*ListAnomalyDetectorsOutput, error) { if params == nil { params = &ListAnomalyDetectorsInput{} diff --git a/service/lookoutmetrics/api_op_ListMetricSets.go b/service/lookoutmetrics/api_op_ListMetricSets.go index 51a1731e841..08531082ee4 100644 --- a/service/lookoutmetrics/api_op_ListMetricSets.go +++ b/service/lookoutmetrics/api_op_ListMetricSets.go @@ -12,7 +12,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the datasets in the current AWS Region. +// Lists the datasets in the current AWS Region. Amazon Lookout for Metrics API +// actions are eventually consistent. If you do a read operation on a resource +// immediately after creating or modifying it, use retries to allow time for the +// write operation to complete. func (c *Client) ListMetricSets(ctx context.Context, params *ListMetricSetsInput, optFns ...func(*Options)) (*ListMetricSetsOutput, error) { if params == nil { params = &ListMetricSetsInput{} diff --git a/service/lookoutmetrics/types/types.go b/service/lookoutmetrics/types/types.go index 63c52fd50ec..a6c16b9c64b 100644 --- a/service/lookoutmetrics/types/types.go +++ b/service/lookoutmetrics/types/types.go @@ -211,7 +211,7 @@ type AnomalyGroupTimeSeriesFeedback struct { // Details about an Amazon AppFlow flow datasource. type AppFlowConfig struct { - // The name of the flow. + // name of the flow. // // This member is required. FlowName *string @@ -566,7 +566,7 @@ type SampleDataS3SourceConfig struct { // and the IAM role that has access to that topic. type SNSConfiguration struct { - // THe ARN of the IAM role that has access to the target SNS topic. + // The ARN of the IAM role that has access to the target SNS topic. // // This member is required. RoleArn *string diff --git a/service/mediaconvert/deserializers.go b/service/mediaconvert/deserializers.go index 48d05cd5945..4f5d60e36c6 100644 --- a/service/mediaconvert/deserializers.go +++ b/service/mediaconvert/deserializers.go @@ -8675,6 +8675,41 @@ func awsRestjson1_deserializeDocumentDvbSubDestinationSettings(v **types.DvbSubD sv.BackgroundOpacity = int32(i64) } + case "ddsHandling": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DvbddsHandling to be of type string, got %T instead", value) + } + sv.DdsHandling = types.DvbddsHandling(jtv) + } + + case "ddsXCoordinate": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin0Max2147483647 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DdsXCoordinate = int32(i64) + } + + case "ddsYCoordinate": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin0Max2147483647 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DdsYCoordinate = int32(i64) + } + case "fontColor": if value != nil { jtv, ok := value.(string) @@ -8732,6 +8767,19 @@ func awsRestjson1_deserializeDocumentDvbSubDestinationSettings(v **types.DvbSubD sv.FontSize = int32(i64) } + case "height": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1Max2147483647 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Height = int32(i64) + } + case "outlineColor": if value != nil { jtv, ok := value.(string) @@ -8820,6 +8868,19 @@ func awsRestjson1_deserializeDocumentDvbSubDestinationSettings(v **types.DvbSubD sv.TeletextSpacing = types.DvbSubtitleTeletextSpacing(jtv) } + case "width": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1Max2147483647 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Width = int32(i64) + } + case "xPosition": if value != nil { jtv, ok := value.(json.Number) @@ -12939,6 +13000,11 @@ func awsRestjson1_deserializeDocumentJobSettings(v **types.JobSettings, value in return err } + case "kantarWatermark": + if err := awsRestjson1_deserializeDocumentKantarWatermarkSettings(&sv.KantarWatermark, value); err != nil { + return err + } + case "motionImageInserter": if err := awsRestjson1_deserializeDocumentMotionImageInserter(&sv.MotionImageInserter, value); err != nil { return err @@ -13176,6 +13242,11 @@ func awsRestjson1_deserializeDocumentJobTemplateSettings(v **types.JobTemplateSe return err } + case "kantarWatermark": + if err := awsRestjson1_deserializeDocumentKantarWatermarkSettings(&sv.KantarWatermark, value); err != nil { + return err + } + case "motionImageInserter": if err := awsRestjson1_deserializeDocumentMotionImageInserter(&sv.MotionImageInserter, value); err != nil { return err @@ -13215,6 +13286,162 @@ func awsRestjson1_deserializeDocumentJobTemplateSettings(v **types.JobTemplateSe return nil } +func awsRestjson1_deserializeDocumentKantarWatermarkSettings(v **types.KantarWatermarkSettings, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.KantarWatermarkSettings + if *v == nil { + sv = &types.KantarWatermarkSettings{} + } 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 __stringMin1Max20 to be of type string, got %T instead", value) + } + sv.ChannelName = ptr.String(jtv) + } + + case "contentReference": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max50PatternAZAZ09 to be of type string, got %T instead", value) + } + sv.ContentReference = ptr.String(jtv) + } + + case "credentialsSecretName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max512PatternAZAZ09 to be of type string, got %T instead", value) + } + sv.CredentialsSecretName = ptr.String(jtv) + } + + case "fileOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __doubleMin0 to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.FileOffset = f64 + } + + case "kantarLicenseId": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin0Max2147483647 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.KantarLicenseId = int32(i64) + } + + case "kantarServerUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringPatternHttpsKantarmediaCom to be of type string, got %T instead", value) + } + sv.KantarServerUrl = ptr.String(jtv) + } + + case "logDestination": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringPatternS3 to be of type string, got %T instead", value) + } + sv.LogDestination = ptr.String(jtv) + } + + case "metadata3": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max50 to be of type string, got %T instead", value) + } + sv.Metadata3 = ptr.String(jtv) + } + + case "metadata4": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max50 to be of type string, got %T instead", value) + } + sv.Metadata4 = ptr.String(jtv) + } + + case "metadata5": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max50 to be of type string, got %T instead", value) + } + sv.Metadata5 = ptr.String(jtv) + } + + case "metadata6": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max50 to be of type string, got %T instead", value) + } + sv.Metadata6 = ptr.String(jtv) + } + + case "metadata7": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max50 to be of type string, got %T instead", value) + } + sv.Metadata7 = ptr.String(jtv) + } + + case "metadata8": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max50 to be of type string, got %T instead", value) + } + sv.Metadata8 = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentM2tsScte35Esam(v **types.M2tsScte35Esam, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13720,6 +13947,19 @@ func awsRestjson1_deserializeDocumentM3u8Settings(v **types.M3u8Settings, value return err } + case "maxPcrInterval": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin0Max500 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxPcrInterval = int32(i64) + } + case "nielsenId3": if value != nil { jtv, ok := value.(string) @@ -18306,6 +18546,15 @@ func awsRestjson1_deserializeDocumentVideoSelector(v **types.VideoSelector, valu sv.Rotate = types.InputRotate(jtv) } + case "sampleRange": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InputSampleRange to be of type string, got %T instead", value) + } + sv.SampleRange = types.InputSampleRange(jtv) + } + default: _, _ = key, value diff --git a/service/mediaconvert/serializers.go b/service/mediaconvert/serializers.go index 996ffdb642e..f5ed6c757a2 100644 --- a/service/mediaconvert/serializers.go +++ b/service/mediaconvert/serializers.go @@ -3899,6 +3899,21 @@ func awsRestjson1_serializeDocumentDvbSubDestinationSettings(v *types.DvbSubDest ok.Integer(v.BackgroundOpacity) } + if len(v.DdsHandling) > 0 { + ok := object.Key("ddsHandling") + ok.String(string(v.DdsHandling)) + } + + if v.DdsXCoordinate != 0 { + ok := object.Key("ddsXCoordinate") + ok.Integer(v.DdsXCoordinate) + } + + if v.DdsYCoordinate != 0 { + ok := object.Key("ddsYCoordinate") + ok.Integer(v.DdsYCoordinate) + } + if len(v.FontColor) > 0 { ok := object.Key("fontColor") ok.String(string(v.FontColor)) @@ -3924,6 +3939,11 @@ func awsRestjson1_serializeDocumentDvbSubDestinationSettings(v *types.DvbSubDest ok.Integer(v.FontSize) } + if v.Height != 0 { + ok := object.Key("height") + ok.Integer(v.Height) + } + if len(v.OutlineColor) > 0 { ok := object.Key("outlineColor") ok.String(string(v.OutlineColor)) @@ -3964,6 +3984,11 @@ func awsRestjson1_serializeDocumentDvbSubDestinationSettings(v *types.DvbSubDest ok.String(string(v.TeletextSpacing)) } + if v.Width != 0 { + ok := object.Key("width") + ok.Integer(v.Width) + } + if v.XPosition != 0 { ok := object.Key("xPosition") ok.Integer(v.XPosition) @@ -5622,6 +5647,13 @@ func awsRestjson1_serializeDocumentJobSettings(v *types.JobSettings, value smith } } + if v.KantarWatermark != nil { + ok := object.Key("kantarWatermark") + if err := awsRestjson1_serializeDocumentKantarWatermarkSettings(v.KantarWatermark, ok); err != nil { + return err + } + } + if v.MotionImageInserter != nil { ok := object.Key("motionImageInserter") if err := awsRestjson1_serializeDocumentMotionImageInserter(v.MotionImageInserter, ok); err != nil { @@ -5697,6 +5729,13 @@ func awsRestjson1_serializeDocumentJobTemplateSettings(v *types.JobTemplateSetti } } + if v.KantarWatermark != nil { + ok := object.Key("kantarWatermark") + if err := awsRestjson1_serializeDocumentKantarWatermarkSettings(v.KantarWatermark, ok); err != nil { + return err + } + } + if v.MotionImageInserter != nil { ok := object.Key("motionImageInserter") if err := awsRestjson1_serializeDocumentMotionImageInserter(v.MotionImageInserter, ok); err != nil { @@ -5742,6 +5781,78 @@ func awsRestjson1_serializeDocumentJobTemplateSettings(v *types.JobTemplateSetti return nil } +func awsRestjson1_serializeDocumentKantarWatermarkSettings(v *types.KantarWatermarkSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ChannelName != nil { + ok := object.Key("channelName") + ok.String(*v.ChannelName) + } + + if v.ContentReference != nil { + ok := object.Key("contentReference") + ok.String(*v.ContentReference) + } + + if v.CredentialsSecretName != nil { + ok := object.Key("credentialsSecretName") + ok.String(*v.CredentialsSecretName) + } + + if v.FileOffset != 0 { + ok := object.Key("fileOffset") + ok.Double(v.FileOffset) + } + + if v.KantarLicenseId != 0 { + ok := object.Key("kantarLicenseId") + ok.Integer(v.KantarLicenseId) + } + + if v.KantarServerUrl != nil { + ok := object.Key("kantarServerUrl") + ok.String(*v.KantarServerUrl) + } + + if v.LogDestination != nil { + ok := object.Key("logDestination") + ok.String(*v.LogDestination) + } + + if v.Metadata3 != nil { + ok := object.Key("metadata3") + ok.String(*v.Metadata3) + } + + if v.Metadata4 != nil { + ok := object.Key("metadata4") + ok.String(*v.Metadata4) + } + + if v.Metadata5 != nil { + ok := object.Key("metadata5") + ok.String(*v.Metadata5) + } + + if v.Metadata6 != nil { + ok := object.Key("metadata6") + ok.String(*v.Metadata6) + } + + if v.Metadata7 != nil { + ok := object.Key("metadata7") + ok.String(*v.Metadata7) + } + + if v.Metadata8 != nil { + ok := object.Key("metadata8") + ok.String(*v.Metadata8) + } + + return nil +} + func awsRestjson1_serializeDocumentM2tsScte35Esam(v *types.M2tsScte35Esam, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5979,6 +6090,11 @@ func awsRestjson1_serializeDocumentM3u8Settings(v *types.M3u8Settings, value smi } } + if v.MaxPcrInterval != 0 { + ok := object.Key("maxPcrInterval") + ok.Integer(v.MaxPcrInterval) + } + if len(v.NielsenId3) > 0 { ok := object.Key("nielsenId3") ok.String(string(v.NielsenId3)) @@ -7728,6 +7844,11 @@ func awsRestjson1_serializeDocumentVideoSelector(v *types.VideoSelector, value s ok.String(string(v.Rotate)) } + if len(v.SampleRange) > 0 { + ok := object.Key("sampleRange") + ok.String(string(v.SampleRange)) + } + return nil } diff --git a/service/mediaconvert/types/enums.go b/service/mediaconvert/types/enums.go index 1bdf02ca7f3..5a0f579f16a 100644 --- a/service/mediaconvert/types/enums.go +++ b/service/mediaconvert/types/enums.go @@ -1943,6 +1943,26 @@ func (DropFrameTimecode) Values() []DropFrameTimecode { } } +type DvbddsHandling string + +// Enum values for DvbddsHandling +const ( + DvbddsHandlingNone DvbddsHandling = "NONE" + DvbddsHandlingSpecified DvbddsHandling = "SPECIFIED" + DvbddsHandlingNoDisplayWindow DvbddsHandling = "NO_DISPLAY_WINDOW" +) + +// Values returns all known values for DvbddsHandling. 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 (DvbddsHandling) Values() []DvbddsHandling { + return []DvbddsHandling{ + "NONE", + "SPECIFIED", + "NO_DISPLAY_WINDOW", + } +} + type DvbSubtitleAlignment string // Enum values for DvbSubtitleAlignment @@ -4160,6 +4180,26 @@ func (InputRotate) Values() []InputRotate { } } +type InputSampleRange string + +// Enum values for InputSampleRange +const ( + InputSampleRangeFollow InputSampleRange = "FOLLOW" + InputSampleRangeFullRange InputSampleRange = "FULL_RANGE" + InputSampleRangeLimitedRange InputSampleRange = "LIMITED_RANGE" +) + +// Values returns all known values for InputSampleRange. 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 (InputSampleRange) Values() []InputSampleRange { + return []InputSampleRange{ + "FOLLOW", + "FULL_RANGE", + "LIMITED_RANGE", + } +} + type InputScanType string // Enum values for InputScanType diff --git a/service/mediaconvert/types/types.go b/service/mediaconvert/types/types.go index 5a1f0ab52f3..498fc295075 100644 --- a/service/mediaconvert/types/types.go +++ b/service/mediaconvert/types/types.go @@ -1748,6 +1748,43 @@ type DvbSubDestinationSettings struct { // (transparent). All burn-in and DVB-Sub font settings must match. BackgroundOpacity int32 + // Specify how MediaConvert handles the display definition segment (DDS). Keep the + // default, None (NONE), to exclude the DDS from this set of captions. Choose No + // display window (NO_DISPLAY_WINDOW) to have MediaConvert include the DDS but not + // include display window data. In this case, MediaConvert writes that information + // to the page composition segment (PCS) instead. Choose Specify (SPECIFIED) to + // have MediaConvert set up the display window based on the values that you specify + // in related job settings. For video resolutions that are 576 pixels or smaller in + // height, MediaConvert doesn't include the DDS, regardless of the value you choose + // for DDS handling (ddsHandling). In this case, it doesn't write the display + // window data to the PCS either. Related settings: Use the settings DDS + // x-coordinate (ddsXCoordinate) and DDS y-coordinate (ddsYCoordinate) to specify + // the offset between the top left corner of the display window and the top left + // corner of the video frame. All burn-in and DVB-Sub font settings must match. + DdsHandling DvbddsHandling + + // Use this setting, along with DDS y-coordinate (ddsYCoordinate), to specify the + // upper left corner of the display definition segment (DDS) display window. With + // this setting, specify the distance, in pixels, between the left side of the + // frame and the left side of the DDS display window. Keep the default value, 0, to + // have MediaConvert automatically choose this offset. Related setting: When you + // use this setting, you must set DDS handling (ddsHandling) to a value other than + // None (NONE). MediaConvert uses these values to determine whether to write page + // position data to the DDS or to the page composition segment (PCS). All burn-in + // and DVB-Sub font settings must match. + DdsXCoordinate int32 + + // Use this setting, along with DDS x-coordinate (ddsXCoordinate), to specify the + // upper left corner of the display definition segment (DDS) display window. With + // this setting, specify the distance, in pixels, between the top of the frame and + // the top of the DDS display window. Keep the default value, 0, to have + // MediaConvert automatically choose this offset. Related setting: When you use + // this setting, you must set DDS handling (ddsHandling) to a value other than None + // (NONE). MediaConvert uses these values to determine whether to write page + // position data to the DDS or to the page composition segment (PCS). All burn-in + // and DVB-Sub font settings must match. + DdsYCoordinate int32 + // Specifies the color of the burned-in captions. This option is not valid for // source captions that are STL, 608/embedded or teletext. These source settings // are already pre-defined by the caption stream. All burn-in and DVB-Sub font @@ -1772,6 +1809,12 @@ type DvbSubDestinationSettings struct { // automatic font size selection. All burn-in and DVB-Sub font settings must match. FontSize int32 + // Specify the height, in pixels, of this set of DVB-Sub captions. The default + // value is 576 pixels. Related setting: When you use this setting, you must set + // DDS handling (ddsHandling) to a value other than None (NONE). All burn-in and + // DVB-Sub font settings must match. + Height int32 + // Specifies font outline color. This option is not valid for source captions that // are either 608/embedded or teletext. These source settings are already // pre-defined by the caption stream. All burn-in and DVB-Sub font settings must @@ -1815,6 +1858,12 @@ type DvbSubDestinationSettings struct { // text easier to read if the captions are closed caption. TeletextSpacing DvbSubtitleTeletextSpacing + // Specify the width, in pixels, of this set of DVB-Sub captions. The default value + // is 720 pixels. Related setting: When you use this setting, you must set DDS + // handling (ddsHandling) to a value other than None (NONE). All burn-in and + // DVB-Sub font settings must match. + Width int32 + // Specifies the horizontal position of the caption relative to the left side of // the output in pixels. A value of 10 would result in the captions starting 10 // pixels from the left of the output. If no explicit x_position is provided, the @@ -3824,6 +3873,14 @@ type JobSettings struct { // create the output. Inputs []Input + // Use these settings only when you use Kantar watermarking. Specify the values + // that MediaConvert uses to generate and place Kantar watermarks in your output + // audio. These settings apply to every output in your job. In addition to + // specifying these values, you also need to store your Kantar credentials in AWS + // Secrets Manager. For more information, see + // https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html. + KantarWatermark *KantarWatermarkSettings + // Overlay motion graphics on top of your video. The motion graphics that you // specify here appear on all outputs in all output groups. For more information, // see @@ -3948,6 +4005,14 @@ type JobTemplateSettings struct { // inputs when referencing a job template. Inputs []InputTemplate + // Use these settings only when you use Kantar watermarking. Specify the values + // that MediaConvert uses to generate and place Kantar watermarks in your output + // audio. These settings apply to every output in your job. In addition to + // specifying these values, you also need to store your Kantar credentials in AWS + // Secrets Manager. For more information, see + // https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html. + KantarWatermark *KantarWatermarkSettings + // Overlay motion graphics on top of your video. The motion graphics that you // specify here appear on all outputs in all output groups. For more information, // see @@ -3995,6 +4060,76 @@ type JobTemplateSettings struct { TimedMetadataInsertion *TimedMetadataInsertion } +// Use these settings only when you use Kantar watermarking. Specify the values +// that MediaConvert uses to generate and place Kantar watermarks in your output +// audio. These settings apply to every output in your job. In addition to +// specifying these values, you also need to store your Kantar credentials in AWS +// Secrets Manager. For more information, see +// https://docs.aws.amazon.com/mediaconvert/latest/ug/kantar-watermarking.html. +type KantarWatermarkSettings struct { + + // Provide an audio channel name from your Kantar audio license. + ChannelName *string + + // Specify a unique identifier for Kantar to use for this piece of content. + ContentReference *string + + // Provide the name of the AWS Secrets Manager secret where your Kantar credentials + // are stored. Note that your MediaConvert service role must provide access to this + // secret. For more information, see + // https://docs.aws.amazon.com/mediaconvert/latest/ug/granting-permissions-for-mediaconvert-to-access-secrets-manager-secret.html. + // For instructions on creating a secret, see + // https://docs.aws.amazon.com/secretsmanager/latest/userguide/tutorials_basic.html, + // in the AWS Secrets Manager User Guide. + CredentialsSecretName *string + + // Optional. Specify an offset, in whole seconds, from the start of your output and + // the beginning of the watermarking. When you don't specify an offset, Kantar + // defaults to zero. + FileOffset float64 + + // Provide your Kantar license ID number. You should get this number from Kantar. + KantarLicenseId int32 + + // Provide the HTTPS endpoint to the Kantar server. You should get this endpoint + // from Kantar. + KantarServerUrl *string + + // Optional. Specify the Amazon S3 bucket where you want MediaConvert to store your + // Kantar watermark XML logs. When you don't specify a bucket, MediaConvert doesn't + // save these logs. Note that your MediaConvert service role must provide access to + // this location. For more information, see + // https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html + LogDestination *string + + // You can optionally use this field to specify the first timestamp that Kantar + // embeds during watermarking. Kantar suggests that you be very cautious when using + // this Kantar feature, and that you use it only on channels that are managed + // specifically for use with this feature by your Audience Measurement Operator. + // For more information about this feature, contact Kantar technical support. + Metadata3 *string + + // Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 + // characters. + Metadata4 *string + + // Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 + // characters. + Metadata5 *string + + // Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 + // characters. + Metadata6 *string + + // Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 + // characters. + Metadata7 *string + + // Additional metadata that MediaConvert sends to Kantar. Maximum length is 50 + // characters. + Metadata8 *string +} + // Settings for SCTE-35 signals from ESAM. Include this in your job settings to put // SCTE-35 markers in your HLS and transport stream outputs at the insertion points // that you specify in an ESAM XML document. Provide the document in the setting @@ -4248,6 +4383,10 @@ type M3u8Settings struct { // comma separation. AudioPids []int32 + // Specify the maximum time, in milliseconds, between Program Clock References + // (PCRs) inserted into the transport stream. + MaxPcrInterval int32 + // If INSERT, Nielsen inaudible tones for media tracking will be detected in the // input audio and an equivalent ID3 tag will be inserted in the output. NielsenId3 M3u8NielsenId3 @@ -6307,6 +6446,18 @@ type VideoSelector struct { // rotation. By default, the service does no rotation, even if your input video has // rotation metadata. The service doesn't pass through rotation metadata. Rotate InputRotate + + // Use this setting when your input video codec is AVC-Intra. Ignore this setting + // for all other inputs. If the sample range metadata in your input video is + // accurate, or if you don't know about sample range, keep the default value, + // Follow (FOLLOW), for this setting. When you do, the service automatically + // detects your input sample range. If your input video has metadata indicating the + // wrong sample range, specify the accurate sample range here. When you do, + // MediaConvert ignores any sample range information in the input metadata. + // Regardless of whether MediaConvert uses the input sample range or the sample + // range that you specify, MediaConvert uses the sample range for transcoding and + // also writes it to the output metadata. + SampleRange InputSampleRange } // Required when you set Codec, under AudioDescriptions>CodecSettings, to the value diff --git a/service/route53/api_op_CreateHostedZone.go b/service/route53/api_op_CreateHostedZone.go index 46153c919de..bfb45840037 100644 --- a/service/route53/api_op_CreateHostedZone.go +++ b/service/route53/api_op_CreateHostedZone.go @@ -46,8 +46,7 @@ import ( // request, the initial status of the hosted zone is PENDING. For public hosted // zones, this means that the NS and SOA records are not yet available on all Route // 53 DNS servers. When the NS and SOA records are available, the status of the -// zone changes to INSYNC. The CreateHostedZone request requires the caller to have -// an ec2:DescribeVpcs permission. +// zone changes to INSYNC. func (c *Client) CreateHostedZone(ctx context.Context, params *CreateHostedZoneInput, optFns ...func(*Options)) (*CreateHostedZoneOutput, error) { if params == nil { params = &CreateHostedZoneInput{} diff --git a/service/route53/api_op_CreateKeySigningKey.go b/service/route53/api_op_CreateKeySigningKey.go index 13f8311c2b0..ee2029a9974 100644 --- a/service/route53/api_op_CreateKeySigningKey.go +++ b/service/route53/api_op_CreateKeySigningKey.go @@ -59,10 +59,10 @@ type CreateKeySigningKeyInput struct { // service in the principal for your account. Specify the following: // // * "Service": - // "dnssec.route53.aws.amazonaws.com" + // "api-service.dnssec.route53.aws.internal" // - // For more information about working with a - // customer managed CMK in AWS KMS, see AWS Key Management Service concepts + // For more information about working + // with a customer managed CMK in AWS KMS, see AWS Key Management Service concepts // (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html). // // This member is required. diff --git a/service/route53/api_op_DeleteKeySigningKey.go b/service/route53/api_op_DeleteKeySigningKey.go index 5a52b18f114..db7e38b448d 100644 --- a/service/route53/api_op_DeleteKeySigningKey.go +++ b/service/route53/api_op_DeleteKeySigningKey.go @@ -12,8 +12,8 @@ import ( ) // Deletes a key-signing key (KSK). Before you can delete a KSK, you must -// deactivate it. The KSK must be deactivated before you can delete it regardless -// of whether the hosted zone is enabled for DNSSEC signing. +// deactivate it. The KSK must be deactived before you can delete it regardless of +// whether the hosted zone is enabled for DNSSEC signing. func (c *Client) DeleteKeySigningKey(ctx context.Context, params *DeleteKeySigningKeyInput, optFns ...func(*Options)) (*DeleteKeySigningKeyOutput, error) { if params == nil { params = &DeleteKeySigningKeyInput{} diff --git a/service/route53/api_op_GetChange.go b/service/route53/api_op_GetChange.go index 2f3f1ab2519..17b8f177f98 100644 --- a/service/route53/api_op_GetChange.go +++ b/service/route53/api_op_GetChange.go @@ -4,11 +4,16 @@ package route53 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/route53/types" "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + "github.com/jmespath/go-jmespath" + "time" ) // Returns the current status of a change batch request. The status is one of the @@ -124,6 +129,167 @@ func addOperationGetChangeMiddlewares(stack *middleware.Stack, options Options) return nil } +// GetChangeAPIClient is a client that implements the GetChange operation. +type GetChangeAPIClient interface { + GetChange(context.Context, *GetChangeInput, ...func(*Options)) (*GetChangeOutput, error) +} + +var _ GetChangeAPIClient = (*Client)(nil) + +// ResourceRecordSetsChangedWaiterOptions are waiter options for +// ResourceRecordSetsChangedWaiter +type ResourceRecordSetsChangedWaiterOptions 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 + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // ResourceRecordSetsChangedWaiter will use default minimum delay of 30 seconds. + // Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or set + // to zero, ResourceRecordSetsChangedWaiter will use default max delay of 120 + // seconds. Note that MaxDelay must resolve to value greater than or equal to the + // MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetChangeInput, *GetChangeOutput, error) (bool, error) +} + +// ResourceRecordSetsChangedWaiter defines the waiters for +// ResourceRecordSetsChanged +type ResourceRecordSetsChangedWaiter struct { + client GetChangeAPIClient + + options ResourceRecordSetsChangedWaiterOptions +} + +// NewResourceRecordSetsChangedWaiter constructs a ResourceRecordSetsChangedWaiter. +func NewResourceRecordSetsChangedWaiter(client GetChangeAPIClient, optFns ...func(*ResourceRecordSetsChangedWaiterOptions)) *ResourceRecordSetsChangedWaiter { + options := ResourceRecordSetsChangedWaiterOptions{} + options.MinDelay = 30 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = resourceRecordSetsChangedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &ResourceRecordSetsChangedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for ResourceRecordSetsChanged waiter. The +// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is +// required and must be greater than zero. +func (w *ResourceRecordSetsChangedWaiter) Wait(ctx context.Context, params *GetChangeInput, maxWaitDur time.Duration, optFns ...func(*ResourceRecordSetsChangedWaiterOptions)) error { + if maxWaitDur <= 0 { + return fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetChange(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return err + } + if !retryable { + return nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return fmt.Errorf("exceeded max wait time for ResourceRecordSetsChanged waiter") +} + +func resourceRecordSetsChangedStateRetryable(ctx context.Context, input *GetChangeInput, output *GetChangeOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("ChangeInfo.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "INSYNC" + value, ok := pathValue.(types.ChangeStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ChangeStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, nil + } + } + + return true, nil +} + func newServiceMetadataMiddleware_opGetChange(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53/api_op_TestDNSAnswer.go b/service/route53/api_op_TestDNSAnswer.go index 5a8c677a73d..238b99241a4 100644 --- a/service/route53/api_op_TestDNSAnswer.go +++ b/service/route53/api_op_TestDNSAnswer.go @@ -13,8 +13,7 @@ import ( // Gets the value that Amazon Route 53 returns in response to a DNS request for a // specified record name and type. You can optionally specify the IP address of a -// DNS resolver, an EDNS0 client subnet IP address, and a subnet mask. This call -// only supports querying public hosted zones. +// DNS resolver, an EDNS0 client subnet IP address, and a subnet mask. func (c *Client) TestDNSAnswer(ctx context.Context, params *TestDNSAnswerInput, optFns ...func(*Options)) (*TestDNSAnswerOutput, error) { if params == nil { params = &TestDNSAnswerInput{} diff --git a/service/route53/generated.json b/service/route53/generated.json index 6b1484555b5..8defb0fffcc 100644 --- a/service/route53/generated.json +++ b/service/route53/generated.json @@ -1,7 +1,8 @@ { "dependencies": { "github.com/aws/aws-sdk-go-v2": "v1.4.0", - "github.com/aws/smithy-go": "v1.4.0" + "github.com/aws/smithy-go": "v1.4.0", + "github.com/jmespath/go-jmespath": "v0.4.0" }, "files": [ "api_client.go", diff --git a/service/route53/go.mod b/service/route53/go.mod index 721796da214..9efaca5356c 100644 --- a/service/route53/go.mod +++ b/service/route53/go.mod @@ -5,6 +5,7 @@ go 1.15 require ( github.com/aws/aws-sdk-go-v2 v1.4.0 github.com/aws/smithy-go v1.4.0 + github.com/jmespath/go-jmespath v0.4.0 ) replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/route53/go.sum b/service/route53/go.sum index 49e393e44d1..fa92f609f9c 100644 --- a/service/route53/go.sum +++ b/service/route53/go.sum @@ -1,13 +1,19 @@ github.com/aws/smithy-go v1.4.0 h1:3rsQpgRe+OoQgJhEwGNpIkosl0fJLdmQqF4gSFRjg+4= github.com/aws/smithy-go v1.4.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 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 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/s3control/api_op_CreateAccessPoint.go b/service/s3control/api_op_CreateAccessPoint.go index 79fa4e0c1e1..017a46eb892 100644 --- a/service/s3control/api_op_CreateAccessPoint.go +++ b/service/s3control/api_op_CreateAccessPoint.go @@ -18,16 +18,16 @@ import ( // Creates an access point and associates it with the specified bucket. For more // information, see Managing Data Access with Amazon S3 Access Points // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html) in -// the Amazon Simple Storage Service User Guide. S3 on Outposts only supports -// VPC-style Access Points. For more information, see Accessing Amazon S3 on -// Outposts using virtual private cloud (VPC) only Access Points +// the Amazon S3 User Guide. S3 on Outposts only supports VPC-style access points. +// For more information, see Accessing Amazon S3 on Outposts using virtual private +// cloud (VPC) only access points // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the -// Amazon Simple Storage Service User Guide. All Amazon S3 on Outposts REST API -// requests for this action require an additional parameter of x-amz-outpost-id to -// be passed with the request and an S3 on Outposts endpoint hostname prefix -// instead of s3-control. For an example of the request syntax for Amazon S3 on -// Outposts that uses the S3 on Outposts endpoint hostname prefix and the -// x-amz-outpost-id derived using the access point ARN, see the Examples +// Amazon S3 User Guide. All Amazon S3 on Outposts REST API requests for this +// action require an additional parameter of x-amz-outpost-id to be passed with the +// request and an S3 on Outposts endpoint hostname prefix instead of s3-control. +// For an example of the request syntax for Amazon S3 on Outposts that uses the S3 +// on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the +// access point ARN, see the Examples // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateAccessPoint.html#API_control_CreateAccessPoint_Examples) // section. The following actions are related to CreateAccessPoint: // diff --git a/service/s3control/api_op_CreateAccessPointForObjectLambda.go b/service/s3control/api_op_CreateAccessPointForObjectLambda.go index fe380def396..586866f7551 100644 --- a/service/s3control/api_op_CreateAccessPointForObjectLambda.go +++ b/service/s3control/api_op_CreateAccessPointForObjectLambda.go @@ -18,8 +18,8 @@ import ( // Creates an Object Lambda Access Point. For more information, see Transforming // objects with Object Lambda Access Points // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html) -// in the Amazon Simple Storage Service User Guide. The following actions are -// related to CreateAccessPointForObjectLambda: +// in the Amazon S3 User Guide. The following actions are related to +// CreateAccessPointForObjectLambda: // // * DeleteAccessPointForObjectLambda // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteAccessPointForObjectLambda.html) diff --git a/service/s3control/api_op_CreateBucket.go b/service/s3control/api_op_CreateBucket.go index 7497cffae00..bebb04423b0 100644 --- a/service/s3control/api_op_CreateBucket.go +++ b/service/s3control/api_op_CreateBucket.go @@ -16,13 +16,12 @@ import ( // This action creates an Amazon S3 on Outposts bucket. To create an S3 bucket, see // Create Bucket // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) in the -// Amazon Simple Storage Service API. Creates a new Outposts bucket. By creating -// the bucket, you become the bucket owner. To create an Outposts bucket, you must -// have S3 on Outposts. For more information, see Using Amazon S3 on Outposts +// Amazon S3 API Reference. Creates a new Outposts bucket. By creating the bucket, +// you become the bucket owner. To create an Outposts bucket, you must have S3 on +// Outposts. For more information, see Using Amazon S3 on Outposts // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in -// Amazon Simple Storage Service User Guide. Not every string is an acceptable -// bucket name. For information on bucket naming restrictions, see Working with -// Amazon S3 Buckets +// Amazon S3 User Guide. Not every string is an acceptable bucket name. For +// information on bucket naming restrictions, see Working with Amazon S3 Buckets // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/BucketRestrictions.html#bucketnamingrules). // S3 on Outposts buckets support: // diff --git a/service/s3control/api_op_CreateJob.go b/service/s3control/api_op_CreateJob.go index 517f78c2f34..2830ade5310 100644 --- a/service/s3control/api_op_CreateJob.go +++ b/service/s3control/api_op_CreateJob.go @@ -19,8 +19,8 @@ import ( // S3 objects. Batch Operations can run a single action on lists of Amazon S3 // objects that you specify. For more information, see S3 Batch Operations // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-basics.html) in the -// Amazon Simple Storage Service User Guide. This action creates a S3 Batch -// Operations job. Related actions include: +// Amazon S3 User Guide. This action creates a S3 Batch Operations job. Related +// actions include: // // * DescribeJob // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DescribeJob.html) @@ -76,7 +76,7 @@ type CreateJobInput struct { // The action that you want this job to perform on every object listed in the // manifest. For more information about the available actions, see Operations // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-actions.html) in the - // Amazon Simple Storage Service User Guide. + // Amazon S3 User Guide. // // This member is required. Operation *types.JobOperation diff --git a/service/s3control/api_op_DeleteBucket.go b/service/s3control/api_op_DeleteBucket.go index 333d1a09892..8175c19d34c 100644 --- a/service/s3control/api_op_DeleteBucket.go +++ b/service/s3control/api_op_DeleteBucket.go @@ -17,17 +17,17 @@ import ( // This action deletes an Amazon S3 on Outposts bucket. To delete an S3 bucket, see // DeleteBucket // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html) in the -// Amazon Simple Storage Service API. Deletes the Amazon S3 on Outposts bucket. All -// objects (including all object versions and delete markers) in the bucket must be -// deleted before the bucket itself can be deleted. For more information, see Using -// Amazon S3 on Outposts +// Amazon S3 API Reference. Deletes the Amazon S3 on Outposts bucket. All objects +// (including all object versions and delete markers) in the bucket must be deleted +// before the bucket itself can be deleted. For more information, see Using Amazon +// S3 on Outposts // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in -// Amazon Simple Storage Service User Guide. All Amazon S3 on Outposts REST API -// requests for this action require an additional parameter of x-amz-outpost-id to -// be passed with the request and an S3 on Outposts endpoint hostname prefix -// instead of s3-control. For an example of the request syntax for Amazon S3 on -// Outposts that uses the S3 on Outposts endpoint hostname prefix and the -// x-amz-outpost-id derived using the access point ARN, see the Examples +// Amazon S3 User Guide. All Amazon S3 on Outposts REST API requests for this +// action require an additional parameter of x-amz-outpost-id to be passed with the +// request and an S3 on Outposts endpoint hostname prefix instead of s3-control. +// For an example of the request syntax for Amazon S3 on Outposts that uses the S3 +// on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the +// access point ARN, see the Examples // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteBucket.html#API_control_DeleteBucket_Examples) // section. Related Resources // diff --git a/service/s3control/api_op_DeleteBucketLifecycleConfiguration.go b/service/s3control/api_op_DeleteBucketLifecycleConfiguration.go index ead8d253148..992b436b67f 100644 --- a/service/s3control/api_op_DeleteBucketLifecycleConfiguration.go +++ b/service/s3control/api_op_DeleteBucketLifecycleConfiguration.go @@ -17,22 +17,22 @@ import ( // This action deletes an Amazon S3 on Outposts bucket's lifecycle configuration. // To delete an S3 bucket's lifecycle configuration, see DeleteBucketLifecycle // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html) -// in the Amazon Simple Storage Service API. Deletes the lifecycle configuration -// from the specified Outposts bucket. Amazon S3 on Outposts removes all the -// lifecycle configuration rules in the lifecycle subresource associated with the -// bucket. Your objects never expire, and Amazon S3 on Outposts no longer -// automatically deletes any objects on the basis of rules contained in the deleted -// lifecycle configuration. For more information, see Using Amazon S3 on Outposts +// in the Amazon S3 API Reference. Deletes the lifecycle configuration from the +// specified Outposts bucket. Amazon S3 on Outposts removes all the lifecycle +// configuration rules in the lifecycle subresource associated with the bucket. +// Your objects never expire, and Amazon S3 on Outposts no longer automatically +// deletes any objects on the basis of rules contained in the deleted lifecycle +// configuration. For more information, see Using Amazon S3 on Outposts // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in -// Amazon Simple Storage Service User Guide. To use this action, you must have -// permission to perform the s3-outposts:DeleteLifecycleConfiguration action. By -// default, the bucket owner has this permission and the Outposts bucket owner can -// grant this permission to others. All Amazon S3 on Outposts REST API requests for -// this action require an additional parameter of x-amz-outpost-id to be passed -// with the request and an S3 on Outposts endpoint hostname prefix instead of -// s3-control. For an example of the request syntax for Amazon S3 on Outposts that -// uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id -// derived using the access point ARN, see the Examples +// Amazon S3 User Guide. To use this action, you must have permission to perform +// the s3-outposts:DeleteLifecycleConfiguration action. By default, the bucket +// owner has this permission and the Outposts bucket owner can grant this +// permission to others. All Amazon S3 on Outposts REST API requests for this +// action require an additional parameter of x-amz-outpost-id to be passed with the +// request and an S3 on Outposts endpoint hostname prefix instead of s3-control. +// For an example of the request syntax for Amazon S3 on Outposts that uses the S3 +// on Outposts endpoint hostname prefix and the x-amz-outpost-id derived using the +// access point ARN, see the Examples // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteBucketLifecycleConfiguration.html#API_control_DeleteBucketLifecycleConfiguration_Examples) // section. For more information about object expiration, see Elements to Describe // Lifecycle Actions diff --git a/service/s3control/api_op_DeleteBucketPolicy.go b/service/s3control/api_op_DeleteBucketPolicy.go index 2b4ae242b03..bba65afedfe 100644 --- a/service/s3control/api_op_DeleteBucketPolicy.go +++ b/service/s3control/api_op_DeleteBucketPolicy.go @@ -17,22 +17,22 @@ import ( // This action deletes an Amazon S3 on Outposts bucket policy. To delete an S3 // bucket policy, see DeleteBucketPolicy // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketPolicy.html) in -// the Amazon Simple Storage Service API. This implementation of the DELETE action -// uses the policy subresource to delete the policy of a specified Amazon S3 on -// Outposts bucket. If you are using an identity other than the root user of the -// AWS account that owns the bucket, the calling identity must have the +// the Amazon S3 API Reference. This implementation of the DELETE action uses the +// policy subresource to delete the policy of a specified Amazon S3 on Outposts +// bucket. If you are using an identity other than the root user of the AWS account +// that owns the bucket, the calling identity must have the // s3-outposts:DeleteBucketPolicy permissions on the specified Outposts bucket and // belong to the bucket owner's account to use this action. For more information, // see Using Amazon S3 on Outposts // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in -// Amazon Simple Storage Service User Guide. If you don't have DeleteBucketPolicy -// permissions, Amazon S3 returns a 403 Access Denied error. If you have the -// correct permissions, but you're not using an identity that belongs to the bucket -// owner's account, Amazon S3 returns a 405 Method Not Allowed error. As a security -// precaution, the root user of the AWS account that owns a bucket can always use -// this action, even if the policy explicitly denies the root user the ability to -// perform this action. For more information about bucket policies, see Using -// Bucket Policies and User Policies +// Amazon S3 User Guide. If you don't have DeleteBucketPolicy permissions, Amazon +// S3 returns a 403 Access Denied error. If you have the correct permissions, but +// you're not using an identity that belongs to the bucket owner's account, Amazon +// S3 returns a 405 Method Not Allowed error. As a security precaution, the root +// user of the AWS account that owns a bucket can always use this action, even if +// the policy explicitly denies the root user the ability to perform this action. +// For more information about bucket policies, see Using Bucket Policies and User +// Policies // (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). All // Amazon S3 on Outposts REST API requests for this action require an additional // parameter of x-amz-outpost-id to be passed with the request and an S3 on diff --git a/service/s3control/api_op_DeleteBucketTagging.go b/service/s3control/api_op_DeleteBucketTagging.go index f93c4ffcdae..50827968686 100644 --- a/service/s3control/api_op_DeleteBucketTagging.go +++ b/service/s3control/api_op_DeleteBucketTagging.go @@ -17,17 +17,17 @@ import ( // This action deletes an Amazon S3 on Outposts bucket's tags. To delete an S3 // bucket tags, see DeleteBucketTagging // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html) -// in the Amazon Simple Storage Service API. Deletes the tags from the Outposts -// bucket. For more information, see Using Amazon S3 on Outposts +// in the Amazon S3 API Reference. Deletes the tags from the Outposts bucket. For +// more information, see Using Amazon S3 on Outposts // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in -// Amazon Simple Storage Service User Guide. To use this action, you must have -// permission to perform the PutBucketTagging action. By default, the bucket owner -// has this permission and can grant this permission to others. All Amazon S3 on -// Outposts REST API requests for this action require an additional parameter of -// x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint -// hostname prefix instead of s3-control. For an example of the request syntax for -// Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and -// the x-amz-outpost-id derived using the access point ARN, see the Examples +// Amazon S3 User Guide. To use this action, you must have permission to perform +// the PutBucketTagging action. By default, the bucket owner has this permission +// and can grant this permission to others. All Amazon S3 on Outposts REST API +// requests for this action require an additional parameter of x-amz-outpost-id to +// be passed with the request and an S3 on Outposts endpoint hostname prefix +// instead of s3-control. For an example of the request syntax for Amazon S3 on +// Outposts that uses the S3 on Outposts endpoint hostname prefix and the +// x-amz-outpost-id derived using the access point ARN, see the Examples // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteBucketTagging.html#API_control_DeleteBucketTagging_Examples) // section. The following actions are related to DeleteBucketTagging: // diff --git a/service/s3control/api_op_DeleteJobTagging.go b/service/s3control/api_op_DeleteJobTagging.go index 49c1ae67457..a6282bddee3 100644 --- a/service/s3control/api_op_DeleteJobTagging.go +++ b/service/s3control/api_op_DeleteJobTagging.go @@ -19,10 +19,9 @@ import ( // action. For more information, see Controlling access and labeling jobs using // tags // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-managing-jobs.html#batch-ops-job-tags) -// in the Amazon Simple Storage Service User Guide. Related actions include: +// in the Amazon S3 User Guide. Related actions include: // -// * -// CreateJob +// * CreateJob // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateJob.html) // // * diff --git a/service/s3control/api_op_DeleteStorageLensConfiguration.go b/service/s3control/api_op_DeleteStorageLensConfiguration.go index d047990ca82..27ba47c89fb 100644 --- a/service/s3control/api_op_DeleteStorageLensConfiguration.go +++ b/service/s3control/api_op_DeleteStorageLensConfiguration.go @@ -18,11 +18,11 @@ import ( // Storage Lens, see Assessing your storage activity and usage with Amazon S3 // Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens.html) in the -// Amazon Simple Storage Service User Guide. To use this action, you must have -// permission to perform the s3:DeleteStorageLensConfiguration action. For more -// information, see Setting permissions to use Amazon S3 Storage Lens +// Amazon S3 User Guide. To use this action, you must have permission to perform +// the s3:DeleteStorageLensConfiguration action. For more information, see Setting +// permissions to use Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens_iam_permissions.html) -// in the Amazon Simple Storage Service User Guide. +// in the Amazon S3 User Guide. func (c *Client) DeleteStorageLensConfiguration(ctx context.Context, params *DeleteStorageLensConfigurationInput, optFns ...func(*Options)) (*DeleteStorageLensConfigurationOutput, error) { if params == nil { params = &DeleteStorageLensConfigurationInput{} diff --git a/service/s3control/api_op_DeleteStorageLensConfigurationTagging.go b/service/s3control/api_op_DeleteStorageLensConfigurationTagging.go index f8592057139..cd125bf2deb 100644 --- a/service/s3control/api_op_DeleteStorageLensConfigurationTagging.go +++ b/service/s3control/api_op_DeleteStorageLensConfigurationTagging.go @@ -18,11 +18,11 @@ import ( // about S3 Storage Lens, see Assessing your storage activity and usage with Amazon // S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens.html) in the -// Amazon Simple Storage Service User Guide. To use this action, you must have -// permission to perform the s3:DeleteStorageLensConfigurationTagging action. For -// more information, see Setting permissions to use Amazon S3 Storage Lens +// Amazon S3 User Guide. To use this action, you must have permission to perform +// the s3:DeleteStorageLensConfigurationTagging action. For more information, see +// Setting permissions to use Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens_iam_permissions.html) -// in the Amazon Simple Storage Service User Guide. +// in the Amazon S3 User Guide. func (c *Client) DeleteStorageLensConfigurationTagging(ctx context.Context, params *DeleteStorageLensConfigurationTaggingInput, optFns ...func(*Options)) (*DeleteStorageLensConfigurationTaggingOutput, error) { if params == nil { params = &DeleteStorageLensConfigurationTaggingInput{} diff --git a/service/s3control/api_op_DescribeJob.go b/service/s3control/api_op_DescribeJob.go index 56ca24657ab..7d4edd4d1c3 100644 --- a/service/s3control/api_op_DescribeJob.go +++ b/service/s3control/api_op_DescribeJob.go @@ -18,7 +18,7 @@ import ( // Retrieves the configuration parameters and status for a Batch Operations job. // For more information, see S3 Batch Operations // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-basics.html) in the -// Amazon Simple Storage Service User Guide. Related actions include: +// Amazon S3 User Guide. Related actions include: // // * CreateJob // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateJob.html) diff --git a/service/s3control/api_op_GetAccessPoint.go b/service/s3control/api_op_GetAccessPoint.go index 8304148002c..a67596816d0 100644 --- a/service/s3control/api_op_GetAccessPoint.go +++ b/service/s3control/api_op_GetAccessPoint.go @@ -97,12 +97,12 @@ type GetAccessPointOutput struct { // information about when Amazon S3 considers a bucket or object public, see The // Meaning of "Public" // (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) - // in the Amazon Simple Storage Service Developer Guide. This is not supported for - // Amazon S3 on Outposts. + // in the Amazon S3 User Guide. This is not supported for Amazon S3 on Outposts. PublicAccessBlockConfiguration *types.PublicAccessBlockConfiguration // Contains the virtual private cloud (VPC) configuration for the specified access - // point. + // point. This element is empty if this access point is an Amazon S3 on Outposts + // access point that is used by other AWS services. VpcConfiguration *types.VpcConfiguration // Metadata pertaining to the operation's result. diff --git a/service/s3control/api_op_GetAccessPointPolicyStatus.go b/service/s3control/api_op_GetAccessPointPolicyStatus.go index 1a759a855f3..0ef065fa4eb 100644 --- a/service/s3control/api_op_GetAccessPointPolicyStatus.go +++ b/service/s3control/api_op_GetAccessPointPolicyStatus.go @@ -17,9 +17,9 @@ import ( // Indicates whether the specified access point currently has a policy that allows // public access. For more information about public access through access points, -// see Managing Data Access with Amazon S3 Access Points +// see Managing Data Access with Amazon S3 access points // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html) in -// the Amazon Simple Storage Service Developer Guide. +// the Amazon S3 User Guide. func (c *Client) GetAccessPointPolicyStatus(ctx context.Context, params *GetAccessPointPolicyStatusInput, optFns ...func(*Options)) (*GetAccessPointPolicyStatusOutput, error) { if params == nil { params = &GetAccessPointPolicyStatusInput{} diff --git a/service/s3control/api_op_GetAccessPointPolicyStatusForObjectLambda.go b/service/s3control/api_op_GetAccessPointPolicyStatusForObjectLambda.go index 7484dec4f2a..10ad1e2aac8 100644 --- a/service/s3control/api_op_GetAccessPointPolicyStatusForObjectLambda.go +++ b/service/s3control/api_op_GetAccessPointPolicyStatusForObjectLambda.go @@ -52,7 +52,7 @@ type GetAccessPointPolicyStatusForObjectLambdaOutput struct { // how Amazon S3 evaluates policies to determine whether they are public, see The // Meaning of "Public" // (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) - // in the Amazon Simple Storage Service User Guide. + // in the Amazon S3 User Guide. PolicyStatus *types.PolicyStatus // Metadata pertaining to the operation's result. diff --git a/service/s3control/api_op_GetBucket.go b/service/s3control/api_op_GetBucket.go index 7ace1758064..5b2474267f5 100644 --- a/service/s3control/api_op_GetBucket.go +++ b/service/s3control/api_op_GetBucket.go @@ -18,20 +18,20 @@ import ( // Gets an Amazon S3 on Outposts bucket. For more information, see Using Amazon S3 // on Outposts // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the -// Amazon Simple Storage Service User Guide. If you are using an identity other -// than the root user of the AWS account that owns the Outposts bucket, the calling -// identity must have the s3-outposts:GetBucket permissions on the specified -// Outposts bucket and belong to the Outposts bucket owner's account in order to -// use this action. Only users from Outposts bucket owner account with the right -// permissions can perform actions on an Outposts bucket. If you don't have -// s3-outposts:GetBucket permissions or you're not using an identity that belongs -// to the bucket owner's account, Amazon S3 returns a 403 Access Denied error. The -// following actions are related to GetBucket for Amazon S3 on Outposts: All Amazon -// S3 on Outposts REST API requests for this action require an additional parameter -// of x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint -// hostname prefix instead of s3-control. For an example of the request syntax for -// Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and -// the x-amz-outpost-id derived using the access point ARN, see the Examples +// Amazon S3 User Guide. If you are using an identity other than the root user of +// the AWS account that owns the Outposts bucket, the calling identity must have +// the s3-outposts:GetBucket permissions on the specified Outposts bucket and +// belong to the Outposts bucket owner's account in order to use this action. Only +// users from Outposts bucket owner account with the right permissions can perform +// actions on an Outposts bucket. If you don't have s3-outposts:GetBucket +// permissions or you're not using an identity that belongs to the bucket owner's +// account, Amazon S3 returns a 403 Access Denied error. The following actions are +// related to GetBucket for Amazon S3 on Outposts: All Amazon S3 on Outposts REST +// API requests for this action require an additional parameter of x-amz-outpost-id +// to be passed with the request and an S3 on Outposts endpoint hostname prefix +// instead of s3-control. For an example of the request syntax for Amazon S3 on +// Outposts that uses the S3 on Outposts endpoint hostname prefix and the +// x-amz-outpost-id derived using the access point ARN, see the Examples // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetBucket.html#API_control_GetBucket_Examples) // section. // diff --git a/service/s3control/api_op_GetBucketLifecycleConfiguration.go b/service/s3control/api_op_GetBucketLifecycleConfiguration.go index 40ecdb6c40c..026d5562763 100644 --- a/service/s3control/api_op_GetBucketLifecycleConfiguration.go +++ b/service/s3control/api_op_GetBucketLifecycleConfiguration.go @@ -18,17 +18,17 @@ import ( // This action gets an Amazon S3 on Outposts bucket's lifecycle configuration. To // get an S3 bucket's lifecycle configuration, see GetBucketLifecycleConfiguration // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html) -// in the Amazon Simple Storage Service API. Returns the lifecycle configuration -// information set on the Outposts bucket. For more information, see Using Amazon -// S3 on Outposts +// in the Amazon S3 API Reference. Returns the lifecycle configuration information +// set on the Outposts bucket. For more information, see Using Amazon S3 on +// Outposts // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) and // for information about lifecycle configuration, see Object Lifecycle Management // (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) in -// Amazon Simple Storage Service User Guide. To use this action, you must have -// permission to perform the s3-outposts:GetLifecycleConfiguration action. The -// Outposts bucket owner has this permission, by default. The bucket owner can -// grant this permission to others. For more information about permissions, see -// Permissions Related to Bucket Subresource Operations +// Amazon S3 User Guide. To use this action, you must have permission to perform +// the s3-outposts:GetLifecycleConfiguration action. The Outposts bucket owner has +// this permission, by default. The bucket owner can grant this permission to +// others. For more information about permissions, see Permissions Related to +// Bucket Subresource Operations // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) // and Managing Access Permissions to Your Amazon S3 Resources // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). diff --git a/service/s3control/api_op_GetBucketPolicy.go b/service/s3control/api_op_GetBucketPolicy.go index 402d3eee4c9..4cf5d74a283 100644 --- a/service/s3control/api_op_GetBucketPolicy.go +++ b/service/s3control/api_op_GetBucketPolicy.go @@ -17,21 +17,20 @@ import ( // This action gets a bucket policy for an Amazon S3 on Outposts bucket. To get a // policy for an S3 bucket, see GetBucketPolicy // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicy.html) in -// the Amazon Simple Storage Service API. Returns the policy of a specified -// Outposts bucket. For more information, see Using Amazon S3 on Outposts +// the Amazon S3 API Reference. Returns the policy of a specified Outposts bucket. +// For more information, see Using Amazon S3 on Outposts // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the -// Amazon Simple Storage Service User Guide. If you are using an identity other -// than the root user of the AWS account that owns the bucket, the calling identity -// must have the GetBucketPolicy permissions on the specified bucket and belong to -// the bucket owner's account in order to use this action. Only users from Outposts -// bucket owner account with the right permissions can perform actions on an -// Outposts bucket. If you don't have s3-outposts:GetBucketPolicy permissions or -// you're not using an identity that belongs to the bucket owner's account, Amazon -// S3 returns a 403 Access Denied error. As a security precaution, the root user of -// the AWS account that owns a bucket can always use this action, even if the -// policy explicitly denies the root user the ability to perform this action. For -// more information about bucket policies, see Using Bucket Policies and User -// Policies +// Amazon S3 User Guide. If you are using an identity other than the root user of +// the AWS account that owns the bucket, the calling identity must have the +// GetBucketPolicy permissions on the specified bucket and belong to the bucket +// owner's account in order to use this action. Only users from Outposts bucket +// owner account with the right permissions can perform actions on an Outposts +// bucket. If you don't have s3-outposts:GetBucketPolicy permissions or you're not +// using an identity that belongs to the bucket owner's account, Amazon S3 returns +// a 403 Access Denied error. As a security precaution, the root user of the AWS +// account that owns a bucket can always use this action, even if the policy +// explicitly denies the root user the ability to perform this action. For more +// information about bucket policies, see Using Bucket Policies and User Policies // (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). All // Amazon S3 on Outposts REST API requests for this action require an additional // parameter of x-amz-outpost-id to be passed with the request and an S3 on diff --git a/service/s3control/api_op_GetBucketTagging.go b/service/s3control/api_op_GetBucketTagging.go index 24c3e41d488..51a165c78ec 100644 --- a/service/s3control/api_op_GetBucketTagging.go +++ b/service/s3control/api_op_GetBucketTagging.go @@ -18,25 +18,25 @@ import ( // This action gets an Amazon S3 on Outposts bucket's tags. To get an S3 bucket // tags, see GetBucketTagging // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html) in -// the Amazon Simple Storage Service API. Returns the tag set associated with the -// Outposts bucket. For more information, see Using Amazon S3 on Outposts +// the Amazon S3 API Reference. Returns the tag set associated with the Outposts +// bucket. For more information, see Using Amazon S3 on Outposts // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the -// Amazon Simple Storage Service User Guide. To use this action, you must have -// permission to perform the GetBucketTagging action. By default, the bucket owner -// has this permission and can grant this permission to others. GetBucketTagging -// has the following special error: +// Amazon S3 User Guide. To use this action, you must have permission to perform +// the GetBucketTagging action. By default, the bucket owner has this permission +// and can grant this permission to others. GetBucketTagging has the following +// special error: // // * Error code: NoSuchTagSetError // -// * -// Description: There is no tag set associated with the bucket. +// * Description: There is no tag +// set associated with the bucket. // -// All Amazon S3 on -// Outposts REST API requests for this action require an additional parameter of -// x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint -// hostname prefix instead of s3-control. For an example of the request syntax for -// Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and -// the x-amz-outpost-id derived using the access point ARN, see the Examples +// All Amazon S3 on Outposts REST API requests for +// this action require an additional parameter of x-amz-outpost-id to be passed +// with the request and an S3 on Outposts endpoint hostname prefix instead of +// s3-control. For an example of the request syntax for Amazon S3 on Outposts that +// uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id +// derived using the access point ARN, see the Examples // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetBucketTagging.html#API_control_GetBucketTagging_Examples) // section. The following actions are related to GetBucketTagging: // diff --git a/service/s3control/api_op_GetJobTagging.go b/service/s3control/api_op_GetJobTagging.go index a585e8ea0a1..e82bf4ea9b2 100644 --- a/service/s3control/api_op_GetJobTagging.go +++ b/service/s3control/api_op_GetJobTagging.go @@ -19,10 +19,9 @@ import ( // have permission to perform the s3:GetJobTagging action. For more information, // see Controlling access and labeling jobs using tags // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-managing-jobs.html#batch-ops-job-tags) -// in the Amazon Simple Storage Service User Guide. Related actions include: +// in the Amazon S3 User Guide. Related actions include: // -// * -// CreateJob +// * CreateJob // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateJob.html) // // * diff --git a/service/s3control/api_op_GetStorageLensConfiguration.go b/service/s3control/api_op_GetStorageLensConfiguration.go index 02f6941b032..a67d3c8bc97 100644 --- a/service/s3control/api_op_GetStorageLensConfiguration.go +++ b/service/s3control/api_op_GetStorageLensConfiguration.go @@ -18,11 +18,11 @@ import ( // Gets the Amazon S3 Storage Lens configuration. For more information, see // Assessing your storage activity and usage with Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens.html) in the -// Amazon Simple Storage Service User Guide. To use this action, you must have -// permission to perform the s3:GetStorageLensConfiguration action. For more -// information, see Setting permissions to use Amazon S3 Storage Lens +// Amazon S3 User Guide. To use this action, you must have permission to perform +// the s3:GetStorageLensConfiguration action. For more information, see Setting +// permissions to use Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens_iam_permissions.html) -// in the Amazon Simple Storage Service User Guide. +// in the Amazon S3 User Guide. func (c *Client) GetStorageLensConfiguration(ctx context.Context, params *GetStorageLensConfigurationInput, optFns ...func(*Options)) (*GetStorageLensConfigurationOutput, error) { if params == nil { params = &GetStorageLensConfigurationInput{} diff --git a/service/s3control/api_op_GetStorageLensConfigurationTagging.go b/service/s3control/api_op_GetStorageLensConfigurationTagging.go index af949f4614a..d2dec93e82e 100644 --- a/service/s3control/api_op_GetStorageLensConfigurationTagging.go +++ b/service/s3control/api_op_GetStorageLensConfigurationTagging.go @@ -19,11 +19,11 @@ import ( // about S3 Storage Lens, see Assessing your storage activity and usage with Amazon // S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens.html) in the -// Amazon Simple Storage Service User Guide. To use this action, you must have -// permission to perform the s3:GetStorageLensConfigurationTagging action. For more -// information, see Setting permissions to use Amazon S3 Storage Lens +// Amazon S3 User Guide. To use this action, you must have permission to perform +// the s3:GetStorageLensConfigurationTagging action. For more information, see +// Setting permissions to use Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens_iam_permissions.html) -// in the Amazon Simple Storage Service User Guide. +// in the Amazon S3 User Guide. func (c *Client) GetStorageLensConfigurationTagging(ctx context.Context, params *GetStorageLensConfigurationTaggingInput, optFns ...func(*Options)) (*GetStorageLensConfigurationTaggingOutput, error) { if params == nil { params = &GetStorageLensConfigurationTaggingInput{} diff --git a/service/s3control/api_op_ListJobs.go b/service/s3control/api_op_ListJobs.go index 8558136a46b..48bafc0a8a7 100644 --- a/service/s3control/api_op_ListJobs.go +++ b/service/s3control/api_op_ListJobs.go @@ -19,7 +19,7 @@ import ( // 30 days for the AWS account making the request. For more information, see S3 // Batch Operations // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-basics.html) in the -// Amazon Simple Storage Service User Guide. Related actions include: +// Amazon S3 User Guide. Related actions include: // // * CreateJob // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateJob.html) diff --git a/service/s3control/api_op_ListRegionalBuckets.go b/service/s3control/api_op_ListRegionalBuckets.go index 647029d749f..6826853ba06 100644 --- a/service/s3control/api_op_ListRegionalBuckets.go +++ b/service/s3control/api_op_ListRegionalBuckets.go @@ -19,9 +19,9 @@ import ( // authenticated sender of the request. For more information, see Using Amazon S3 // on Outposts // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the -// Amazon Simple Storage Service User Guide. For an example of the request syntax -// for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix -// and x-amz-outpost-id in your request, see the Examples +// Amazon S3 User Guide. For an example of the request syntax for Amazon S3 on +// Outposts that uses the S3 on Outposts endpoint hostname prefix and +// x-amz-outpost-id in your request, see the Examples // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_ListRegionalBuckets.html#API_control_ListRegionalBuckets_Examples) // section. func (c *Client) ListRegionalBuckets(ctx context.Context, params *ListRegionalBucketsInput, optFns ...func(*Options)) (*ListRegionalBucketsOutput, error) { diff --git a/service/s3control/api_op_ListStorageLensConfigurations.go b/service/s3control/api_op_ListStorageLensConfigurations.go index 78bc5001aaa..a0eb04b704a 100644 --- a/service/s3control/api_op_ListStorageLensConfigurations.go +++ b/service/s3control/api_op_ListStorageLensConfigurations.go @@ -19,11 +19,11 @@ import ( // S3 Storage Lens, see Assessing your storage activity and usage with Amazon S3 // Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens.html) in the -// Amazon Simple Storage Service User Guide. To use this action, you must have -// permission to perform the s3:ListStorageLensConfigurations action. For more -// information, see Setting permissions to use Amazon S3 Storage Lens +// Amazon S3 User Guide. To use this action, you must have permission to perform +// the s3:ListStorageLensConfigurations action. For more information, see Setting +// permissions to use Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens_iam_permissions.html) -// in the Amazon Simple Storage Service User Guide. +// in the Amazon S3 User Guide. func (c *Client) ListStorageLensConfigurations(ctx context.Context, params *ListStorageLensConfigurationsInput, optFns ...func(*Options)) (*ListStorageLensConfigurationsOutput, error) { if params == nil { params = &ListStorageLensConfigurationsInput{} diff --git a/service/s3control/api_op_PutAccessPointPolicy.go b/service/s3control/api_op_PutAccessPointPolicy.go index cb8febd0dc5..a0293d66e8f 100644 --- a/service/s3control/api_op_PutAccessPointPolicy.go +++ b/service/s3control/api_op_PutAccessPointPolicy.go @@ -71,9 +71,9 @@ type PutAccessPointPolicyInput struct { // The policy that you want to apply to the specified access point. For more // information about access point policies, see Managing data access with Amazon S3 - // Access Points + // access points // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html) in - // the Amazon Simple Storage Service User Guide. + // the Amazon S3 User Guide. // // This member is required. Policy *string diff --git a/service/s3control/api_op_PutAccessPointPolicyForObjectLambda.go b/service/s3control/api_op_PutAccessPointPolicyForObjectLambda.go index f543d1e04d6..5cfee78d94b 100644 --- a/service/s3control/api_op_PutAccessPointPolicyForObjectLambda.go +++ b/service/s3control/api_op_PutAccessPointPolicyForObjectLambda.go @@ -17,11 +17,10 @@ import ( // Creates or replaces resource policy for an Object Lambda Access Point. For an // example policy, see Creating Object Lambda Access Points // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/olap-create.html#olap-create-cli) -// in the Amazon Simple Storage Service User Guide. The following actions are -// related to PutAccessPointPolicyForObjectLambda: +// in the Amazon S3 User Guide. The following actions are related to +// PutAccessPointPolicyForObjectLambda: // -// * -// DeleteAccessPointPolicyForObjectLambda +// * DeleteAccessPointPolicyForObjectLambda // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteAccessPointPolicyForObjectLambda.html) // // * diff --git a/service/s3control/api_op_PutBucketLifecycleConfiguration.go b/service/s3control/api_op_PutBucketLifecycleConfiguration.go index 61e4f6ba0c0..2eb1df3d5f4 100644 --- a/service/s3control/api_op_PutBucketLifecycleConfiguration.go +++ b/service/s3control/api_op_PutBucketLifecycleConfiguration.go @@ -19,16 +19,15 @@ import ( // To put a lifecycle configuration to an S3 bucket, see // PutBucketLifecycleConfiguration // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html) -// in the Amazon Simple Storage Service API. Creates a new lifecycle configuration -// for the S3 on Outposts bucket or replaces an existing lifecycle configuration. -// Outposts buckets only support lifecycle configurations that delete/expire -// objects after a certain period of time and abort incomplete multipart uploads. -// All Amazon S3 on Outposts REST API requests for this action require an -// additional parameter of x-amz-outpost-id to be passed with the request and an S3 -// on Outposts endpoint hostname prefix instead of s3-control. For an example of -// the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts -// endpoint hostname prefix and the x-amz-outpost-id derived using the access point -// ARN, see the Examples +// in the Amazon S3 API Reference. Creates a new lifecycle configuration for the S3 +// on Outposts bucket or replaces an existing lifecycle configuration. Outposts +// buckets only support lifecycle configurations that delete/expire objects after a +// certain period of time and abort incomplete multipart uploads. All Amazon S3 on +// Outposts REST API requests for this action require an additional parameter of +// x-amz-outpost-id to be passed with the request and an S3 on Outposts endpoint +// hostname prefix instead of s3-control. For an example of the request syntax for +// Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and +// the x-amz-outpost-id derived using the access point ARN, see the Examples // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_PutBucketLifecycleConfiguration.html#API_control_PutBucketLifecycleConfiguration_Examples) // section. The following actions are related to // PutBucketLifecycleConfiguration: diff --git a/service/s3control/api_op_PutBucketPolicy.go b/service/s3control/api_op_PutBucketPolicy.go index 2c0878c6038..afb5debe61b 100644 --- a/service/s3control/api_op_PutBucketPolicy.go +++ b/service/s3control/api_op_PutBucketPolicy.go @@ -17,20 +17,20 @@ import ( // This action puts a bucket policy to an Amazon S3 on Outposts bucket. To put a // policy on an S3 bucket, see PutBucketPolicy // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketPolicy.html) in -// the Amazon Simple Storage Service API. Applies an Amazon S3 bucket policy to an -// Outposts bucket. For more information, see Using Amazon S3 on Outposts +// the Amazon S3 API Reference. Applies an Amazon S3 bucket policy to an Outposts +// bucket. For more information, see Using Amazon S3 on Outposts // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the -// Amazon Simple Storage Service User Guide. If you are using an identity other -// than the root user of the AWS account that owns the Outposts bucket, the calling -// identity must have the PutBucketPolicy permissions on the specified Outposts -// bucket and belong to the bucket owner's account in order to use this action. If -// you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access -// Denied error. If you have the correct permissions, but you're not using an -// identity that belongs to the bucket owner's account, Amazon S3 returns a 405 -// Method Not Allowed error. As a security precaution, the root user of the AWS -// account that owns a bucket can always use this action, even if the policy -// explicitly denies the root user the ability to perform this action. For more -// information about bucket policies, see Using Bucket Policies and User Policies +// Amazon S3 User Guide. If you are using an identity other than the root user of +// the AWS account that owns the Outposts bucket, the calling identity must have +// the PutBucketPolicy permissions on the specified Outposts bucket and belong to +// the bucket owner's account in order to use this action. If you don't have +// PutBucketPolicy permissions, Amazon S3 returns a 403 Access Denied error. If you +// have the correct permissions, but you're not using an identity that belongs to +// the bucket owner's account, Amazon S3 returns a 405 Method Not Allowed error. As +// a security precaution, the root user of the AWS account that owns a bucket can +// always use this action, even if the policy explicitly denies the root user the +// ability to perform this action. For more information about bucket policies, see +// Using Bucket Policies and User Policies // (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). All // Amazon S3 on Outposts REST API requests for this action require an additional // parameter of x-amz-outpost-id to be passed with the request and an S3 on diff --git a/service/s3control/api_op_PutBucketTagging.go b/service/s3control/api_op_PutBucketTagging.go index 5f5e3e86aa8..94c03e2a0d2 100644 --- a/service/s3control/api_op_PutBucketTagging.go +++ b/service/s3control/api_op_PutBucketTagging.go @@ -18,17 +18,16 @@ import ( // This action puts tags on an Amazon S3 on Outposts bucket. To put tags on an S3 // bucket, see PutBucketTagging // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html) in -// the Amazon Simple Storage Service API. Sets the tags for an S3 on Outposts -// bucket. For more information, see Using Amazon S3 on Outposts +// the Amazon S3 API Reference. Sets the tags for an S3 on Outposts bucket. For +// more information, see Using Amazon S3 on Outposts // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) in the -// Amazon Simple Storage Service User Guide. Use tags to organize your AWS bill to -// reflect your own cost structure. To do this, sign up to get your AWS account -// bill with tag key values included. Then, to see the cost of combined resources, -// organize your billing information according to resources with the same tag key -// values. For example, you can tag several resources with a specific application -// name, and then organize your billing information to see the total cost of that -// application across several services. For more information, see Cost allocation -// and tagging +// Amazon S3 User Guide. Use tags to organize your AWS bill to reflect your own +// cost structure. To do this, sign up to get your AWS account bill with tag key +// values included. Then, to see the cost of combined resources, organize your +// billing information according to resources with the same tag key values. For +// example, you can tag several resources with a specific application name, and +// then organize your billing information to see the total cost of that application +// across several services. For more information, see Cost allocation and tagging // (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html). // Within a bucket, if you add a tag that has the same key as an existing tag, the // new value overwrites the old value. For more information, see Using cost diff --git a/service/s3control/api_op_PutJobTagging.go b/service/s3control/api_op_PutJobTagging.go index f0fc0a29679..4a77d6809c1 100644 --- a/service/s3control/api_op_PutJobTagging.go +++ b/service/s3control/api_op_PutJobTagging.go @@ -26,16 +26,15 @@ import ( // modified. For more information, see Controlling access and labeling jobs using // tags // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-managing-jobs.html#batch-ops-job-tags) -// in the Amazon Simple Storage Service User Guide. +// in the Amazon S3 User Guide. // -// * If you send this request -// with an empty tag set, Amazon S3 deletes the existing tag set on the Batch -// Operations job. If you use this method, you are charged for a Tier 1 Request -// (PUT). For more information, see Amazon S3 pricing -// (http://aws.amazon.com/s3/pricing/). +// * If you send this request with an empty tag set, +// Amazon S3 deletes the existing tag set on the Batch Operations job. If you use +// this method, you are charged for a Tier 1 Request (PUT). For more information, +// see Amazon S3 pricing (http://aws.amazon.com/s3/pricing/). // -// * For deleting existing tags for your -// Batch Operations job, a DeleteJobTagging +// * For deleting +// existing tags for your Batch Operations job, a DeleteJobTagging // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteJobTagging.html) // request is preferred because it achieves the same result without incurring // charges. diff --git a/service/s3control/api_op_PutStorageLensConfiguration.go b/service/s3control/api_op_PutStorageLensConfiguration.go index d57a279f5ba..8ea9b2c29a0 100644 --- a/service/s3control/api_op_PutStorageLensConfiguration.go +++ b/service/s3control/api_op_PutStorageLensConfiguration.go @@ -18,11 +18,11 @@ import ( // Puts an Amazon S3 Storage Lens configuration. For more information about S3 // Storage Lens, see Working with Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens.html) in the -// Amazon Simple Storage Service User Guide. To use this action, you must have -// permission to perform the s3:PutStorageLensConfiguration action. For more -// information, see Setting permissions to use Amazon S3 Storage Lens +// Amazon S3 User Guide. To use this action, you must have permission to perform +// the s3:PutStorageLensConfiguration action. For more information, see Setting +// permissions to use Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens_iam_permissions.html) -// in the Amazon Simple Storage Service User Guide. +// in the Amazon S3 User Guide. func (c *Client) PutStorageLensConfiguration(ctx context.Context, params *PutStorageLensConfigurationInput, optFns ...func(*Options)) (*PutStorageLensConfigurationOutput, error) { if params == nil { params = &PutStorageLensConfigurationInput{} diff --git a/service/s3control/api_op_PutStorageLensConfigurationTagging.go b/service/s3control/api_op_PutStorageLensConfigurationTagging.go index 0d17e82f29a..328c86574fb 100644 --- a/service/s3control/api_op_PutStorageLensConfigurationTagging.go +++ b/service/s3control/api_op_PutStorageLensConfigurationTagging.go @@ -19,11 +19,11 @@ import ( // more information about S3 Storage Lens, see Assessing your storage activity and // usage with Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens.html) in the -// Amazon Simple Storage Service User Guide. To use this action, you must have -// permission to perform the s3:PutStorageLensConfigurationTagging action. For more -// information, see Setting permissions to use Amazon S3 Storage Lens +// Amazon S3 User Guide. To use this action, you must have permission to perform +// the s3:PutStorageLensConfigurationTagging action. For more information, see +// Setting permissions to use Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens_iam_permissions.html) -// in the Amazon Simple Storage Service User Guide. +// in the Amazon S3 User Guide. func (c *Client) PutStorageLensConfigurationTagging(ctx context.Context, params *PutStorageLensConfigurationTaggingInput, optFns ...func(*Options)) (*PutStorageLensConfigurationTaggingOutput, error) { if params == nil { params = &PutStorageLensConfigurationTaggingInput{} diff --git a/service/s3control/api_op_UpdateJobPriority.go b/service/s3control/api_op_UpdateJobPriority.go index 0df124fdd7b..b846e5b13dc 100644 --- a/service/s3control/api_op_UpdateJobPriority.go +++ b/service/s3control/api_op_UpdateJobPriority.go @@ -17,7 +17,7 @@ import ( // Updates an existing S3 Batch Operations job's priority. For more information, // see S3 Batch Operations // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-basics.html) in the -// Amazon Simple Storage Service User Guide. Related actions include: +// Amazon S3 User Guide. Related actions include: // // * CreateJob // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateJob.html) diff --git a/service/s3control/api_op_UpdateJobStatus.go b/service/s3control/api_op_UpdateJobStatus.go index f6a9971242e..2dc73c86936 100644 --- a/service/s3control/api_op_UpdateJobStatus.go +++ b/service/s3control/api_op_UpdateJobStatus.go @@ -19,7 +19,7 @@ import ( // want to run a job or to cancel an existing job. For more information, see S3 // Batch Operations // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-basics.html) in the -// Amazon Simple Storage Service User Guide. Related actions include: +// Amazon S3 User Guide. Related actions include: // // * CreateJob // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateJob.html) diff --git a/service/s3control/types/types.go b/service/s3control/types/types.go index dc516f5782d..4babb017d45 100644 --- a/service/s3control/types/types.go +++ b/service/s3control/types/types.go @@ -40,7 +40,8 @@ type AccessPoint struct { AccessPointArn *string // The virtual private cloud (VPC) configuration for this access point, if one - // exists. + // exists. This element is empty if this access point is an Amazon S3 on Outposts + // access point that is used by other AWS services. VpcConfiguration *VpcConfiguration } @@ -281,7 +282,7 @@ type JobManifestSpec struct { // The operation that you want this job to perform on every object listed in the // manifest. For more information about the available operations, see Operations // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-operations.html) in -// the Amazon Simple Storage Service User Guide. +// the Amazon S3 User Guide. type JobOperation struct { // Directs the specified job to invoke an AWS Lambda function on every object in @@ -309,7 +310,7 @@ type JobOperation struct { // API. For more information, see Using S3 Object Lock legal hold with S3 Batch // Operations // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-legal-hold.html) in - // the Amazon Simple Storage Service User Guide. + // the Amazon S3 User Guide. S3PutObjectLegalHold *S3SetObjectLegalHoldOperation // Contains the configuration parameters for the Object Lock retention action for @@ -317,7 +318,7 @@ type JobOperation struct { // underlying PutObjectRetention API. For more information, see Using S3 Object // Lock retention with S3 Batch Operations // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-retention-date.html) - // in the Amazon Simple Storage Service User Guide. + // in the Amazon S3 User Guide. S3PutObjectRetention *S3SetObjectRetentionOperation // Directs the specified job to run a PUT Object tagging call on every object in @@ -411,7 +412,7 @@ type LifecycleRule struct { // information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle // Policy // (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config) - // in the Amazon Simple Storage Service Developer Guide. + // in the Amazon S3 User Guide. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload // Specifies the expiration for the lifecycle of the object in the form of date, @@ -502,7 +503,7 @@ type NoncurrentVersionExpiration struct { // perform the associated action. For information about the noncurrent days // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent // (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations) - // in the Amazon Simple Storage Service Developer Guide. + // in the Amazon S3 User Guide. NoncurrentDays int32 } @@ -514,7 +515,7 @@ type NoncurrentVersionTransition struct { // calculations, see How Amazon S3 Calculates How Long an Object Has Been // Noncurrent // (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations) - // in the Amazon Simple Storage Service Developer Guide. + // in the Amazon S3 User Guide. NoncurrentDays int32 // The class of storage used to store the object. @@ -590,7 +591,7 @@ type ObjectLambdaTransformationConfiguration struct { // how Amazon S3 evaluates policies to determine whether they are public, see The // Meaning of "Public" // (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) -// in the Amazon Simple Storage Service User Guide. +// in the Amazon S3 User Guide. type PolicyStatus struct { // @@ -621,8 +622,7 @@ type PrefixLevelStorageMetrics struct { // information about when Amazon S3 considers a bucket or object public, see The // Meaning of "Public" // (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) -// in the Amazon Simple Storage Service Developer Guide. This is not supported for -// Amazon S3 on Outposts. +// in the Amazon S3 User Guide. This is not supported for Amazon S3 on Outposts. type PublicAccessBlockConfiguration struct { // Specifies whether Amazon S3 should block public access control lists (ACLs) for @@ -925,7 +925,7 @@ type S3ObjectOwner struct { // types in your operation, you will remove the retention from your objects. For // more information, see Using S3 Object Lock retention with S3 Batch Operations // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-retention-date.html) -// in the Amazon Simple Storage Service User Guide. +// in the Amazon S3 User Guide. type S3Retention struct { // The Object Lock retention mode to be applied to all objects in the Batch @@ -952,7 +952,7 @@ type S3SetObjectAclOperation struct { // API. For more information, see Using S3 Object Lock legal hold with S3 Batch // Operations // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-legal-hold.html) in -// the Amazon Simple Storage Service User Guide. +// the Amazon S3 User Guide. type S3SetObjectLegalHoldOperation struct { // Contains the Object Lock legal hold status to be applied to all objects in the @@ -967,14 +967,14 @@ type S3SetObjectLegalHoldOperation struct { // underlying PutObjectRetention API. For more information, see Using S3 Object // Lock retention with S3 Batch Operations // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-retention-date.html) -// in the Amazon Simple Storage Service User Guide. +// in the Amazon S3 User Guide. type S3SetObjectRetentionOperation struct { // Contains the Object Lock retention mode to be applied to all objects in the // Batch Operations job. For more information, see Using S3 Object Lock retention // with S3 Batch Operations // (https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-retention-date.html) - // in the Amazon Simple Storage Service User Guide. + // in the Amazon S3 User Guide. // // This member is required. Retention *S3Retention @@ -1138,7 +1138,7 @@ type Tagging struct { // information about Amazon S3 Lifecycle configuration rules, see Transitioning // objects using Amazon S3 Lifecycle // (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html) -// in the Amazon Simple Storage Service User Guide. +// in the Amazon S3 User Guide. type Transition struct { // Indicates when objects are transitioned to the specified storage class. The date diff --git a/service/ssm/api_op_AssociateOpsItemRelatedItem.go b/service/ssm/api_op_AssociateOpsItemRelatedItem.go new file mode 100644 index 00000000000..b375696f38d --- /dev/null +++ b/service/ssm/api_op_AssociateOpsItemRelatedItem.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +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 a related resource to a Systems Manager OpsCenter OpsItem. For +// example, you can associate an Incident Manager incident or analysis with an +// OpsItem. Incident Manager is a capability of AWS Systems Manager. +func (c *Client) AssociateOpsItemRelatedItem(ctx context.Context, params *AssociateOpsItemRelatedItemInput, optFns ...func(*Options)) (*AssociateOpsItemRelatedItemOutput, error) { + if params == nil { + params = &AssociateOpsItemRelatedItemInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateOpsItemRelatedItem", params, optFns, addOperationAssociateOpsItemRelatedItemMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateOpsItemRelatedItemOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateOpsItemRelatedItemInput struct { + + // The type of association that you want to create between an OpsItem and a + // resource. OpsCenter supports IsParentOf and RelatesTo association types. + // + // This member is required. + AssociationType *string + + // The ID of the OpsItem to which you want to associate a resource as a related + // item. + // + // This member is required. + OpsItemId *string + + // The type of resource that you want to associate with an OpsItem. OpsCenter + // supports the following types: AWS::SSMIncidents::IncidentRecord: an Incident + // Manager incident. Incident Manager is a capability of AWS Systems Manager. + // AWS::SSM::Document: a Systems Manager (SSM) document. + // + // This member is required. + ResourceType *string + + // The Amazon Resource Name (ARN) of the AWS resource that you want to associate + // with the OpsItem. + // + // This member is required. + ResourceUri *string +} + +type AssociateOpsItemRelatedItemOutput struct { + + // The association ID. + AssociationId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationAssociateOpsItemRelatedItemMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssociateOpsItemRelatedItem{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssociateOpsItemRelatedItem{}, 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 = addOpAssociateOpsItemRelatedItemValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateOpsItemRelatedItem(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_opAssociateOpsItemRelatedItem(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm", + OperationName: "AssociateOpsItemRelatedItem", + } +} diff --git a/service/ssm/api_op_CreateDocument.go b/service/ssm/api_op_CreateDocument.go index eb72230a240..985ce3f8648 100644 --- a/service/ssm/api_op_CreateDocument.go +++ b/service/ssm/api_op_CreateDocument.go @@ -70,6 +70,11 @@ type CreateDocumentInput struct { // document. Attachments []types.AttachmentsSource + // An optional field where you can specify a friendly name for the Systems Manager + // document. This value can differ for each version of the document. You can update + // this value at a later time using the UpdateDocument action. + DisplayName *string + // Specify the document format for the request. The document format can be JSON, // YAML, or TEXT. JSON is the default format. DocumentFormat types.DocumentFormat diff --git a/service/ssm/api_op_DescribeAutomationStepExecutions.go b/service/ssm/api_op_DescribeAutomationStepExecutions.go index 915c55449ca..834a3269e64 100644 --- a/service/ssm/api_op_DescribeAutomationStepExecutions.go +++ b/service/ssm/api_op_DescribeAutomationStepExecutions.go @@ -48,8 +48,8 @@ type DescribeAutomationStepExecutionsInput struct { // previous call.) NextToken *string - // A boolean that indicates whether to list step executions in reverse order by - // start time. The default value is 'false'. + // Indicates whether to list step executions in reverse order by start time. The + // default value is 'false'. ReverseOrder bool } diff --git a/service/ssm/api_op_DisassociateOpsItemRelatedItem.go b/service/ssm/api_op_DisassociateOpsItemRelatedItem.go new file mode 100644 index 00000000000..ab327fc3145 --- /dev/null +++ b/service/ssm/api_op_DisassociateOpsItemRelatedItem.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +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 association between an OpsItem and a related resource. For example, +// this API action can delete an Incident Manager incident from an OpsItem. +// Incident Manager is a capability of AWS Systems Manager. +func (c *Client) DisassociateOpsItemRelatedItem(ctx context.Context, params *DisassociateOpsItemRelatedItemInput, optFns ...func(*Options)) (*DisassociateOpsItemRelatedItemOutput, error) { + if params == nil { + params = &DisassociateOpsItemRelatedItemInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateOpsItemRelatedItem", params, optFns, addOperationDisassociateOpsItemRelatedItemMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateOpsItemRelatedItemOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateOpsItemRelatedItemInput struct { + + // The ID of the association for which you want to delete an association between + // the OpsItem and a related resource. + // + // This member is required. + AssociationId *string + + // The ID of the OpsItem for which you want to delete an association between the + // OpsItem and a related resource. + // + // This member is required. + OpsItemId *string +} + +type DisassociateOpsItemRelatedItemOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationDisassociateOpsItemRelatedItemMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem{}, 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 = addOpDisassociateOpsItemRelatedItemValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateOpsItemRelatedItem(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_opDisassociateOpsItemRelatedItem(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm", + OperationName: "DisassociateOpsItemRelatedItem", + } +} diff --git a/service/ssm/api_op_GetDocument.go b/service/ssm/api_op_GetDocument.go index 32e32b906db..6024df8779c 100644 --- a/service/ssm/api_op_GetDocument.go +++ b/service/ssm/api_op_GetDocument.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/ssm/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "time" ) // Gets the contents of the specified Systems Manager document. @@ -56,6 +57,14 @@ type GetDocumentOutput struct { // The contents of the Systems Manager document. Content *string + // The date the Systems Manager document was created. + CreatedDate *time.Time + + // The friendly name of the Systems Manager document. This value can differ for + // each version of the document. If you want to update this value, see + // UpdateDocument. + DisplayName *string + // The document format, either JSON or YAML. DocumentFormat types.DocumentFormat diff --git a/service/ssm/api_op_ListOpsItemRelatedItems.go b/service/ssm/api_op_ListOpsItemRelatedItems.go new file mode 100644 index 00000000000..275244eb785 --- /dev/null +++ b/service/ssm/api_op_ListOpsItemRelatedItems.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +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/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all related-item resources associated with an OpsItem. +func (c *Client) ListOpsItemRelatedItems(ctx context.Context, params *ListOpsItemRelatedItemsInput, optFns ...func(*Options)) (*ListOpsItemRelatedItemsOutput, error) { + if params == nil { + params = &ListOpsItemRelatedItemsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOpsItemRelatedItems", params, optFns, addOperationListOpsItemRelatedItemsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOpsItemRelatedItemsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOpsItemRelatedItemsInput struct { + + // One or more OpsItem filters. Use a filter to return a more specific list of + // results. + Filters []types.OpsItemRelatedItemsFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // The ID of the OpsItem for which you want to list all related-item resources. + OpsItemId *string +} + +type ListOpsItemRelatedItemsOutput struct { + + // The token for the next set of items to return. Use this token to get the next + // set of results. + NextToken *string + + // A list of related-item resources for the specified OpsItem. + Summaries []types.OpsItemRelatedItemSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListOpsItemRelatedItemsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListOpsItemRelatedItems{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListOpsItemRelatedItems{}, 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 = addOpListOpsItemRelatedItemsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOpsItemRelatedItems(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 +} + +// ListOpsItemRelatedItemsAPIClient is a client that implements the +// ListOpsItemRelatedItems operation. +type ListOpsItemRelatedItemsAPIClient interface { + ListOpsItemRelatedItems(context.Context, *ListOpsItemRelatedItemsInput, ...func(*Options)) (*ListOpsItemRelatedItemsOutput, error) +} + +var _ ListOpsItemRelatedItemsAPIClient = (*Client)(nil) + +// ListOpsItemRelatedItemsPaginatorOptions is the paginator options for +// ListOpsItemRelatedItems +type ListOpsItemRelatedItemsPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + 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 +} + +// ListOpsItemRelatedItemsPaginator is a paginator for ListOpsItemRelatedItems +type ListOpsItemRelatedItemsPaginator struct { + options ListOpsItemRelatedItemsPaginatorOptions + client ListOpsItemRelatedItemsAPIClient + params *ListOpsItemRelatedItemsInput + nextToken *string + firstPage bool +} + +// NewListOpsItemRelatedItemsPaginator returns a new +// ListOpsItemRelatedItemsPaginator +func NewListOpsItemRelatedItemsPaginator(client ListOpsItemRelatedItemsAPIClient, params *ListOpsItemRelatedItemsInput, optFns ...func(*ListOpsItemRelatedItemsPaginatorOptions)) *ListOpsItemRelatedItemsPaginator { + if params == nil { + params = &ListOpsItemRelatedItemsInput{} + } + + options := ListOpsItemRelatedItemsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListOpsItemRelatedItemsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListOpsItemRelatedItemsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListOpsItemRelatedItems page. +func (p *ListOpsItemRelatedItemsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOpsItemRelatedItemsOutput, 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.ListOpsItemRelatedItems(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_opListOpsItemRelatedItems(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm", + OperationName: "ListOpsItemRelatedItems", + } +} diff --git a/service/ssm/api_op_UpdateDocument.go b/service/ssm/api_op_UpdateDocument.go index 2c4310c7d93..42597a64982 100644 --- a/service/ssm/api_op_UpdateDocument.go +++ b/service/ssm/api_op_UpdateDocument.go @@ -34,7 +34,7 @@ type UpdateDocumentInput struct { // This member is required. Content *string - // The name of the document that you want to update. + // The name of the Systems Manager document that you want to update. // // This member is required. Name *string @@ -43,6 +43,12 @@ type UpdateDocumentInput struct { // document. Attachments []types.AttachmentsSource + // The friendly name of the Systems Manager document that you want to update. This + // value can differ for each version of the document. If you do not specify a value + // for this parameter in your request, the existing value is applied to the new + // document version. + DisplayName *string + // Specify the document format for the new document version. Systems Manager // supports JSON and YAML documents. JSON is the default format. DocumentFormat types.DocumentFormat diff --git a/service/ssm/deserializers.go b/service/ssm/deserializers.go index ff25967b7d2..11207c5da2d 100644 --- a/service/ssm/deserializers.go +++ b/service/ssm/deserializers.go @@ -143,6 +143,129 @@ func awsAwsjson11_deserializeOpErrorAddTagsToResource(response *smithyhttp.Respo } } +type awsAwsjson11_deserializeOpAssociateOpsItemRelatedItem struct { +} + +func (*awsAwsjson11_deserializeOpAssociateOpsItemRelatedItem) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpAssociateOpsItemRelatedItem) HandleDeserialize(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_deserializeOpErrorAssociateOpsItemRelatedItem(response, &metadata) + } + output := &AssociateOpsItemRelatedItemOutput{} + 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_deserializeOpDocumentAssociateOpsItemRelatedItemOutput(&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_deserializeOpErrorAssociateOpsItemRelatedItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + + case strings.EqualFold("OpsItemLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemLimitExceededException(response, errorBody) + + case strings.EqualFold("OpsItemNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) + + case strings.EqualFold("OpsItemRelatedItemAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemRelatedItemAlreadyExistsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCancelCommand struct { } @@ -6839,14 +6962,14 @@ func awsAwsjson11_deserializeOpErrorDescribeSessions(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpGetAutomationExecution struct { +type awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem struct { } -func (*awsAwsjson11_deserializeOpGetAutomationExecution) ID() string { +func (*awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetAutomationExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6860,9 +6983,9 @@ func (m *awsAwsjson11_deserializeOpGetAutomationExecution) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetAutomationExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDisassociateOpsItemRelatedItem(response, &metadata) } - output := &GetAutomationExecutionOutput{} + output := &DisassociateOpsItemRelatedItemOutput{} out.Result = output var buff [1024]byte @@ -6882,7 +7005,7 @@ func (m *awsAwsjson11_deserializeOpGetAutomationExecution) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetAutomationExecutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDisassociateOpsItemRelatedItemOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6896,7 +7019,7 @@ func (m *awsAwsjson11_deserializeOpGetAutomationExecution) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetAutomationExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDisassociateOpsItemRelatedItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6937,131 +7060,17 @@ func awsAwsjson11_deserializeOpErrorGetAutomationExecution(response *smithyhttp. } switch { - case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpGetCalendarState struct { -} - -func (*awsAwsjson11_deserializeOpGetCalendarState) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpGetCalendarState) HandleDeserialize(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_deserializeOpErrorGetCalendarState(response, &metadata) - } - output := &GetCalendarStateOutput{} - 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_deserializeOpDocumentGetCalendarStateOutput(&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_deserializeOpErrorGetCalendarState(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidDocumentType", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentType(response, errorBody) + case strings.EqualFold("OpsItemNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) - case strings.EqualFold("UnsupportedCalendarException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedCalendarException(response, errorBody) + case strings.EqualFold("OpsItemRelatedItemAssociationNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemRelatedItemAssociationNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -7073,14 +7082,14 @@ func awsAwsjson11_deserializeOpErrorGetCalendarState(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpGetCommandInvocation struct { +type awsAwsjson11_deserializeOpGetAutomationExecution struct { } -func (*awsAwsjson11_deserializeOpGetCommandInvocation) ID() string { +func (*awsAwsjson11_deserializeOpGetAutomationExecution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetCommandInvocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetAutomationExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7094,9 +7103,9 @@ func (m *awsAwsjson11_deserializeOpGetCommandInvocation) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetCommandInvocation(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetAutomationExecution(response, &metadata) } - output := &GetCommandInvocationOutput{} + output := &GetAutomationExecutionOutput{} out.Result = output var buff [1024]byte @@ -7116,7 +7125,7 @@ func (m *awsAwsjson11_deserializeOpGetCommandInvocation) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetCommandInvocationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetAutomationExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7130,7 +7139,7 @@ func (m *awsAwsjson11_deserializeOpGetCommandInvocation) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetCommandInvocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetAutomationExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7171,20 +7180,131 @@ func awsAwsjson11_deserializeOpErrorGetCommandInvocation(response *smithyhttp.Re } switch { + case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidCommandId", errorCode): - return awsAwsjson11_deserializeErrorInvalidCommandId(response, errorBody) + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError - case strings.EqualFold("InvalidInstanceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + } +} - case strings.EqualFold("InvalidPluginName", errorCode): - return awsAwsjson11_deserializeErrorInvalidPluginName(response, errorBody) +type awsAwsjson11_deserializeOpGetCalendarState struct { +} - case strings.EqualFold("InvocationDoesNotExist", errorCode): - return awsAwsjson11_deserializeErrorInvocationDoesNotExist(response, errorBody) +func (*awsAwsjson11_deserializeOpGetCalendarState) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetCalendarState) HandleDeserialize(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_deserializeOpErrorGetCalendarState(response, &metadata) + } + output := &GetCalendarStateOutput{} + 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_deserializeOpDocumentGetCalendarStateOutput(&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_deserializeOpErrorGetCalendarState(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentType", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentType(response, errorBody) + + case strings.EqualFold("UnsupportedCalendarException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedCalendarException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -7196,14 +7316,14 @@ func awsAwsjson11_deserializeOpErrorGetCommandInvocation(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpGetConnectionStatus struct { +type awsAwsjson11_deserializeOpGetCommandInvocation struct { } -func (*awsAwsjson11_deserializeOpGetConnectionStatus) ID() string { +func (*awsAwsjson11_deserializeOpGetCommandInvocation) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetConnectionStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetCommandInvocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7217,9 +7337,9 @@ func (m *awsAwsjson11_deserializeOpGetConnectionStatus) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetConnectionStatus(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetCommandInvocation(response, &metadata) } - output := &GetConnectionStatusOutput{} + output := &GetCommandInvocationOutput{} out.Result = output var buff [1024]byte @@ -7239,7 +7359,7 @@ func (m *awsAwsjson11_deserializeOpGetConnectionStatus) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetConnectionStatusOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetCommandInvocationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7253,7 +7373,7 @@ func (m *awsAwsjson11_deserializeOpGetConnectionStatus) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetConnectionStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetCommandInvocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7297,6 +7417,18 @@ func awsAwsjson11_deserializeOpErrorGetConnectionStatus(response *smithyhttp.Res case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidCommandId", errorCode): + return awsAwsjson11_deserializeErrorInvalidCommandId(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidPluginName", errorCode): + return awsAwsjson11_deserializeErrorInvalidPluginName(response, errorBody) + + case strings.EqualFold("InvocationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorInvocationDoesNotExist(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7307,14 +7439,14 @@ func awsAwsjson11_deserializeOpErrorGetConnectionStatus(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpGetDefaultPatchBaseline struct { +type awsAwsjson11_deserializeOpGetConnectionStatus struct { } -func (*awsAwsjson11_deserializeOpGetDefaultPatchBaseline) ID() string { +func (*awsAwsjson11_deserializeOpGetConnectionStatus) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetDefaultPatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetConnectionStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7328,9 +7460,9 @@ func (m *awsAwsjson11_deserializeOpGetDefaultPatchBaseline) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetDefaultPatchBaseline(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetConnectionStatus(response, &metadata) } - output := &GetDefaultPatchBaselineOutput{} + output := &GetConnectionStatusOutput{} out.Result = output var buff [1024]byte @@ -7350,7 +7482,7 @@ func (m *awsAwsjson11_deserializeOpGetDefaultPatchBaseline) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetDefaultPatchBaselineOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetConnectionStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7364,7 +7496,7 @@ func (m *awsAwsjson11_deserializeOpGetDefaultPatchBaseline) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetDefaultPatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetConnectionStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7418,14 +7550,14 @@ func awsAwsjson11_deserializeOpErrorGetDefaultPatchBaseline(response *smithyhttp } } -type awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance struct { +type awsAwsjson11_deserializeOpGetDefaultPatchBaseline struct { } -func (*awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) ID() string { +func (*awsAwsjson11_deserializeOpGetDefaultPatchBaseline) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetDefaultPatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7439,9 +7571,9 @@ func (m *awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetDefaultPatchBaseline(response, &metadata) } - output := &GetDeployablePatchSnapshotForInstanceOutput{} + output := &GetDefaultPatchBaselineOutput{} out.Result = output var buff [1024]byte @@ -7461,7 +7593,7 @@ func (m *awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) Handle return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetDeployablePatchSnapshotForInstanceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetDefaultPatchBaselineOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7475,7 +7607,7 @@ func (m *awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) Handle return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetDefaultPatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7519,12 +7651,6 @@ func awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(respon case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("UnsupportedFeatureRequiredException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedFeatureRequiredException(response, errorBody) - - case strings.EqualFold("UnsupportedOperatingSystem", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedOperatingSystem(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7535,14 +7661,14 @@ func awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(respon } } -type awsAwsjson11_deserializeOpGetDocument struct { +type awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance struct { } -func (*awsAwsjson11_deserializeOpGetDocument) ID() string { +func (*awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetDocument) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7556,9 +7682,9 @@ func (m *awsAwsjson11_deserializeOpGetDocument) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetDocument(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(response, &metadata) } - output := &GetDocumentOutput{} + output := &GetDeployablePatchSnapshotForInstanceOutput{} out.Result = output var buff [1024]byte @@ -7578,7 +7704,7 @@ func (m *awsAwsjson11_deserializeOpGetDocument) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetDocumentOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetDeployablePatchSnapshotForInstanceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7592,7 +7718,7 @@ func (m *awsAwsjson11_deserializeOpGetDocument) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetDocument(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7636,11 +7762,11 @@ func awsAwsjson11_deserializeOpErrorGetDocument(response *smithyhttp.Response, m case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + case strings.EqualFold("UnsupportedFeatureRequiredException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedFeatureRequiredException(response, errorBody) - case strings.EqualFold("InvalidDocumentVersion", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + case strings.EqualFold("UnsupportedOperatingSystem", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperatingSystem(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -7652,14 +7778,14 @@ func awsAwsjson11_deserializeOpErrorGetDocument(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpGetInventory struct { +type awsAwsjson11_deserializeOpGetDocument struct { } -func (*awsAwsjson11_deserializeOpGetInventory) ID() string { +func (*awsAwsjson11_deserializeOpGetDocument) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetInventory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetDocument) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7673,9 +7799,9 @@ func (m *awsAwsjson11_deserializeOpGetInventory) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetInventory(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetDocument(response, &metadata) } - output := &GetInventoryOutput{} + output := &GetDocumentOutput{} out.Result = output var buff [1024]byte @@ -7695,7 +7821,7 @@ func (m *awsAwsjson11_deserializeOpGetInventory) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetInventoryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetDocumentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7709,7 +7835,7 @@ func (m *awsAwsjson11_deserializeOpGetInventory) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetInventory(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetDocument(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7753,23 +7879,11 @@ func awsAwsjson11_deserializeOpErrorGetInventory(response *smithyhttp.Response, case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidAggregatorException", errorCode): - return awsAwsjson11_deserializeErrorInvalidAggregatorException(response, errorBody) - - case strings.EqualFold("InvalidFilter", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) - - case strings.EqualFold("InvalidInventoryGroupException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInventoryGroupException(response, errorBody) - - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - - case strings.EqualFold("InvalidResultAttributeException", errorCode): - return awsAwsjson11_deserializeErrorInvalidResultAttributeException(response, errorBody) + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - case strings.EqualFold("InvalidTypeNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -7781,14 +7895,14 @@ func awsAwsjson11_deserializeOpErrorGetInventory(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpGetInventorySchema struct { +type awsAwsjson11_deserializeOpGetInventory struct { } -func (*awsAwsjson11_deserializeOpGetInventorySchema) ID() string { +func (*awsAwsjson11_deserializeOpGetInventory) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetInventorySchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetInventory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7802,9 +7916,9 @@ func (m *awsAwsjson11_deserializeOpGetInventorySchema) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetInventorySchema(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetInventory(response, &metadata) } - output := &GetInventorySchemaOutput{} + output := &GetInventoryOutput{} out.Result = output var buff [1024]byte @@ -7824,7 +7938,7 @@ func (m *awsAwsjson11_deserializeOpGetInventorySchema) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetInventorySchemaOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetInventoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7838,7 +7952,7 @@ func (m *awsAwsjson11_deserializeOpGetInventorySchema) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetInventorySchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetInventory(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7882,9 +7996,21 @@ func awsAwsjson11_deserializeOpErrorGetInventorySchema(response *smithyhttp.Resp case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidAggregatorException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAggregatorException(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidInventoryGroupException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInventoryGroupException(response, errorBody) + case strings.EqualFold("InvalidNextToken", errorCode): return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + case strings.EqualFold("InvalidResultAttributeException", errorCode): + return awsAwsjson11_deserializeErrorInvalidResultAttributeException(response, errorBody) + case strings.EqualFold("InvalidTypeNameException", errorCode): return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) @@ -7898,14 +8024,14 @@ func awsAwsjson11_deserializeOpErrorGetInventorySchema(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpGetMaintenanceWindow struct { +type awsAwsjson11_deserializeOpGetInventorySchema struct { } -func (*awsAwsjson11_deserializeOpGetMaintenanceWindow) ID() string { +func (*awsAwsjson11_deserializeOpGetInventorySchema) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetInventorySchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7919,9 +8045,9 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindow) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetInventorySchema(response, &metadata) } - output := &GetMaintenanceWindowOutput{} + output := &GetInventorySchemaOutput{} out.Result = output var buff [1024]byte @@ -7941,7 +8067,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindow) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetInventorySchemaOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7955,7 +8081,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindow) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetInventorySchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7996,12 +8122,15 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(response *smithyhttp.Re } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("InvalidTypeNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8012,14 +8141,14 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpGetMaintenanceWindowExecution struct { +type awsAwsjson11_deserializeOpGetMaintenanceWindow struct { } -func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) ID() string { +func (*awsAwsjson11_deserializeOpGetMaintenanceWindow) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8033,9 +8162,9 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(response, &metadata) } - output := &GetMaintenanceWindowExecutionOutput{} + output := &GetMaintenanceWindowOutput{} out.Result = output var buff [1024]byte @@ -8055,7 +8184,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) HandleDeserial return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8069,7 +8198,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) HandleDeserial return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8126,14 +8255,14 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecution(response *smit } } -type awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask struct { +type awsAwsjson11_deserializeOpGetMaintenanceWindowExecution struct { } -func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) ID() string { +func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8147,9 +8276,9 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTask(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecution(response, &metadata) } - output := &GetMaintenanceWindowExecutionTaskOutput{} + output := &GetMaintenanceWindowExecutionOutput{} out.Result = output var buff [1024]byte @@ -8169,7 +8298,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) HandleDese return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionTaskOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8183,7 +8312,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) HandleDese return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8240,14 +8369,14 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTask(response * } } -type awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation struct { +type awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask struct { } -func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) ID() string { +func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8261,9 +8390,9 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTaskInvocation(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTask(response, &metadata) } - output := &GetMaintenanceWindowExecutionTaskInvocationOutput{} + output := &GetMaintenanceWindowExecutionTaskOutput{} out.Result = output var buff [1024]byte @@ -8283,7 +8412,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionTaskInvocationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionTaskOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8297,7 +8426,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTaskInvocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8354,14 +8483,14 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTaskInvocation( } } -type awsAwsjson11_deserializeOpGetMaintenanceWindowTask struct { +type awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation struct { } -func (*awsAwsjson11_deserializeOpGetMaintenanceWindowTask) ID() string { +func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8375,9 +8504,9 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowTask) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowTask(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTaskInvocation(response, &metadata) } - output := &GetMaintenanceWindowTaskOutput{} + output := &GetMaintenanceWindowExecutionTaskInvocationOutput{} out.Result = output var buff [1024]byte @@ -8397,7 +8526,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowTask) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowTaskOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionTaskInvocationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8411,7 +8540,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowTask) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTaskInvocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8468,14 +8597,14 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowTask(response *smithyhtt } } -type awsAwsjson11_deserializeOpGetOpsItem struct { +type awsAwsjson11_deserializeOpGetMaintenanceWindowTask struct { } -func (*awsAwsjson11_deserializeOpGetOpsItem) ID() string { +func (*awsAwsjson11_deserializeOpGetMaintenanceWindowTask) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetOpsItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8489,9 +8618,9 @@ func (m *awsAwsjson11_deserializeOpGetOpsItem) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsItem(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowTask(response, &metadata) } - output := &GetOpsItemOutput{} + output := &GetMaintenanceWindowTaskOutput{} out.Result = output var buff [1024]byte @@ -8511,7 +8640,7 @@ func (m *awsAwsjson11_deserializeOpGetOpsItem) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetOpsItemOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowTaskOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8525,7 +8654,7 @@ func (m *awsAwsjson11_deserializeOpGetOpsItem) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetOpsItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8566,129 +8695,12 @@ func awsAwsjson11_deserializeOpErrorGetOpsItem(response *smithyhttp.Response, me } switch { - case strings.EqualFold("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - - case strings.EqualFold("OpsItemNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpGetOpsMetadata struct { -} - -func (*awsAwsjson11_deserializeOpGetOpsMetadata) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpGetOpsMetadata) HandleDeserialize(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_deserializeOpErrorGetOpsMetadata(response, &metadata) - } - output := &GetOpsMetadataOutput{} - 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_deserializeOpDocumentGetOpsMetadataOutput(&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_deserializeOpErrorGetOpsMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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 - } + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("OpsMetadataInvalidArgumentException", errorCode): - return awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response, errorBody) - - case strings.EqualFold("OpsMetadataNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorOpsMetadataNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8699,14 +8711,14 @@ func awsAwsjson11_deserializeOpErrorGetOpsMetadata(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpGetOpsSummary struct { +type awsAwsjson11_deserializeOpGetOpsItem struct { } -func (*awsAwsjson11_deserializeOpGetOpsSummary) ID() string { +func (*awsAwsjson11_deserializeOpGetOpsItem) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetOpsSummary) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetOpsItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8720,9 +8732,9 @@ func (m *awsAwsjson11_deserializeOpGetOpsSummary) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsSummary(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsItem(response, &metadata) } - output := &GetOpsSummaryOutput{} + output := &GetOpsItemOutput{} out.Result = output var buff [1024]byte @@ -8742,7 +8754,7 @@ func (m *awsAwsjson11_deserializeOpGetOpsSummary) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetOpsSummaryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetOpsItemOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8756,7 +8768,7 @@ func (m *awsAwsjson11_deserializeOpGetOpsSummary) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetOpsSummary(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetOpsItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8800,20 +8812,8 @@ func awsAwsjson11_deserializeOpErrorGetOpsSummary(response *smithyhttp.Response, case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidAggregatorException", errorCode): - return awsAwsjson11_deserializeErrorInvalidAggregatorException(response, errorBody) - - case strings.EqualFold("InvalidFilter", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) - - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - - case strings.EqualFold("InvalidTypeNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) - - case strings.EqualFold("ResourceDataSyncNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceDataSyncNotFoundException(response, errorBody) + case strings.EqualFold("OpsItemNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -8825,14 +8825,14 @@ func awsAwsjson11_deserializeOpErrorGetOpsSummary(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpGetParameter struct { +type awsAwsjson11_deserializeOpGetOpsMetadata struct { } -func (*awsAwsjson11_deserializeOpGetParameter) ID() string { +func (*awsAwsjson11_deserializeOpGetOpsMetadata) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetParameter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetOpsMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8846,9 +8846,9 @@ func (m *awsAwsjson11_deserializeOpGetParameter) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetParameter(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsMetadata(response, &metadata) } - output := &GetParameterOutput{} + output := &GetOpsMetadataOutput{} out.Result = output var buff [1024]byte @@ -8868,7 +8868,7 @@ func (m *awsAwsjson11_deserializeOpGetParameter) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetParameterOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetOpsMetadataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8882,7 +8882,7 @@ func (m *awsAwsjson11_deserializeOpGetParameter) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetParameter(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetOpsMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8926,14 +8926,11 @@ func awsAwsjson11_deserializeOpErrorGetParameter(response *smithyhttp.Response, case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidKeyId", errorCode): - return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) - - case strings.EqualFold("ParameterNotFound", errorCode): - return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) + case strings.EqualFold("OpsMetadataInvalidArgumentException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response, errorBody) - case strings.EqualFold("ParameterVersionNotFound", errorCode): - return awsAwsjson11_deserializeErrorParameterVersionNotFound(response, errorBody) + case strings.EqualFold("OpsMetadataNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -8945,14 +8942,14 @@ func awsAwsjson11_deserializeOpErrorGetParameter(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpGetParameterHistory struct { +type awsAwsjson11_deserializeOpGetOpsSummary struct { } -func (*awsAwsjson11_deserializeOpGetParameterHistory) ID() string { +func (*awsAwsjson11_deserializeOpGetOpsSummary) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetParameterHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetOpsSummary) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8966,9 +8963,9 @@ func (m *awsAwsjson11_deserializeOpGetParameterHistory) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetParameterHistory(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsSummary(response, &metadata) } - output := &GetParameterHistoryOutput{} + output := &GetOpsSummaryOutput{} out.Result = output var buff [1024]byte @@ -8988,7 +8985,7 @@ func (m *awsAwsjson11_deserializeOpGetParameterHistory) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetParameterHistoryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetOpsSummaryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9002,7 +8999,7 @@ func (m *awsAwsjson11_deserializeOpGetParameterHistory) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetParameterHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetOpsSummary(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9046,14 +9043,20 @@ func awsAwsjson11_deserializeOpErrorGetParameterHistory(response *smithyhttp.Res case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidKeyId", errorCode): - return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + case strings.EqualFold("InvalidAggregatorException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAggregatorException(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) case strings.EqualFold("InvalidNextToken", errorCode): return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - case strings.EqualFold("ParameterNotFound", errorCode): - return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) + case strings.EqualFold("InvalidTypeNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + + case strings.EqualFold("ResourceDataSyncNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9065,14 +9068,14 @@ func awsAwsjson11_deserializeOpErrorGetParameterHistory(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpGetParameters struct { +type awsAwsjson11_deserializeOpGetParameter struct { } -func (*awsAwsjson11_deserializeOpGetParameters) ID() string { +func (*awsAwsjson11_deserializeOpGetParameter) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetParameters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetParameter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9086,9 +9089,9 @@ func (m *awsAwsjson11_deserializeOpGetParameters) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetParameters(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetParameter(response, &metadata) } - output := &GetParametersOutput{} + output := &GetParameterOutput{} out.Result = output var buff [1024]byte @@ -9108,7 +9111,7 @@ func (m *awsAwsjson11_deserializeOpGetParameters) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetParametersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetParameterOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9122,7 +9125,7 @@ func (m *awsAwsjson11_deserializeOpGetParameters) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetParameters(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetParameter(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9169,6 +9172,12 @@ func awsAwsjson11_deserializeOpErrorGetParameters(response *smithyhttp.Response, case strings.EqualFold("InvalidKeyId", errorCode): return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + case strings.EqualFold("ParameterNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) + + case strings.EqualFold("ParameterVersionNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterVersionNotFound(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9179,14 +9188,14 @@ func awsAwsjson11_deserializeOpErrorGetParameters(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpGetParametersByPath struct { +type awsAwsjson11_deserializeOpGetParameterHistory struct { } -func (*awsAwsjson11_deserializeOpGetParametersByPath) ID() string { +func (*awsAwsjson11_deserializeOpGetParameterHistory) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetParametersByPath) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetParameterHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9200,9 +9209,9 @@ func (m *awsAwsjson11_deserializeOpGetParametersByPath) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetParametersByPath(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetParameterHistory(response, &metadata) } - output := &GetParametersByPathOutput{} + output := &GetParameterHistoryOutput{} out.Result = output var buff [1024]byte @@ -9222,7 +9231,7 @@ func (m *awsAwsjson11_deserializeOpGetParametersByPath) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetParametersByPathOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetParameterHistoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9236,7 +9245,7 @@ func (m *awsAwsjson11_deserializeOpGetParametersByPath) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetParametersByPath(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetParameterHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9280,21 +9289,15 @@ func awsAwsjson11_deserializeOpErrorGetParametersByPath(response *smithyhttp.Res case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidFilterKey", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) - - case strings.EqualFold("InvalidFilterOption", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilterOption(response, errorBody) - - case strings.EqualFold("InvalidFilterValue", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilterValue(response, errorBody) - case strings.EqualFold("InvalidKeyId", errorCode): return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) case strings.EqualFold("InvalidNextToken", errorCode): return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + case strings.EqualFold("ParameterNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9305,14 +9308,14 @@ func awsAwsjson11_deserializeOpErrorGetParametersByPath(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpGetPatchBaseline struct { +type awsAwsjson11_deserializeOpGetParameters struct { } -func (*awsAwsjson11_deserializeOpGetPatchBaseline) ID() string { +func (*awsAwsjson11_deserializeOpGetParameters) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetPatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetParameters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9326,9 +9329,9 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaseline) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetPatchBaseline(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetParameters(response, &metadata) } - output := &GetPatchBaselineOutput{} + output := &GetParametersOutput{} out.Result = output var buff [1024]byte @@ -9348,7 +9351,7 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaseline) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetPatchBaselineOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetParametersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9362,7 +9365,7 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaseline) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetPatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetParameters(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9403,14 +9406,137 @@ func awsAwsjson11_deserializeOpErrorGetPatchBaseline(response *smithyhttp.Respon } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidKeyId", errorCode): + return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetParametersByPath struct { +} + +func (*awsAwsjson11_deserializeOpGetParametersByPath) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetParametersByPath) HandleDeserialize(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_deserializeOpErrorGetParametersByPath(response, &metadata) + } + output := &GetParametersByPathOutput{} + 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_deserializeOpDocumentGetParametersByPathOutput(&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_deserializeOpErrorGetParametersByPath(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidResourceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidFilterOption", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterOption(response, errorBody) + + case strings.EqualFold("InvalidFilterValue", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterValue(response, errorBody) + + case strings.EqualFold("InvalidKeyId", errorCode): + return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9422,14 +9548,14 @@ func awsAwsjson11_deserializeOpErrorGetPatchBaseline(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup struct { +type awsAwsjson11_deserializeOpGetPatchBaseline struct { } -func (*awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) ID() string { +func (*awsAwsjson11_deserializeOpGetPatchBaseline) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetPatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9443,9 +9569,9 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetPatchBaseline(response, &metadata) } - output := &GetPatchBaselineForPatchGroupOutput{} + output := &GetPatchBaselineOutput{} out.Result = output var buff [1024]byte @@ -9465,7 +9591,7 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) HandleDeserial return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetPatchBaselineForPatchGroupOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetPatchBaselineOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9479,7 +9605,7 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) HandleDeserial return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetPatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9520,9 +9646,15 @@ func awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response *smit } switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9533,14 +9665,14 @@ func awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response *smit } } -type awsAwsjson11_deserializeOpGetServiceSetting struct { +type awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup struct { } -func (*awsAwsjson11_deserializeOpGetServiceSetting) ID() string { +func (*awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetServiceSetting) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9554,9 +9686,9 @@ func (m *awsAwsjson11_deserializeOpGetServiceSetting) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetServiceSetting(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response, &metadata) } - output := &GetServiceSettingOutput{} + output := &GetPatchBaselineForPatchGroupOutput{} out.Result = output var buff [1024]byte @@ -9576,7 +9708,7 @@ func (m *awsAwsjson11_deserializeOpGetServiceSetting) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetServiceSettingOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetPatchBaselineForPatchGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9590,7 +9722,118 @@ func (m *awsAwsjson11_deserializeOpGetServiceSetting) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetServiceSetting(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetServiceSetting struct { +} + +func (*awsAwsjson11_deserializeOpGetServiceSetting) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetServiceSetting) HandleDeserialize(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_deserializeOpErrorGetServiceSetting(response, &metadata) + } + output := &GetServiceSettingOutput{} + 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_deserializeOpDocumentGetServiceSettingOutput(&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_deserializeOpErrorGetServiceSetting(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11084,14 +11327,14 @@ func awsAwsjson11_deserializeOpErrorListOpsItemEvents(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpListOpsMetadata struct { +type awsAwsjson11_deserializeOpListOpsItemRelatedItems struct { } -func (*awsAwsjson11_deserializeOpListOpsMetadata) ID() string { +func (*awsAwsjson11_deserializeOpListOpsItemRelatedItems) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListOpsMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11105,9 +11348,9 @@ func (m *awsAwsjson11_deserializeOpListOpsMetadata) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListOpsMetadata(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(response, &metadata) } - output := &ListOpsMetadataOutput{} + output := &ListOpsItemRelatedItemsOutput{} out.Result = output var buff [1024]byte @@ -11127,7 +11370,7 @@ func (m *awsAwsjson11_deserializeOpListOpsMetadata) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListOpsMetadataOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListOpsItemRelatedItemsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11141,7 +11384,7 @@ func (m *awsAwsjson11_deserializeOpListOpsMetadata) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListOpsMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11185,8 +11428,8 @@ func awsAwsjson11_deserializeOpErrorListOpsMetadata(response *smithyhttp.Respons case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("OpsMetadataInvalidArgumentException", errorCode): - return awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response, errorBody) + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11198,14 +11441,14 @@ func awsAwsjson11_deserializeOpErrorListOpsMetadata(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpListResourceComplianceSummaries struct { +type awsAwsjson11_deserializeOpListOpsMetadata struct { } -func (*awsAwsjson11_deserializeOpListResourceComplianceSummaries) ID() string { +func (*awsAwsjson11_deserializeOpListOpsMetadata) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListResourceComplianceSummaries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListOpsMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11219,9 +11462,9 @@ func (m *awsAwsjson11_deserializeOpListResourceComplianceSummaries) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListOpsMetadata(response, &metadata) } - output := &ListResourceComplianceSummariesOutput{} + output := &ListOpsMetadataOutput{} out.Result = output var buff [1024]byte @@ -11241,7 +11484,7 @@ func (m *awsAwsjson11_deserializeOpListResourceComplianceSummaries) HandleDeseri return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListResourceComplianceSummariesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListOpsMetadataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11255,7 +11498,7 @@ func (m *awsAwsjson11_deserializeOpListResourceComplianceSummaries) HandleDeseri return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListOpsMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11299,11 +11542,8 @@ func awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(response *sm case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidFilter", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) - - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + case strings.EqualFold("OpsMetadataInvalidArgumentException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11315,14 +11555,14 @@ func awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(response *sm } } -type awsAwsjson11_deserializeOpListResourceDataSync struct { +type awsAwsjson11_deserializeOpListResourceComplianceSummaries struct { } -func (*awsAwsjson11_deserializeOpListResourceDataSync) ID() string { +func (*awsAwsjson11_deserializeOpListResourceComplianceSummaries) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListResourceDataSync) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListResourceComplianceSummaries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11336,9 +11576,9 @@ func (m *awsAwsjson11_deserializeOpListResourceDataSync) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListResourceDataSync(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(response, &metadata) } - output := &ListResourceDataSyncOutput{} + output := &ListResourceComplianceSummariesOutput{} out.Result = output var buff [1024]byte @@ -11358,7 +11598,7 @@ func (m *awsAwsjson11_deserializeOpListResourceDataSync) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListResourceDataSyncOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListResourceComplianceSummariesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11372,7 +11612,7 @@ func (m *awsAwsjson11_deserializeOpListResourceDataSync) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListResourceDataSync(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11416,12 +11656,12 @@ func awsAwsjson11_deserializeOpErrorListResourceDataSync(response *smithyhttp.Re case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + case strings.EqualFold("InvalidNextToken", errorCode): return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - case strings.EqualFold("ResourceDataSyncInvalidConfigurationException", errorCode): - return awsAwsjson11_deserializeErrorResourceDataSyncInvalidConfigurationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11432,14 +11672,14 @@ func awsAwsjson11_deserializeOpErrorListResourceDataSync(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpListTagsForResource struct { +type awsAwsjson11_deserializeOpListResourceDataSync struct { } -func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson11_deserializeOpListResourceDataSync) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListResourceDataSync) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11453,9 +11693,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_deserializeOpErrorListResourceDataSync(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListResourceDataSyncOutput{} out.Result = output var buff [1024]byte @@ -11475,7 +11715,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListResourceDataSyncOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11489,7 +11729,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListResourceDataSync(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11533,11 +11773,11 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidResourceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - case strings.EqualFold("InvalidResourceType", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) + case strings.EqualFold("ResourceDataSyncInvalidConfigurationException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncInvalidConfigurationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11549,14 +11789,14 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpModifyDocumentPermission struct { +type awsAwsjson11_deserializeOpListTagsForResource struct { } -func (*awsAwsjson11_deserializeOpModifyDocumentPermission) ID() string { +func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpModifyDocumentPermission) 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) @@ -11570,9 +11810,9 @@ func (m *awsAwsjson11_deserializeOpModifyDocumentPermission) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorModifyDocumentPermission(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &ModifyDocumentPermissionOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -11592,7 +11832,7 @@ func (m *awsAwsjson11_deserializeOpModifyDocumentPermission) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentModifyDocumentPermissionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11606,7 +11846,7 @@ func (m *awsAwsjson11_deserializeOpModifyDocumentPermission) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorModifyDocumentPermission(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)} @@ -11647,20 +11887,14 @@ func awsAwsjson11_deserializeOpErrorModifyDocumentPermission(response *smithyhtt } switch { - case strings.EqualFold("DocumentLimitExceeded", errorCode): - return awsAwsjson11_deserializeErrorDocumentLimitExceeded(response, errorBody) - - case strings.EqualFold("DocumentPermissionLimit", errorCode): - return awsAwsjson11_deserializeErrorDocumentPermissionLimit(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) - case strings.EqualFold("InvalidPermissionType", errorCode): - return awsAwsjson11_deserializeErrorInvalidPermissionType(response, errorBody) + case strings.EqualFold("InvalidResourceType", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11672,14 +11906,14 @@ func awsAwsjson11_deserializeOpErrorModifyDocumentPermission(response *smithyhtt } } -type awsAwsjson11_deserializeOpPutComplianceItems struct { +type awsAwsjson11_deserializeOpModifyDocumentPermission struct { } -func (*awsAwsjson11_deserializeOpPutComplianceItems) ID() string { +func (*awsAwsjson11_deserializeOpModifyDocumentPermission) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutComplianceItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpModifyDocumentPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11693,9 +11927,9 @@ func (m *awsAwsjson11_deserializeOpPutComplianceItems) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutComplianceItems(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorModifyDocumentPermission(response, &metadata) } - output := &PutComplianceItemsOutput{} + output := &ModifyDocumentPermissionOutput{} out.Result = output var buff [1024]byte @@ -11715,7 +11949,7 @@ func (m *awsAwsjson11_deserializeOpPutComplianceItems) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutComplianceItemsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentModifyDocumentPermissionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11729,7 +11963,7 @@ func (m *awsAwsjson11_deserializeOpPutComplianceItems) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutComplianceItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorModifyDocumentPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11770,26 +12004,20 @@ func awsAwsjson11_deserializeOpErrorPutComplianceItems(response *smithyhttp.Resp } switch { - case strings.EqualFold("ComplianceTypeCountLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorComplianceTypeCountLimitExceededException(response, errorBody) + case strings.EqualFold("DocumentLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorDocumentLimitExceeded(response, errorBody) + + case strings.EqualFold("DocumentPermissionLimit", errorCode): + return awsAwsjson11_deserializeErrorDocumentPermissionLimit(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidItemContentException", errorCode): - return awsAwsjson11_deserializeErrorInvalidItemContentException(response, errorBody) - - case strings.EqualFold("InvalidResourceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) - - case strings.EqualFold("InvalidResourceType", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) - - case strings.EqualFold("ItemSizeLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorItemSizeLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - case strings.EqualFold("TotalSizeLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorTotalSizeLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidPermissionType", errorCode): + return awsAwsjson11_deserializeErrorInvalidPermissionType(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11801,14 +12029,14 @@ func awsAwsjson11_deserializeOpErrorPutComplianceItems(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpPutInventory struct { +type awsAwsjson11_deserializeOpPutComplianceItems struct { } -func (*awsAwsjson11_deserializeOpPutInventory) ID() string { +func (*awsAwsjson11_deserializeOpPutComplianceItems) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutInventory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutComplianceItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11822,9 +12050,9 @@ func (m *awsAwsjson11_deserializeOpPutInventory) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutInventory(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutComplianceItems(response, &metadata) } - output := &PutInventoryOutput{} + output := &PutComplianceItemsOutput{} out.Result = output var buff [1024]byte @@ -11844,7 +12072,7 @@ func (m *awsAwsjson11_deserializeOpPutInventory) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutInventoryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutComplianceItemsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11858,7 +12086,136 @@ func (m *awsAwsjson11_deserializeOpPutInventory) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutInventory(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutComplianceItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ComplianceTypeCountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorComplianceTypeCountLimitExceededException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidItemContentException", errorCode): + return awsAwsjson11_deserializeErrorInvalidItemContentException(response, errorBody) + + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + case strings.EqualFold("InvalidResourceType", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) + + case strings.EqualFold("ItemSizeLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorItemSizeLimitExceededException(response, errorBody) + + case strings.EqualFold("TotalSizeLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorTotalSizeLimitExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutInventory struct { +} + +func (*awsAwsjson11_deserializeOpPutInventory) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutInventory) HandleDeserialize(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_deserializeOpErrorPutInventory(response, &metadata) + } + output := &PutInventoryOutput{} + 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_deserializeOpDocumentPutInventoryOutput(&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_deserializeOpErrorPutInventory(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18674,6 +19031,76 @@ func awsAwsjson11_deserializeErrorOpsItemNotFoundException(response *smithyhttp. return output } +func awsAwsjson11_deserializeErrorOpsItemRelatedItemAlreadyExistsException(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.OpsItemRelatedItemAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentOpsItemRelatedItemAlreadyExistsException(&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_deserializeErrorOpsItemRelatedItemAssociationNotFoundException(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.OpsItemRelatedItemAssociationNotFoundException{} + err := awsAwsjson11_deserializeDocumentOpsItemRelatedItemAssociationNotFoundException(&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_deserializeErrorOpsMetadataAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -24218,6 +24645,15 @@ func awsAwsjson11_deserializeDocumentDocumentDescription(v **types.DocumentDescr sv.Description = ptr.String(jtv) } + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + case "DocumentFormat": if value != nil { jtv, ok := value.(string) @@ -24427,6 +24863,28 @@ func awsAwsjson11_deserializeDocumentDocumentIdentifier(v **types.DocumentIdenti sv.Author = ptr.String(jtv) } + case "CreatedDate": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + case "DocumentFormat": if value != nil { jtv, ok := value.(string) @@ -25098,6 +25556,15 @@ func awsAwsjson11_deserializeDocumentDocumentVersionInfo(v **types.DocumentVersi sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) } + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + case "DocumentFormat": if value != nil { jtv, ok := value.(string) @@ -32509,6 +32976,250 @@ func awsAwsjson11_deserializeDocumentOpsItemParameterNamesList(v *[]string, valu return nil } +func awsAwsjson11_deserializeDocumentOpsItemRelatedItemAlreadyExistsException(v **types.OpsItemRelatedItemAlreadyExistsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemRelatedItemAlreadyExistsException + if *v == nil { + sv = &types.OpsItemRelatedItemAlreadyExistsException{} + } 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 "OpsItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemId to be of type string, got %T instead", value) + } + sv.OpsItemId = ptr.String(jtv) + } + + case "ResourceUri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemRelatedItemAssociationResourceUri to be of type string, got %T instead", value) + } + sv.ResourceUri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemRelatedItemAssociationNotFoundException(v **types.OpsItemRelatedItemAssociationNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemRelatedItemAssociationNotFoundException + if *v == nil { + sv = &types.OpsItemRelatedItemAssociationNotFoundException{} + } 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 awsAwsjson11_deserializeDocumentOpsItemRelatedItemSummaries(v *[]types.OpsItemRelatedItemSummary, 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.OpsItemRelatedItemSummary + if *v == nil { + cv = []types.OpsItemRelatedItemSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OpsItemRelatedItemSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentOpsItemRelatedItemSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOpsItemRelatedItemSummary(v **types.OpsItemRelatedItemSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpsItemRelatedItemSummary + if *v == nil { + sv = &types.OpsItemRelatedItemSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AssociationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemRelatedItemAssociationId to be of type string, got %T instead", value) + } + sv.AssociationId = ptr.String(jtv) + } + + case "AssociationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemRelatedItemAssociationType to be of type string, got %T instead", value) + } + sv.AssociationType = ptr.String(jtv) + } + + case "CreatedBy": + if err := awsAwsjson11_deserializeDocumentOpsItemIdentity(&sv.CreatedBy, value); err != nil { + return err + } + + case "CreatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "LastModifiedBy": + if err := awsAwsjson11_deserializeDocumentOpsItemIdentity(&sv.LastModifiedBy, value); err != nil { + return err + } + + case "LastModifiedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "OpsItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemId to be of type string, got %T instead", value) + } + sv.OpsItemId = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemRelatedItemAssociationResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "ResourceUri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpsItemRelatedItemAssociationResourceUri to be of type string, got %T instead", value) + } + sv.ResourceUri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentOpsItemSummaries(v *[]types.OpsItemSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -38601,7 +39312,176 @@ func awsAwsjson11_deserializeDocumentUnsupportedCalendarException(v **types.Unsu return nil } -func awsAwsjson11_deserializeDocumentUnsupportedFeatureRequiredException(v **types.UnsupportedFeatureRequiredException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUnsupportedFeatureRequiredException(v **types.UnsupportedFeatureRequiredException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnsupportedFeatureRequiredException + if *v == nil { + sv = &types.UnsupportedFeatureRequiredException{} + } 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 awsAwsjson11_deserializeDocumentUnsupportedInventoryItemContextException(v **types.UnsupportedInventoryItemContextException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnsupportedInventoryItemContextException + if *v == nil { + sv = &types.UnsupportedInventoryItemContextException{} + } 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 "TypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InventoryItemTypeName to be of type string, got %T instead", value) + } + sv.TypeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUnsupportedInventorySchemaVersionException(v **types.UnsupportedInventorySchemaVersionException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnsupportedInventorySchemaVersionException + if *v == nil { + sv = &types.UnsupportedInventorySchemaVersionException{} + } 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 awsAwsjson11_deserializeDocumentUnsupportedOperatingSystem(v **types.UnsupportedOperatingSystem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnsupportedOperatingSystem + if *v == nil { + sv = &types.UnsupportedOperatingSystem{} + } 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 awsAwsjson11_deserializeDocumentUnsupportedParameterType(v **types.UnsupportedParameterType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38614,16 +39494,16 @@ func awsAwsjson11_deserializeDocumentUnsupportedFeatureRequiredException(v **typ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UnsupportedFeatureRequiredException + var sv *types.UnsupportedParameterType if *v == nil { - sv = &types.UnsupportedFeatureRequiredException{} + sv = &types.UnsupportedParameterType{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "message": if value != nil { jtv, ok := value.(string) if !ok { @@ -38641,7 +39521,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedFeatureRequiredException(v **typ return nil } -func awsAwsjson11_deserializeDocumentUnsupportedInventoryItemContextException(v **types.UnsupportedInventoryItemContextException, value interface{}) error { +func awsAwsjson11_deserializeDocumentUnsupportedPlatformType(v **types.UnsupportedPlatformType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38654,9 +39534,9 @@ func awsAwsjson11_deserializeDocumentUnsupportedInventoryItemContextException(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UnsupportedInventoryItemContextException + var sv *types.UnsupportedPlatformType if *v == nil { - sv = &types.UnsupportedInventoryItemContextException{} + sv = &types.UnsupportedPlatformType{} } else { sv = *v } @@ -38672,15 +39552,6 @@ func awsAwsjson11_deserializeDocumentUnsupportedInventoryItemContextException(v sv.Message = ptr.String(jtv) } - case "TypeName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InventoryItemTypeName to be of type string, got %T instead", value) - } - sv.TypeName = ptr.String(jtv) - } - default: _, _ = key, value @@ -38690,7 +39561,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedInventoryItemContextException(v return nil } -func awsAwsjson11_deserializeDocumentUnsupportedInventorySchemaVersionException(v **types.UnsupportedInventorySchemaVersionException, value interface{}) error { +func awsAwsjson11_deserializeDocumentValidNextStepList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38698,79 +39569,35 @@ func awsAwsjson11_deserializeDocumentUnsupportedInventorySchemaVersionException( 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.UnsupportedInventorySchemaVersionException + var cv []string if *v == nil { - sv = &types.UnsupportedInventorySchemaVersionException{} + cv = []string{} } 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) + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValidNextStep to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = jtv } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentUnsupportedOperatingSystem(v **types.UnsupportedOperatingSystem, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.UnsupportedOperatingSystem - if *v == nil { - sv = &types.UnsupportedOperatingSystem{} - } 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 + cv = append(cv, col) - } } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentUnsupportedParameterType(v **types.UnsupportedParameterType, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentAddTagsToResourceOutput(v **AddTagsToResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38783,24 +39610,15 @@ func awsAwsjson11_deserializeDocumentUnsupportedParameterType(v **types.Unsuppor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UnsupportedParameterType + var sv *AddTagsToResourceOutput if *v == nil { - sv = &types.UnsupportedParameterType{} + sv = &AddTagsToResourceOutput{} } 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 @@ -38810,7 +39628,7 @@ func awsAwsjson11_deserializeDocumentUnsupportedParameterType(v **types.Unsuppor return nil } -func awsAwsjson11_deserializeDocumentUnsupportedPlatformType(v **types.UnsupportedPlatformType, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentAssociateOpsItemRelatedItemOutput(v **AssociateOpsItemRelatedItemOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38823,91 +39641,24 @@ func awsAwsjson11_deserializeDocumentUnsupportedPlatformType(v **types.Unsupport return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UnsupportedPlatformType + var sv *AssociateOpsItemRelatedItemOutput if *v == nil { - sv = &types.UnsupportedPlatformType{} + sv = &AssociateOpsItemRelatedItemOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "AssociationId": 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 OpsItemRelatedItemAssociationId to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentValidNextStepList(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 ValidNextStep to be of type string, got %T instead", value) + sv.AssociationId = ptr.String(jtv) } - col = jtv - } - cv = append(cv, col) - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeOpDocumentAddTagsToResourceOutput(v **AddTagsToResourceOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *AddTagsToResourceOutput - if *v == nil { - sv = &AddTagsToResourceOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { default: _, _ = key, value @@ -41449,6 +42200,37 @@ func awsAwsjson11_deserializeOpDocumentDescribeSessionsOutput(v **DescribeSessio return nil } +func awsAwsjson11_deserializeOpDocumentDisassociateOpsItemRelatedItemOutput(v **DisassociateOpsItemRelatedItemOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DisassociateOpsItemRelatedItemOutput + if *v == nil { + sv = &DisassociateOpsItemRelatedItemOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentGetAutomationExecutionOutput(v **GetAutomationExecutionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -41928,6 +42710,28 @@ func awsAwsjson11_deserializeOpDocumentGetDocumentOutput(v **GetDocumentOutput, sv.Content = ptr.String(jtv) } + case "CreatedDate": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentDisplayName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + case "DocumentFormat": if value != nil { jtv, ok := value.(string) @@ -43980,6 +44784,51 @@ func awsAwsjson11_deserializeOpDocumentListOpsItemEventsOutput(v **ListOpsItemEv return nil } +func awsAwsjson11_deserializeOpDocumentListOpsItemRelatedItemsOutput(v **ListOpsItemRelatedItemsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListOpsItemRelatedItemsOutput + if *v == nil { + sv = &ListOpsItemRelatedItemsOutput{} + } 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 "Summaries": + if err := awsAwsjson11_deserializeDocumentOpsItemRelatedItemSummaries(&sv.Summaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListOpsMetadataOutput(v **ListOpsMetadataOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ssm/doc.go b/service/ssm/doc.go index f8b28ba0533..1dc970d2937 100644 --- a/service/ssm/doc.go +++ b/service/ssm/doc.go @@ -17,9 +17,27 @@ // verify prerequisites and configure managed instances. For more information, see // Setting up AWS Systems Manager // (https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-setting-up.html) -// in the AWS Systems Manager User Guide. For information about other API actions -// you can perform on EC2 instances, see the Amazon EC2 API Reference -// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/). For information about -// how to use a Query API, see Making API requests +// in the AWS Systems Manager User Guide. Related resources +// +// * For information +// about how to use a Query API, see Making API requests // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/making-api-requests.html). +// +// * +// For information about other API actions you can perform on EC2 instances, see +// the Amazon EC2 API Reference +// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/). +// +// * For information +// about AWS AppConfig, a capability of Systems Manager, see the AWS AppConfig User +// Guide (https://docs.aws.amazon.com/appconfig/latest/userguide/) and the AWS +// AppConfig API Reference +// (https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/). +// +// * For +// information about AWS Incident Manager, a capability of Systems Manager, see the +// AWS Incident Manager User Guide +// (https://docs.aws.amazon.com/incident-manager/latest/userguide/) and the AWS +// Incident Manager API Reference +// (https://docs.aws.amazon.com/incident-manager/latest/APIReference/). package ssm diff --git a/service/ssm/generated.json b/service/ssm/generated.json index 7cfe9fd005e..1faa87f195a 100644 --- a/service/ssm/generated.json +++ b/service/ssm/generated.json @@ -7,6 +7,7 @@ "files": [ "api_client.go", "api_op_AddTagsToResource.go", + "api_op_AssociateOpsItemRelatedItem.go", "api_op_CancelCommand.go", "api_op_CancelMaintenanceWindowExecution.go", "api_op_CreateActivation.go", @@ -64,6 +65,7 @@ "api_op_DescribePatchGroups.go", "api_op_DescribePatchProperties.go", "api_op_DescribeSessions.go", + "api_op_DisassociateOpsItemRelatedItem.go", "api_op_GetAutomationExecution.go", "api_op_GetCalendarState.go", "api_op_GetCommandInvocation.go", @@ -100,6 +102,7 @@ "api_op_ListDocuments.go", "api_op_ListInventoryEntries.go", "api_op_ListOpsItemEvents.go", + "api_op_ListOpsItemRelatedItems.go", "api_op_ListOpsMetadata.go", "api_op_ListResourceComplianceSummaries.go", "api_op_ListResourceDataSync.go", diff --git a/service/ssm/serializers.go b/service/ssm/serializers.go index c1c18b74bbd..61852401c69 100644 --- a/service/ssm/serializers.go +++ b/service/ssm/serializers.go @@ -62,6 +62,53 @@ func (m *awsAwsjson11_serializeOpAddTagsToResource) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpAssociateOpsItemRelatedItem struct { +} + +func (*awsAwsjson11_serializeOpAssociateOpsItemRelatedItem) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpAssociateOpsItemRelatedItem) 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.(*AssociateOpsItemRelatedItemInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AmazonSSM.AssociateOpsItemRelatedItem") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentAssociateOpsItemRelatedItemInput(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_serializeOpCancelCommand struct { } @@ -2741,6 +2788,53 @@ func (m *awsAwsjson11_serializeOpDescribeSessions) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem struct { +} + +func (*awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem) 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.(*DisassociateOpsItemRelatedItemInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AmazonSSM.DisassociateOpsItemRelatedItem") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDisassociateOpsItemRelatedItemInput(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_serializeOpGetAutomationExecution struct { } @@ -4433,6 +4527,53 @@ func (m *awsAwsjson11_serializeOpListOpsItemEvents) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListOpsItemRelatedItems struct { +} + +func (*awsAwsjson11_serializeOpListOpsItemRelatedItems) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListOpsItemRelatedItems) 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.(*ListOpsItemRelatedItemsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("AmazonSSM.ListOpsItemRelatedItems") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListOpsItemRelatedItemsInput(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_serializeOpListOpsMetadata struct { } @@ -8040,6 +8181,54 @@ func awsAwsjson11_serializeDocumentOpsItemOpsDataKeysList(v []string, value smit return nil } +func awsAwsjson11_serializeDocumentOpsItemRelatedItemsFilter(v *types.OpsItemRelatedItemsFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("Key") + ok.String(string(v.Key)) + } + + if len(v.Operator) > 0 { + ok := object.Key("Operator") + ok.String(string(v.Operator)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentOpsItemRelatedItemsFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemRelatedItemsFilters(v []types.OpsItemRelatedItemsFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentOpsItemRelatedItemsFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentOpsItemRelatedItemsFilterValues(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_serializeDocumentOpsMetadataFilter(v *types.OpsMetadataFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -9059,6 +9248,33 @@ func awsAwsjson11_serializeOpDocumentAddTagsToResourceInput(v *AddTagsToResource return nil } +func awsAwsjson11_serializeOpDocumentAssociateOpsItemRelatedItemInput(v *AssociateOpsItemRelatedItemInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociationType != nil { + ok := object.Key("AssociationType") + ok.String(*v.AssociationType) + } + + if v.OpsItemId != nil { + ok := object.Key("OpsItemId") + ok.String(*v.OpsItemId) + } + + if v.ResourceType != nil { + ok := object.Key("ResourceType") + ok.String(*v.ResourceType) + } + + if v.ResourceUri != nil { + ok := object.Key("ResourceUri") + ok.String(*v.ResourceUri) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCancelCommandInput(v *CancelCommandInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -9256,6 +9472,11 @@ func awsAwsjson11_serializeOpDocumentCreateDocumentInput(v *CreateDocumentInput, ok.String(*v.Content) } + if v.DisplayName != nil { + ok := object.Key("DisplayName") + ok.String(*v.DisplayName) + } + if len(v.DocumentFormat) > 0 { ok := object.Key("DocumentFormat") ok.String(string(v.DocumentFormat)) @@ -10699,6 +10920,23 @@ func awsAwsjson11_serializeOpDocumentDescribeSessionsInput(v *DescribeSessionsIn return nil } +func awsAwsjson11_serializeOpDocumentDisassociateOpsItemRelatedItemInput(v *DisassociateOpsItemRelatedItemInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AssociationId != nil { + ok := object.Key("AssociationId") + ok.String(*v.AssociationId) + } + + if v.OpsItemId != nil { + ok := object.Key("OpsItemId") + ok.String(*v.OpsItemId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentGetAutomationExecutionInput(v *GetAutomationExecutionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -11545,6 +11783,35 @@ func awsAwsjson11_serializeOpDocumentListOpsItemEventsInput(v *ListOpsItemEvents return nil } +func awsAwsjson11_serializeOpDocumentListOpsItemRelatedItemsInput(v *ListOpsItemRelatedItemsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentOpsItemRelatedItemsFilters(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) + } + + if v.OpsItemId != nil { + ok := object.Key("OpsItemId") + ok.String(*v.OpsItemId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListOpsMetadataInput(v *ListOpsMetadataInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -12519,6 +12786,11 @@ func awsAwsjson11_serializeOpDocumentUpdateDocumentInput(v *UpdateDocumentInput, ok.String(*v.Content) } + if v.DisplayName != nil { + ok := object.Key("DisplayName") + ok.String(*v.DisplayName) + } + if len(v.DocumentFormat) > 0 { ok := object.Key("DocumentFormat") ok.String(string(v.DocumentFormat)) diff --git a/service/ssm/types/enums.go b/service/ssm/types/enums.go index 0a4df68ab8c..1a91bbe4626 100644 --- a/service/ssm/types/enums.go +++ b/service/ssm/types/enums.go @@ -753,6 +753,8 @@ const ( DocumentTypeDeploymentStrategy DocumentType = "DeploymentStrategy" DocumentTypeChangeCalendar DocumentType = "ChangeCalendar" DocumentTypeChangeTemplate DocumentType = "Automation.ChangeTemplate" + DocumentTypeProblemAnalysis DocumentType = "ProblemAnalysis" + DocumentTypeProblemAnalysisTemplate DocumentType = "ProblemAnalysisTemplate" ) // Values returns all known values for DocumentType. Note that this can be expanded @@ -770,6 +772,8 @@ func (DocumentType) Values() []DocumentType { "DeploymentStrategy", "ChangeCalendar", "Automation.ChangeTemplate", + "ProblemAnalysis", + "ProblemAnalysisTemplate", } } @@ -1278,6 +1282,43 @@ func (OpsItemFilterOperator) Values() []OpsItemFilterOperator { } } +type OpsItemRelatedItemsFilterKey string + +// Enum values for OpsItemRelatedItemsFilterKey +const ( + OpsItemRelatedItemsFilterKeyResourceType OpsItemRelatedItemsFilterKey = "ResourceType" + OpsItemRelatedItemsFilterKeyAssociationId OpsItemRelatedItemsFilterKey = "AssociationId" + OpsItemRelatedItemsFilterKeyResourceUri OpsItemRelatedItemsFilterKey = "ResourceUri" +) + +// Values returns all known values for OpsItemRelatedItemsFilterKey. 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 (OpsItemRelatedItemsFilterKey) Values() []OpsItemRelatedItemsFilterKey { + return []OpsItemRelatedItemsFilterKey{ + "ResourceType", + "AssociationId", + "ResourceUri", + } +} + +type OpsItemRelatedItemsFilterOperator string + +// Enum values for OpsItemRelatedItemsFilterOperator +const ( + OpsItemRelatedItemsFilterOperatorEqual OpsItemRelatedItemsFilterOperator = "Equal" +) + +// Values returns all known values for OpsItemRelatedItemsFilterOperator. 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 (OpsItemRelatedItemsFilterOperator) Values() []OpsItemRelatedItemsFilterOperator { + return []OpsItemRelatedItemsFilterOperator{ + "Equal", + } +} + type OpsItemStatus string // Enum values for OpsItemStatus diff --git a/service/ssm/types/errors.go b/service/ssm/types/errors.go index d68d681095f..99ce78f4f17 100644 --- a/service/ssm/types/errors.go +++ b/service/ssm/types/errors.go @@ -1579,6 +1579,52 @@ func (e *OpsItemNotFoundException) ErrorMessage() string { func (e *OpsItemNotFoundException) ErrorCode() string { return "OpsItemNotFoundException" } func (e *OpsItemNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The Amazon Resource Name (ARN) is already associated with the OpsItem. +type OpsItemRelatedItemAlreadyExistsException struct { + Message *string + + ResourceUri *string + OpsItemId *string +} + +func (e *OpsItemRelatedItemAlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsItemRelatedItemAlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsItemRelatedItemAlreadyExistsException) ErrorCode() string { + return "OpsItemRelatedItemAlreadyExistsException" +} +func (e *OpsItemRelatedItemAlreadyExistsException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The association was not found using the parameters you specified in the call. +// Verify the information and try again. +type OpsItemRelatedItemAssociationNotFoundException struct { + Message *string +} + +func (e *OpsItemRelatedItemAssociationNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpsItemRelatedItemAssociationNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpsItemRelatedItemAssociationNotFoundException) ErrorCode() string { + return "OpsItemRelatedItemAssociationNotFoundException" +} +func (e *OpsItemRelatedItemAssociationNotFoundException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // An OpsMetadata object already exists for the selected resource. type OpsMetadataAlreadyExistsException struct { Message *string diff --git a/service/ssm/types/types.go b/service/ssm/types/types.go index f2d440f9cc2..d67bcf8f28f 100644 --- a/service/ssm/types/types.go +++ b/service/ssm/types/types.go @@ -1470,6 +1470,11 @@ type DocumentDescription struct { // A description of the document. Description *string + // The friendly name of the Systems Manager document. This value can differ for + // each version of the document. If you want to update this value, see + // UpdateDocument. + DisplayName *string + // The document format, either JSON or YAML. DocumentFormat DocumentFormat @@ -1565,6 +1570,14 @@ type DocumentIdentifier struct { // The user in your organization who created the document. Author *string + // The date the Systems Manager document was created. + CreatedDate *time.Time + + // An optional field where you can specify a friendly name for the Systems Manager + // document. This value can differ for each version of the document. If you want to + // update this value, see UpdateDocument. + DisplayName *string + // The document format, either JSON or YAML. DocumentFormat DocumentFormat @@ -1776,6 +1789,11 @@ type DocumentVersionInfo struct { // The date the document was created. CreatedDate *time.Time + // The friendly name of the Systems Manager document. This value can differ for + // each version of the document. If you want to update this value, see + // UpdateDocument. + DisplayName *string + // The document format, either JSON or YAML. DocumentFormat DocumentFormat @@ -3109,7 +3127,8 @@ type OpsItemEventFilter struct { Values []string } -// Summary information about an OpsItem event. +// Summary information about an OpsItem event or that associated an OpsItem with a +// related item. type OpsItemEventSummary struct { // Information about the user or resource that created the OpsItem event. @@ -3168,6 +3187,57 @@ type OpsItemNotification struct { Arn *string } +// Describes a filter for a specific list of related-item resources. +type OpsItemRelatedItemsFilter struct { + + // The name of the filter key. Supported values include ResourceUri, ResourceType, + // or AssociationId. + // + // This member is required. + Key OpsItemRelatedItemsFilterKey + + // The operator used by the filter call. The only supported operator is EQUAL. + // + // This member is required. + Operator OpsItemRelatedItemsFilterOperator + + // The values for the filter. + // + // This member is required. + Values []string +} + +// Summary information about related-item resources for an OpsItem. +type OpsItemRelatedItemSummary struct { + + // The association ID. + AssociationId *string + + // The association type. + AssociationType *string + + // Information about the user or resource that created an OpsItem event. + CreatedBy *OpsItemIdentity + + // The time the related-item association was created. + CreatedTime *time.Time + + // Information about the user or resource that created an OpsItem event. + LastModifiedBy *OpsItemIdentity + + // The time the related-item association was last updated. + LastModifiedTime *time.Time + + // The OpsItem ID. + OpsItemId *string + + // The resource type. + ResourceType *string + + // The Amazon Resource Name (ARN) of the related-item resource. + ResourceUri *string +} + // A count of OpsItems. type OpsItemSummary struct { diff --git a/service/ssm/validators.go b/service/ssm/validators.go index f681d2c7ea4..5cdd17fed22 100644 --- a/service/ssm/validators.go +++ b/service/ssm/validators.go @@ -30,6 +30,26 @@ func (m *validateOpAddTagsToResource) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpAssociateOpsItemRelatedItem struct { +} + +func (*validateOpAssociateOpsItemRelatedItem) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateOpsItemRelatedItem) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateOpsItemRelatedItemInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateOpsItemRelatedItemInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCancelCommand struct { } @@ -990,6 +1010,26 @@ func (m *validateOpDescribeSessions) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpDisassociateOpsItemRelatedItem struct { +} + +func (*validateOpDisassociateOpsItemRelatedItem) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateOpsItemRelatedItem) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateOpsItemRelatedItemInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateOpsItemRelatedItemInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetAutomationExecution struct { } @@ -1630,6 +1670,26 @@ func (m *validateOpListOpsItemEvents) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpListOpsItemRelatedItems struct { +} + +func (*validateOpListOpsItemRelatedItems) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListOpsItemRelatedItems) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListOpsItemRelatedItemsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListOpsItemRelatedItemsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListOpsMetadata struct { } @@ -2354,6 +2414,10 @@ func addOpAddTagsToResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddTagsToResource{}, middleware.After) } +func addOpAssociateOpsItemRelatedItemValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateOpsItemRelatedItem{}, middleware.After) +} + func addOpCancelCommandValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCancelCommand{}, middleware.After) } @@ -2546,6 +2610,10 @@ func addOpDescribeSessionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeSessions{}, middleware.After) } +func addOpDisassociateOpsItemRelatedItemValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateOpsItemRelatedItem{}, middleware.After) +} + func addOpGetAutomationExecutionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetAutomationExecution{}, middleware.After) } @@ -2674,6 +2742,10 @@ func addOpListOpsItemEventsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListOpsItemEvents{}, middleware.After) } +func addOpListOpsItemRelatedItemsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListOpsItemRelatedItems{}, middleware.After) +} + func addOpListOpsMetadataValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListOpsMetadata{}, middleware.After) } @@ -3635,6 +3707,44 @@ func validateOpsItemFilters(v []types.OpsItemFilter) error { } } +func validateOpsItemRelatedItemsFilter(v *types.OpsItemRelatedItemsFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsItemRelatedItemsFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + 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 validateOpsItemRelatedItemsFilters(v []types.OpsItemRelatedItemsFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpsItemRelatedItemsFilters"} + for i := range v { + if err := validateOpsItemRelatedItemsFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpsMetadataFilter(v *types.OpsMetadataFilter) error { if v == nil { return nil @@ -4201,6 +4311,30 @@ func validateOpAddTagsToResourceInput(v *AddTagsToResourceInput) error { } } +func validateOpAssociateOpsItemRelatedItemInput(v *AssociateOpsItemRelatedItemInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateOpsItemRelatedItemInput"} + if v.OpsItemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpsItemId")) + } + if v.AssociationType == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssociationType")) + } + if v.ResourceType == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) + } + if v.ResourceUri == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceUri")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCancelCommandInput(v *CancelCommandInput) error { if v == nil { return nil @@ -5069,6 +5203,24 @@ func validateOpDescribeSessionsInput(v *DescribeSessionsInput) error { } } +func validateOpDisassociateOpsItemRelatedItemInput(v *DisassociateOpsItemRelatedItemInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateOpsItemRelatedItemInput"} + if v.OpsItemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OpsItemId")) + } + if v.AssociationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetAutomationExecutionInput(v *GetAutomationExecutionInput) error { if v == nil { return nil @@ -5625,6 +5777,23 @@ func validateOpListOpsItemEventsInput(v *ListOpsItemEventsInput) error { } } +func validateOpListOpsItemRelatedItemsInput(v *ListOpsItemRelatedItemsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListOpsItemRelatedItemsInput"} + if v.Filters != nil { + if err := validateOpsItemRelatedItemsFilters(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListOpsMetadataInput(v *ListOpsMetadataInput) error { if v == nil { return nil diff --git a/service/ssmcontacts/LICENSE.txt b/service/ssmcontacts/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/ssmcontacts/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/ssmcontacts/api_client.go b/service/ssmcontacts/api_client.go new file mode 100644 index 00000000000..28d59e24ba2 --- /dev/null +++ b/service/ssmcontacts/api_client.go @@ -0,0 +1,279 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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" + smithy "github.com/aws/smithy-go" + "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 = "SSM Contacts" +const ServiceAPIVersion = "2021-05-03" + +// Client provides the API client to make operations call for AWS Systems Manager +// Incident Manager Contacts. +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) + } + + 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 +} + +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) + 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, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "ssmcontacts", 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) +} + +// 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/ssmcontacts/api_op_AcceptPage.go b/service/ssmcontacts/api_op_AcceptPage.go new file mode 100644 index 00000000000..603be90d7d0 --- /dev/null +++ b/service/ssmcontacts/api_op_AcceptPage.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Used to acknowledge an engagement to a contact channel during an incident. +func (c *Client) AcceptPage(ctx context.Context, params *AcceptPageInput, optFns ...func(*Options)) (*AcceptPageOutput, error) { + if params == nil { + params = &AcceptPageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AcceptPage", params, optFns, addOperationAcceptPageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AcceptPageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AcceptPageInput struct { + + // The accept code is a 6-digit code used to acknowledge the page. + // + // This member is required. + AcceptCode *string + + // The type indicates if the page was DELIVERED or READ. + // + // This member is required. + AcceptType types.AcceptType + + // The Amazon Resource Name (ARN) of the engagement to a contact channel. + // + // This member is required. + PageId *string + + // The ARN of the contact channel. + ContactChannelId *string + + // Information provided by the user when the user acknowledges the page. + Note *string +} + +type AcceptPageOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationAcceptPageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpAcceptPage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAcceptPage{}, 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 = addOpAcceptPageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptPage(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_opAcceptPage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "AcceptPage", + } +} diff --git a/service/ssmcontacts/api_op_ActivateContactChannel.go b/service/ssmcontacts/api_op_ActivateContactChannel.go new file mode 100644 index 00000000000..5dc7f814c2d --- /dev/null +++ b/service/ssmcontacts/api_op_ActivateContactChannel.go @@ -0,0 +1,118 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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" +) + +// Activates a contact's contact channel. Incident Manager can't engage a contact +// until the contact channel has been activated. +func (c *Client) ActivateContactChannel(ctx context.Context, params *ActivateContactChannelInput, optFns ...func(*Options)) (*ActivateContactChannelOutput, error) { + if params == nil { + params = &ActivateContactChannelInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ActivateContactChannel", params, optFns, addOperationActivateContactChannelMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ActivateContactChannelOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ActivateContactChannelInput struct { + + // The code sent to the contact channel when it was created in the contact. + // + // This member is required. + ActivationCode *string + + // The Amazon Resource Name (ARN) of the contact channel. + // + // This member is required. + ContactChannelId *string +} + +type ActivateContactChannelOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationActivateContactChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpActivateContactChannel{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpActivateContactChannel{}, 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 = addOpActivateContactChannelValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opActivateContactChannel(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_opActivateContactChannel(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "ActivateContactChannel", + } +} diff --git a/service/ssmcontacts/api_op_CreateContact.go b/service/ssmcontacts/api_op_CreateContact.go new file mode 100644 index 00000000000..ad2a5501e77 --- /dev/null +++ b/service/ssmcontacts/api_op_CreateContact.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Contacts are either the contacts that Incident Manager engages during an +// incident or the escalation plans that Incident Manager uses to engage contacts +// in phases during an incident. +func (c *Client) CreateContact(ctx context.Context, params *CreateContactInput, optFns ...func(*Options)) (*CreateContactOutput, error) { + if params == nil { + params = &CreateContactInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateContact", params, optFns, addOperationCreateContactMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateContactOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateContactInput struct { + + // The short name to quickly identify a contact or escalation plan. The contact + // alias must be unique and identifiable. + // + // This member is required. + Alias *string + + // A list of stages. A contact has an engagement plan with stages that contact + // specified contact channels. An escalation plan uses stages that contact + // specified contacts. + // + // This member is required. + Plan *types.Plan + + // To create an escalation plan use ESCALATION. To create a contact use PERSONAL. + // + // This member is required. + Type types.ContactType + + // The full name of the contact or escalation plan. + DisplayName *string + + // A token ensuring that the action is called only once with the specified details. + IdempotencyToken *string + + // Adds a tag to the target. You can only tag resources created in the first Region + // of your replication set. + Tags []types.Tag +} + +type CreateContactOutput struct { + + // The Amazon Resource Name (ARN) of the created contact or escalation plan. + // + // This member is required. + ContactArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationCreateContactMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateContact{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateContact{}, 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_opCreateContactMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateContactValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateContact(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_initializeOpCreateContact struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateContact) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateContact) 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.(*CreateContactInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateContactInput ") + } + + if input.IdempotencyToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.IdempotencyToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateContactMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateContact{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateContact(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "CreateContact", + } +} diff --git a/service/ssmcontacts/api_op_CreateContactChannel.go b/service/ssmcontacts/api_op_CreateContactChannel.go new file mode 100644 index 00000000000..a829cb0f53f --- /dev/null +++ b/service/ssmcontacts/api_op_CreateContactChannel.go @@ -0,0 +1,197 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// A contact channel is the method that Incident Manager uses to engage your +// contact. +func (c *Client) CreateContactChannel(ctx context.Context, params *CreateContactChannelInput, optFns ...func(*Options)) (*CreateContactChannelOutput, error) { + if params == nil { + params = &CreateContactChannelInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateContactChannel", params, optFns, addOperationCreateContactChannelMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateContactChannelOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateContactChannelInput struct { + + // The Amazon Resource Name (ARN) of the contact channel. + // + // This member is required. + ContactId *string + + // The details that Incident Manager uses when trying to engage the contact + // channel. The format is dependent on the type of the contact channel. The + // following are the expected formats: + // + // * SMS - '+' followed by the country code + // and phone number + // + // * VOICE - '+' followed by the country code and phone number + // + // * + // EMAIL - any standard email format + // + // This member is required. + DeliveryAddress *types.ContactChannelAddress + + // The name of the contact channel. + // + // This member is required. + Name *string + + // Incident Manager supports three types of contact channels: + // + // * SMS + // + // * VOICE + // + // * + // EMAIL + // + // This member is required. + Type types.ChannelType + + // If you want to activate the channel at a later time, you can choose to defer + // activation. Incident Manager can't engage your contact channel until it has been + // activated. + DeferActivation *bool + + // A token ensuring that the action is called only once with the specified details. + IdempotencyToken *string +} + +type CreateContactChannelOutput struct { + + // The ARN of the contact channel. + // + // This member is required. + ContactChannelArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationCreateContactChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateContactChannel{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateContactChannel{}, 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_opCreateContactChannelMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateContactChannelValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateContactChannel(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_initializeOpCreateContactChannel struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateContactChannel) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateContactChannel) 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.(*CreateContactChannelInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateContactChannelInput ") + } + + if input.IdempotencyToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.IdempotencyToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateContactChannelMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateContactChannel{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateContactChannel(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "CreateContactChannel", + } +} diff --git a/service/ssmcontacts/api_op_DeactivateContactChannel.go b/service/ssmcontacts/api_op_DeactivateContactChannel.go new file mode 100644 index 00000000000..a2581916228 --- /dev/null +++ b/service/ssmcontacts/api_op_DeactivateContactChannel.go @@ -0,0 +1,113 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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" +) + +// To no longer receive Incident Manager engagements to a contact channel, you can +// deactivate the channel. +func (c *Client) DeactivateContactChannel(ctx context.Context, params *DeactivateContactChannelInput, optFns ...func(*Options)) (*DeactivateContactChannelOutput, error) { + if params == nil { + params = &DeactivateContactChannelInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeactivateContactChannel", params, optFns, addOperationDeactivateContactChannelMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeactivateContactChannelOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeactivateContactChannelInput struct { + + // The Amazon Resource Name (ARN) of the contact channel you're deactivating. + // + // This member is required. + ContactChannelId *string +} + +type DeactivateContactChannelOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationDeactivateContactChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeactivateContactChannel{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeactivateContactChannel{}, 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 = addOpDeactivateContactChannelValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeactivateContactChannel(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_opDeactivateContactChannel(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "DeactivateContactChannel", + } +} diff --git a/service/ssmcontacts/api_op_DeleteContact.go b/service/ssmcontacts/api_op_DeleteContact.go new file mode 100644 index 00000000000..9852cbe747d --- /dev/null +++ b/service/ssmcontacts/api_op_DeleteContact.go @@ -0,0 +1,116 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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" +) + +// To remove a contact from Incident Manager, you can delete the contact. Deleting +// a contact removes them from all escalation plans and related response plans. +// Deleting an escalation plan removes it from all related response plans. You will +// have to recreate the contact and its contact channels before you can use it +// again. +func (c *Client) DeleteContact(ctx context.Context, params *DeleteContactInput, optFns ...func(*Options)) (*DeleteContactOutput, error) { + if params == nil { + params = &DeleteContactInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteContact", params, optFns, addOperationDeleteContactMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteContactOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteContactInput struct { + + // The Amazon Resource Name (ARN) of the contact that you're deleting. + // + // This member is required. + ContactId *string +} + +type DeleteContactOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationDeleteContactMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteContact{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteContact{}, 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 = addOpDeleteContactValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteContact(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_opDeleteContact(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "DeleteContact", + } +} diff --git a/service/ssmcontacts/api_op_DeleteContactChannel.go b/service/ssmcontacts/api_op_DeleteContactChannel.go new file mode 100644 index 00000000000..444d9323143 --- /dev/null +++ b/service/ssmcontacts/api_op_DeleteContactChannel.go @@ -0,0 +1,115 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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" +) + +// To no longer receive engagements on a contact channel, you can delete the +// channel from a contact. Deleting the contact channel removes it from the +// contact's engagement plan. If you delete the only contact channel for a contact, +// you won't be able to engage that contact during an incident. +func (c *Client) DeleteContactChannel(ctx context.Context, params *DeleteContactChannelInput, optFns ...func(*Options)) (*DeleteContactChannelOutput, error) { + if params == nil { + params = &DeleteContactChannelInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteContactChannel", params, optFns, addOperationDeleteContactChannelMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteContactChannelOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteContactChannelInput struct { + + // The Amazon Resource Name (ARN) of the contact channel. + // + // This member is required. + ContactChannelId *string +} + +type DeleteContactChannelOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationDeleteContactChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteContactChannel{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteContactChannel{}, 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 = addOpDeleteContactChannelValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteContactChannel(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_opDeleteContactChannel(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "DeleteContactChannel", + } +} diff --git a/service/ssmcontacts/api_op_DescribeEngagement.go b/service/ssmcontacts/api_op_DescribeEngagement.go new file mode 100644 index 00000000000..c991dcaa0ca --- /dev/null +++ b/service/ssmcontacts/api_op_DescribeEngagement.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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" +) + +// Incident Manager uses engagements to engage contacts and escalation plans during +// an incident. Use this command to describe the engagement that occurred during an +// incident. +func (c *Client) DescribeEngagement(ctx context.Context, params *DescribeEngagementInput, optFns ...func(*Options)) (*DescribeEngagementOutput, error) { + if params == nil { + params = &DescribeEngagementInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeEngagement", params, optFns, addOperationDescribeEngagementMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeEngagementOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeEngagementInput struct { + + // The Amazon Resource Name (ARN) of the engagement you want the details of. + // + // This member is required. + EngagementId *string +} + +type DescribeEngagementOutput struct { + + // The ARN of the escalation plan or contacts involved in the engagement. + // + // This member is required. + ContactArn *string + + // The secure content of the message that was sent to the contact. Use this field + // for engagements to VOICE and EMAIL. + // + // This member is required. + Content *string + + // The ARN of the engagement. + // + // This member is required. + EngagementArn *string + + // The user that started the engagement. + // + // This member is required. + Sender *string + + // The secure subject of the message that was sent to the contact. Use this field + // for engagements to VOICE and EMAIL. + // + // This member is required. + Subject *string + + // The ARN of the incident in which the engagement occurred. + IncidentId *string + + // The insecure content of the message that was sent to the contact. Use this field + // for engagements to SMS. + PublicContent *string + + // The insecure subject of the message that was sent to the contact. Use this field + // for engagements to SMS. + PublicSubject *string + + // The time that the engagement started. + StartTime *time.Time + + // The time that the engagement ended. + StopTime *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationDescribeEngagementMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeEngagement{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeEngagement{}, 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 = addOpDescribeEngagementValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEngagement(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_opDescribeEngagement(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "DescribeEngagement", + } +} diff --git a/service/ssmcontacts/api_op_DescribePage.go b/service/ssmcontacts/api_op_DescribePage.go new file mode 100644 index 00000000000..8166f1464e8 --- /dev/null +++ b/service/ssmcontacts/api_op_DescribePage.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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" +) + +// Lists details of the engagement to a contact channel. +func (c *Client) DescribePage(ctx context.Context, params *DescribePageInput, optFns ...func(*Options)) (*DescribePageOutput, error) { + if params == nil { + params = &DescribePageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribePage", params, optFns, addOperationDescribePageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribePageOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribePageInput struct { + + // The ID of the engagement to a contact channel. + // + // This member is required. + PageId *string +} + +type DescribePageOutput struct { + + // The ARN of the contact that was engaged. + // + // This member is required. + ContactArn *string + + // The secure content of the message that was sent to the contact. Use this field + // for engagements to VOICE and EMAIL. + // + // This member is required. + Content *string + + // The ARN of the engagement that engaged the contact channel. + // + // This member is required. + EngagementArn *string + + // The Amazon Resource Name (ARN) of the engagement to a contact channel. + // + // This member is required. + PageArn *string + + // The user that started the engagement. + // + // This member is required. + Sender *string + + // The secure subject of the message that was sent to the contact. Use this field + // for engagements to VOICE and EMAIL. + // + // This member is required. + Subject *string + + // The time that the contact channel received the engagement. + DeliveryTime *time.Time + + // The ARN of the incident that engaged the contact channel. + IncidentId *string + + // The insecure content of the message that was sent to the contact. Use this field + // for engagements to SMS. + PublicContent *string + + // The insecure subject of the message that was sent to the contact. Use this field + // for engagements to SMS. + PublicSubject *string + + // The time that the contact channel acknowledged the engagement. + ReadTime *time.Time + + // The time the engagement was sent to the contact channel. + SentTime *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationDescribePageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribePage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribePage{}, 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 = addOpDescribePageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePage(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_opDescribePage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "DescribePage", + } +} diff --git a/service/ssmcontacts/api_op_GetContact.go b/service/ssmcontacts/api_op_GetContact.go new file mode 100644 index 00000000000..59dbb4bb6e3 --- /dev/null +++ b/service/ssmcontacts/api_op_GetContact.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves information about the specified contact or escalation plan. +func (c *Client) GetContact(ctx context.Context, params *GetContactInput, optFns ...func(*Options)) (*GetContactOutput, error) { + if params == nil { + params = &GetContactInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetContact", params, optFns, addOperationGetContactMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetContactOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetContactInput struct { + + // The Amazon Resource Name (ARN) of the contact or escalation plan. + // + // This member is required. + ContactId *string +} + +type GetContactOutput struct { + + // The alias of the contact or escalation plan. The alias is unique and + // identifiable. + // + // This member is required. + Alias *string + + // The ARN of the contact or escalation plan. + // + // This member is required. + ContactArn *string + + // Details about the specific timing or stages and targets of the escalation plan + // or engagement plan. + // + // This member is required. + Plan *types.Plan + + // The type of contact, either PERSONAL or ESCALATION. + // + // This member is required. + Type types.ContactType + + // The full name of the contact or escalation plan. + DisplayName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationGetContactMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetContact{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetContact{}, 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 = addOpGetContactValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContact(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_opGetContact(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "GetContact", + } +} diff --git a/service/ssmcontacts/api_op_GetContactChannel.go b/service/ssmcontacts/api_op_GetContactChannel.go new file mode 100644 index 00000000000..e81e4b98d04 --- /dev/null +++ b/service/ssmcontacts/api_op_GetContactChannel.go @@ -0,0 +1,144 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List details about a specific contact channel. +func (c *Client) GetContactChannel(ctx context.Context, params *GetContactChannelInput, optFns ...func(*Options)) (*GetContactChannelOutput, error) { + if params == nil { + params = &GetContactChannelInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetContactChannel", params, optFns, addOperationGetContactChannelMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetContactChannelOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetContactChannelInput struct { + + // The Amazon Resource Name (ARN) of the contact channel you want information + // about. + // + // This member is required. + ContactChannelId *string +} + +type GetContactChannelOutput struct { + + // The ARN of the contact that the channel belongs to. + // + // This member is required. + ContactArn *string + + // The ARN of the contact channel. + // + // This member is required. + ContactChannelArn *string + + // The details that Incident Manager uses when trying to engage the contact + // channel. + // + // This member is required. + DeliveryAddress *types.ContactChannelAddress + + // The name of the contact channel + // + // This member is required. + Name *string + + // The type of contact channel. The type is SMS, VOICE, or EMAIL. + // + // This member is required. + Type types.ChannelType + + // A Boolean value indicating if the contact channel has been activated or not. + ActivationStatus types.ActivationStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationGetContactChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetContactChannel{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetContactChannel{}, 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 = addOpGetContactChannelValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContactChannel(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_opGetContactChannel(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "GetContactChannel", + } +} diff --git a/service/ssmcontacts/api_op_GetContactPolicy.go b/service/ssmcontacts/api_op_GetContactPolicy.go new file mode 100644 index 00000000000..a939e1f3011 --- /dev/null +++ b/service/ssmcontacts/api_op_GetContactPolicy.go @@ -0,0 +1,120 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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" +) + +// Retrieves the resource policies attached to the specified contact or escalation +// plan. +func (c *Client) GetContactPolicy(ctx context.Context, params *GetContactPolicyInput, optFns ...func(*Options)) (*GetContactPolicyOutput, error) { + if params == nil { + params = &GetContactPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetContactPolicy", params, optFns, addOperationGetContactPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetContactPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetContactPolicyInput struct { + + // The Amazon Resource Name (ARN) of the contact or escalation plan. + // + // This member is required. + ContactArn *string +} + +type GetContactPolicyOutput struct { + + // The ARN of the contact or escalation plan. + ContactArn *string + + // Details about the resource policy attached to the contact or escalation plan. + Policy *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationGetContactPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetContactPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetContactPolicy{}, 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 = addOpGetContactPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContactPolicy(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_opGetContactPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "GetContactPolicy", + } +} diff --git a/service/ssmcontacts/api_op_ListContactChannels.go b/service/ssmcontacts/api_op_ListContactChannels.go new file mode 100644 index 00000000000..aeb147da4fd --- /dev/null +++ b/service/ssmcontacts/api_op_ListContactChannels.go @@ -0,0 +1,216 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all contact channels for the specified contact. +func (c *Client) ListContactChannels(ctx context.Context, params *ListContactChannelsInput, optFns ...func(*Options)) (*ListContactChannelsOutput, error) { + if params == nil { + params = &ListContactChannelsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListContactChannels", params, optFns, addOperationListContactChannelsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListContactChannelsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListContactChannelsInput struct { + + // The Amazon Resource Name (ARN) of the contact. + // + // This member is required. + ContactId *string + + // The maximum number of contact channels per page. + MaxResults *int32 + + // The pagination token to continue to the next page of results. + NextToken *string +} + +type ListContactChannelsOutput struct { + + // A list of contact channels related to the specified contact. + // + // This member is required. + ContactChannels []types.ContactChannel + + // The pagination token to continue to the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListContactChannelsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListContactChannels{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListContactChannels{}, 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 = addOpListContactChannelsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListContactChannels(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 +} + +// ListContactChannelsAPIClient is a client that implements the ListContactChannels +// operation. +type ListContactChannelsAPIClient interface { + ListContactChannels(context.Context, *ListContactChannelsInput, ...func(*Options)) (*ListContactChannelsOutput, error) +} + +var _ ListContactChannelsAPIClient = (*Client)(nil) + +// ListContactChannelsPaginatorOptions is the paginator options for +// ListContactChannels +type ListContactChannelsPaginatorOptions struct { + // The maximum number of contact channels 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 +} + +// ListContactChannelsPaginator is a paginator for ListContactChannels +type ListContactChannelsPaginator struct { + options ListContactChannelsPaginatorOptions + client ListContactChannelsAPIClient + params *ListContactChannelsInput + nextToken *string + firstPage bool +} + +// NewListContactChannelsPaginator returns a new ListContactChannelsPaginator +func NewListContactChannelsPaginator(client ListContactChannelsAPIClient, params *ListContactChannelsInput, optFns ...func(*ListContactChannelsPaginatorOptions)) *ListContactChannelsPaginator { + if params == nil { + params = &ListContactChannelsInput{} + } + + options := ListContactChannelsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListContactChannelsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListContactChannelsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListContactChannels page. +func (p *ListContactChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListContactChannelsOutput, 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.ListContactChannels(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_opListContactChannels(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "ListContactChannels", + } +} diff --git a/service/ssmcontacts/api_op_ListContacts.go b/service/ssmcontacts/api_op_ListContacts.go new file mode 100644 index 00000000000..ed7bd3812b3 --- /dev/null +++ b/service/ssmcontacts/api_op_ListContacts.go @@ -0,0 +1,211 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all contacts and escalation plans in Incident Manager. +func (c *Client) ListContacts(ctx context.Context, params *ListContactsInput, optFns ...func(*Options)) (*ListContactsOutput, error) { + if params == nil { + params = &ListContactsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListContacts", params, optFns, addOperationListContactsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListContactsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListContactsInput struct { + + // Used to list only contacts who's aliases start with the specified prefix. + AliasPrefix *string + + // The maximum number of contacts and escalation plans per page of results. + MaxResults *int32 + + // The pagination token to continue to the next page of results. + NextToken *string + + // The type of contact. A contact is type PERSONAL and an escalation plan is type + // ESCALATION. + Type types.ContactType +} + +type ListContactsOutput struct { + + // A list of the contacts and escalation plans in your Incident Manager account. + Contacts []types.Contact + + // The pagination token to continue to the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListContactsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListContacts{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListContacts{}, 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_opListContacts(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 +} + +// ListContactsAPIClient is a client that implements the ListContacts operation. +type ListContactsAPIClient interface { + ListContacts(context.Context, *ListContactsInput, ...func(*Options)) (*ListContactsOutput, error) +} + +var _ ListContactsAPIClient = (*Client)(nil) + +// ListContactsPaginatorOptions is the paginator options for ListContacts +type ListContactsPaginatorOptions struct { + // The maximum number of contacts and escalation plans per page of results. + 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 +} + +// ListContactsPaginator is a paginator for ListContacts +type ListContactsPaginator struct { + options ListContactsPaginatorOptions + client ListContactsAPIClient + params *ListContactsInput + nextToken *string + firstPage bool +} + +// NewListContactsPaginator returns a new ListContactsPaginator +func NewListContactsPaginator(client ListContactsAPIClient, params *ListContactsInput, optFns ...func(*ListContactsPaginatorOptions)) *ListContactsPaginator { + if params == nil { + params = &ListContactsInput{} + } + + options := ListContactsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListContactsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListContactsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListContacts page. +func (p *ListContactsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListContactsOutput, 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.ListContacts(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_opListContacts(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "ListContacts", + } +} diff --git a/service/ssmcontacts/api_op_ListEngagements.go b/service/ssmcontacts/api_op_ListEngagements.go new file mode 100644 index 00000000000..a9b19032232 --- /dev/null +++ b/service/ssmcontacts/api_op_ListEngagements.go @@ -0,0 +1,214 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all engagements that have happened in an incident. +func (c *Client) ListEngagements(ctx context.Context, params *ListEngagementsInput, optFns ...func(*Options)) (*ListEngagementsOutput, error) { + if params == nil { + params = &ListEngagementsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEngagements", params, optFns, addOperationListEngagementsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEngagementsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEngagementsInput struct { + + // The Amazon Resource Name (ARN) of the incident you're listing engagements for. + IncidentId *string + + // The maximum number of engagements per page of results. + MaxResults *int32 + + // The pagination token to continue to the next page of results. + NextToken *string + + // The time range to lists engagements for an incident. + TimeRangeValue *types.TimeRange +} + +type ListEngagementsOutput struct { + + // A list of each engagement that occurred during the specified time range of an + // incident. + // + // This member is required. + Engagements []types.Engagement + + // The pagination token to continue to the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListEngagementsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListEngagements{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListEngagements{}, 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_opListEngagements(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 +} + +// ListEngagementsAPIClient is a client that implements the ListEngagements +// operation. +type ListEngagementsAPIClient interface { + ListEngagements(context.Context, *ListEngagementsInput, ...func(*Options)) (*ListEngagementsOutput, error) +} + +var _ ListEngagementsAPIClient = (*Client)(nil) + +// ListEngagementsPaginatorOptions is the paginator options for ListEngagements +type ListEngagementsPaginatorOptions struct { + // The maximum number of engagements per page of results. + 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 +} + +// ListEngagementsPaginator is a paginator for ListEngagements +type ListEngagementsPaginator struct { + options ListEngagementsPaginatorOptions + client ListEngagementsAPIClient + params *ListEngagementsInput + nextToken *string + firstPage bool +} + +// NewListEngagementsPaginator returns a new ListEngagementsPaginator +func NewListEngagementsPaginator(client ListEngagementsAPIClient, params *ListEngagementsInput, optFns ...func(*ListEngagementsPaginatorOptions)) *ListEngagementsPaginator { + if params == nil { + params = &ListEngagementsInput{} + } + + options := ListEngagementsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEngagementsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEngagementsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListEngagements page. +func (p *ListEngagementsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEngagementsOutput, 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.ListEngagements(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_opListEngagements(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "ListEngagements", + } +} diff --git a/service/ssmcontacts/api_op_ListPageReceipts.go b/service/ssmcontacts/api_op_ListPageReceipts.go new file mode 100644 index 00000000000..c2c44737883 --- /dev/null +++ b/service/ssmcontacts/api_op_ListPageReceipts.go @@ -0,0 +1,213 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all of the engagements to contact channels that have been acknowledged. +func (c *Client) ListPageReceipts(ctx context.Context, params *ListPageReceiptsInput, optFns ...func(*Options)) (*ListPageReceiptsOutput, error) { + if params == nil { + params = &ListPageReceiptsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListPageReceipts", params, optFns, addOperationListPageReceiptsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListPageReceiptsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListPageReceiptsInput struct { + + // The Amazon Resource Name (ARN) of the engagement to a specific contact channel. + // + // This member is required. + PageId *string + + // The maximum number of acknowledgements per page of results. + MaxResults *int32 + + // The pagination token to continue to the next page of results. + NextToken *string +} + +type ListPageReceiptsOutput struct { + + // The pagination token to continue to the next page of results. + NextToken *string + + // A list of each acknowledgement. + Receipts []types.Receipt + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListPageReceiptsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListPageReceipts{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListPageReceipts{}, 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 = addOpListPageReceiptsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPageReceipts(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 +} + +// ListPageReceiptsAPIClient is a client that implements the ListPageReceipts +// operation. +type ListPageReceiptsAPIClient interface { + ListPageReceipts(context.Context, *ListPageReceiptsInput, ...func(*Options)) (*ListPageReceiptsOutput, error) +} + +var _ ListPageReceiptsAPIClient = (*Client)(nil) + +// ListPageReceiptsPaginatorOptions is the paginator options for ListPageReceipts +type ListPageReceiptsPaginatorOptions struct { + // The maximum number of acknowledgements per page of results. + 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 +} + +// ListPageReceiptsPaginator is a paginator for ListPageReceipts +type ListPageReceiptsPaginator struct { + options ListPageReceiptsPaginatorOptions + client ListPageReceiptsAPIClient + params *ListPageReceiptsInput + nextToken *string + firstPage bool +} + +// NewListPageReceiptsPaginator returns a new ListPageReceiptsPaginator +func NewListPageReceiptsPaginator(client ListPageReceiptsAPIClient, params *ListPageReceiptsInput, optFns ...func(*ListPageReceiptsPaginatorOptions)) *ListPageReceiptsPaginator { + if params == nil { + params = &ListPageReceiptsInput{} + } + + options := ListPageReceiptsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListPageReceiptsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListPageReceiptsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListPageReceipts page. +func (p *ListPageReceiptsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPageReceiptsOutput, 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.ListPageReceipts(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_opListPageReceipts(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "ListPageReceipts", + } +} diff --git a/service/ssmcontacts/api_op_ListPagesByContact.go b/service/ssmcontacts/api_op_ListPagesByContact.go new file mode 100644 index 00000000000..fa77ab2e233 --- /dev/null +++ b/service/ssmcontacts/api_op_ListPagesByContact.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the engagements to a contact's contact channels. +func (c *Client) ListPagesByContact(ctx context.Context, params *ListPagesByContactInput, optFns ...func(*Options)) (*ListPagesByContactOutput, error) { + if params == nil { + params = &ListPagesByContactInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListPagesByContact", params, optFns, addOperationListPagesByContactMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListPagesByContactOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListPagesByContactInput struct { + + // The Amazon Resource Name (ARN) of the contact you are retrieving engagements + // for. + // + // This member is required. + ContactId *string + + // The maximum number of engagements to contact channels to list per page of + // results. + MaxResults *int32 + + // The pagination token to continue to the next page of results. + NextToken *string +} + +type ListPagesByContactOutput struct { + + // The list of engagements to a contact's contact channel. + // + // This member is required. + Pages []types.Page + + // The pagination token to continue to the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListPagesByContactMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListPagesByContact{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListPagesByContact{}, 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 = addOpListPagesByContactValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPagesByContact(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 +} + +// ListPagesByContactAPIClient is a client that implements the ListPagesByContact +// operation. +type ListPagesByContactAPIClient interface { + ListPagesByContact(context.Context, *ListPagesByContactInput, ...func(*Options)) (*ListPagesByContactOutput, error) +} + +var _ ListPagesByContactAPIClient = (*Client)(nil) + +// ListPagesByContactPaginatorOptions is the paginator options for +// ListPagesByContact +type ListPagesByContactPaginatorOptions struct { + // The maximum number of engagements to contact channels to list per page of + // results. + 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 +} + +// ListPagesByContactPaginator is a paginator for ListPagesByContact +type ListPagesByContactPaginator struct { + options ListPagesByContactPaginatorOptions + client ListPagesByContactAPIClient + params *ListPagesByContactInput + nextToken *string + firstPage bool +} + +// NewListPagesByContactPaginator returns a new ListPagesByContactPaginator +func NewListPagesByContactPaginator(client ListPagesByContactAPIClient, params *ListPagesByContactInput, optFns ...func(*ListPagesByContactPaginatorOptions)) *ListPagesByContactPaginator { + if params == nil { + params = &ListPagesByContactInput{} + } + + options := ListPagesByContactPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListPagesByContactPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListPagesByContactPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListPagesByContact page. +func (p *ListPagesByContactPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPagesByContactOutput, 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.ListPagesByContact(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_opListPagesByContact(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "ListPagesByContact", + } +} diff --git a/service/ssmcontacts/api_op_ListPagesByEngagement.go b/service/ssmcontacts/api_op_ListPagesByEngagement.go new file mode 100644 index 00000000000..cad19d4e74b --- /dev/null +++ b/service/ssmcontacts/api_op_ListPagesByEngagement.go @@ -0,0 +1,218 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the engagements to contact channels that occurred by engaging a contact. +func (c *Client) ListPagesByEngagement(ctx context.Context, params *ListPagesByEngagementInput, optFns ...func(*Options)) (*ListPagesByEngagementOutput, error) { + if params == nil { + params = &ListPagesByEngagementInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListPagesByEngagement", params, optFns, addOperationListPagesByEngagementMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListPagesByEngagementOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListPagesByEngagementInput struct { + + // The Amazon Resource Name (ARN) of the engagement. + // + // This member is required. + EngagementId *string + + // The maximum number of engagements to contact channels to list per page of + // results. + MaxResults *int32 + + // The pagination token to continue to the next page of results. + NextToken *string +} + +type ListPagesByEngagementOutput struct { + + // The list of engagements to contact channels. + // + // This member is required. + Pages []types.Page + + // The pagination token to continue to the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListPagesByEngagementMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListPagesByEngagement{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListPagesByEngagement{}, 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 = addOpListPagesByEngagementValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPagesByEngagement(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 +} + +// ListPagesByEngagementAPIClient is a client that implements the +// ListPagesByEngagement operation. +type ListPagesByEngagementAPIClient interface { + ListPagesByEngagement(context.Context, *ListPagesByEngagementInput, ...func(*Options)) (*ListPagesByEngagementOutput, error) +} + +var _ ListPagesByEngagementAPIClient = (*Client)(nil) + +// ListPagesByEngagementPaginatorOptions is the paginator options for +// ListPagesByEngagement +type ListPagesByEngagementPaginatorOptions struct { + // The maximum number of engagements to contact channels to list per page of + // results. + 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 +} + +// ListPagesByEngagementPaginator is a paginator for ListPagesByEngagement +type ListPagesByEngagementPaginator struct { + options ListPagesByEngagementPaginatorOptions + client ListPagesByEngagementAPIClient + params *ListPagesByEngagementInput + nextToken *string + firstPage bool +} + +// NewListPagesByEngagementPaginator returns a new ListPagesByEngagementPaginator +func NewListPagesByEngagementPaginator(client ListPagesByEngagementAPIClient, params *ListPagesByEngagementInput, optFns ...func(*ListPagesByEngagementPaginatorOptions)) *ListPagesByEngagementPaginator { + if params == nil { + params = &ListPagesByEngagementInput{} + } + + options := ListPagesByEngagementPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListPagesByEngagementPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListPagesByEngagementPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListPagesByEngagement page. +func (p *ListPagesByEngagementPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPagesByEngagementOutput, 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.ListPagesByEngagement(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_opListPagesByEngagement(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "ListPagesByEngagement", + } +} diff --git a/service/ssmcontacts/api_op_ListTagsForResource.go b/service/ssmcontacts/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..e903cfc00bf --- /dev/null +++ b/service/ssmcontacts/api_op_ListTagsForResource.go @@ -0,0 +1,117 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the tags of an escalation plan or contact. +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, 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 contact or escalation plan. + // + // This member is required. + ResourceARN *string +} + +type ListTagsForResourceOutput struct { + + // The tags related to the contact or escalation plan. + Tags []types.Tag + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_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: "ssm-contacts", + OperationName: "ListTagsForResource", + } +} diff --git a/service/ssmcontacts/api_op_PutContactPolicy.go b/service/ssmcontacts/api_op_PutContactPolicy.go new file mode 100644 index 00000000000..fd31f33f37d --- /dev/null +++ b/service/ssmcontacts/api_op_PutContactPolicy.go @@ -0,0 +1,117 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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 a resource to the specified contact or escalation plan. +func (c *Client) PutContactPolicy(ctx context.Context, params *PutContactPolicyInput, optFns ...func(*Options)) (*PutContactPolicyOutput, error) { + if params == nil { + params = &PutContactPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutContactPolicy", params, optFns, addOperationPutContactPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutContactPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutContactPolicyInput struct { + + // The Amazon Resource Name (ARN) of the contact or escalation plan. + // + // This member is required. + ContactArn *string + + // Details of the resource policy. + // + // This member is required. + Policy *string +} + +type PutContactPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationPutContactPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutContactPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutContactPolicy{}, 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 = addOpPutContactPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutContactPolicy(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_opPutContactPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "PutContactPolicy", + } +} diff --git a/service/ssmcontacts/api_op_SendActivationCode.go b/service/ssmcontacts/api_op_SendActivationCode.go new file mode 100644 index 00000000000..bb600268724 --- /dev/null +++ b/service/ssmcontacts/api_op_SendActivationCode.go @@ -0,0 +1,114 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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" +) + +// Sends an activation code to a contact channel. The contact can use this code to +// activate the contact channel in the console or with the ActivateChannel action. +// Incident Manager can't engage a contact channel until it has been activated. +func (c *Client) SendActivationCode(ctx context.Context, params *SendActivationCodeInput, optFns ...func(*Options)) (*SendActivationCodeOutput, error) { + if params == nil { + params = &SendActivationCodeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SendActivationCode", params, optFns, addOperationSendActivationCodeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SendActivationCodeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SendActivationCodeInput struct { + + // The Amazon Resource Name (ARN) of the contact channel. + // + // This member is required. + ContactChannelId *string +} + +type SendActivationCodeOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationSendActivationCodeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpSendActivationCode{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpSendActivationCode{}, 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 = addOpSendActivationCodeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendActivationCode(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_opSendActivationCode(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "SendActivationCode", + } +} diff --git a/service/ssmcontacts/api_op_StartEngagement.go b/service/ssmcontacts/api_op_StartEngagement.go new file mode 100644 index 00000000000..244a2d53622 --- /dev/null +++ b/service/ssmcontacts/api_op_StartEngagement.go @@ -0,0 +1,187 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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" +) + +// Starts an engagement to a contact or escalation plan. The engagement engages +// each contact specified in the incident. +func (c *Client) StartEngagement(ctx context.Context, params *StartEngagementInput, optFns ...func(*Options)) (*StartEngagementOutput, error) { + if params == nil { + params = &StartEngagementInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartEngagement", params, optFns, addOperationStartEngagementMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartEngagementOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartEngagementInput struct { + + // The Amazon Resource Name (ARN) of the contact being engaged. + // + // This member is required. + ContactId *string + + // The secure content of the message that was sent to the contact. Use this field + // for engagements to VOICE or EMAIL. + // + // This member is required. + Content *string + + // The user that started the engagement. + // + // This member is required. + Sender *string + + // The secure subject of the message that was sent to the contact. Use this field + // for engagements to VOICE or EMAIL. + // + // This member is required. + Subject *string + + // A token ensuring that the action is called only once with the specified details. + IdempotencyToken *string + + // The ARN of the incident that the engagement is part of. + IncidentId *string + + // The insecure content of the message that was sent to the contact. Use this field + // for engagements to SMS. + PublicContent *string + + // The insecure subject of the message that was sent to the contact. Use this field + // for engagements to SMS. + PublicSubject *string +} + +type StartEngagementOutput struct { + + // The ARN of the engagement. + // + // This member is required. + EngagementArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationStartEngagementMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartEngagement{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartEngagement{}, 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_opStartEngagementMiddleware(stack, options); err != nil { + return err + } + if err = addOpStartEngagementValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartEngagement(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_initializeOpStartEngagement struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpStartEngagement) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpStartEngagement) 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.(*StartEngagementInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *StartEngagementInput ") + } + + if input.IdempotencyToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.IdempotencyToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opStartEngagementMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpStartEngagement{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opStartEngagement(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "StartEngagement", + } +} diff --git a/service/ssmcontacts/api_op_StopEngagement.go b/service/ssmcontacts/api_op_StopEngagement.go new file mode 100644 index 00000000000..952efbbdd76 --- /dev/null +++ b/service/ssmcontacts/api_op_StopEngagement.go @@ -0,0 +1,116 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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" +) + +// Stops an engagement before it finishes the final stage of the escalation plan or +// engagement plan. Further contacts aren't engaged. +func (c *Client) StopEngagement(ctx context.Context, params *StopEngagementInput, optFns ...func(*Options)) (*StopEngagementOutput, error) { + if params == nil { + params = &StopEngagementInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StopEngagement", params, optFns, addOperationStopEngagementMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StopEngagementOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StopEngagementInput struct { + + // The Amazon Resource Name (ARN) of the engagement. + // + // This member is required. + EngagementId *string + + // The reason that you're stopping the engagement. + Reason *string +} + +type StopEngagementOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationStopEngagementMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStopEngagement{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStopEngagement{}, 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 = addOpStopEngagementValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopEngagement(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_opStopEngagement(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "StopEngagement", + } +} diff --git a/service/ssmcontacts/api_op_TagResource.go b/service/ssmcontacts/api_op_TagResource.go new file mode 100644 index 00000000000..f75b1f8e166 --- /dev/null +++ b/service/ssmcontacts/api_op_TagResource.go @@ -0,0 +1,119 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Tags a contact or escalation plan. You can tag only contacts and escalation +// plans in the first region of your replication set. +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, 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 contact or escalation plan. + // + // This member is required. + ResourceARN *string + + // A list of tags that you are adding to the contact or escalation plan. + // + // This member is required. + Tags []types.Tag +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_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: "ssm-contacts", + OperationName: "TagResource", + } +} diff --git a/service/ssmcontacts/api_op_UntagResource.go b/service/ssmcontacts/api_op_UntagResource.go new file mode 100644 index 00000000000..245a47899fe --- /dev/null +++ b/service/ssmcontacts/api_op_UntagResource.go @@ -0,0 +1,117 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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 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, 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 contact or escalation plan. + // + // This member is required. + ResourceARN *string + + // The key of the tag that you want to remove. + // + // This member is required. + TagKeys []string +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_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: "ssm-contacts", + OperationName: "UntagResource", + } +} diff --git a/service/ssmcontacts/api_op_UpdateContact.go b/service/ssmcontacts/api_op_UpdateContact.go new file mode 100644 index 00000000000..320d46717fd --- /dev/null +++ b/service/ssmcontacts/api_op_UpdateContact.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the contact or escalation plan specified. +func (c *Client) UpdateContact(ctx context.Context, params *UpdateContactInput, optFns ...func(*Options)) (*UpdateContactOutput, error) { + if params == nil { + params = &UpdateContactInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateContact", params, optFns, addOperationUpdateContactMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateContactOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateContactInput struct { + + // The Amazon Resource Name (ARN) of the contact or escalation plan you're + // updating. + // + // This member is required. + ContactId *string + + // The full name of the contact or escalation plan. + DisplayName *string + + // A list of stages. A contact has an engagement plan with stages for specified + // contact channels. An escalation plan uses these stages to contact specified + // contacts. + Plan *types.Plan +} + +type UpdateContactOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationUpdateContactMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateContact{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateContact{}, 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 = addOpUpdateContactValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateContact(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_opUpdateContact(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "UpdateContact", + } +} diff --git a/service/ssmcontacts/api_op_UpdateContactChannel.go b/service/ssmcontacts/api_op_UpdateContactChannel.go new file mode 100644 index 00000000000..833251609e5 --- /dev/null +++ b/service/ssmcontacts/api_op_UpdateContactChannel.go @@ -0,0 +1,120 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a contact's contact channel. +func (c *Client) UpdateContactChannel(ctx context.Context, params *UpdateContactChannelInput, optFns ...func(*Options)) (*UpdateContactChannelOutput, error) { + if params == nil { + params = &UpdateContactChannelInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateContactChannel", params, optFns, addOperationUpdateContactChannelMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateContactChannelOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateContactChannelInput struct { + + // The Amazon Resource Name (ARN) of the contact channel you want to update. + // + // This member is required. + ContactChannelId *string + + // The details that Incident Manager uses when trying to engage the contact + // channel. + DeliveryAddress *types.ContactChannelAddress + + // The name of the contact channel + Name *string +} + +type UpdateContactChannelOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata +} + +func addOperationUpdateContactChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateContactChannel{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateContactChannel{}, 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 = addOpUpdateContactChannelValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateContactChannel(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_opUpdateContactChannel(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ssm-contacts", + OperationName: "UpdateContactChannel", + } +} diff --git a/service/ssmcontacts/deserializers.go b/service/ssmcontacts/deserializers.go new file mode 100644 index 00000000000..bfe8ebda7cf --- /dev/null +++ b/service/ssmcontacts/deserializers.go @@ -0,0 +1,6486 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/ssmcontacts/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" + "strings" +) + +type awsAwsjson11_deserializeOpAcceptPage struct { +} + +func (*awsAwsjson11_deserializeOpAcceptPage) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpAcceptPage) HandleDeserialize(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_deserializeOpErrorAcceptPage(response, &metadata) + } + output := &AcceptPageOutput{} + 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_deserializeOpDocumentAcceptPageOutput(&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_deserializeOpErrorAcceptPage(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpActivateContactChannel struct { +} + +func (*awsAwsjson11_deserializeOpActivateContactChannel) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpActivateContactChannel) HandleDeserialize(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_deserializeOpErrorActivateContactChannel(response, &metadata) + } + output := &ActivateContactChannelOutput{} + 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_deserializeOpDocumentActivateContactChannelOutput(&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_deserializeOpErrorActivateContactChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateContact struct { +} + +func (*awsAwsjson11_deserializeOpCreateContact) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateContact) HandleDeserialize(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_deserializeOpErrorCreateContact(response, &metadata) + } + output := &CreateContactOutput{} + 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_deserializeOpDocumentCreateContactOutput(&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_deserializeOpErrorCreateContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DataEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorDataEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateContactChannel struct { +} + +func (*awsAwsjson11_deserializeOpCreateContactChannel) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateContactChannel) HandleDeserialize(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_deserializeOpErrorCreateContactChannel(response, &metadata) + } + output := &CreateContactChannelOutput{} + 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_deserializeOpDocumentCreateContactChannelOutput(&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_deserializeOpErrorCreateContactChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DataEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorDataEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeactivateContactChannel struct { +} + +func (*awsAwsjson11_deserializeOpDeactivateContactChannel) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeactivateContactChannel) HandleDeserialize(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_deserializeOpErrorDeactivateContactChannel(response, &metadata) + } + output := &DeactivateContactChannelOutput{} + 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_deserializeOpDocumentDeactivateContactChannelOutput(&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_deserializeOpErrorDeactivateContactChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteContact struct { +} + +func (*awsAwsjson11_deserializeOpDeleteContact) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteContact) HandleDeserialize(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_deserializeOpErrorDeleteContact(response, &metadata) + } + output := &DeleteContactOutput{} + 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_deserializeOpDocumentDeleteContactOutput(&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_deserializeOpErrorDeleteContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteContactChannel struct { +} + +func (*awsAwsjson11_deserializeOpDeleteContactChannel) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteContactChannel) HandleDeserialize(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_deserializeOpErrorDeleteContactChannel(response, &metadata) + } + output := &DeleteContactChannelOutput{} + 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_deserializeOpDocumentDeleteContactChannelOutput(&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_deserializeOpErrorDeleteContactChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeEngagement struct { +} + +func (*awsAwsjson11_deserializeOpDescribeEngagement) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeEngagement) HandleDeserialize(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_deserializeOpErrorDescribeEngagement(response, &metadata) + } + output := &DescribeEngagementOutput{} + 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_deserializeOpDocumentDescribeEngagementOutput(&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_deserializeOpErrorDescribeEngagement(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorDataEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribePage struct { +} + +func (*awsAwsjson11_deserializeOpDescribePage) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribePage) HandleDeserialize(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_deserializeOpErrorDescribePage(response, &metadata) + } + output := &DescribePageOutput{} + 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_deserializeOpDocumentDescribePageOutput(&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_deserializeOpErrorDescribePage(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorDataEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetContact struct { +} + +func (*awsAwsjson11_deserializeOpGetContact) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetContact) HandleDeserialize(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_deserializeOpErrorGetContact(response, &metadata) + } + output := &GetContactOutput{} + 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_deserializeOpDocumentGetContactOutput(&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_deserializeOpErrorGetContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorDataEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetContactChannel struct { +} + +func (*awsAwsjson11_deserializeOpGetContactChannel) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetContactChannel) HandleDeserialize(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_deserializeOpErrorGetContactChannel(response, &metadata) + } + output := &GetContactChannelOutput{} + 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_deserializeOpDocumentGetContactChannelOutput(&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_deserializeOpErrorGetContactChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorDataEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetContactPolicy struct { +} + +func (*awsAwsjson11_deserializeOpGetContactPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetContactPolicy) HandleDeserialize(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_deserializeOpErrorGetContactPolicy(response, &metadata) + } + output := &GetContactPolicyOutput{} + 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_deserializeOpDocumentGetContactPolicyOutput(&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_deserializeOpErrorGetContactPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListContactChannels struct { +} + +func (*awsAwsjson11_deserializeOpListContactChannels) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListContactChannels) HandleDeserialize(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_deserializeOpErrorListContactChannels(response, &metadata) + } + output := &ListContactChannelsOutput{} + 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_deserializeOpDocumentListContactChannelsOutput(&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_deserializeOpErrorListContactChannels(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorDataEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListContacts struct { +} + +func (*awsAwsjson11_deserializeOpListContacts) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListContacts) HandleDeserialize(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_deserializeOpErrorListContacts(response, &metadata) + } + output := &ListContactsOutput{} + 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_deserializeOpDocumentListContactsOutput(&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_deserializeOpErrorListContacts(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListEngagements struct { +} + +func (*awsAwsjson11_deserializeOpListEngagements) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListEngagements) HandleDeserialize(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_deserializeOpErrorListEngagements(response, &metadata) + } + output := &ListEngagementsOutput{} + 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_deserializeOpDocumentListEngagementsOutput(&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_deserializeOpErrorListEngagements(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListPageReceipts struct { +} + +func (*awsAwsjson11_deserializeOpListPageReceipts) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListPageReceipts) HandleDeserialize(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_deserializeOpErrorListPageReceipts(response, &metadata) + } + output := &ListPageReceiptsOutput{} + 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_deserializeOpDocumentListPageReceiptsOutput(&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_deserializeOpErrorListPageReceipts(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListPagesByContact struct { +} + +func (*awsAwsjson11_deserializeOpListPagesByContact) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListPagesByContact) HandleDeserialize(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_deserializeOpErrorListPagesByContact(response, &metadata) + } + output := &ListPagesByContactOutput{} + 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_deserializeOpDocumentListPagesByContactOutput(&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_deserializeOpErrorListPagesByContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListPagesByEngagement struct { +} + +func (*awsAwsjson11_deserializeOpListPagesByEngagement) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListPagesByEngagement) HandleDeserialize(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_deserializeOpErrorListPagesByEngagement(response, &metadata) + } + output := &ListPagesByEngagementOutput{} + 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_deserializeOpDocumentListPagesByEngagementOutput(&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_deserializeOpErrorListPagesByEngagement(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListTagsForResource struct { +} + +func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +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) + 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_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 = awsAwsjson11_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 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)} + } + 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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutContactPolicy struct { +} + +func (*awsAwsjson11_deserializeOpPutContactPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutContactPolicy) HandleDeserialize(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_deserializeOpErrorPutContactPolicy(response, &metadata) + } + output := &PutContactPolicyOutput{} + 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_deserializeOpDocumentPutContactPolicyOutput(&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_deserializeOpErrorPutContactPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpSendActivationCode struct { +} + +func (*awsAwsjson11_deserializeOpSendActivationCode) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpSendActivationCode) HandleDeserialize(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_deserializeOpErrorSendActivationCode(response, &metadata) + } + output := &SendActivationCodeOutput{} + 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_deserializeOpDocumentSendActivationCodeOutput(&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_deserializeOpErrorSendActivationCode(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorDataEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartEngagement struct { +} + +func (*awsAwsjson11_deserializeOpStartEngagement) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartEngagement) HandleDeserialize(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_deserializeOpErrorStartEngagement(response, &metadata) + } + output := &StartEngagementOutput{} + 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_deserializeOpDocumentStartEngagementOutput(&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_deserializeOpErrorStartEngagement(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorDataEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStopEngagement struct { +} + +func (*awsAwsjson11_deserializeOpStopEngagement) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStopEngagement) HandleDeserialize(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_deserializeOpErrorStopEngagement(response, &metadata) + } + output := &StopEngagementOutput{} + 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_deserializeOpDocumentStopEngagementOutput(&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_deserializeOpErrorStopEngagement(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpTagResource struct { +} + +func (*awsAwsjson11_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +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 + } + + 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_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 = awsAwsjson11_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 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() + 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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +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 { + 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_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 = awsAwsjson11_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 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() + 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("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateContact struct { +} + +func (*awsAwsjson11_deserializeOpUpdateContact) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateContact) HandleDeserialize(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_deserializeOpErrorUpdateContact(response, &metadata) + } + output := &UpdateContactOutput{} + 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_deserializeOpDocumentUpdateContactOutput(&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_deserializeOpErrorUpdateContact(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("DataEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorDataEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateContactChannel struct { +} + +func (*awsAwsjson11_deserializeOpUpdateContactChannel) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateContactChannel) HandleDeserialize(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_deserializeOpErrorUpdateContactChannel(response, &metadata) + } + output := &UpdateContactChannelOutput{} + 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_deserializeOpDocumentUpdateContactChannelOutput(&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_deserializeOpErrorUpdateContactChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("DataEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorDataEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson11_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 := awsAwsjson11_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 awsAwsjson11_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 := awsAwsjson11_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 awsAwsjson11_deserializeErrorDataEncryptionException(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.DataEncryptionException{} + err := awsAwsjson11_deserializeDocumentDataEncryptionException(&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_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 := awsAwsjson11_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 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_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 := awsAwsjson11_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 awsAwsjson11_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 := awsAwsjson11_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 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_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 awsAwsjson11_deserializeDocumentChannelTargetInfo(v **types.ChannelTargetInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ChannelTargetInfo + if *v == nil { + sv = &types.ChannelTargetInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactChannelId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactChannelId = ptr.String(jtv) + } + + case "RetryIntervalInMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RetryIntervalInMinutes to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RetryIntervalInMinutes = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_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 awsAwsjson11_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 "Alias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactAlias to be of type string, got %T instead", value) + } + sv.Alias = ptr.String(jtv) + } + + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } + + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactType to be of type string, got %T instead", value) + } + sv.Type = types.ContactType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContactChannel(v **types.ContactChannel, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ContactChannel + if *v == nil { + sv = &types.ContactChannel{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActivationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActivationStatus to be of type string, got %T instead", value) + } + sv.ActivationStatus = types.ActivationStatus(jtv) + } + + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } + + case "ContactChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactChannelArn = ptr.String(jtv) + } + + case "DeliveryAddress": + if err := awsAwsjson11_deserializeDocumentContactChannelAddress(&sv.DeliveryAddress, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelName 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 ChannelType to be of type string, got %T instead", value) + } + sv.Type = types.ChannelType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContactChannelAddress(v **types.ContactChannelAddress, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ContactChannelAddress + if *v == nil { + sv = &types.ContactChannelAddress{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SimpleAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SimpleAddress to be of type string, got %T instead", value) + } + sv.SimpleAddress = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContactChannelList(v *[]types.ContactChannel, 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.ContactChannel + if *v == nil { + cv = []types.ContactChannel{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ContactChannel + destAddr := &col + if err := awsAwsjson11_deserializeDocumentContactChannel(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentContactsList(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.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Contact + if *v == nil { + cv = []types.Contact{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Contact + destAddr := &col + if err := awsAwsjson11_deserializeDocumentContact(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentContactTargetInfo(v **types.ContactTargetInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ContactTargetInfo + if *v == nil { + sv = &types.ContactTargetInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactId = ptr.String(jtv) + } + + case "IsEssential": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected IsEssential to be of type *bool, got %T instead", value) + } + sv.IsEssential = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDataEncryptionException(v **types.DataEncryptionException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DataEncryptionException + if *v == nil { + sv = &types.DataEncryptionException{} + } 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 awsAwsjson11_deserializeDocumentEngagement(v **types.Engagement, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Engagement + if *v == nil { + sv = &types.Engagement{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } + + case "EngagementArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.EngagementArn = ptr.String(jtv) + } + + case "IncidentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncidentId to be of type string, got %T instead", value) + } + sv.IncidentId = ptr.String(jtv) + } + + case "Sender": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Sender to be of type string, got %T instead", value) + } + sv.Sender = ptr.String(jtv) + } + + case "StartTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "StopTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StopTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEngagementsList(v *[]types.Engagement, 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.Engagement + if *v == nil { + cv = []types.Engagement{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Engagement + destAddr := &col + if err := awsAwsjson11_deserializeDocumentEngagement(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_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 RetryAfterSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RetryAfterSeconds = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPage(v **types.Page, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Page + if *v == nil { + sv = &types.Page{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } + + case "DeliveryTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DeliveryTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "EngagementArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.EngagementArn = ptr.String(jtv) + } + + case "IncidentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncidentId to be of type string, got %T instead", value) + } + sv.IncidentId = ptr.String(jtv) + } + + case "PageArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.PageArn = ptr.String(jtv) + } + + case "ReadTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ReadTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "Sender": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Sender to be of type string, got %T instead", value) + } + sv.Sender = ptr.String(jtv) + } + + case "SentTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SentTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPagesList(v *[]types.Page, 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.Page + if *v == nil { + cv = []types.Page{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Page + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPage(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPlan(v **types.Plan, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Plan + if *v == nil { + sv = &types.Plan{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Stages": + if err := awsAwsjson11_deserializeDocumentStagesList(&sv.Stages, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentReceipt(v **types.Receipt, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Receipt + if *v == nil { + sv = &types.Receipt{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactChannelArn = ptr.String(jtv) + } + + case "ReceiptInfo": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReceiptInfo to be of type string, got %T instead", value) + } + sv.ReceiptInfo = ptr.String(jtv) + } + + case "ReceiptTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ReceiptTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "ReceiptType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReceiptType to be of type string, got %T instead", value) + } + sv.ReceiptType = types.ReceiptType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentReceiptsList(v *[]types.Receipt, 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.Receipt + if *v == nil { + cv = []types.Receipt{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Receipt + destAddr := &col + if err := awsAwsjson11_deserializeDocumentReceipt(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_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 awsAwsjson11_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 awsAwsjson11_deserializeDocumentStage(v **types.Stage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Stage + if *v == nil { + sv = &types.Stage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DurationInMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StageDurationInMins to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DurationInMinutes = ptr.Int32(int32(i64)) + } + + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargetsList(&sv.Targets, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentStagesList(v *[]types.Stage, 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.Stage + if *v == nil { + cv = []types.Stage{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Stage + destAddr := &col + if err := awsAwsjson11_deserializeDocumentStage(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_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 awsAwsjson11_deserializeDocumentTagsList(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 := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTarget(v **types.Target, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Target + if *v == nil { + sv = &types.Target{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelTargetInfo": + if err := awsAwsjson11_deserializeDocumentChannelTargetInfo(&sv.ChannelTargetInfo, value); err != nil { + return err + } + + case "ContactTargetInfo": + if err := awsAwsjson11_deserializeDocumentContactTargetInfo(&sv.ContactTargetInfo, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetsList(v *[]types.Target, 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.Target + if *v == nil { + cv = []types.Target{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Target + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTarget(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_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 awsAwsjson11_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 := awsAwsjson11_deserializeDocumentValidationExceptionFieldList(&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 awsAwsjson11_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 awsAwsjson11_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 := awsAwsjson11_deserializeDocumentValidationExceptionField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeOpDocumentAcceptPageOutput(v **AcceptPageOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AcceptPageOutput + if *v == nil { + sv = &AcceptPageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentActivateContactChannelOutput(v **ActivateContactChannelOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ActivateContactChannelOutput + if *v == nil { + sv = &ActivateContactChannelOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateContactChannelOutput(v **CreateContactChannelOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateContactChannelOutput + if *v == nil { + sv = &CreateContactChannelOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactChannelArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateContactOutput(v **CreateContactOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateContactOutput + if *v == nil { + sv = &CreateContactOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeactivateContactChannelOutput(v **DeactivateContactChannelOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeactivateContactChannelOutput + if *v == nil { + sv = &DeactivateContactChannelOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteContactChannelOutput(v **DeleteContactChannelOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteContactChannelOutput + if *v == nil { + sv = &DeleteContactChannelOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteContactOutput(v **DeleteContactOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteContactOutput + if *v == nil { + sv = &DeleteContactOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeEngagementOutput(v **DescribeEngagementOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeEngagementOutput + if *v == nil { + sv = &DescribeEngagementOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } + + case "Content": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Content to be of type string, got %T instead", value) + } + sv.Content = ptr.String(jtv) + } + + case "EngagementArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.EngagementArn = ptr.String(jtv) + } + + case "IncidentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncidentId to be of type string, got %T instead", value) + } + sv.IncidentId = ptr.String(jtv) + } + + case "PublicContent": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PublicContent to be of type string, got %T instead", value) + } + sv.PublicContent = ptr.String(jtv) + } + + case "PublicSubject": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PublicSubject to be of type string, got %T instead", value) + } + sv.PublicSubject = ptr.String(jtv) + } + + case "Sender": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Sender to be of type string, got %T instead", value) + } + sv.Sender = ptr.String(jtv) + } + + case "StartTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "StopTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StopTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "Subject": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Subject to be of type string, got %T instead", value) + } + sv.Subject = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribePageOutput(v **DescribePageOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribePageOutput + if *v == nil { + sv = &DescribePageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } + + case "Content": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Content to be of type string, got %T instead", value) + } + sv.Content = ptr.String(jtv) + } + + case "DeliveryTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DeliveryTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "EngagementArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.EngagementArn = ptr.String(jtv) + } + + case "IncidentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncidentId to be of type string, got %T instead", value) + } + sv.IncidentId = ptr.String(jtv) + } + + case "PageArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.PageArn = ptr.String(jtv) + } + + case "PublicContent": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PublicContent to be of type string, got %T instead", value) + } + sv.PublicContent = ptr.String(jtv) + } + + case "PublicSubject": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PublicSubject to be of type string, got %T instead", value) + } + sv.PublicSubject = ptr.String(jtv) + } + + case "ReadTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ReadTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "Sender": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Sender to be of type string, got %T instead", value) + } + sv.Sender = ptr.String(jtv) + } + + case "SentTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DateTime to be json.Number, got %T instead", value) + } + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SentTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + } + + case "Subject": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Subject to be of type string, got %T instead", value) + } + sv.Subject = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetContactChannelOutput(v **GetContactChannelOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetContactChannelOutput + if *v == nil { + sv = &GetContactChannelOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActivationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActivationStatus to be of type string, got %T instead", value) + } + sv.ActivationStatus = types.ActivationStatus(jtv) + } + + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } + + case "ContactChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactChannelArn = ptr.String(jtv) + } + + case "DeliveryAddress": + if err := awsAwsjson11_deserializeDocumentContactChannelAddress(&sv.DeliveryAddress, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelName 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 ChannelType to be of type string, got %T instead", value) + } + sv.Type = types.ChannelType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetContactOutput(v **GetContactOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetContactOutput + if *v == nil { + sv = &GetContactOutput{} + } 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 ContactAlias to be of type string, got %T instead", value) + } + sv.Alias = ptr.String(jtv) + } + + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } + + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactName to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "Plan": + if err := awsAwsjson11_deserializeDocumentPlan(&sv.Plan, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContactType to be of type string, got %T instead", value) + } + sv.Type = types.ContactType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetContactPolicyOutput(v **GetContactPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetContactPolicyOutput + if *v == nil { + sv = &GetContactPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.ContactArn = ptr.String(jtv) + } + + case "Policy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Policy to be of type string, got %T instead", value) + } + sv.Policy = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListContactChannelsOutput(v **ListContactChannelsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListContactChannelsOutput + if *v == nil { + sv = &ListContactChannelsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContactChannels": + if err := awsAwsjson11_deserializeDocumentContactChannelList(&sv.ContactChannels, 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 +} + +func awsAwsjson11_deserializeOpDocumentListContactsOutput(v **ListContactsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListContactsOutput + if *v == nil { + sv = &ListContactsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Contacts": + if err := awsAwsjson11_deserializeDocumentContactsList(&sv.Contacts, 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 +} + +func awsAwsjson11_deserializeOpDocumentListEngagementsOutput(v **ListEngagementsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListEngagementsOutput + if *v == nil { + sv = &ListEngagementsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Engagements": + if err := awsAwsjson11_deserializeDocumentEngagementsList(&sv.Engagements, 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 +} + +func awsAwsjson11_deserializeOpDocumentListPageReceiptsOutput(v **ListPageReceiptsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListPageReceiptsOutput + if *v == nil { + sv = &ListPageReceiptsOutput{} + } 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 PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Receipts": + if err := awsAwsjson11_deserializeDocumentReceiptsList(&sv.Receipts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListPagesByContactOutput(v **ListPagesByContactOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListPagesByContactOutput + if *v == nil { + sv = &ListPagesByContactOutput{} + } 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 PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Pages": + if err := awsAwsjson11_deserializeDocumentPagesList(&sv.Pages, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListPagesByEngagementOutput(v **ListPagesByEngagementOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListPagesByEngagementOutput + if *v == nil { + sv = &ListPagesByEngagementOutput{} + } 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 PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Pages": + if err := awsAwsjson11_deserializeDocumentPagesList(&sv.Pages, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_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 := awsAwsjson11_deserializeDocumentTagsList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutContactPolicyOutput(v **PutContactPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutContactPolicyOutput + if *v == nil { + sv = &PutContactPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentSendActivationCodeOutput(v **SendActivationCodeOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SendActivationCodeOutput + if *v == nil { + sv = &SendActivationCodeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStartEngagementOutput(v **StartEngagementOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartEngagementOutput + if *v == nil { + sv = &StartEngagementOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EngagementArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmContactsArn to be of type string, got %T instead", value) + } + sv.EngagementArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStopEngagementOutput(v **StopEngagementOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StopEngagementOutput + if *v == nil { + sv = &StopEngagementOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_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 awsAwsjson11_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 +} + +func awsAwsjson11_deserializeOpDocumentUpdateContactChannelOutput(v **UpdateContactChannelOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateContactChannelOutput + if *v == nil { + sv = &UpdateContactChannelOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateContactOutput(v **UpdateContactOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateContactOutput + if *v == nil { + sv = &UpdateContactOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/ssmcontacts/doc.go b/service/ssmcontacts/doc.go new file mode 100644 index 00000000000..ad32b556904 --- /dev/null +++ b/service/ssmcontacts/doc.go @@ -0,0 +1,7 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package ssmcontacts provides the API client, operations, and parameter types for +// AWS Systems Manager Incident Manager Contacts. +// +// +package ssmcontacts diff --git a/service/ssmcontacts/endpoints.go b/service/ssmcontacts/endpoints.go new file mode 100644 index 00000000000..3ffb4ae13cd --- /dev/null +++ b/service/ssmcontacts/endpoints.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +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/ssmcontacts/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" +) + +// 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") + } + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), m.Options) + 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 = "ssm-contacts" + } + 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.EndpointResolver + 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) + 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) +} + +// 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. +// awsResolver and fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver { + return &wrappedEndpointResolver{ + awsResolver: awsResolver, + resolver: fallbackResolver, + } +} diff --git a/service/ssmcontacts/generated.json b/service/ssmcontacts/generated.json new file mode 100644 index 00000000000..31c7940bd60 --- /dev/null +++ b/service/ssmcontacts/generated.json @@ -0,0 +1,51 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_op_AcceptPage.go", + "api_op_ActivateContactChannel.go", + "api_op_CreateContact.go", + "api_op_CreateContactChannel.go", + "api_op_DeactivateContactChannel.go", + "api_op_DeleteContact.go", + "api_op_DeleteContactChannel.go", + "api_op_DescribeEngagement.go", + "api_op_DescribePage.go", + "api_op_GetContact.go", + "api_op_GetContactChannel.go", + "api_op_GetContactPolicy.go", + "api_op_ListContactChannels.go", + "api_op_ListContacts.go", + "api_op_ListEngagements.go", + "api_op_ListPageReceipts.go", + "api_op_ListPagesByContact.go", + "api_op_ListPagesByEngagement.go", + "api_op_ListTagsForResource.go", + "api_op_PutContactPolicy.go", + "api_op_SendActivationCode.go", + "api_op_StartEngagement.go", + "api_op_StopEngagement.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "api_op_UpdateContact.go", + "api_op_UpdateContactChannel.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/ssmcontacts", + "unstable": false +} diff --git a/service/ssmcontacts/go.mod b/service/ssmcontacts/go.mod new file mode 100644 index 00000000000..22048461d4d --- /dev/null +++ b/service/ssmcontacts/go.mod @@ -0,0 +1,10 @@ +module github.com/aws/aws-sdk-go-v2/service/ssmcontacts + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.4.0 + github.com/aws/smithy-go v1.4.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/ssmcontacts/go.sum b/service/ssmcontacts/go.sum new file mode 100644 index 00000000000..49e393e44d1 --- /dev/null +++ b/service/ssmcontacts/go.sum @@ -0,0 +1,13 @@ +github.com/aws/smithy-go v1.4.0 h1:3rsQpgRe+OoQgJhEwGNpIkosl0fJLdmQqF4gSFRjg+4= +github.com/aws/smithy-go v1.4.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 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.4/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/ssmcontacts/go_module_metadata.go b/service/ssmcontacts/go_module_metadata.go new file mode 100644 index 00000000000..3f27d204a76 --- /dev/null +++ b/service/ssmcontacts/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package ssmcontacts + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/ssmcontacts/internal/endpoints/endpoints.go b/service/ssmcontacts/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..494c0809622 --- /dev/null +++ b/service/ssmcontacts/internal/endpoints/endpoints.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + DisableHTTPS bool +} + +// Resolver SSM Contacts 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 := endpoints.Options{ + DisableHTTPS: options.DisableHTTPS, + } + 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: endpoints.Endpoint{ + Hostname: "ssm-contacts.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + }, + { + ID: "aws-cn", + Defaults: endpoints.Endpoint{ + Hostname: "ssm-contacts.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: endpoints.Endpoint{ + Hostname: "ssm-contacts.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: endpoints.Endpoint{ + Hostname: "ssm-contacts.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: endpoints.Endpoint{ + Hostname: "ssm-contacts.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/ssmcontacts/internal/endpoints/endpoints_test.go b/service/ssmcontacts/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/ssmcontacts/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/ssmcontacts/protocol_test.go b/service/ssmcontacts/protocol_test.go new file mode 100644 index 00000000000..3f779ac61f3 --- /dev/null +++ b/service/ssmcontacts/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts diff --git a/service/ssmcontacts/serializers.go b/service/ssmcontacts/serializers.go new file mode 100644 index 00000000000..37670411ff9 --- /dev/null +++ b/service/ssmcontacts/serializers.go @@ -0,0 +1,2028 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/ssmcontacts/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" +) + +type awsAwsjson11_serializeOpAcceptPage struct { +} + +func (*awsAwsjson11_serializeOpAcceptPage) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpAcceptPage) 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.(*AcceptPageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.AcceptPage") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentAcceptPageInput(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_serializeOpActivateContactChannel struct { +} + +func (*awsAwsjson11_serializeOpActivateContactChannel) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpActivateContactChannel) 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.(*ActivateContactChannelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.ActivateContactChannel") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentActivateContactChannelInput(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_serializeOpCreateContact struct { +} + +func (*awsAwsjson11_serializeOpCreateContact) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateContact) 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.(*CreateContactInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.CreateContact") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateContactInput(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_serializeOpCreateContactChannel struct { +} + +func (*awsAwsjson11_serializeOpCreateContactChannel) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateContactChannel) 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.(*CreateContactChannelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.CreateContactChannel") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateContactChannelInput(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_serializeOpDeactivateContactChannel struct { +} + +func (*awsAwsjson11_serializeOpDeactivateContactChannel) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeactivateContactChannel) 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.(*DeactivateContactChannelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.DeactivateContactChannel") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeactivateContactChannelInput(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_serializeOpDeleteContact struct { +} + +func (*awsAwsjson11_serializeOpDeleteContact) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteContact) 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.(*DeleteContactInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.DeleteContact") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteContactInput(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_serializeOpDeleteContactChannel struct { +} + +func (*awsAwsjson11_serializeOpDeleteContactChannel) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteContactChannel) 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.(*DeleteContactChannelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.DeleteContactChannel") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteContactChannelInput(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_serializeOpDescribeEngagement struct { +} + +func (*awsAwsjson11_serializeOpDescribeEngagement) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeEngagement) 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.(*DescribeEngagementInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.DescribeEngagement") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeEngagementInput(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_serializeOpDescribePage struct { +} + +func (*awsAwsjson11_serializeOpDescribePage) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribePage) 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.(*DescribePageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.DescribePage") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribePageInput(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_serializeOpGetContact struct { +} + +func (*awsAwsjson11_serializeOpGetContact) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetContact) 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.(*GetContactInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.GetContact") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetContactInput(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_serializeOpGetContactChannel struct { +} + +func (*awsAwsjson11_serializeOpGetContactChannel) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetContactChannel) 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.(*GetContactChannelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.GetContactChannel") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetContactChannelInput(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_serializeOpGetContactPolicy struct { +} + +func (*awsAwsjson11_serializeOpGetContactPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetContactPolicy) 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.(*GetContactPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.GetContactPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetContactPolicyInput(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_serializeOpListContactChannels struct { +} + +func (*awsAwsjson11_serializeOpListContactChannels) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListContactChannels) 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.(*ListContactChannelsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.ListContactChannels") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListContactChannelsInput(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_serializeOpListContacts struct { +} + +func (*awsAwsjson11_serializeOpListContacts) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListContacts) 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.(*ListContactsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.ListContacts") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListContactsInput(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_serializeOpListEngagements struct { +} + +func (*awsAwsjson11_serializeOpListEngagements) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListEngagements) 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.(*ListEngagementsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.ListEngagements") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListEngagementsInput(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_serializeOpListPageReceipts struct { +} + +func (*awsAwsjson11_serializeOpListPageReceipts) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListPageReceipts) 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.(*ListPageReceiptsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.ListPageReceipts") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListPageReceiptsInput(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_serializeOpListPagesByContact struct { +} + +func (*awsAwsjson11_serializeOpListPagesByContact) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListPagesByContact) 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.(*ListPagesByContactInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.ListPagesByContact") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListPagesByContactInput(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_serializeOpListPagesByEngagement struct { +} + +func (*awsAwsjson11_serializeOpListPagesByEngagement) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListPagesByEngagement) 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.(*ListPagesByEngagementInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.ListPagesByEngagement") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListPagesByEngagementInput(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_serializeOpListTagsForResource struct { +} + +func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_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)} + } + + 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("SSMContacts.ListTagsForResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_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 awsAwsjson11_serializeOpPutContactPolicy struct { +} + +func (*awsAwsjson11_serializeOpPutContactPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutContactPolicy) 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.(*PutContactPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.PutContactPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutContactPolicyInput(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_serializeOpSendActivationCode struct { +} + +func (*awsAwsjson11_serializeOpSendActivationCode) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpSendActivationCode) 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.(*SendActivationCodeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.SendActivationCode") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentSendActivationCodeInput(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_serializeOpStartEngagement struct { +} + +func (*awsAwsjson11_serializeOpStartEngagement) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartEngagement) 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.(*StartEngagementInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.StartEngagement") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartEngagementInput(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_serializeOpStopEngagement struct { +} + +func (*awsAwsjson11_serializeOpStopEngagement) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStopEngagement) 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.(*StopEngagementInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.StopEngagement") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStopEngagementInput(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_serializeOpTagResource struct { +} + +func (*awsAwsjson11_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_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)} + } + + 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("SSMContacts.TagResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_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 awsAwsjson11_serializeOpUntagResource struct { +} + +func (*awsAwsjson11_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_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)} + } + + 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("SSMContacts.UntagResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_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 awsAwsjson11_serializeOpUpdateContact struct { +} + +func (*awsAwsjson11_serializeOpUpdateContact) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateContact) 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.(*UpdateContactInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.UpdateContact") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateContactInput(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_serializeOpUpdateContactChannel struct { +} + +func (*awsAwsjson11_serializeOpUpdateContactChannel) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateContactChannel) 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.(*UpdateContactChannelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + 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("SSMContacts.UpdateContactChannel") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateContactChannelInput(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_serializeDocumentChannelTargetInfo(v *types.ChannelTargetInfo, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactChannelId != nil { + ok := object.Key("ContactChannelId") + ok.String(*v.ContactChannelId) + } + + if v.RetryIntervalInMinutes != nil { + ok := object.Key("RetryIntervalInMinutes") + ok.Integer(*v.RetryIntervalInMinutes) + } + + return nil +} + +func awsAwsjson11_serializeDocumentContactChannelAddress(v *types.ContactChannelAddress, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SimpleAddress != nil { + ok := object.Key("SimpleAddress") + ok.String(*v.SimpleAddress) + } + + return nil +} + +func awsAwsjson11_serializeDocumentContactTargetInfo(v *types.ContactTargetInfo, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactId != nil { + ok := object.Key("ContactId") + ok.String(*v.ContactId) + } + + if v.IsEssential != nil { + ok := object.Key("IsEssential") + ok.Boolean(*v.IsEssential) + } + + return nil +} + +func awsAwsjson11_serializeDocumentPlan(v *types.Plan, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Stages != nil { + ok := object.Key("Stages") + if err := awsAwsjson11_serializeDocumentStagesList(v.Stages, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentStage(v *types.Stage, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DurationInMinutes != nil { + ok := object.Key("DurationInMinutes") + ok.Integer(*v.DurationInMinutes) + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargetsList(v.Targets, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentStagesList(v []types.Stage, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentStage(&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() + + 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_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 awsAwsjson11_serializeDocumentTagsList(v []types.Tag, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentTarget(v *types.Target, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ChannelTargetInfo != nil { + ok := object.Key("ChannelTargetInfo") + if err := awsAwsjson11_serializeDocumentChannelTargetInfo(v.ChannelTargetInfo, ok); err != nil { + return err + } + } + + if v.ContactTargetInfo != nil { + ok := object.Key("ContactTargetInfo") + if err := awsAwsjson11_serializeDocumentContactTargetInfo(v.ContactTargetInfo, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentTargetsList(v []types.Target, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentTarget(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentTimeRange(v *types.TimeRange, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EndTime != nil { + ok := object.Key("EndTime") + ok.Double(smithytime.FormatEpochSeconds(*v.EndTime)) + } + + if v.StartTime != nil { + ok := object.Key("StartTime") + ok.Double(smithytime.FormatEpochSeconds(*v.StartTime)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentAcceptPageInput(v *AcceptPageInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AcceptCode != nil { + ok := object.Key("AcceptCode") + ok.String(*v.AcceptCode) + } + + if len(v.AcceptType) > 0 { + ok := object.Key("AcceptType") + ok.String(string(v.AcceptType)) + } + + if v.ContactChannelId != nil { + ok := object.Key("ContactChannelId") + ok.String(*v.ContactChannelId) + } + + if v.Note != nil { + ok := object.Key("Note") + ok.String(*v.Note) + } + + if v.PageId != nil { + ok := object.Key("PageId") + ok.String(*v.PageId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentActivateContactChannelInput(v *ActivateContactChannelInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ActivationCode != nil { + ok := object.Key("ActivationCode") + ok.String(*v.ActivationCode) + } + + if v.ContactChannelId != nil { + ok := object.Key("ContactChannelId") + ok.String(*v.ContactChannelId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateContactChannelInput(v *CreateContactChannelInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactId != nil { + ok := object.Key("ContactId") + ok.String(*v.ContactId) + } + + if v.DeferActivation != nil { + ok := object.Key("DeferActivation") + ok.Boolean(*v.DeferActivation) + } + + if v.DeliveryAddress != nil { + ok := object.Key("DeliveryAddress") + if err := awsAwsjson11_serializeDocumentContactChannelAddress(v.DeliveryAddress, ok); err != nil { + return err + } + } + + if v.IdempotencyToken != nil { + ok := object.Key("IdempotencyToken") + ok.String(*v.IdempotencyToken) + } + + 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)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateContactInput(v *CreateContactInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Alias != nil { + ok := object.Key("Alias") + ok.String(*v.Alias) + } + + if v.DisplayName != nil { + ok := object.Key("DisplayName") + ok.String(*v.DisplayName) + } + + if v.IdempotencyToken != nil { + ok := object.Key("IdempotencyToken") + ok.String(*v.IdempotencyToken) + } + + if v.Plan != nil { + ok := object.Key("Plan") + if err := awsAwsjson11_serializeDocumentPlan(v.Plan, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagsList(v.Tags, ok); err != nil { + return err + } + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeactivateContactChannelInput(v *DeactivateContactChannelInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactChannelId != nil { + ok := object.Key("ContactChannelId") + ok.String(*v.ContactChannelId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteContactChannelInput(v *DeleteContactChannelInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactChannelId != nil { + ok := object.Key("ContactChannelId") + ok.String(*v.ContactChannelId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteContactInput(v *DeleteContactInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactId != nil { + ok := object.Key("ContactId") + ok.String(*v.ContactId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeEngagementInput(v *DescribeEngagementInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EngagementId != nil { + ok := object.Key("EngagementId") + ok.String(*v.EngagementId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribePageInput(v *DescribePageInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PageId != nil { + ok := object.Key("PageId") + ok.String(*v.PageId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetContactChannelInput(v *GetContactChannelInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactChannelId != nil { + ok := object.Key("ContactChannelId") + ok.String(*v.ContactChannelId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetContactInput(v *GetContactInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactId != nil { + ok := object.Key("ContactId") + ok.String(*v.ContactId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetContactPolicyInput(v *GetContactPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactArn != nil { + ok := object.Key("ContactArn") + ok.String(*v.ContactArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListContactChannelsInput(v *ListContactChannelsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactId != nil { + ok := object.Key("ContactId") + ok.String(*v.ContactId) + } + + 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_serializeOpDocumentListContactsInput(v *ListContactsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AliasPrefix != nil { + ok := object.Key("AliasPrefix") + ok.String(*v.AliasPrefix) + } + + 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.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListEngagementsInput(v *ListEngagementsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IncidentId != nil { + ok := object.Key("IncidentId") + ok.String(*v.IncidentId) + } + + 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.TimeRangeValue != nil { + ok := object.Key("TimeRangeValue") + if err := awsAwsjson11_serializeDocumentTimeRange(v.TimeRangeValue, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListPageReceiptsInput(v *ListPageReceiptsInput, 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.PageId != nil { + ok := object.Key("PageId") + ok.String(*v.PageId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListPagesByContactInput(v *ListPagesByContactInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactId != nil { + ok := object.Key("ContactId") + ok.String(*v.ContactId) + } + + 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_serializeOpDocumentListPagesByEngagementInput(v *ListPagesByEngagementInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EngagementId != nil { + ok := object.Key("EngagementId") + ok.String(*v.EngagementId) + } + + 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_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, 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 awsAwsjson11_serializeOpDocumentPutContactPolicyInput(v *PutContactPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactArn != nil { + ok := object.Key("ContactArn") + ok.String(*v.ContactArn) + } + + if v.Policy != nil { + ok := object.Key("Policy") + ok.String(*v.Policy) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentSendActivationCodeInput(v *SendActivationCodeInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactChannelId != nil { + ok := object.Key("ContactChannelId") + ok.String(*v.ContactChannelId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartEngagementInput(v *StartEngagementInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactId != nil { + ok := object.Key("ContactId") + ok.String(*v.ContactId) + } + + if v.Content != nil { + ok := object.Key("Content") + ok.String(*v.Content) + } + + if v.IdempotencyToken != nil { + ok := object.Key("IdempotencyToken") + ok.String(*v.IdempotencyToken) + } + + if v.IncidentId != nil { + ok := object.Key("IncidentId") + ok.String(*v.IncidentId) + } + + if v.PublicContent != nil { + ok := object.Key("PublicContent") + ok.String(*v.PublicContent) + } + + if v.PublicSubject != nil { + ok := object.Key("PublicSubject") + ok.String(*v.PublicSubject) + } + + if v.Sender != nil { + ok := object.Key("Sender") + ok.String(*v.Sender) + } + + if v.Subject != nil { + ok := object.Key("Subject") + ok.String(*v.Subject) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStopEngagementInput(v *StopEngagementInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EngagementId != nil { + ok := object.Key("EngagementId") + ok.String(*v.EngagementId) + } + + if v.Reason != nil { + ok := object.Key("Reason") + ok.String(*v.Reason) + } + + return nil +} + +func awsAwsjson11_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 := awsAwsjson11_serializeDocumentTagsList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_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 := awsAwsjson11_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateContactChannelInput(v *UpdateContactChannelInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactChannelId != nil { + ok := object.Key("ContactChannelId") + ok.String(*v.ContactChannelId) + } + + if v.DeliveryAddress != nil { + ok := object.Key("DeliveryAddress") + if err := awsAwsjson11_serializeDocumentContactChannelAddress(v.DeliveryAddress, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateContactInput(v *UpdateContactInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContactId != nil { + ok := object.Key("ContactId") + ok.String(*v.ContactId) + } + + if v.DisplayName != nil { + ok := object.Key("DisplayName") + ok.String(*v.DisplayName) + } + + if v.Plan != nil { + ok := object.Key("Plan") + if err := awsAwsjson11_serializeDocumentPlan(v.Plan, ok); err != nil { + return err + } + } + + return nil +} diff --git a/service/ssmcontacts/types/enums.go b/service/ssmcontacts/types/enums.go new file mode 100644 index 00000000000..e8591606734 --- /dev/null +++ b/service/ssmcontacts/types/enums.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type AcceptType string + +// Enum values for AcceptType +const ( + AcceptTypeDelivered AcceptType = "DELIVERED" + AcceptTypeRead AcceptType = "READ" +) + +// Values returns all known values for AcceptType. 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 (AcceptType) Values() []AcceptType { + return []AcceptType{ + "DELIVERED", + "READ", + } +} + +type ActivationStatus string + +// Enum values for ActivationStatus +const ( + ActivationStatusActivated ActivationStatus = "ACTIVATED" + ActivationStatusNotActivated ActivationStatus = "NOT_ACTIVATED" +) + +// Values returns all known values for ActivationStatus. 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 (ActivationStatus) Values() []ActivationStatus { + return []ActivationStatus{ + "ACTIVATED", + "NOT_ACTIVATED", + } +} + +type ChannelType string + +// Enum values for ChannelType +const ( + ChannelTypeSms ChannelType = "SMS" + ChannelTypeVoice ChannelType = "VOICE" + ChannelTypeEmail ChannelType = "EMAIL" +) + +// Values returns all known values for ChannelType. 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 (ChannelType) Values() []ChannelType { + return []ChannelType{ + "SMS", + "VOICE", + "EMAIL", + } +} + +type ContactType string + +// Enum values for ContactType +const ( + ContactTypePersonal ContactType = "PERSONAL" + ContactTypeEscalation ContactType = "ESCALATION" +) + +// Values returns all known values for ContactType. 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 (ContactType) Values() []ContactType { + return []ContactType{ + "PERSONAL", + "ESCALATION", + } +} + +type ReceiptType string + +// Enum values for ReceiptType +const ( + ReceiptTypeDelivered ReceiptType = "DELIVERED" + ReceiptTypeError ReceiptType = "ERROR" + ReceiptTypeRead ReceiptType = "READ" + ReceiptTypeSent ReceiptType = "SENT" + ReceiptTypeStop ReceiptType = "STOP" +) + +// Values returns all known values for ReceiptType. 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 (ReceiptType) Values() []ReceiptType { + return []ReceiptType{ + "DELIVERED", + "ERROR", + "READ", + "SENT", + "STOP", + } +} + +type ValidationExceptionReason string + +// Enum values for ValidationExceptionReason +const ( + ValidationExceptionReasonUnknownOperation ValidationExceptionReason = "UNKNOWN_OPERATION" + 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{ + "UNKNOWN_OPERATION", + "CANNOT_PARSE", + "FIELD_VALIDATION_FAILED", + "OTHER", + } +} diff --git a/service/ssmcontacts/types/errors.go b/service/ssmcontacts/types/errors.go new file mode 100644 index 00000000000..cc5f631125d --- /dev/null +++ b/service/ssmcontacts/types/errors.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// You don't have sufficient access to perform this action. +type AccessDeniedException struct { + Message *string +} + +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 causes an inconsistent state. +type ConflictException struct { + Message *string + + ResourceId *string + ResourceType *string +} + +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 action failed to due an encryption key error. +type DataEncryptionException struct { + Message *string +} + +func (e *DataEncryptionException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DataEncryptionException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DataEncryptionException) ErrorCode() string { return "DataEncryptionException" } +func (e *DataEncryptionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Unexpected error occurred while processing the request. +type InternalServerException struct { + Message *string + + RetryAfterSeconds int32 +} + +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 } + +// Request references a resource that doesn't exist. +type ResourceNotFoundException struct { + Message *string + + ResourceId *string + ResourceType *string +} + +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 } + +// Request would cause a service quota to be exceeded. +type ServiceQuotaExceededException struct { + Message *string + + ResourceId *string + ResourceType *string + QuotaCode *string + ServiceCode *string +} + +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 + + QuotaCode *string + ServiceCode *string + RetryAfterSeconds int32 +} + +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 fails to satisfy the constraints specified by an AWS service. +type ValidationException struct { + Message *string + + Reason ValidationExceptionReason + Fields []ValidationExceptionField +} + +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/ssmcontacts/types/types.go b/service/ssmcontacts/types/types.go new file mode 100644 index 00000000000..69854e52586 --- /dev/null +++ b/service/ssmcontacts/types/types.go @@ -0,0 +1,273 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "time" +) + +// Information about the contact channel that Incident Manager uses to engage the +// contact. +type ChannelTargetInfo struct { + + // The Amazon Resource Name (ARN) of the contact channel. + // + // This member is required. + ContactChannelId *string + + // The number of minutes to wait to retry sending engagement in the case the + // engagement initially fails. + RetryIntervalInMinutes *int32 +} + +// A personal contact or escalation plan that Incident Manager engages during an +// incident. +type Contact struct { + + // The unique and identifiable alias of the contact or escalation plan. + // + // This member is required. + Alias *string + + // The Amazon Resource Name (ARN) of the contact or escalation plan. + // + // This member is required. + ContactArn *string + + // Refers to the type of contact. A single contact is type PERSONAL and an + // escalation plan is type ESCALATION. + // + // This member is required. + Type ContactType + + // The full name of the contact or escalation plan. + DisplayName *string +} + +// The method that Incident Manager uses to engage a contact. +type ContactChannel struct { + + // A Boolean value describing if the contact channel has been activated or not. If + // the contact channel isn't activated, Incident Manager can't engage the contact + // through it. + // + // This member is required. + ActivationStatus ActivationStatus + + // The ARN of the contact that contains the contact channel. + // + // This member is required. + ContactArn *string + + // The Amazon Resource Name (ARN) of the contact channel. + // + // This member is required. + ContactChannelArn *string + + // The details that Incident Manager uses when trying to engage the contact + // channel. + // + // This member is required. + DeliveryAddress *ContactChannelAddress + + // The name of the contact channel. + // + // This member is required. + Name *string + + // The type of the contact channel. Incident Manager supports three contact + // methods: + // + // * SMS + // + // * VOICE + // + // * EMAIL + Type ChannelType +} + +// The details that Incident Manager uses when trying to engage the contact +// channel. +type ContactChannelAddress struct { + + // The format is dependent on the type of the contact channel. The following are + // the expected formats: + // + // * SMS - '+' followed by the country code and phone + // number + // + // * VOICE - '+' followed by the country code and phone number + // + // * EMAIL - + // any standard email format + SimpleAddress *string +} + +// The contact that Incident Manager is engaging during an incident. +type ContactTargetInfo struct { + + // A Boolean value determining if the contact's acknowledgement stops the progress + // of stages in the plan. + // + // This member is required. + IsEssential *bool + + // The Amazon Resource Name (ARN) of the contact. + ContactId *string +} + +// Incident Manager reaching out to a contact or escalation plan to engage contact +// during an incident. +type Engagement struct { + + // The ARN of the escalation plan or contact that Incident Manager is engaging. + // + // This member is required. + ContactArn *string + + // The Amazon Resource Name (ARN) of the engagement. + // + // This member is required. + EngagementArn *string + + // The user that started the engagement. + // + // This member is required. + Sender *string + + // The ARN of the incident that's engaging the contact. + IncidentId *string + + // The time that the engagement began. + StartTime *time.Time + + // The time that the engagement ended. + StopTime *time.Time +} + +// Incident Manager engaging a contact's contact channel. +type Page struct { + + // The ARN of the contact that Incident Manager is engaging. + // + // This member is required. + ContactArn *string + + // The ARN of the engagement that this page is part of. + // + // This member is required. + EngagementArn *string + + // The Amazon Resource Name (ARN) of the page to the contact channel. + // + // This member is required. + PageArn *string + + // The user that started the engagement. + // + // This member is required. + Sender *string + + // The time the message was delivered to the contact channel. + DeliveryTime *time.Time + + // The ARN of the incident that's engaging the contact channel. + IncidentId *string + + // The time that the contact channel acknowledged engagement. + ReadTime *time.Time + + // The time that Incident Manager engaged the contact channel. + SentTime *time.Time +} + +// The stages that an escalation plan or engagement plan engages contacts and +// contact methods in. +type Plan struct { + + // A list of stages that the escalation plan or engagement plan uses to engage + // contacts and contact methods. + // + // This member is required. + Stages []Stage +} + +// Records events during an engagement. +type Receipt struct { + + // The time receipt was SENT, DELIVERED, or READ. + // + // This member is required. + ReceiptTime *time.Time + + // The type follows the engagement cycle, SENT, DELIVERED, and READ. + // + // This member is required. + ReceiptType ReceiptType + + // The Amazon Resource Name (ARN) of the contact channel Incident Manager engaged. + ContactChannelArn *string + + // Information provided during the page acknowledgement. + ReceiptInfo *string +} + +// A set amount of time that an escalation plan or engagement plan engages the +// specified contacts or contact methods. +type Stage struct { + + // The time to wait until beginning the next stage. + // + // This member is required. + DurationInMinutes *int32 + + // The contacts or contact methods that the escalation plan or engagement plan is + // engaging. + // + // This member is required. + Targets []Target +} + +// A container of a key-value name pair. +type Tag struct { + + // Name of the object key. + Key *string + + // Value of the tag. + Value *string +} + +// The contact or contact channel that is being engaged. +type Target struct { + + // Information about the contact channel Incident Manager is engaging. + ChannelTargetInfo *ChannelTargetInfo + + // Information about the contact that Incident Manager is engaging. + ContactTargetInfo *ContactTargetInfo +} + +// A range of between two set times +type TimeRange struct { + + // The end of the time range. + EndTime *time.Time + + // The start of the time range. + StartTime *time.Time +} + +// Provides information about which field caused the exception. +type ValidationExceptionField struct { + + // Information about what caused the field to cause an exception. + // + // This member is required. + Message *string + + // The name of the field that caused the exception. + // + // This member is required. + Name *string +} diff --git a/service/ssmcontacts/validators.go b/service/ssmcontacts/validators.go new file mode 100644 index 00000000000..effe6add209 --- /dev/null +++ b/service/ssmcontacts/validators.go @@ -0,0 +1,1164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssmcontacts + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/ssmcontacts/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpAcceptPage struct { +} + +func (*validateOpAcceptPage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAcceptPage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AcceptPageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAcceptPageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpActivateContactChannel struct { +} + +func (*validateOpActivateContactChannel) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpActivateContactChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ActivateContactChannelInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpActivateContactChannelInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateContactChannel struct { +} + +func (*validateOpCreateContactChannel) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateContactChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateContactChannelInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateContactChannelInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateContact struct { +} + +func (*validateOpCreateContact) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateContact) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateContactInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateContactInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeactivateContactChannel struct { +} + +func (*validateOpDeactivateContactChannel) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeactivateContactChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeactivateContactChannelInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeactivateContactChannelInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteContactChannel struct { +} + +func (*validateOpDeleteContactChannel) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteContactChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteContactChannelInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteContactChannelInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteContact struct { +} + +func (*validateOpDeleteContact) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteContact) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteContactInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteContactInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeEngagement struct { +} + +func (*validateOpDescribeEngagement) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeEngagement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeEngagementInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeEngagementInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribePage struct { +} + +func (*validateOpDescribePage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribePage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribePageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribePageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetContactChannel struct { +} + +func (*validateOpGetContactChannel) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetContactChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetContactChannelInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetContactChannelInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetContact struct { +} + +func (*validateOpGetContact) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetContact) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetContactInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetContactInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetContactPolicy struct { +} + +func (*validateOpGetContactPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetContactPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetContactPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetContactPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListContactChannels struct { +} + +func (*validateOpListContactChannels) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListContactChannels) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListContactChannelsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListContactChannelsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListPageReceipts struct { +} + +func (*validateOpListPageReceipts) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListPageReceipts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListPageReceiptsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListPageReceiptsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListPagesByContact struct { +} + +func (*validateOpListPagesByContact) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListPagesByContact) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListPagesByContactInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListPagesByContactInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListPagesByEngagement struct { +} + +func (*validateOpListPagesByEngagement) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListPagesByEngagement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListPagesByEngagementInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListPagesByEngagementInput(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 validateOpPutContactPolicy struct { +} + +func (*validateOpPutContactPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutContactPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutContactPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutContactPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpSendActivationCode struct { +} + +func (*validateOpSendActivationCode) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSendActivationCode) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SendActivationCodeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSendActivationCodeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartEngagement struct { +} + +func (*validateOpStartEngagement) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartEngagement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartEngagementInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartEngagementInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStopEngagement struct { +} + +func (*validateOpStopEngagement) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStopEngagement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StopEngagementInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStopEngagementInput(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 validateOpUpdateContactChannel struct { +} + +func (*validateOpUpdateContactChannel) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateContactChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateContactChannelInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateContactChannelInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateContact struct { +} + +func (*validateOpUpdateContact) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateContact) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateContactInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateContactInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAcceptPageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAcceptPage{}, middleware.After) +} + +func addOpActivateContactChannelValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpActivateContactChannel{}, middleware.After) +} + +func addOpCreateContactChannelValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateContactChannel{}, middleware.After) +} + +func addOpCreateContactValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateContact{}, middleware.After) +} + +func addOpDeactivateContactChannelValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeactivateContactChannel{}, middleware.After) +} + +func addOpDeleteContactChannelValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteContactChannel{}, middleware.After) +} + +func addOpDeleteContactValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteContact{}, middleware.After) +} + +func addOpDescribeEngagementValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeEngagement{}, middleware.After) +} + +func addOpDescribePageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribePage{}, middleware.After) +} + +func addOpGetContactChannelValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetContactChannel{}, middleware.After) +} + +func addOpGetContactValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetContact{}, middleware.After) +} + +func addOpGetContactPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetContactPolicy{}, middleware.After) +} + +func addOpListContactChannelsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListContactChannels{}, middleware.After) +} + +func addOpListPageReceiptsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListPageReceipts{}, middleware.After) +} + +func addOpListPagesByContactValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListPagesByContact{}, middleware.After) +} + +func addOpListPagesByEngagementValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListPagesByEngagement{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpPutContactPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutContactPolicy{}, middleware.After) +} + +func addOpSendActivationCodeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSendActivationCode{}, middleware.After) +} + +func addOpStartEngagementValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartEngagement{}, middleware.After) +} + +func addOpStopEngagementValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStopEngagement{}, 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 addOpUpdateContactChannelValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateContactChannel{}, middleware.After) +} + +func addOpUpdateContactValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateContact{}, middleware.After) +} + +func validateChannelTargetInfo(v *types.ChannelTargetInfo) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ChannelTargetInfo"} + if v.ContactChannelId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactChannelId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContactTargetInfo(v *types.ContactTargetInfo) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContactTargetInfo"} + if v.IsEssential == nil { + invalidParams.Add(smithy.NewErrParamRequired("IsEssential")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePlan(v *types.Plan) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Plan"} + if v.Stages == nil { + invalidParams.Add(smithy.NewErrParamRequired("Stages")) + } else if v.Stages != nil { + if err := validateStagesList(v.Stages); err != nil { + invalidParams.AddNested("Stages", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStage(v *types.Stage) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Stage"} + if v.DurationInMinutes == nil { + invalidParams.Add(smithy.NewErrParamRequired("DurationInMinutes")) + } + if v.Targets == nil { + invalidParams.Add(smithy.NewErrParamRequired("Targets")) + } else if v.Targets != nil { + if err := validateTargetsList(v.Targets); err != nil { + invalidParams.AddNested("Targets", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStagesList(v []types.Stage) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StagesList"} + for i := range v { + if err := validateStage(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTarget(v *types.Target) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Target"} + if v.ChannelTargetInfo != nil { + if err := validateChannelTargetInfo(v.ChannelTargetInfo); err != nil { + invalidParams.AddNested("ChannelTargetInfo", err.(smithy.InvalidParamsError)) + } + } + if v.ContactTargetInfo != nil { + if err := validateContactTargetInfo(v.ContactTargetInfo); err != nil { + invalidParams.AddNested("ContactTargetInfo", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTargetsList(v []types.Target) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TargetsList"} + for i := range v { + if err := validateTarget(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAcceptPageInput(v *AcceptPageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceptPageInput"} + if v.PageId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PageId")) + } + if len(v.AcceptType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("AcceptType")) + } + if v.AcceptCode == nil { + invalidParams.Add(smithy.NewErrParamRequired("AcceptCode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpActivateContactChannelInput(v *ActivateContactChannelInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ActivateContactChannelInput"} + if v.ContactChannelId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactChannelId")) + } + if v.ActivationCode == nil { + invalidParams.Add(smithy.NewErrParamRequired("ActivationCode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateContactChannelInput(v *CreateContactChannelInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateContactChannelInput"} + if v.ContactId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.DeliveryAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeliveryAddress")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateContactInput(v *CreateContactInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateContactInput"} + if v.Alias == nil { + invalidParams.Add(smithy.NewErrParamRequired("Alias")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.Plan == nil { + invalidParams.Add(smithy.NewErrParamRequired("Plan")) + } else if v.Plan != nil { + if err := validatePlan(v.Plan); err != nil { + invalidParams.AddNested("Plan", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeactivateContactChannelInput(v *DeactivateContactChannelInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeactivateContactChannelInput"} + if v.ContactChannelId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactChannelId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteContactChannelInput(v *DeleteContactChannelInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteContactChannelInput"} + if v.ContactChannelId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactChannelId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteContactInput(v *DeleteContactInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteContactInput"} + if v.ContactId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeEngagementInput(v *DescribeEngagementInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeEngagementInput"} + if v.EngagementId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EngagementId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribePageInput(v *DescribePageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribePageInput"} + if v.PageId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PageId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetContactChannelInput(v *GetContactChannelInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetContactChannelInput"} + if v.ContactChannelId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactChannelId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetContactInput(v *GetContactInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetContactInput"} + if v.ContactId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetContactPolicyInput(v *GetContactPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetContactPolicyInput"} + if v.ContactArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListContactChannelsInput(v *ListContactChannelsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListContactChannelsInput"} + if v.ContactId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListPageReceiptsInput(v *ListPageReceiptsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListPageReceiptsInput"} + if v.PageId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PageId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListPagesByContactInput(v *ListPagesByContactInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListPagesByContactInput"} + if v.ContactId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListPagesByEngagementInput(v *ListPagesByEngagementInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListPagesByEngagementInput"} + if v.EngagementId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EngagementId")) + } + 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 validateOpPutContactPolicyInput(v *PutContactPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutContactPolicyInput"} + if v.ContactArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactArn")) + } + if v.Policy == nil { + invalidParams.Add(smithy.NewErrParamRequired("Policy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpSendActivationCodeInput(v *SendActivationCodeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SendActivationCodeInput"} + if v.ContactChannelId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactChannelId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartEngagementInput(v *StartEngagementInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartEngagementInput"} + if v.ContactId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactId")) + } + if v.Sender == nil { + invalidParams.Add(smithy.NewErrParamRequired("Sender")) + } + if v.Subject == nil { + invalidParams.Add(smithy.NewErrParamRequired("Subject")) + } + if v.Content == nil { + invalidParams.Add(smithy.NewErrParamRequired("Content")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStopEngagementInput(v *StopEngagementInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StopEngagementInput"} + if v.EngagementId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EngagementId")) + } + 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 validateOpUpdateContactChannelInput(v *UpdateContactChannelInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateContactChannelInput"} + if v.ContactChannelId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactChannelId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateContactInput(v *UpdateContactInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateContactInput"} + if v.ContactId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContactId")) + } + if v.Plan != nil { + if err := validatePlan(v.Plan); err != nil { + invalidParams.AddNested("Plan", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +}