From f5ecc3147035a1f3d2d74cfed147999927ea8256 Mon Sep 17 00:00:00 2001 From: AllanZhengYP Date: Fri, 5 Nov 2021 14:23:37 -0700 Subject: [PATCH] feat(clients): update clients as of 2021/11/05 (#2994) * chore(models): update models as of 11/05/2021 * feat(clients): update clients as of 2021/11/05 --- .../src/models/models_0.ts | 33 +- .../src/protocols/Aws_json1_1.ts | 16 + clients/client-chime-sdk-meetings/.gitignore | 9 + clients/client-chime-sdk-meetings/LICENSE | 201 + clients/client-chime-sdk-meetings/README.md | 205 + .../client-chime-sdk-meetings/jest.config.js | 4 + .../client-chime-sdk-meetings/package.json | 96 + .../src/ChimeSDKMeetings.ts | 430 ++ .../src/ChimeSDKMeetingsClient.ts | 293 + .../commands/BatchCreateAttendeeCommand.ts | 95 + .../src/commands/CreateAttendeeCommand.ts | 100 + .../src/commands/CreateMeetingCommand.ts | 101 + .../CreateMeetingWithAttendeesCommand.ts | 104 + .../src/commands/DeleteAttendeeCommand.ts | 98 + .../src/commands/DeleteMeetingCommand.ts | 98 + .../src/commands/GetAttendeeCommand.ts | 99 + .../src/commands/GetMeetingCommand.ts | 97 + .../src/commands/ListAttendeesCommand.ts | 99 + .../StartMeetingTranscriptionCommand.ts | 98 + .../StopMeetingTranscriptionCommand.ts | 95 + .../src/commands/index.ts | 11 + .../src/endpoints.ts | 126 + .../client-chime-sdk-meetings/src/index.ts | 5 + .../src/models/index.ts | 1 + .../src/models/models_0.ts | 1019 +++ .../src/pagination/Interfaces.ts | 8 + .../src/pagination/ListAttendeesPaginator.ts | 59 + .../src/pagination/index.ts | 2 + .../src/protocols/Aws_restJson1.ts | 1764 +++++ .../src/runtimeConfig.browser.ts | 44 + .../src/runtimeConfig.native.ts | 17 + .../src/runtimeConfig.shared.ts | 17 + .../src/runtimeConfig.ts | 53 + .../tsconfig.es.json | 10 + .../client-chime-sdk-meetings/tsconfig.json | 32 + .../tsconfig.types.json | 10 + clients/client-cloudfront/src/CloudFront.ts | 324 +- .../client-cloudfront/src/CloudFrontClient.ts | 42 + .../CreateResponseHeadersPolicyCommand.ts | 105 + .../DeleteMonitoringSubscriptionCommand.ts | 3 +- .../DeleteOriginRequestPolicyCommand.ts | 2 +- .../src/commands/DeletePublicKeyCommand.ts | 2 +- .../DeleteRealtimeLogConfigCommand.ts | 2 +- .../DeleteResponseHeadersPolicyCommand.ts | 104 + .../DeleteStreamingDistributionCommand.ts | 2 +- .../src/commands/DescribeFunctionCommand.ts | 2 +- .../src/commands/GetCachePolicyCommand.ts | 2 +- .../commands/GetCachePolicyConfigCommand.ts | 2 +- ...etCloudFrontOriginAccessIdentityCommand.ts | 2 +- ...dFrontOriginAccessIdentityConfigCommand.ts | 2 +- .../src/commands/GetDistributionCommand.ts | 2 +- .../commands/GetDistributionConfigCommand.ts | 2 +- .../GetFieldLevelEncryptionCommand.ts | 2 +- .../GetResponseHeadersPolicyCommand.ts | 102 + .../GetResponseHeadersPolicyConfigCommand.ts | 109 + .../src/commands/ListCachePoliciesCommand.ts | 2 +- ...butionsByResponseHeadersPolicyIdCommand.ts | 116 + .../src/commands/ListFunctionsCommand.ts | 2 +- .../ListOriginRequestPoliciesCommand.ts | 2 +- .../ListResponseHeadersPoliciesCommand.ts | 105 + .../UpdateResponseHeadersPolicyCommand.ts | 116 + .../client-cloudfront/src/commands/index.ts | 7 + .../client-cloudfront/src/models/models_0.ts | 1717 +++-- .../client-cloudfront/src/models/models_1.ts | 1024 ++- .../src/protocols/Aws_restXml.ts | 2223 ++++++- clients/client-connect/README.md | 2 +- clients/client-connect/src/Connect.ts | 279 +- clients/client-connect/src/ConnectClient.ts | 44 +- .../CreateIntegrationAssociationCommand.ts | 2 +- .../commands/CreateSecurityProfileCommand.ts | 96 + .../DeleteIntegrationAssociationCommand.ts | 2 +- .../commands/DeleteSecurityProfileCommand.ts | 96 + .../DescribeSecurityProfileCommand.ts | 96 + .../ListIntegrationAssociationsCommand.ts | 2 +- .../ListSecurityProfilePermissionsCommand.ts | 104 + .../commands/ListSecurityProfilesCommand.ts | 3 +- .../commands/StartContactStreamingCommand.ts | 97 + .../commands/StopContactStreamingCommand.ts | 97 + .../commands/UpdateSecurityProfileCommand.ts | 96 + .../commands/UpdateUserPhoneConfigCommand.ts | 2 +- .../UpdateUserRoutingProfileCommand.ts | 2 +- .../UpdateUserSecurityProfilesCommand.ts | 2 +- clients/client-connect/src/commands/index.ts | 7 + clients/client-connect/src/models/index.ts | 1 + clients/client-connect/src/models/models_0.ts | 546 +- clients/client-connect/src/models/models_1.ts | 79 + ...ListSecurityProfilePermissionsPaginator.ts | 59 + .../client-connect/src/pagination/index.ts | 1 + .../src/protocols/Aws_restJson1.ts | 1089 ++- .../src/models/models_0.ts | 4 - clients/client-datasync/src/DataSync.ts | 113 + clients/client-datasync/src/DataSyncClient.ts | 12 + .../src/commands/CreateLocationHdfsCommand.ts | 95 + .../commands/DescribeLocationHdfsCommand.ts | 96 + .../src/commands/UpdateLocationHdfsCommand.ts | 96 + clients/client-datasync/src/commands/index.ts | 3 + .../client-datasync/src/models/models_0.ts | 439 +- .../src/protocols/Aws_json1_1.ts | 412 ++ clients/client-ec2/src/models/models_0.ts | 38 +- clients/client-ec2/src/models/models_1.ts | 7 +- clients/client-ec2/src/models/models_2.ts | 26 +- clients/client-ec2/src/models/models_3.ts | 59 +- clients/client-ec2/src/models/models_4.ts | 15 +- clients/client-ec2/src/protocols/Aws_ec2.ts | 72 + clients/client-finspace/README.md | 3 +- clients/client-finspace/src/Finspace.ts | 3 +- clients/client-finspace/src/FinspaceClient.ts | 3 +- .../client-finspace/src/models/models_0.ts | 54 + .../src/protocols/Aws_restJson1.ts | 26 + .../client-iot-wireless/src/IoTWireless.ts | 971 +++ .../src/IoTWirelessClient.ts | 135 + ...ciateMulticastGroupWithFuotaTaskCommand.ts | 106 + ...ciateWirelessDeviceWithFuotaTaskCommand.ts | 106 + ...WirelessDeviceWithMulticastGroupCommand.ts | 110 + .../CancelMulticastGroupSessionCommand.ts | 100 + .../src/commands/CreateFuotaTaskCommand.ts | 95 + .../commands/CreateMulticastGroupCommand.ts | 95 + .../src/commands/DeleteFuotaTaskCommand.ts | 95 + .../commands/DeleteMulticastGroupCommand.ts | 95 + ...ciateMulticastGroupFromFuotaTaskCommand.ts | 110 + ...ciateWirelessDeviceFromFuotaTaskCommand.ts | 110 + ...WirelessDeviceFromMulticastGroupCommand.ts | 110 + .../src/commands/GetFuotaTaskCommand.ts | 95 + .../src/commands/GetMulticastGroupCommand.ts | 95 + .../GetMulticastGroupSessionCommand.ts | 95 + .../GetResourceEventConfigurationCommand.ts | 100 + .../src/commands/ListFuotaTasksCommand.ts | 95 + .../ListMulticastGroupsByFuotaTaskCommand.ts | 103 + .../commands/ListMulticastGroupsCommand.ts | 95 + .../SendDataToMulticastGroupCommand.ts | 95 + ...WirelessDeviceWithMulticastGroupCommand.ts | 110 + ...WirelessDeviceFromMulticastGroupCommand.ts | 110 + .../src/commands/StartFuotaTaskCommand.ts | 95 + .../StartMulticastGroupSessionCommand.ts | 98 + .../src/commands/UpdateFuotaTaskCommand.ts | 95 + .../commands/UpdateMulticastGroupCommand.ts | 95 + ...UpdateResourceEventConfigurationCommand.ts | 103 + .../client-iot-wireless/src/commands/index.ts | 26 + .../src/models/models_0.ts | 1653 ++++- .../src/pagination/ListFuotaTasksPaginator.ts | 59 + ...ListMulticastGroupsByFuotaTaskPaginator.ts | 59 + .../ListMulticastGroupsPaginator.ts | 59 + .../src/pagination/index.ts | 3 + .../src/protocols/Aws_restJson1.ts | 5818 +++++++++++++---- clients/client-lightsail/src/Lightsail.ts | 2 + .../src/commands/DeleteKeyPairCommand.ts | 2 + .../client-lightsail/src/models/models_0.ts | 92 +- .../client-lightsail/src/models/models_1.ts | 33 +- .../src/protocols/Aws_json1_1.ts | 27 +- clients/client-macie2/src/Macie2.ts | 2 +- .../commands/UpdateMemberSessionCommand.ts | 2 +- clients/client-macie2/src/models/models_0.ts | 72 +- .../src/protocols/Aws_restJson1.ts | 46 + clients/client-neptune/src/Neptune.ts | 4 +- .../src/commands/AddRoleToDBClusterCommand.ts | 2 +- .../src/commands/StartDBClusterCommand.ts | 2 +- clients/client-neptune/src/models/models_0.ts | 56 +- .../client-neptune/src/protocols/Aws_query.ts | 6 + clients/client-neptune/src/waiters/index.ts | 1 + .../src/waiters/waitForDBInstanceDeleted.ts | 114 + clients/client-networkmanager/README.md | 3 +- .../src/NetworkManager.ts | 305 +- .../src/NetworkManagerClient.ts | 42 +- .../GetNetworkResourceCountsCommand.ts | 95 + .../GetNetworkResourceRelationshipsCommand.ts | 103 + .../commands/GetNetworkResourcesCommand.ts | 96 + .../src/commands/GetNetworkRoutesCommand.ts | 95 + .../commands/GetNetworkTelemetryCommand.ts | 95 + .../src/commands/GetRouteAnalysisCommand.ts | 95 + .../commands/RegisterTransitGatewayCommand.ts | 4 +- .../src/commands/StartRouteAnalysisCommand.ts | 96 + .../UpdateNetworkResourceMetadataCommand.ts | 100 + .../src/commands/index.ts | 8 + .../src/models/models_0.ts | 1757 ++++- .../GetNetworkResourceCountsPaginator.ts | 59 + ...etNetworkResourceRelationshipsPaginator.ts | 59 + .../GetNetworkResourcesPaginator.ts | 59 + .../GetNetworkTelemetryPaginator.ts | 59 + .../src/pagination/index.ts | 6 +- .../src/protocols/Aws_restJson1.ts | 1899 +++++- clients/client-rekognition/src/Rekognition.ts | 448 +- .../src/RekognitionClient.ts | 31 +- .../src/commands/CreateDatasetCommand.ts | 119 + .../src/commands/CreateProjectCommand.ts | 4 +- .../commands/CreateProjectVersionCommand.ts | 36 +- .../src/commands/DeleteDatasetCommand.ts | 104 + .../src/commands/DeleteProjectCommand.ts | 4 + .../src/commands/DescribeDatasetCommand.ts | 99 + .../DescribeProjectVersionsCommand.ts | 4 +- .../src/commands/DescribeProjectsCommand.ts | 2 +- .../DistributeDatasetEntriesCommand.ts | 106 + .../GetCelebrityRecognitionCommand.ts | 39 +- .../src/commands/ListDatasetEntriesCommand.ts | 109 + .../src/commands/ListDatasetLabelsCommand.ts | 100 + .../commands/RecognizeCelebritiesCommand.ts | 6 +- .../commands/UpdateDatasetEntriesCommand.ts | 122 + .../client-rekognition/src/commands/index.ts | 7 + .../client-rekognition/src/models/models_0.ts | 833 ++- .../pagination/ListDatasetEntriesPaginator.ts | 59 + .../pagination/ListDatasetLabelsPaginator.ts | 59 + .../src/pagination/index.ts | 2 + .../src/protocols/Aws_json1_1.ts | 1466 ++++- .../src/ResourceGroupsTaggingAPI.ts | 75 +- .../commands/GetComplianceSummaryCommand.ts | 4 +- .../src/commands/GetResourcesCommand.ts | 6 +- .../src/commands/GetTagKeysCommand.ts | 4 +- .../src/commands/GetTagValuesCommand.ts | 6 +- .../src/commands/TagResourcesCommand.ts | 30 +- .../src/commands/UntagResourcesCommand.ts | 25 +- .../src/models/models_0.ts | 125 +- .../client-sagemaker/src/models/models_1.ts | 5 + .../client-sagemaker/src/models/models_2.ts | 5 + .../src/protocols/Aws_json1_1.ts | 2 + clients/client-transcribe/src/Transcribe.ts | 2 +- .../src/commands/TagResourceCommand.ts | 2 +- .../client-transcribe/src/models/models_0.ts | 101 +- .../src/protocols/Aws_json1_1.ts | 69 + clients/client-translate/src/Translate.ts | 8 +- .../src/commands/CreateParallelDataCommand.ts | 6 +- .../DescribeTextTranslationJobCommand.ts | 2 +- .../client-translate/src/models/models_0.ts | 62 +- .../src/protocols/Aws_json1_1.ts | 16 + .../aws-models/application-insights.json | 137 +- .../aws-models/chime-sdk-meetings.json | 1569 +++++ .../sdk-codegen/aws-models/cloudfront.json | 1676 ++++- codegen/sdk-codegen/aws-models/connect.json | 752 ++- .../aws-models/connectparticipant.json | 16 - codegen/sdk-codegen/aws-models/datasync.json | 611 +- codegen/sdk-codegen/aws-models/ec2.json | 102 +- codegen/sdk-codegen/aws-models/finspace.json | 115 +- .../sdk-codegen/aws-models/iot-wireless.json | 2690 +++++++- codegen/sdk-codegen/aws-models/lightsail.json | 87 +- codegen/sdk-codegen/aws-models/macie2.json | 133 +- codegen/sdk-codegen/aws-models/neptune.json | 134 +- .../aws-models/networkmanager.json | 2545 +++++-- .../sdk-codegen/aws-models/rekognition.json | 1128 +++- .../resource-groups-tagging-api.json | 110 +- codegen/sdk-codegen/aws-models/sagemaker.json | 12 + .../sdk-codegen/aws-models/transcribe.json | 111 +- codegen/sdk-codegen/aws-models/translate.json | 40 +- 240 files changed, 44921 insertions(+), 4309 deletions(-) create mode 100644 clients/client-chime-sdk-meetings/.gitignore create mode 100644 clients/client-chime-sdk-meetings/LICENSE create mode 100644 clients/client-chime-sdk-meetings/README.md create mode 100644 clients/client-chime-sdk-meetings/jest.config.js create mode 100644 clients/client-chime-sdk-meetings/package.json create mode 100644 clients/client-chime-sdk-meetings/src/ChimeSDKMeetings.ts create mode 100644 clients/client-chime-sdk-meetings/src/ChimeSDKMeetingsClient.ts create mode 100644 clients/client-chime-sdk-meetings/src/commands/BatchCreateAttendeeCommand.ts create mode 100644 clients/client-chime-sdk-meetings/src/commands/CreateAttendeeCommand.ts create mode 100644 clients/client-chime-sdk-meetings/src/commands/CreateMeetingCommand.ts create mode 100644 clients/client-chime-sdk-meetings/src/commands/CreateMeetingWithAttendeesCommand.ts create mode 100644 clients/client-chime-sdk-meetings/src/commands/DeleteAttendeeCommand.ts create mode 100644 clients/client-chime-sdk-meetings/src/commands/DeleteMeetingCommand.ts create mode 100644 clients/client-chime-sdk-meetings/src/commands/GetAttendeeCommand.ts create mode 100644 clients/client-chime-sdk-meetings/src/commands/GetMeetingCommand.ts create mode 100644 clients/client-chime-sdk-meetings/src/commands/ListAttendeesCommand.ts create mode 100644 clients/client-chime-sdk-meetings/src/commands/StartMeetingTranscriptionCommand.ts create mode 100644 clients/client-chime-sdk-meetings/src/commands/StopMeetingTranscriptionCommand.ts create mode 100644 clients/client-chime-sdk-meetings/src/commands/index.ts create mode 100644 clients/client-chime-sdk-meetings/src/endpoints.ts create mode 100644 clients/client-chime-sdk-meetings/src/index.ts create mode 100644 clients/client-chime-sdk-meetings/src/models/index.ts create mode 100644 clients/client-chime-sdk-meetings/src/models/models_0.ts create mode 100644 clients/client-chime-sdk-meetings/src/pagination/Interfaces.ts create mode 100644 clients/client-chime-sdk-meetings/src/pagination/ListAttendeesPaginator.ts create mode 100644 clients/client-chime-sdk-meetings/src/pagination/index.ts create mode 100644 clients/client-chime-sdk-meetings/src/protocols/Aws_restJson1.ts create mode 100644 clients/client-chime-sdk-meetings/src/runtimeConfig.browser.ts create mode 100644 clients/client-chime-sdk-meetings/src/runtimeConfig.native.ts create mode 100644 clients/client-chime-sdk-meetings/src/runtimeConfig.shared.ts create mode 100644 clients/client-chime-sdk-meetings/src/runtimeConfig.ts create mode 100644 clients/client-chime-sdk-meetings/tsconfig.es.json create mode 100644 clients/client-chime-sdk-meetings/tsconfig.json create mode 100644 clients/client-chime-sdk-meetings/tsconfig.types.json create mode 100644 clients/client-cloudfront/src/commands/CreateResponseHeadersPolicyCommand.ts create mode 100644 clients/client-cloudfront/src/commands/DeleteResponseHeadersPolicyCommand.ts create mode 100644 clients/client-cloudfront/src/commands/GetResponseHeadersPolicyCommand.ts create mode 100644 clients/client-cloudfront/src/commands/GetResponseHeadersPolicyConfigCommand.ts create mode 100644 clients/client-cloudfront/src/commands/ListDistributionsByResponseHeadersPolicyIdCommand.ts create mode 100644 clients/client-cloudfront/src/commands/ListResponseHeadersPoliciesCommand.ts create mode 100644 clients/client-cloudfront/src/commands/UpdateResponseHeadersPolicyCommand.ts create mode 100644 clients/client-connect/src/commands/CreateSecurityProfileCommand.ts create mode 100644 clients/client-connect/src/commands/DeleteSecurityProfileCommand.ts create mode 100644 clients/client-connect/src/commands/DescribeSecurityProfileCommand.ts create mode 100644 clients/client-connect/src/commands/ListSecurityProfilePermissionsCommand.ts create mode 100644 clients/client-connect/src/commands/StartContactStreamingCommand.ts create mode 100644 clients/client-connect/src/commands/StopContactStreamingCommand.ts create mode 100644 clients/client-connect/src/commands/UpdateSecurityProfileCommand.ts create mode 100644 clients/client-connect/src/models/models_1.ts create mode 100644 clients/client-connect/src/pagination/ListSecurityProfilePermissionsPaginator.ts create mode 100644 clients/client-datasync/src/commands/CreateLocationHdfsCommand.ts create mode 100644 clients/client-datasync/src/commands/DescribeLocationHdfsCommand.ts create mode 100644 clients/client-datasync/src/commands/UpdateLocationHdfsCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/AssociateMulticastGroupWithFuotaTaskCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/AssociateWirelessDeviceWithFuotaTaskCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/AssociateWirelessDeviceWithMulticastGroupCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/CancelMulticastGroupSessionCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/CreateFuotaTaskCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/CreateMulticastGroupCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/DeleteFuotaTaskCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/DeleteMulticastGroupCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/DisassociateMulticastGroupFromFuotaTaskCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/DisassociateWirelessDeviceFromFuotaTaskCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/DisassociateWirelessDeviceFromMulticastGroupCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/GetFuotaTaskCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/GetMulticastGroupCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/GetMulticastGroupSessionCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/GetResourceEventConfigurationCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/ListFuotaTasksCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/ListMulticastGroupsByFuotaTaskCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/ListMulticastGroupsCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/SendDataToMulticastGroupCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/StartBulkAssociateWirelessDeviceWithMulticastGroupCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/StartFuotaTaskCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/StartMulticastGroupSessionCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/UpdateFuotaTaskCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/UpdateMulticastGroupCommand.ts create mode 100644 clients/client-iot-wireless/src/commands/UpdateResourceEventConfigurationCommand.ts create mode 100644 clients/client-iot-wireless/src/pagination/ListFuotaTasksPaginator.ts create mode 100644 clients/client-iot-wireless/src/pagination/ListMulticastGroupsByFuotaTaskPaginator.ts create mode 100644 clients/client-iot-wireless/src/pagination/ListMulticastGroupsPaginator.ts create mode 100644 clients/client-neptune/src/waiters/waitForDBInstanceDeleted.ts create mode 100644 clients/client-networkmanager/src/commands/GetNetworkResourceCountsCommand.ts create mode 100644 clients/client-networkmanager/src/commands/GetNetworkResourceRelationshipsCommand.ts create mode 100644 clients/client-networkmanager/src/commands/GetNetworkResourcesCommand.ts create mode 100644 clients/client-networkmanager/src/commands/GetNetworkRoutesCommand.ts create mode 100644 clients/client-networkmanager/src/commands/GetNetworkTelemetryCommand.ts create mode 100644 clients/client-networkmanager/src/commands/GetRouteAnalysisCommand.ts create mode 100644 clients/client-networkmanager/src/commands/StartRouteAnalysisCommand.ts create mode 100644 clients/client-networkmanager/src/commands/UpdateNetworkResourceMetadataCommand.ts create mode 100644 clients/client-networkmanager/src/pagination/GetNetworkResourceCountsPaginator.ts create mode 100644 clients/client-networkmanager/src/pagination/GetNetworkResourceRelationshipsPaginator.ts create mode 100644 clients/client-networkmanager/src/pagination/GetNetworkResourcesPaginator.ts create mode 100644 clients/client-networkmanager/src/pagination/GetNetworkTelemetryPaginator.ts create mode 100644 clients/client-rekognition/src/commands/CreateDatasetCommand.ts create mode 100644 clients/client-rekognition/src/commands/DeleteDatasetCommand.ts create mode 100644 clients/client-rekognition/src/commands/DescribeDatasetCommand.ts create mode 100644 clients/client-rekognition/src/commands/DistributeDatasetEntriesCommand.ts create mode 100644 clients/client-rekognition/src/commands/ListDatasetEntriesCommand.ts create mode 100644 clients/client-rekognition/src/commands/ListDatasetLabelsCommand.ts create mode 100644 clients/client-rekognition/src/commands/UpdateDatasetEntriesCommand.ts create mode 100644 clients/client-rekognition/src/pagination/ListDatasetEntriesPaginator.ts create mode 100644 clients/client-rekognition/src/pagination/ListDatasetLabelsPaginator.ts create mode 100644 codegen/sdk-codegen/aws-models/chime-sdk-meetings.json diff --git a/clients/client-application-insights/src/models/models_0.ts b/clients/client-application-insights/src/models/models_0.ts index 6ee39f3dea80..2f905c70e93a 100644 --- a/clients/client-application-insights/src/models/models_0.ts +++ b/clients/client-application-insights/src/models/models_0.ts @@ -31,8 +31,13 @@ export type Tier = | "MYSQL" | "ORACLE" | "POSTGRESQL" + | "SAP_HANA" + | "SAP_HANA_HIGH_AVAILABILITY" + | "SAP_HANA_MULTI_NODE" + | "SAP_HANA_SINGLE_NODE" | "SQL_SERVER" - | "SQL_SERVER_ALWAYSON_AVAILABILITY_GROUP"; + | "SQL_SERVER_ALWAYSON_AVAILABILITY_GROUP" + | "SQL_SERVER_FAILOVER_CLUSTER_INSTANCE"; export type OsType = "LINUX" | "WINDOWS"; @@ -92,6 +97,11 @@ export namespace ApplicationComponent { }); } +export enum DiscoveryType { + ACCOUNT_BASED = "ACCOUNT_BASED", + RESOURCE_GROUP_BASED = "RESOURCE_GROUP_BASED", +} + /** *

Describes the status of the application.

*/ @@ -142,6 +152,9 @@ export interface ApplicationInfo { * */ Remarks?: string; + + AutoConfigEnabled?: boolean; + DiscoveryType?: DiscoveryType | string; } export namespace ApplicationInfo { @@ -294,7 +307,7 @@ export interface CreateApplicationRequest { /** *

The name of the resource group.

*/ - ResourceGroupName: string | undefined; + ResourceGroupName?: string; /** *

@@ -325,6 +338,9 @@ export interface CreateApplicationRequest { * characters.

*/ Tags?: Tag[]; + + AutoConfigEnabled?: boolean; + AutoCreate?: boolean; } export namespace CreateApplicationRequest { @@ -1231,7 +1247,7 @@ export type FeedbackValue = "NOT_SPECIFIED" | "NOT_USEFUL" | "USEFUL"; export type SeverityLevel = "High" | "Low" | "Medium"; -export type Status = "IGNORE" | "PENDING" | "RESOLVED"; +export type Status = "IGNORE" | "PENDING" | "RECURRING" | "RESOLVED"; /** *

Describes a problem that is detected by correlating observations.

@@ -1286,6 +1302,9 @@ export interface Problem { *

Feedback provided by the user about the problem.

*/ Feedback?: { [key: string]: FeedbackValue | string }; + + RecurringCount?: number; + LastRecurrenceTime?: Date; } export namespace Problem { @@ -1672,6 +1691,8 @@ export interface ListProblemsRequest { *

The token to request the next page of results.

*/ NextToken?: string; + + ComponentName?: string; } export namespace ListProblemsRequest { @@ -1694,6 +1715,8 @@ export interface ListProblemsResponse { * when there are no more results to return.

*/ NextToken?: string; + + ResourceGroupName?: string; } export namespace ListProblemsResponse { @@ -1866,6 +1889,8 @@ export interface UpdateApplicationRequest { * Disassociates the SNS topic from the opsItem created for detected problems.

*/ RemoveSNSTopic?: boolean; + + AutoConfigEnabled?: boolean; } export namespace UpdateApplicationRequest { @@ -1964,6 +1989,8 @@ export interface UpdateComponentConfigurationRequest { * format of the component configuration file, see Component Configuration.

*/ ComponentConfiguration?: string; + + AutoConfigEnabled?: boolean; } export namespace UpdateComponentConfigurationRequest { diff --git a/clients/client-application-insights/src/protocols/Aws_json1_1.ts b/clients/client-application-insights/src/protocols/Aws_json1_1.ts index 4975e1270ba4..2cab264c9135 100644 --- a/clients/client-application-insights/src/protocols/Aws_json1_1.ts +++ b/clients/client-application-insights/src/protocols/Aws_json1_1.ts @@ -2559,6 +2559,9 @@ const serializeAws_json1_1CreateApplicationRequest = ( context: __SerdeContext ): any => { return { + ...(input.AutoConfigEnabled !== undefined && + input.AutoConfigEnabled !== null && { AutoConfigEnabled: input.AutoConfigEnabled }), + ...(input.AutoCreate !== undefined && input.AutoCreate !== null && { AutoCreate: input.AutoCreate }), ...(input.CWEMonitorEnabled !== undefined && input.CWEMonitorEnabled !== null && { CWEMonitorEnabled: input.CWEMonitorEnabled }), ...(input.OpsCenterEnabled !== undefined && @@ -2760,6 +2763,7 @@ const serializeAws_json1_1ListLogPatternsRequest = (input: ListLogPatternsReques const serializeAws_json1_1ListProblemsRequest = (input: ListProblemsRequest, context: __SerdeContext): any => { return { + ...(input.ComponentName !== undefined && input.ComponentName !== null && { ComponentName: input.ComponentName }), ...(input.EndTime !== undefined && input.EndTime !== null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), @@ -2840,6 +2844,8 @@ const serializeAws_json1_1UpdateApplicationRequest = ( context: __SerdeContext ): any => { return { + ...(input.AutoConfigEnabled !== undefined && + input.AutoConfigEnabled !== null && { AutoConfigEnabled: input.AutoConfigEnabled }), ...(input.CWEMonitorEnabled !== undefined && input.CWEMonitorEnabled !== null && { CWEMonitorEnabled: input.CWEMonitorEnabled }), ...(input.OpsCenterEnabled !== undefined && @@ -2858,6 +2864,8 @@ const serializeAws_json1_1UpdateComponentConfigurationRequest = ( context: __SerdeContext ): any => { return { + ...(input.AutoConfigEnabled !== undefined && + input.AutoConfigEnabled !== null && { AutoConfigEnabled: input.AutoConfigEnabled }), ...(input.ComponentConfiguration !== undefined && input.ComponentConfiguration !== null && { ComponentConfiguration: input.ComponentConfiguration }), ...(input.ComponentName !== undefined && input.ComponentName !== null && { ComponentName: input.ComponentName }), @@ -2929,7 +2937,9 @@ const deserializeAws_json1_1ApplicationComponentList = ( const deserializeAws_json1_1ApplicationInfo = (output: any, context: __SerdeContext): ApplicationInfo => { return { + AutoConfigEnabled: __expectBoolean(output.AutoConfigEnabled), CWEMonitorEnabled: __expectBoolean(output.CWEMonitorEnabled), + DiscoveryType: __expectString(output.DiscoveryType), LifeCycle: __expectString(output.LifeCycle), OpsCenterEnabled: __expectBoolean(output.OpsCenterEnabled), OpsItemSNSTopicArn: __expectString(output.OpsItemSNSTopicArn), @@ -3246,6 +3256,7 @@ const deserializeAws_json1_1ListProblemsResponse = (output: any, context: __Serd output.ProblemList !== undefined && output.ProblemList !== null ? deserializeAws_json1_1ProblemList(output.ProblemList, context) : undefined, + ResourceGroupName: __expectString(output.ResourceGroupName), } as any; }; @@ -3375,6 +3386,11 @@ const deserializeAws_json1_1Problem = (output: any, context: __SerdeContext): Pr : undefined, Id: __expectString(output.Id), Insights: __expectString(output.Insights), + LastRecurrenceTime: + output.LastRecurrenceTime !== undefined && output.LastRecurrenceTime !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRecurrenceTime))) + : undefined, + RecurringCount: __expectLong(output.RecurringCount), ResourceGroupName: __expectString(output.ResourceGroupName), SeverityLevel: __expectString(output.SeverityLevel), StartTime: diff --git a/clients/client-chime-sdk-meetings/.gitignore b/clients/client-chime-sdk-meetings/.gitignore new file mode 100644 index 000000000000..54f14c9aef25 --- /dev/null +++ b/clients/client-chime-sdk-meetings/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-chime-sdk-meetings/LICENSE b/clients/client-chime-sdk-meetings/LICENSE new file mode 100644 index 000000000000..f9e0c8672bca --- /dev/null +++ b/clients/client-chime-sdk-meetings/LICENSE @@ -0,0 +1,201 @@ + 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 2018-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. + 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/clients/client-chime-sdk-meetings/README.md b/clients/client-chime-sdk-meetings/README.md new file mode 100644 index 000000000000..18a84ae16cc5 --- /dev/null +++ b/clients/client-chime-sdk-meetings/README.md @@ -0,0 +1,205 @@ +# @aws-sdk/client-chime-sdk-meetings + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-chime-sdk-meetings/latest.svg)](https://www.npmjs.com/package/@aws-sdk/client-chime-sdk-meetings) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-chime-sdk-meetings.svg)](https://www.npmjs.com/package/@aws-sdk/client-chime-sdk-meetings) + +## Description + +AWS SDK for JavaScript ChimeSDKMeetings Client for Node.js, Browser and React Native. + +

The Amazon Chime SDK meetings APIs in this section allow software developers to create Amazon Chime SDK meetings, set the AWS Regions for meetings, create and manage users, and send and +receive meeting notifications. For more information +about the meeting APIs, see Amazon Chime SDK meetings.

+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-chime-sdk-meetings +using your favorite package manager: + +- `npm install @aws-sdk/client-chime-sdk-meetings` +- `yarn add @aws-sdk/client-chime-sdk-meetings` +- `pnpm add @aws-sdk/client-chime-sdk-meetings` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `ChimeSDKMeetingsClient` and +the commands you need, for example `BatchCreateAttendeeCommand`: + +```js +// ES5 example +const { ChimeSDKMeetingsClient, BatchCreateAttendeeCommand } = require("@aws-sdk/client-chime-sdk-meetings"); +``` + +```ts +// ES6+ example +import { ChimeSDKMeetingsClient, BatchCreateAttendeeCommand } from "@aws-sdk/client-chime-sdk-meetings"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new ChimeSDKMeetingsClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new BatchCreateAttendeeCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // proccess err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-chime-sdk-meetings"; +const client = new AWS.ChimeSDKMeetings({ region: "REGION" }); + +// async/await. +try { + const data = await client.batchCreateAttendee(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .batchCreateAttendee(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.batchCreateAttendee(params, (err, data) => { + // proccess err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-chime-sdk-meetings` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. diff --git a/clients/client-chime-sdk-meetings/jest.config.js b/clients/client-chime-sdk-meetings/jest.config.js new file mode 100644 index 000000000000..02eed352c6a8 --- /dev/null +++ b/clients/client-chime-sdk-meetings/jest.config.js @@ -0,0 +1,4 @@ +module.exports = { + preset: "ts-jest", + testMatch: ["**/*.spec.ts", "!**/*.browser.spec.ts", "!**/*.integ.spec.ts"], +}; diff --git a/clients/client-chime-sdk-meetings/package.json b/clients/client-chime-sdk-meetings/package.json new file mode 100644 index 000000000000..aaaf70b589e1 --- /dev/null +++ b/clients/client-chime-sdk-meetings/package.json @@ -0,0 +1,96 @@ +{ + "name": "@aws-sdk/client-chime-sdk-meetings", + "description": "AWS SDK for JavaScript Chime Sdk Meetings Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "yarn build:cjs && yarn build:es && yarn build:types", + "build:cjs": "tsc -p tsconfig.json", + "build:docs": "yarn clean:docs && typedoc ./", + "build:es": "tsc -p tsconfig.es.json", + "build:types": "tsc -p tsconfig.types.json", + "clean": "yarn clean:dist && yarn clean:docs", + "clean:dist": "rimraf ./dist-*", + "clean:docs": "rimraf ./docs", + "downlevel-dts": "downlevel-dts dist-types dist-types/ts3.4", + "test": "jest --coverage --passWithNoTests" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "2.0.0", + "@aws-crypto/sha256-js": "2.0.0", + "@aws-sdk/client-sts": "3.39.0", + "@aws-sdk/config-resolver": "3.39.0", + "@aws-sdk/credential-provider-node": "3.39.0", + "@aws-sdk/fetch-http-handler": "3.38.0", + "@aws-sdk/hash-node": "3.38.0", + "@aws-sdk/invalid-dependency": "3.38.0", + "@aws-sdk/middleware-content-length": "3.38.0", + "@aws-sdk/middleware-host-header": "3.38.0", + "@aws-sdk/middleware-logger": "3.38.0", + "@aws-sdk/middleware-retry": "3.39.0", + "@aws-sdk/middleware-serde": "3.38.0", + "@aws-sdk/middleware-signing": "3.39.0", + "@aws-sdk/middleware-stack": "3.38.0", + "@aws-sdk/middleware-user-agent": "3.38.0", + "@aws-sdk/node-config-provider": "3.39.0", + "@aws-sdk/node-http-handler": "3.38.0", + "@aws-sdk/protocol-http": "3.38.0", + "@aws-sdk/smithy-client": "3.38.0", + "@aws-sdk/types": "3.38.0", + "@aws-sdk/url-parser": "3.38.0", + "@aws-sdk/util-base64-browser": "3.37.0", + "@aws-sdk/util-base64-node": "3.37.0", + "@aws-sdk/util-body-length-browser": "3.37.0", + "@aws-sdk/util-body-length-node": "3.37.0", + "@aws-sdk/util-user-agent-browser": "3.38.0", + "@aws-sdk/util-user-agent-node": "3.39.0", + "@aws-sdk/util-utf8-browser": "3.37.0", + "@aws-sdk/util-utf8-node": "3.37.0", + "tslib": "^2.3.0", + "uuid": "^8.3.2" + }, + "devDependencies": { + "@aws-sdk/service-client-documentation-generator": "3.38.0", + "@types/node": "^12.7.5", + "@types/uuid": "^8.3.0", + "downlevel-dts": "0.7.0", + "jest": "^26.1.0", + "rimraf": "^3.0.0", + "ts-jest": "^26.4.1", + "typedoc": "^0.19.2", + "typescript": "~4.3.5" + }, + "engines": { + "node": ">=10.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "browser": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-chime-sdk-meetings", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-chime-sdk-meetings" + } +} diff --git a/clients/client-chime-sdk-meetings/src/ChimeSDKMeetings.ts b/clients/client-chime-sdk-meetings/src/ChimeSDKMeetings.ts new file mode 100644 index 000000000000..89bfed6bf5b6 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/ChimeSDKMeetings.ts @@ -0,0 +1,430 @@ +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; + +import { ChimeSDKMeetingsClient } from "./ChimeSDKMeetingsClient"; +import { + BatchCreateAttendeeCommand, + BatchCreateAttendeeCommandInput, + BatchCreateAttendeeCommandOutput, +} from "./commands/BatchCreateAttendeeCommand"; +import { + CreateAttendeeCommand, + CreateAttendeeCommandInput, + CreateAttendeeCommandOutput, +} from "./commands/CreateAttendeeCommand"; +import { + CreateMeetingCommand, + CreateMeetingCommandInput, + CreateMeetingCommandOutput, +} from "./commands/CreateMeetingCommand"; +import { + CreateMeetingWithAttendeesCommand, + CreateMeetingWithAttendeesCommandInput, + CreateMeetingWithAttendeesCommandOutput, +} from "./commands/CreateMeetingWithAttendeesCommand"; +import { + DeleteAttendeeCommand, + DeleteAttendeeCommandInput, + DeleteAttendeeCommandOutput, +} from "./commands/DeleteAttendeeCommand"; +import { + DeleteMeetingCommand, + DeleteMeetingCommandInput, + DeleteMeetingCommandOutput, +} from "./commands/DeleteMeetingCommand"; +import { GetAttendeeCommand, GetAttendeeCommandInput, GetAttendeeCommandOutput } from "./commands/GetAttendeeCommand"; +import { GetMeetingCommand, GetMeetingCommandInput, GetMeetingCommandOutput } from "./commands/GetMeetingCommand"; +import { + ListAttendeesCommand, + ListAttendeesCommandInput, + ListAttendeesCommandOutput, +} from "./commands/ListAttendeesCommand"; +import { + StartMeetingTranscriptionCommand, + StartMeetingTranscriptionCommandInput, + StartMeetingTranscriptionCommandOutput, +} from "./commands/StartMeetingTranscriptionCommand"; +import { + StopMeetingTranscriptionCommand, + StopMeetingTranscriptionCommandInput, + StopMeetingTranscriptionCommandOutput, +} from "./commands/StopMeetingTranscriptionCommand"; + +/** + *

The Amazon Chime SDK meetings APIs in this section allow software developers to create Amazon Chime SDK meetings, set the AWS Regions for meetings, create and manage users, and send and + * receive meeting notifications. For more information + * about the meeting APIs, see Amazon Chime SDK meetings.

+ */ +export class ChimeSDKMeetings extends ChimeSDKMeetingsClient { + /** + *

Creates a group of meeting attendees.

+ */ + public batchCreateAttendee( + args: BatchCreateAttendeeCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public batchCreateAttendee( + args: BatchCreateAttendeeCommandInput, + cb: (err: any, data?: BatchCreateAttendeeCommandOutput) => void + ): void; + public batchCreateAttendee( + args: BatchCreateAttendeeCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: BatchCreateAttendeeCommandOutput) => void + ): void; + public batchCreateAttendee( + args: BatchCreateAttendeeCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: BatchCreateAttendeeCommandOutput) => void), + cb?: (err: any, data?: BatchCreateAttendeeCommandOutput) => void + ): Promise | void { + const command = new BatchCreateAttendeeCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

+ * Creates a new attendee for an active Amazon Chime SDK meeting. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the + * Amazon Chime Developer Guide. + *

+ */ + public createAttendee( + args: CreateAttendeeCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createAttendee( + args: CreateAttendeeCommandInput, + cb: (err: any, data?: CreateAttendeeCommandOutput) => void + ): void; + public createAttendee( + args: CreateAttendeeCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateAttendeeCommandOutput) => void + ): void; + public createAttendee( + args: CreateAttendeeCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateAttendeeCommandOutput) => void), + cb?: (err: any, data?: CreateAttendeeCommandOutput) => void + ): Promise | void { + const command = new CreateAttendeeCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Creates a new Amazon Chime SDK meeting in the specified media Region with no initial attendees. For more information about specifying media Regions, see + * Amazon Chime SDK Media Regions + * in the Amazon Chime Developer Guide. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the + * Amazon Chime Developer Guide. + *

+ */ + public createMeeting( + args: CreateMeetingCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createMeeting( + args: CreateMeetingCommandInput, + cb: (err: any, data?: CreateMeetingCommandOutput) => void + ): void; + public createMeeting( + args: CreateMeetingCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateMeetingCommandOutput) => void + ): void; + public createMeeting( + args: CreateMeetingCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateMeetingCommandOutput) => void), + cb?: (err: any, data?: CreateMeetingCommandOutput) => void + ): Promise | void { + const command = new CreateMeetingCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

+ * Creates a new Amazon Chime SDK meeting in the specified media Region, with attendees. For more information about specifying media Regions, see + * Amazon Chime SDK Media Regions + * in the Amazon Chime Developer Guide. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the Amazon Chime Developer Guide. + *

+ */ + public createMeetingWithAttendees( + args: CreateMeetingWithAttendeesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createMeetingWithAttendees( + args: CreateMeetingWithAttendeesCommandInput, + cb: (err: any, data?: CreateMeetingWithAttendeesCommandOutput) => void + ): void; + public createMeetingWithAttendees( + args: CreateMeetingWithAttendeesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateMeetingWithAttendeesCommandOutput) => void + ): void; + public createMeetingWithAttendees( + args: CreateMeetingWithAttendeesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateMeetingWithAttendeesCommandOutput) => void), + cb?: (err: any, data?: CreateMeetingWithAttendeesCommandOutput) => void + ): Promise | void { + const command = new CreateMeetingWithAttendeesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Deletes an attendee from the specified Amazon Chime SDK meeting and deletes their + * JoinToken. Attendees are automatically deleted when a Amazon Chime SDK meeting is deleted. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the Amazon Chime Developer Guide.

+ */ + public deleteAttendee( + args: DeleteAttendeeCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteAttendee( + args: DeleteAttendeeCommandInput, + cb: (err: any, data?: DeleteAttendeeCommandOutput) => void + ): void; + public deleteAttendee( + args: DeleteAttendeeCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteAttendeeCommandOutput) => void + ): void; + public deleteAttendee( + args: DeleteAttendeeCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteAttendeeCommandOutput) => void), + cb?: (err: any, data?: DeleteAttendeeCommandOutput) => void + ): Promise | void { + const command = new DeleteAttendeeCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Deletes the specified Amazon Chime SDK meeting. The operation deletes all attendees, disconnects all clients, and prevents new clients from + * joining the meeting. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK in the + * Amazon Chime Developer Guide.

+ */ + public deleteMeeting( + args: DeleteMeetingCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteMeeting( + args: DeleteMeetingCommandInput, + cb: (err: any, data?: DeleteMeetingCommandOutput) => void + ): void; + public deleteMeeting( + args: DeleteMeetingCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteMeetingCommandOutput) => void + ): void; + public deleteMeeting( + args: DeleteMeetingCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteMeetingCommandOutput) => void), + cb?: (err: any, data?: DeleteMeetingCommandOutput) => void + ): Promise | void { + const command = new DeleteMeetingCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

+ * Gets the Amazon Chime SDK attendee details for a specified meeting ID and attendee ID. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the Amazon Chime Developer Guide. + *

+ */ + public getAttendee(args: GetAttendeeCommandInput, options?: __HttpHandlerOptions): Promise; + public getAttendee(args: GetAttendeeCommandInput, cb: (err: any, data?: GetAttendeeCommandOutput) => void): void; + public getAttendee( + args: GetAttendeeCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAttendeeCommandOutput) => void + ): void; + public getAttendee( + args: GetAttendeeCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetAttendeeCommandOutput) => void), + cb?: (err: any, data?: GetAttendeeCommandOutput) => void + ): Promise | void { + const command = new GetAttendeeCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Gets the Amazon Chime SDK meeting details for the specified meeting ID. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the Amazon Chime Developer Guide.

+ */ + public getMeeting(args: GetMeetingCommandInput, options?: __HttpHandlerOptions): Promise; + public getMeeting(args: GetMeetingCommandInput, cb: (err: any, data?: GetMeetingCommandOutput) => void): void; + public getMeeting( + args: GetMeetingCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetMeetingCommandOutput) => void + ): void; + public getMeeting( + args: GetMeetingCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetMeetingCommandOutput) => void), + cb?: (err: any, data?: GetMeetingCommandOutput) => void + ): Promise | void { + const command = new GetMeetingCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

+ * Lists the attendees for the specified Amazon Chime SDK meeting. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the Amazon Chime Developer Guide. + *

+ */ + public listAttendees( + args: ListAttendeesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listAttendees( + args: ListAttendeesCommandInput, + cb: (err: any, data?: ListAttendeesCommandOutput) => void + ): void; + public listAttendees( + args: ListAttendeesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListAttendeesCommandOutput) => void + ): void; + public listAttendees( + args: ListAttendeesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListAttendeesCommandOutput) => void), + cb?: (err: any, data?: ListAttendeesCommandOutput) => void + ): Promise | void { + const command = new ListAttendeesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Starts transcription for the specified meetingId.

+ */ + public startMeetingTranscription( + args: StartMeetingTranscriptionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startMeetingTranscription( + args: StartMeetingTranscriptionCommandInput, + cb: (err: any, data?: StartMeetingTranscriptionCommandOutput) => void + ): void; + public startMeetingTranscription( + args: StartMeetingTranscriptionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartMeetingTranscriptionCommandOutput) => void + ): void; + public startMeetingTranscription( + args: StartMeetingTranscriptionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartMeetingTranscriptionCommandOutput) => void), + cb?: (err: any, data?: StartMeetingTranscriptionCommandOutput) => void + ): Promise | void { + const command = new StartMeetingTranscriptionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Stops transcription for the specified meetingId.

+ */ + public stopMeetingTranscription( + args: StopMeetingTranscriptionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public stopMeetingTranscription( + args: StopMeetingTranscriptionCommandInput, + cb: (err: any, data?: StopMeetingTranscriptionCommandOutput) => void + ): void; + public stopMeetingTranscription( + args: StopMeetingTranscriptionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StopMeetingTranscriptionCommandOutput) => void + ): void; + public stopMeetingTranscription( + args: StopMeetingTranscriptionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StopMeetingTranscriptionCommandOutput) => void), + cb?: (err: any, data?: StopMeetingTranscriptionCommandOutput) => void + ): Promise | void { + const command = new StopMeetingTranscriptionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } +} diff --git a/clients/client-chime-sdk-meetings/src/ChimeSDKMeetingsClient.ts b/clients/client-chime-sdk-meetings/src/ChimeSDKMeetingsClient.ts new file mode 100644 index 000000000000..3fbc03ada5fb --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/ChimeSDKMeetingsClient.ts @@ -0,0 +1,293 @@ +import { + EndpointsInputConfig, + EndpointsResolvedConfig, + RegionInputConfig, + RegionResolvedConfig, + resolveEndpointsConfig, + resolveRegionConfig, +} from "@aws-sdk/config-resolver"; +import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length"; +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig, +} from "@aws-sdk/middleware-signing"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http"; +import { + Client as __Client, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@aws-sdk/smithy-client"; +import { + Credentials as __Credentials, + Decoder as __Decoder, + Encoder as __Encoder, + Hash as __Hash, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + RegionInfoProvider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@aws-sdk/types"; + +import { + BatchCreateAttendeeCommandInput, + BatchCreateAttendeeCommandOutput, +} from "./commands/BatchCreateAttendeeCommand"; +import { CreateAttendeeCommandInput, CreateAttendeeCommandOutput } from "./commands/CreateAttendeeCommand"; +import { CreateMeetingCommandInput, CreateMeetingCommandOutput } from "./commands/CreateMeetingCommand"; +import { + CreateMeetingWithAttendeesCommandInput, + CreateMeetingWithAttendeesCommandOutput, +} from "./commands/CreateMeetingWithAttendeesCommand"; +import { DeleteAttendeeCommandInput, DeleteAttendeeCommandOutput } from "./commands/DeleteAttendeeCommand"; +import { DeleteMeetingCommandInput, DeleteMeetingCommandOutput } from "./commands/DeleteMeetingCommand"; +import { GetAttendeeCommandInput, GetAttendeeCommandOutput } from "./commands/GetAttendeeCommand"; +import { GetMeetingCommandInput, GetMeetingCommandOutput } from "./commands/GetMeetingCommand"; +import { ListAttendeesCommandInput, ListAttendeesCommandOutput } from "./commands/ListAttendeesCommand"; +import { + StartMeetingTranscriptionCommandInput, + StartMeetingTranscriptionCommandOutput, +} from "./commands/StartMeetingTranscriptionCommand"; +import { + StopMeetingTranscriptionCommandInput, + StopMeetingTranscriptionCommandOutput, +} from "./commands/StopMeetingTranscriptionCommand"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; + +export type ServiceInputTypes = + | BatchCreateAttendeeCommandInput + | CreateAttendeeCommandInput + | CreateMeetingCommandInput + | CreateMeetingWithAttendeesCommandInput + | DeleteAttendeeCommandInput + | DeleteMeetingCommandInput + | GetAttendeeCommandInput + | GetMeetingCommandInput + | ListAttendeesCommandInput + | StartMeetingTranscriptionCommandInput + | StopMeetingTranscriptionCommandInput; + +export type ServiceOutputTypes = + | BatchCreateAttendeeCommandOutput + | CreateAttendeeCommandOutput + | CreateMeetingCommandOutput + | CreateMeetingWithAttendeesCommandOutput + | DeleteAttendeeCommandOutput + | DeleteMeetingCommandOutput + | GetAttendeeCommandOutput + | GetMeetingCommandOutput + | ListAttendeesCommandOutput + | StartMeetingTranscriptionCommandOutput + | StopMeetingTranscriptionCommandOutput; + +export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the {@link __Hash} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: (body: any) => number | undefined; + + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + + /** + * The runtime environment. + * @internal + */ + runtime?: string; + + /** + * Disable dyanamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * Default credentials provider; Not available in browser runtime. + * @internal + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * Fetch related hostname, signing name or signing region with given region. + * @internal + */ + regionInfoProvider?: RegionInfoProvider; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; +} + +type ChimeSDKMeetingsClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + RegionInputConfig & + EndpointsInputConfig & + RetryInputConfig & + HostHeaderInputConfig & + AwsAuthInputConfig & + UserAgentInputConfig; +/** + * The configuration interface of ChimeSDKMeetingsClient class constructor that set the region, credentials and other options. + */ +export interface ChimeSDKMeetingsClientConfig extends ChimeSDKMeetingsClientConfigType {} + +type ChimeSDKMeetingsClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RegionResolvedConfig & + EndpointsResolvedConfig & + RetryResolvedConfig & + HostHeaderResolvedConfig & + AwsAuthResolvedConfig & + UserAgentResolvedConfig; +/** + * The resolved configuration interface of ChimeSDKMeetingsClient class. This is resolved and normalized from the {@link ChimeSDKMeetingsClientConfig | constructor configuration interface}. + */ +export interface ChimeSDKMeetingsClientResolvedConfig extends ChimeSDKMeetingsClientResolvedConfigType {} + +/** + *

The Amazon Chime SDK meetings APIs in this section allow software developers to create Amazon Chime SDK meetings, set the AWS Regions for meetings, create and manage users, and send and + * receive meeting notifications. For more information + * about the meeting APIs, see Amazon Chime SDK meetings.

+ */ +export class ChimeSDKMeetingsClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + ChimeSDKMeetingsClientResolvedConfig +> { + /** + * The resolved configuration of ChimeSDKMeetingsClient class. This is resolved and normalized from the {@link ChimeSDKMeetingsClientConfig | constructor configuration interface}. + */ + readonly config: ChimeSDKMeetingsClientResolvedConfig; + + constructor(configuration: ChimeSDKMeetingsClientConfig) { + const _config_0 = __getRuntimeConfig(configuration); + const _config_1 = resolveRegionConfig(_config_0); + const _config_2 = resolveEndpointsConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveHostHeaderConfig(_config_3); + const _config_5 = resolveAwsAuthConfig(_config_4); + const _config_6 = resolveUserAgentConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + } + + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-chime-sdk-meetings/src/commands/BatchCreateAttendeeCommand.ts b/clients/client-chime-sdk-meetings/src/commands/BatchCreateAttendeeCommand.ts new file mode 100644 index 000000000000..8d3a0a6495dc --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/commands/BatchCreateAttendeeCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ChimeSDKMeetingsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKMeetingsClient"; +import { BatchCreateAttendeeRequest, BatchCreateAttendeeResponse } from "../models/models_0"; +import { + deserializeAws_restJson1BatchCreateAttendeeCommand, + serializeAws_restJson1BatchCreateAttendeeCommand, +} from "../protocols/Aws_restJson1"; + +export interface BatchCreateAttendeeCommandInput extends BatchCreateAttendeeRequest {} +export interface BatchCreateAttendeeCommandOutput extends BatchCreateAttendeeResponse, __MetadataBearer {} + +/** + *

Creates a group of meeting attendees.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ChimeSDKMeetingsClient, BatchCreateAttendeeCommand } from "@aws-sdk/client-chime-sdk-meetings"; // ES Modules import + * // const { ChimeSDKMeetingsClient, BatchCreateAttendeeCommand } = require("@aws-sdk/client-chime-sdk-meetings"); // CommonJS import + * const client = new ChimeSDKMeetingsClient(config); + * const command = new BatchCreateAttendeeCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link BatchCreateAttendeeCommandInput} for command's `input` shape. + * @see {@link BatchCreateAttendeeCommandOutput} for command's `response` shape. + * @see {@link ChimeSDKMeetingsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class BatchCreateAttendeeCommand extends $Command< + BatchCreateAttendeeCommandInput, + BatchCreateAttendeeCommandOutput, + ChimeSDKMeetingsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: BatchCreateAttendeeCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ChimeSDKMeetingsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ChimeSDKMeetingsClient"; + const commandName = "BatchCreateAttendeeCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: BatchCreateAttendeeRequest.filterSensitiveLog, + outputFilterSensitiveLog: BatchCreateAttendeeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: BatchCreateAttendeeCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1BatchCreateAttendeeCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1BatchCreateAttendeeCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-chime-sdk-meetings/src/commands/CreateAttendeeCommand.ts b/clients/client-chime-sdk-meetings/src/commands/CreateAttendeeCommand.ts new file mode 100644 index 000000000000..3dcf94a96b82 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/commands/CreateAttendeeCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ChimeSDKMeetingsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKMeetingsClient"; +import { CreateAttendeeRequest, CreateAttendeeResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateAttendeeCommand, + serializeAws_restJson1CreateAttendeeCommand, +} from "../protocols/Aws_restJson1"; + +export interface CreateAttendeeCommandInput extends CreateAttendeeRequest {} +export interface CreateAttendeeCommandOutput extends CreateAttendeeResponse, __MetadataBearer {} + +/** + *

+ * Creates a new attendee for an active Amazon Chime SDK meeting. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the + * Amazon Chime Developer Guide. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ChimeSDKMeetingsClient, CreateAttendeeCommand } from "@aws-sdk/client-chime-sdk-meetings"; // ES Modules import + * // const { ChimeSDKMeetingsClient, CreateAttendeeCommand } = require("@aws-sdk/client-chime-sdk-meetings"); // CommonJS import + * const client = new ChimeSDKMeetingsClient(config); + * const command = new CreateAttendeeCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateAttendeeCommandInput} for command's `input` shape. + * @see {@link CreateAttendeeCommandOutput} for command's `response` shape. + * @see {@link ChimeSDKMeetingsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateAttendeeCommand extends $Command< + CreateAttendeeCommandInput, + CreateAttendeeCommandOutput, + ChimeSDKMeetingsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateAttendeeCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ChimeSDKMeetingsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ChimeSDKMeetingsClient"; + const commandName = "CreateAttendeeCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateAttendeeRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateAttendeeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateAttendeeCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateAttendeeCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1CreateAttendeeCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-chime-sdk-meetings/src/commands/CreateMeetingCommand.ts b/clients/client-chime-sdk-meetings/src/commands/CreateMeetingCommand.ts new file mode 100644 index 000000000000..c37746b286f2 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/commands/CreateMeetingCommand.ts @@ -0,0 +1,101 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ChimeSDKMeetingsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKMeetingsClient"; +import { CreateMeetingRequest, CreateMeetingResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateMeetingCommand, + serializeAws_restJson1CreateMeetingCommand, +} from "../protocols/Aws_restJson1"; + +export interface CreateMeetingCommandInput extends CreateMeetingRequest {} +export interface CreateMeetingCommandOutput extends CreateMeetingResponse, __MetadataBearer {} + +/** + *

Creates a new Amazon Chime SDK meeting in the specified media Region with no initial attendees. For more information about specifying media Regions, see + * Amazon Chime SDK Media Regions + * in the Amazon Chime Developer Guide. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the + * Amazon Chime Developer Guide. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ChimeSDKMeetingsClient, CreateMeetingCommand } from "@aws-sdk/client-chime-sdk-meetings"; // ES Modules import + * // const { ChimeSDKMeetingsClient, CreateMeetingCommand } = require("@aws-sdk/client-chime-sdk-meetings"); // CommonJS import + * const client = new ChimeSDKMeetingsClient(config); + * const command = new CreateMeetingCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateMeetingCommandInput} for command's `input` shape. + * @see {@link CreateMeetingCommandOutput} for command's `response` shape. + * @see {@link ChimeSDKMeetingsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateMeetingCommand extends $Command< + CreateMeetingCommandInput, + CreateMeetingCommandOutput, + ChimeSDKMeetingsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateMeetingCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ChimeSDKMeetingsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ChimeSDKMeetingsClient"; + const commandName = "CreateMeetingCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateMeetingRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateMeetingResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateMeetingCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateMeetingCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1CreateMeetingCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-chime-sdk-meetings/src/commands/CreateMeetingWithAttendeesCommand.ts b/clients/client-chime-sdk-meetings/src/commands/CreateMeetingWithAttendeesCommand.ts new file mode 100644 index 000000000000..12e54d0f3f3b --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/commands/CreateMeetingWithAttendeesCommand.ts @@ -0,0 +1,104 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ChimeSDKMeetingsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKMeetingsClient"; +import { CreateMeetingWithAttendeesRequest, CreateMeetingWithAttendeesResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateMeetingWithAttendeesCommand, + serializeAws_restJson1CreateMeetingWithAttendeesCommand, +} from "../protocols/Aws_restJson1"; + +export interface CreateMeetingWithAttendeesCommandInput extends CreateMeetingWithAttendeesRequest {} +export interface CreateMeetingWithAttendeesCommandOutput extends CreateMeetingWithAttendeesResponse, __MetadataBearer {} + +/** + *

+ * Creates a new Amazon Chime SDK meeting in the specified media Region, with attendees. For more information about specifying media Regions, see + * Amazon Chime SDK Media Regions + * in the Amazon Chime Developer Guide. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the Amazon Chime Developer Guide. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ChimeSDKMeetingsClient, CreateMeetingWithAttendeesCommand } from "@aws-sdk/client-chime-sdk-meetings"; // ES Modules import + * // const { ChimeSDKMeetingsClient, CreateMeetingWithAttendeesCommand } = require("@aws-sdk/client-chime-sdk-meetings"); // CommonJS import + * const client = new ChimeSDKMeetingsClient(config); + * const command = new CreateMeetingWithAttendeesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateMeetingWithAttendeesCommandInput} for command's `input` shape. + * @see {@link CreateMeetingWithAttendeesCommandOutput} for command's `response` shape. + * @see {@link ChimeSDKMeetingsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateMeetingWithAttendeesCommand extends $Command< + CreateMeetingWithAttendeesCommandInput, + CreateMeetingWithAttendeesCommandOutput, + ChimeSDKMeetingsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateMeetingWithAttendeesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ChimeSDKMeetingsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ChimeSDKMeetingsClient"; + const commandName = "CreateMeetingWithAttendeesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateMeetingWithAttendeesRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateMeetingWithAttendeesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateMeetingWithAttendeesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateMeetingWithAttendeesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1CreateMeetingWithAttendeesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-chime-sdk-meetings/src/commands/DeleteAttendeeCommand.ts b/clients/client-chime-sdk-meetings/src/commands/DeleteAttendeeCommand.ts new file mode 100644 index 000000000000..327d2dc33f5a --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/commands/DeleteAttendeeCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ChimeSDKMeetingsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKMeetingsClient"; +import { DeleteAttendeeRequest } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteAttendeeCommand, + serializeAws_restJson1DeleteAttendeeCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteAttendeeCommandInput extends DeleteAttendeeRequest {} +export interface DeleteAttendeeCommandOutput extends __MetadataBearer {} + +/** + *

Deletes an attendee from the specified Amazon Chime SDK meeting and deletes their + * JoinToken. Attendees are automatically deleted when a Amazon Chime SDK meeting is deleted. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the Amazon Chime Developer Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ChimeSDKMeetingsClient, DeleteAttendeeCommand } from "@aws-sdk/client-chime-sdk-meetings"; // ES Modules import + * // const { ChimeSDKMeetingsClient, DeleteAttendeeCommand } = require("@aws-sdk/client-chime-sdk-meetings"); // CommonJS import + * const client = new ChimeSDKMeetingsClient(config); + * const command = new DeleteAttendeeCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteAttendeeCommandInput} for command's `input` shape. + * @see {@link DeleteAttendeeCommandOutput} for command's `response` shape. + * @see {@link ChimeSDKMeetingsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteAttendeeCommand extends $Command< + DeleteAttendeeCommandInput, + DeleteAttendeeCommandOutput, + ChimeSDKMeetingsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteAttendeeCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ChimeSDKMeetingsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ChimeSDKMeetingsClient"; + const commandName = "DeleteAttendeeCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteAttendeeRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteAttendeeCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteAttendeeCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteAttendeeCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-chime-sdk-meetings/src/commands/DeleteMeetingCommand.ts b/clients/client-chime-sdk-meetings/src/commands/DeleteMeetingCommand.ts new file mode 100644 index 000000000000..b6ff3577f868 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/commands/DeleteMeetingCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ChimeSDKMeetingsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKMeetingsClient"; +import { DeleteMeetingRequest } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteMeetingCommand, + serializeAws_restJson1DeleteMeetingCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteMeetingCommandInput extends DeleteMeetingRequest {} +export interface DeleteMeetingCommandOutput extends __MetadataBearer {} + +/** + *

Deletes the specified Amazon Chime SDK meeting. The operation deletes all attendees, disconnects all clients, and prevents new clients from + * joining the meeting. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK in the + * Amazon Chime Developer Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ChimeSDKMeetingsClient, DeleteMeetingCommand } from "@aws-sdk/client-chime-sdk-meetings"; // ES Modules import + * // const { ChimeSDKMeetingsClient, DeleteMeetingCommand } = require("@aws-sdk/client-chime-sdk-meetings"); // CommonJS import + * const client = new ChimeSDKMeetingsClient(config); + * const command = new DeleteMeetingCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteMeetingCommandInput} for command's `input` shape. + * @see {@link DeleteMeetingCommandOutput} for command's `response` shape. + * @see {@link ChimeSDKMeetingsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteMeetingCommand extends $Command< + DeleteMeetingCommandInput, + DeleteMeetingCommandOutput, + ChimeSDKMeetingsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteMeetingCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ChimeSDKMeetingsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ChimeSDKMeetingsClient"; + const commandName = "DeleteMeetingCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteMeetingRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteMeetingCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteMeetingCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteMeetingCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-chime-sdk-meetings/src/commands/GetAttendeeCommand.ts b/clients/client-chime-sdk-meetings/src/commands/GetAttendeeCommand.ts new file mode 100644 index 000000000000..d1543e08a34d --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/commands/GetAttendeeCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ChimeSDKMeetingsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKMeetingsClient"; +import { GetAttendeeRequest, GetAttendeeResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetAttendeeCommand, + serializeAws_restJson1GetAttendeeCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetAttendeeCommandInput extends GetAttendeeRequest {} +export interface GetAttendeeCommandOutput extends GetAttendeeResponse, __MetadataBearer {} + +/** + *

+ * Gets the Amazon Chime SDK attendee details for a specified meeting ID and attendee ID. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the Amazon Chime Developer Guide. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ChimeSDKMeetingsClient, GetAttendeeCommand } from "@aws-sdk/client-chime-sdk-meetings"; // ES Modules import + * // const { ChimeSDKMeetingsClient, GetAttendeeCommand } = require("@aws-sdk/client-chime-sdk-meetings"); // CommonJS import + * const client = new ChimeSDKMeetingsClient(config); + * const command = new GetAttendeeCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetAttendeeCommandInput} for command's `input` shape. + * @see {@link GetAttendeeCommandOutput} for command's `response` shape. + * @see {@link ChimeSDKMeetingsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetAttendeeCommand extends $Command< + GetAttendeeCommandInput, + GetAttendeeCommandOutput, + ChimeSDKMeetingsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetAttendeeCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ChimeSDKMeetingsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ChimeSDKMeetingsClient"; + const commandName = "GetAttendeeCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetAttendeeRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetAttendeeResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetAttendeeCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetAttendeeCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetAttendeeCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-chime-sdk-meetings/src/commands/GetMeetingCommand.ts b/clients/client-chime-sdk-meetings/src/commands/GetMeetingCommand.ts new file mode 100644 index 000000000000..744863635951 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/commands/GetMeetingCommand.ts @@ -0,0 +1,97 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ChimeSDKMeetingsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKMeetingsClient"; +import { GetMeetingRequest, GetMeetingResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetMeetingCommand, + serializeAws_restJson1GetMeetingCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetMeetingCommandInput extends GetMeetingRequest {} +export interface GetMeetingCommandOutput extends GetMeetingResponse, __MetadataBearer {} + +/** + *

Gets the Amazon Chime SDK meeting details for the specified meeting ID. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the Amazon Chime Developer Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ChimeSDKMeetingsClient, GetMeetingCommand } from "@aws-sdk/client-chime-sdk-meetings"; // ES Modules import + * // const { ChimeSDKMeetingsClient, GetMeetingCommand } = require("@aws-sdk/client-chime-sdk-meetings"); // CommonJS import + * const client = new ChimeSDKMeetingsClient(config); + * const command = new GetMeetingCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetMeetingCommandInput} for command's `input` shape. + * @see {@link GetMeetingCommandOutput} for command's `response` shape. + * @see {@link ChimeSDKMeetingsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetMeetingCommand extends $Command< + GetMeetingCommandInput, + GetMeetingCommandOutput, + ChimeSDKMeetingsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetMeetingCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ChimeSDKMeetingsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ChimeSDKMeetingsClient"; + const commandName = "GetMeetingCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetMeetingRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetMeetingResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetMeetingCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetMeetingCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetMeetingCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-chime-sdk-meetings/src/commands/ListAttendeesCommand.ts b/clients/client-chime-sdk-meetings/src/commands/ListAttendeesCommand.ts new file mode 100644 index 000000000000..96dd4523688c --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/commands/ListAttendeesCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ChimeSDKMeetingsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKMeetingsClient"; +import { ListAttendeesRequest, ListAttendeesResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListAttendeesCommand, + serializeAws_restJson1ListAttendeesCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListAttendeesCommandInput extends ListAttendeesRequest {} +export interface ListAttendeesCommandOutput extends ListAttendeesResponse, __MetadataBearer {} + +/** + *

+ * Lists the attendees for the specified Amazon Chime SDK meeting. For more information about the Amazon Chime SDK, see + * Using the Amazon Chime SDK + * in the Amazon Chime Developer Guide. + *

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ChimeSDKMeetingsClient, ListAttendeesCommand } from "@aws-sdk/client-chime-sdk-meetings"; // ES Modules import + * // const { ChimeSDKMeetingsClient, ListAttendeesCommand } = require("@aws-sdk/client-chime-sdk-meetings"); // CommonJS import + * const client = new ChimeSDKMeetingsClient(config); + * const command = new ListAttendeesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListAttendeesCommandInput} for command's `input` shape. + * @see {@link ListAttendeesCommandOutput} for command's `response` shape. + * @see {@link ChimeSDKMeetingsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListAttendeesCommand extends $Command< + ListAttendeesCommandInput, + ListAttendeesCommandOutput, + ChimeSDKMeetingsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListAttendeesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ChimeSDKMeetingsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ChimeSDKMeetingsClient"; + const commandName = "ListAttendeesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListAttendeesRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListAttendeesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListAttendeesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListAttendeesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListAttendeesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-chime-sdk-meetings/src/commands/StartMeetingTranscriptionCommand.ts b/clients/client-chime-sdk-meetings/src/commands/StartMeetingTranscriptionCommand.ts new file mode 100644 index 000000000000..1e2c515226e9 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/commands/StartMeetingTranscriptionCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ChimeSDKMeetingsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKMeetingsClient"; +import { StartMeetingTranscriptionRequest } from "../models/models_0"; +import { + deserializeAws_restJson1StartMeetingTranscriptionCommand, + serializeAws_restJson1StartMeetingTranscriptionCommand, +} from "../protocols/Aws_restJson1"; + +export interface StartMeetingTranscriptionCommandInput extends StartMeetingTranscriptionRequest {} +export interface StartMeetingTranscriptionCommandOutput extends __MetadataBearer {} + +/** + *

Starts transcription for the specified meetingId.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ChimeSDKMeetingsClient, StartMeetingTranscriptionCommand } from "@aws-sdk/client-chime-sdk-meetings"; // ES Modules import + * // const { ChimeSDKMeetingsClient, StartMeetingTranscriptionCommand } = require("@aws-sdk/client-chime-sdk-meetings"); // CommonJS import + * const client = new ChimeSDKMeetingsClient(config); + * const command = new StartMeetingTranscriptionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartMeetingTranscriptionCommandInput} for command's `input` shape. + * @see {@link StartMeetingTranscriptionCommandOutput} for command's `response` shape. + * @see {@link ChimeSDKMeetingsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class StartMeetingTranscriptionCommand extends $Command< + StartMeetingTranscriptionCommandInput, + StartMeetingTranscriptionCommandOutput, + ChimeSDKMeetingsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartMeetingTranscriptionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ChimeSDKMeetingsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ChimeSDKMeetingsClient"; + const commandName = "StartMeetingTranscriptionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartMeetingTranscriptionRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StartMeetingTranscriptionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StartMeetingTranscriptionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1StartMeetingTranscriptionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-chime-sdk-meetings/src/commands/StopMeetingTranscriptionCommand.ts b/clients/client-chime-sdk-meetings/src/commands/StopMeetingTranscriptionCommand.ts new file mode 100644 index 000000000000..28aeb8e88c37 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/commands/StopMeetingTranscriptionCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ChimeSDKMeetingsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKMeetingsClient"; +import { StopMeetingTranscriptionRequest } from "../models/models_0"; +import { + deserializeAws_restJson1StopMeetingTranscriptionCommand, + serializeAws_restJson1StopMeetingTranscriptionCommand, +} from "../protocols/Aws_restJson1"; + +export interface StopMeetingTranscriptionCommandInput extends StopMeetingTranscriptionRequest {} +export interface StopMeetingTranscriptionCommandOutput extends __MetadataBearer {} + +/** + *

Stops transcription for the specified meetingId.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ChimeSDKMeetingsClient, StopMeetingTranscriptionCommand } from "@aws-sdk/client-chime-sdk-meetings"; // ES Modules import + * // const { ChimeSDKMeetingsClient, StopMeetingTranscriptionCommand } = require("@aws-sdk/client-chime-sdk-meetings"); // CommonJS import + * const client = new ChimeSDKMeetingsClient(config); + * const command = new StopMeetingTranscriptionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StopMeetingTranscriptionCommandInput} for command's `input` shape. + * @see {@link StopMeetingTranscriptionCommandOutput} for command's `response` shape. + * @see {@link ChimeSDKMeetingsClientResolvedConfig | config} for command's `input` shape. + * + */ +export class StopMeetingTranscriptionCommand extends $Command< + StopMeetingTranscriptionCommandInput, + StopMeetingTranscriptionCommandOutput, + ChimeSDKMeetingsClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StopMeetingTranscriptionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ChimeSDKMeetingsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ChimeSDKMeetingsClient"; + const commandName = "StopMeetingTranscriptionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StopMeetingTranscriptionRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StopMeetingTranscriptionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StopMeetingTranscriptionCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1StopMeetingTranscriptionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-chime-sdk-meetings/src/commands/index.ts b/clients/client-chime-sdk-meetings/src/commands/index.ts new file mode 100644 index 000000000000..88c0013c6c77 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/commands/index.ts @@ -0,0 +1,11 @@ +export * from "./BatchCreateAttendeeCommand"; +export * from "./CreateAttendeeCommand"; +export * from "./CreateMeetingCommand"; +export * from "./CreateMeetingWithAttendeesCommand"; +export * from "./DeleteAttendeeCommand"; +export * from "./DeleteMeetingCommand"; +export * from "./GetAttendeeCommand"; +export * from "./GetMeetingCommand"; +export * from "./ListAttendeesCommand"; +export * from "./StartMeetingTranscriptionCommand"; +export * from "./StopMeetingTranscriptionCommand"; diff --git a/clients/client-chime-sdk-meetings/src/endpoints.ts b/clients/client-chime-sdk-meetings/src/endpoints.ts new file mode 100644 index 000000000000..b817d8f64dc6 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/endpoints.ts @@ -0,0 +1,126 @@ +import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver"; +import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types"; + +const regionHash: RegionHash = {}; + +const partitionHash: PartitionHash = { + aws: { + regions: [ + "af-south-1", + "ap-east-1", + "ap-northeast-1", + "ap-northeast-2", + "ap-northeast-3", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", + "eu-central-1", + "eu-north-1", + "eu-south-1", + "eu-west-1", + "eu-west-2", + "eu-west-3", + "me-south-1", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + ], + regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "meetings-chime.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "meetings-chime-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "meetings-chime-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "meetings-chime.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, + "aws-cn": { + regions: ["cn-north-1", "cn-northwest-1"], + regionRegex: "^cn\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "meetings-chime.{region}.amazonaws.com.cn", + tags: [], + }, + { + hostname: "meetings-chime-fips.{region}.amazonaws.com.cn", + tags: ["fips"], + }, + { + hostname: "meetings-chime-fips.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack", "fips"], + }, + { + hostname: "meetings-chime.{region}.api.amazonwebservices.com.cn", + tags: ["dualstack"], + }, + ], + }, + "aws-iso": { + regions: ["us-iso-east-1", "us-iso-west-1"], + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "meetings-chime.{region}.c2s.ic.gov", + tags: [], + }, + ], + }, + "aws-iso-b": { + regions: ["us-isob-east-1"], + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "meetings-chime.{region}.sc2s.sgov.gov", + tags: [], + }, + ], + }, + "aws-us-gov": { + regions: ["us-gov-east-1", "us-gov-west-1"], + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + variants: [ + { + hostname: "meetings-chime.{region}.amazonaws.com", + tags: [], + }, + { + hostname: "meetings-chime-fips.{region}.amazonaws.com", + tags: ["fips"], + }, + { + hostname: "meetings-chime-fips.{region}.api.aws", + tags: ["dualstack", "fips"], + }, + { + hostname: "meetings-chime.{region}.api.aws", + tags: ["dualstack"], + }, + ], + }, +}; + +export const defaultRegionInfoProvider: RegionInfoProvider = async ( + region: string, + options?: RegionInfoProviderOptions +) => + getRegionInfo(region, { + ...options, + signingService: "chime", + regionHash, + partitionHash, + }); diff --git a/clients/client-chime-sdk-meetings/src/index.ts b/clients/client-chime-sdk-meetings/src/index.ts new file mode 100644 index 000000000000..9044a8c271fc --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/index.ts @@ -0,0 +1,5 @@ +export * from "./ChimeSDKMeetings"; +export * from "./ChimeSDKMeetingsClient"; +export * from "./commands"; +export * from "./models"; +export * from "./pagination"; diff --git a/clients/client-chime-sdk-meetings/src/models/index.ts b/clients/client-chime-sdk-meetings/src/models/index.ts new file mode 100644 index 000000000000..09c5d6e09b8c --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/models/index.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/clients/client-chime-sdk-meetings/src/models/models_0.ts b/clients/client-chime-sdk-meetings/src/models/models_0.ts new file mode 100644 index 000000000000..2e714711ae80 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/models/models_0.ts @@ -0,0 +1,1019 @@ +import { SENSITIVE_STRING } from "@aws-sdk/smithy-client"; +import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; + +/** + *

An Amazon Chime SDK meeting attendee. Includes a unique + * AttendeeId and JoinToken. The + * JoinToken + * allows a client to authenticate and join as the specified attendee. The + * JoinToken + * expires when the meeting ends, or when + * DeleteAttendee + * is called. After that, the attendee is unable to join the meeting. + *

+ * + *

We recommend securely transferring each JoinToken from your server application + * to the client so that no other client has access to the token except for the one + * authorized to represent the attendee.

+ */ +export interface Attendee { + /** + *

The Amazon Chime SDK external user ID. An idempotency token. Links the attendee to an identity managed by a builder application.

+ */ + ExternalUserId?: string; + + /** + *

The Amazon Chime SDK attendee ID.

+ */ + AttendeeId?: string; + + /** + *

The join token used by the Amazon Chime SDK attendee.

+ */ + JoinToken?: string; +} + +export namespace Attendee { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Attendee): any => ({ + ...obj, + ...(obj.ExternalUserId && { ExternalUserId: SENSITIVE_STRING }), + ...(obj.JoinToken && { JoinToken: SENSITIVE_STRING }), + }); +} + +/** + *

The input parameters don't match the service's restrictions.

+ */ +export interface BadRequestException extends __SmithyException, $MetadataBearer { + name: "BadRequestException"; + $fault: "client"; + Code?: string; + Message?: string; + /** + *

The request id associated with the call responsible for the exception.

+ */ + RequestId?: string; +} + +export namespace BadRequestException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: BadRequestException): any => ({ + ...obj, + }); +} + +/** + *

The Amazon Chime SDK attendee fields to create, used with the BatchCreateAttendee action.

+ */ +export interface CreateAttendeeRequestItem { + /** + *

The Amazon Chime SDK external user ID. An idempotency token. Links the attendee to an identity managed by a builder application.

+ */ + ExternalUserId: string | undefined; +} + +export namespace CreateAttendeeRequestItem { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateAttendeeRequestItem): any => ({ + ...obj, + ...(obj.ExternalUserId && { ExternalUserId: SENSITIVE_STRING }), + }); +} + +export interface BatchCreateAttendeeRequest { + /** + *

The Amazon Chime SDK ID of the meeting to which you're adding attendees.

+ */ + MeetingId: string | undefined; + + /** + *

The attendee information, including attendees' IDs and join tokens.

+ */ + Attendees: CreateAttendeeRequestItem[] | undefined; +} + +export namespace BatchCreateAttendeeRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: BatchCreateAttendeeRequest): any => ({ + ...obj, + ...(obj.Attendees && { + Attendees: obj.Attendees.map((item) => CreateAttendeeRequestItem.filterSensitiveLog(item)), + }), + }); +} + +/** + *

The list of errors returned when errors are encountered during the BatchCreateAttendee and CreateAttendee actions. This includes external user IDs, error codes, and error messages.

+ */ +export interface CreateAttendeeError { + /** + *

The Amazon Chime SDK external user ID. An idempotency token. Links the attendee to an identity managed by a builder application.

+ */ + ExternalUserId?: string; + + /** + *

The error code.

+ */ + ErrorCode?: string; + + /** + *

The error message.

+ */ + ErrorMessage?: string; +} + +export namespace CreateAttendeeError { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateAttendeeError): any => ({ + ...obj, + ...(obj.ExternalUserId && { ExternalUserId: SENSITIVE_STRING }), + }); +} + +export interface BatchCreateAttendeeResponse { + /** + *

The attendee information, including attendees' IDs and join tokens.

+ */ + Attendees?: Attendee[]; + + /** + *

If the action fails for one or more of the attendees in the request, a list of the attendees is returned, along with error codes and error messages.

+ */ + Errors?: CreateAttendeeError[]; +} + +export namespace BatchCreateAttendeeResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: BatchCreateAttendeeResponse): any => ({ + ...obj, + ...(obj.Attendees && { Attendees: obj.Attendees.map((item) => Attendee.filterSensitiveLog(item)) }), + ...(obj.Errors && { Errors: obj.Errors.map((item) => CreateAttendeeError.filterSensitiveLog(item)) }), + }); +} + +/** + *

The client is permanently forbidden from making the request.

+ */ +export interface ForbiddenException extends __SmithyException, $MetadataBearer { + name: "ForbiddenException"; + $fault: "client"; + Code?: string; + Message?: string; + /** + *

The request id associated with the call responsible for the exception.

+ */ + RequestId?: string; +} + +export namespace ForbiddenException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ForbiddenException): any => ({ + ...obj, + }); +} + +/** + *

The request exceeds the resource limit.

+ */ +export interface LimitExceededException extends __SmithyException, $MetadataBearer { + name: "LimitExceededException"; + $fault: "client"; + Code?: string; + Message?: string; + /** + *

The request id associated with the call responsible for the exception.

+ */ + RequestId?: string; +} + +export namespace LimitExceededException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: LimitExceededException): any => ({ + ...obj, + }); +} + +/** + *

One or more of the resources in the request does not exist in the system.

+ */ +export interface NotFoundException extends __SmithyException, $MetadataBearer { + name: "NotFoundException"; + $fault: "client"; + Code?: string; + Message?: string; + /** + *

The request id associated with the call responsible for the exception.

+ */ + RequestId?: string; +} + +export namespace NotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NotFoundException): any => ({ + ...obj, + }); +} + +/** + *

The service is currently unavailable.

+ */ +export interface ServiceUnavailableException extends __SmithyException, $MetadataBearer { + name: "ServiceUnavailableException"; + $fault: "server"; + Code?: string; + Message?: string; + /** + *

The request id associated with the call responsible for the exception.

+ */ + RequestId?: string; + + /** + *

The number of seconds the caller should wait before retrying.

+ */ + RetryAfterSeconds?: string; +} + +export namespace ServiceUnavailableException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServiceUnavailableException): any => ({ + ...obj, + }); +} + +/** + *

The user isn't authorized to request a resource.

+ */ +export interface UnauthorizedException extends __SmithyException, $MetadataBearer { + name: "UnauthorizedException"; + $fault: "client"; + Code?: string; + Message?: string; + /** + *

The request id associated with the call responsible for the exception.

+ */ + RequestId?: string; +} + +export namespace UnauthorizedException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UnauthorizedException): any => ({ + ...obj, + }); +} + +export interface CreateAttendeeRequest { + /** + *

The unique ID of the meeting.

+ */ + MeetingId: string | undefined; + + /** + *

The Amazon Chime SDK external user ID. An idempotency token. Links the attendee to an identity managed by a builder application.

+ */ + ExternalUserId: string | undefined; +} + +export namespace CreateAttendeeRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateAttendeeRequest): any => ({ + ...obj, + ...(obj.ExternalUserId && { ExternalUserId: SENSITIVE_STRING }), + }); +} + +export interface CreateAttendeeResponse { + /** + *

The attendee information, including attendee ID and join token.

+ */ + Attendee?: Attendee; +} + +export namespace CreateAttendeeResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateAttendeeResponse): any => ({ + ...obj, + ...(obj.Attendee && { Attendee: Attendee.filterSensitiveLog(obj.Attendee) }), + }); +} + +/** + *

The request was well-formed but was unable to be followed due to semantic errors.

+ */ +export interface UnprocessableEntityException extends __SmithyException, $MetadataBearer { + name: "UnprocessableEntityException"; + $fault: "client"; + Code?: string; + Message?: string; + /** + *

The request id associated with the call responsible for the exception.

+ */ + RequestId?: string; +} + +export namespace UnprocessableEntityException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UnprocessableEntityException): any => ({ + ...obj, + }); +} + +/** + *

The configuration for resource targets to receive notifications when meeting and attendee events occur.

+ */ +export interface NotificationsConfiguration { + /** + *

The ARN of the AWS Lambda function in the notifications configuration.

+ */ + LambdaFunctionArn?: string; + + /** + *

The ARN of the SNS topic.

+ */ + SnsTopicArn?: string; + + /** + *

The ARN of the SQS queue.

+ */ + SqsQueueArn?: string; +} + +export namespace NotificationsConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NotificationsConfiguration): any => ({ + ...obj, + ...(obj.LambdaFunctionArn && { LambdaFunctionArn: SENSITIVE_STRING }), + ...(obj.SnsTopicArn && { SnsTopicArn: SENSITIVE_STRING }), + ...(obj.SqsQueueArn && { SqsQueueArn: SENSITIVE_STRING }), + }); +} + +export interface CreateMeetingRequest { + /** + *

The unique identifier for the client request. Use a different token for different meetings.

+ */ + ClientRequestToken?: string; + + /** + *

The Region in which to create the meeting. Default: us-east-1.

+ * + *

+ * Available values: + * af-south-1 + * , + * ap-northeast-1 + * , + * ap-northeast-2 + * , + * ap-south-1 + * , + * ap-southeast-1 + * , + * ap-southeast-2 + * , + * ca-central-1 + * , + * eu-central-1 + * , + * eu-north-1 + * , + * eu-south-1 + * , + * eu-west-1 + * , + * eu-west-2 + * , + * eu-west-3 + * , + * sa-east-1 + * , + * us-east-1 + * , + * us-east-2 + * , + * us-west-1 + * , + * us-west-2 + * . + *

+ */ + MediaRegion: string | undefined; + + /** + *

Reserved.

+ */ + MeetingHostId?: string; + + /** + *

The external meeting ID.

+ */ + ExternalMeetingId: string | undefined; + + /** + *

The configuration for resource targets to receive notifications when meeting and attendee events occur.

+ */ + NotificationsConfiguration?: NotificationsConfiguration; +} + +export namespace CreateMeetingRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateMeetingRequest): any => ({ + ...obj, + ...(obj.ClientRequestToken && { ClientRequestToken: SENSITIVE_STRING }), + ...(obj.MeetingHostId && { MeetingHostId: SENSITIVE_STRING }), + ...(obj.ExternalMeetingId && { ExternalMeetingId: SENSITIVE_STRING }), + ...(obj.NotificationsConfiguration && { + NotificationsConfiguration: NotificationsConfiguration.filterSensitiveLog(obj.NotificationsConfiguration), + }), + }); +} + +/** + *

A set of endpoints used by clients to connect to the media service group for an Amazon Chime SDK meeting.

+ */ +export interface MediaPlacement { + /** + *

The audio host URL.

+ */ + AudioHostUrl?: string; + + /** + *

The audio fallback URL.

+ */ + AudioFallbackUrl?: string; + + /** + *

The signaling URL.

+ */ + SignalingUrl?: string; + + /** + *

The turn control URL.

+ */ + TurnControlUrl?: string; + + /** + *

The screen data URL.

+ */ + ScreenDataUrl?: string; + + /** + *

The screen viewing URL.

+ */ + ScreenViewingUrl?: string; + + /** + *

The screen sharing URL.

+ */ + ScreenSharingUrl?: string; + + /** + *

The event ingestion URL.

+ */ + EventIngestionUrl?: string; +} + +export namespace MediaPlacement { + /** + * @internal + */ + export const filterSensitiveLog = (obj: MediaPlacement): any => ({ + ...obj, + }); +} + +/** + *

A meeting created using the Amazon Chime SDK.

+ */ +export interface Meeting { + /** + *

The Amazon Chime SDK meeting ID.

+ */ + MeetingId?: string; + + /** + *

Reserved.

+ */ + MeetingHostId?: string; + + /** + *

The external meeting ID.

+ */ + ExternalMeetingId?: string; + + /** + *

The Region in which you create the meeting. Available values: af-south-1, ap-northeast-1, + * ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2, ca-central-1, + * eu-central-1, eu-north-1, eu-south-1, + * eu-west-1, eu-west-2, eu-west-3, + * sa-east-1, us-east-1, us-east-2, + * us-west-1, us-west-2.

+ */ + MediaRegion?: string; + + /** + *

The media placement for the meeting.

+ */ + MediaPlacement?: MediaPlacement; +} + +export namespace Meeting { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Meeting): any => ({ + ...obj, + ...(obj.MeetingHostId && { MeetingHostId: SENSITIVE_STRING }), + ...(obj.ExternalMeetingId && { ExternalMeetingId: SENSITIVE_STRING }), + }); +} + +export interface CreateMeetingResponse { + /** + *

The meeting information, including the meeting ID and + * MediaPlacement.

+ */ + Meeting?: Meeting; +} + +export namespace CreateMeetingResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateMeetingResponse): any => ({ + ...obj, + ...(obj.Meeting && { Meeting: Meeting.filterSensitiveLog(obj.Meeting) }), + }); +} + +export interface CreateMeetingWithAttendeesRequest { + /** + *

The unique identifier for the client request. Use a different token for different meetings.

+ */ + ClientRequestToken?: string; + + /** + *

The Region in which to create the meeting. Default: us-east-1.

+ */ + MediaRegion: string | undefined; + + /** + *

Reserved.

+ */ + MeetingHostId?: string; + + /** + *

The external meeting ID.

+ */ + ExternalMeetingId: string | undefined; + + /** + *

The configuration for resource targets to receive notifications when meeting and attendee events occur.

+ */ + NotificationsConfiguration?: NotificationsConfiguration; + + /** + *

The attendee information, including attendees' IDs and join tokens.

+ */ + Attendees: CreateAttendeeRequestItem[] | undefined; +} + +export namespace CreateMeetingWithAttendeesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateMeetingWithAttendeesRequest): any => ({ + ...obj, + ...(obj.ClientRequestToken && { ClientRequestToken: SENSITIVE_STRING }), + ...(obj.MeetingHostId && { MeetingHostId: SENSITIVE_STRING }), + ...(obj.ExternalMeetingId && { ExternalMeetingId: SENSITIVE_STRING }), + ...(obj.NotificationsConfiguration && { + NotificationsConfiguration: NotificationsConfiguration.filterSensitiveLog(obj.NotificationsConfiguration), + }), + ...(obj.Attendees && { + Attendees: obj.Attendees.map((item) => CreateAttendeeRequestItem.filterSensitiveLog(item)), + }), + }); +} + +export interface CreateMeetingWithAttendeesResponse { + /** + *

The meeting information, including the meeting ID and + * MediaPlacement.

+ */ + Meeting?: Meeting; + + /** + *

The attendee information, including attendees' IDs and join tokens.

+ */ + Attendees?: Attendee[]; + + /** + *

If the action fails for one or more of the attendees in the request, a list of the attendees is returned, along with error codes and error messages.

+ */ + Errors?: CreateAttendeeError[]; +} + +export namespace CreateMeetingWithAttendeesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateMeetingWithAttendeesResponse): any => ({ + ...obj, + ...(obj.Meeting && { Meeting: Meeting.filterSensitiveLog(obj.Meeting) }), + ...(obj.Attendees && { Attendees: obj.Attendees.map((item) => Attendee.filterSensitiveLog(item)) }), + ...(obj.Errors && { Errors: obj.Errors.map((item) => CreateAttendeeError.filterSensitiveLog(item)) }), + }); +} + +export interface DeleteAttendeeRequest { + /** + *

The Amazon Chime SDK meeting ID.

+ */ + MeetingId: string | undefined; + + /** + *

The Amazon Chime SDK attendee ID.

+ */ + AttendeeId: string | undefined; +} + +export namespace DeleteAttendeeRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteAttendeeRequest): any => ({ + ...obj, + }); +} + +export interface DeleteMeetingRequest { + /** + *

The Amazon Chime SDK meeting ID.

+ */ + MeetingId: string | undefined; +} + +export namespace DeleteMeetingRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteMeetingRequest): any => ({ + ...obj, + }); +} + +export interface GetAttendeeRequest { + /** + *

The Amazon Chime SDK meeting ID.

+ */ + MeetingId: string | undefined; + + /** + *

The Amazon Chime SDK attendee ID.

+ */ + AttendeeId: string | undefined; +} + +export namespace GetAttendeeRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetAttendeeRequest): any => ({ + ...obj, + }); +} + +export interface GetAttendeeResponse { + /** + *

The Amazon Chime SDK attendee information.

+ */ + Attendee?: Attendee; +} + +export namespace GetAttendeeResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetAttendeeResponse): any => ({ + ...obj, + ...(obj.Attendee && { Attendee: Attendee.filterSensitiveLog(obj.Attendee) }), + }); +} + +export interface GetMeetingRequest { + /** + *

The Amazon Chime SDK meeting ID.

+ */ + MeetingId: string | undefined; +} + +export namespace GetMeetingRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetMeetingRequest): any => ({ + ...obj, + }); +} + +export interface GetMeetingResponse { + /** + *

The Amazon Chime SDK meeting information.

+ */ + Meeting?: Meeting; +} + +export namespace GetMeetingResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetMeetingResponse): any => ({ + ...obj, + ...(obj.Meeting && { Meeting: Meeting.filterSensitiveLog(obj.Meeting) }), + }); +} + +export interface ListAttendeesRequest { + /** + *

The Amazon Chime SDK meeting ID.

+ */ + MeetingId: string | undefined; + + /** + *

The token to use to retrieve the next page of results.

+ */ + NextToken?: string; + + /** + *

The maximum number of results to return in a single call.

+ */ + MaxResults?: number; +} + +export namespace ListAttendeesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListAttendeesRequest): any => ({ + ...obj, + }); +} + +export interface ListAttendeesResponse { + /** + *

The Amazon Chime SDK attendee information.

+ */ + Attendees?: Attendee[]; + + /** + *

The token to use to retrieve the next page of results.

+ */ + NextToken?: string; +} + +export namespace ListAttendeesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListAttendeesResponse): any => ({ + ...obj, + ...(obj.Attendees && { Attendees: obj.Attendees.map((item) => Attendee.filterSensitiveLog(item)) }), + }); +} + +export enum TranscribeMedicalLanguageCode { + EN_US = "en-US", +} + +export enum TranscribeMedicalRegion { + AP_SOUTHEAST_2 = "ap-southeast-2", + AUTO = "auto", + CA_CENTRAL_1 = "ca-central-1", + EU_WEST_1 = "eu-west-1", + US_EAST_1 = "us-east-1", + US_EAST_2 = "us-east-2", + US_WEST_2 = "us-west-2", +} + +export enum TranscribeMedicalSpecialty { + CARDIOLOGY = "CARDIOLOGY", + NEUROLOGY = "NEUROLOGY", + ONCOLOGY = "ONCOLOGY", + PRIMARYCARE = "PRIMARYCARE", + RADIOLOGY = "RADIOLOGY", + UROLOGY = "UROLOGY", +} + +export enum TranscribeMedicalType { + CONVERSATION = "CONVERSATION", + DICTATION = "DICTATION", +} + +/** + *

Settings specific to the Amazon Transcribe Medical engine.

+ */ +export interface EngineTranscribeMedicalSettings { + /** + *

The language code specified for the Amazon Transcribe Medical engine.

+ */ + LanguageCode: TranscribeMedicalLanguageCode | string | undefined; + + /** + *

The specialty specified for the Amazon Transcribe Medical engine.

+ */ + Specialty: TranscribeMedicalSpecialty | string | undefined; + + /** + *

The type of transcription.

+ */ + Type: TranscribeMedicalType | string | undefined; + + /** + *

The name of the vocabulary passed to Amazon Transcribe Medical.

+ */ + VocabularyName?: string; + + /** + *

The AWS Region passed to Amazon Transcribe Medical. If you don't specify a Region, Amazon Chime uses the meeting's Region.

+ */ + Region?: TranscribeMedicalRegion | string; +} + +export namespace EngineTranscribeMedicalSettings { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EngineTranscribeMedicalSettings): any => ({ + ...obj, + }); +} + +export enum TranscribeLanguageCode { + DE_DE = "de-DE", + EN_AU = "en-AU", + EN_GB = "en-GB", + EN_US = "en-US", + ES_US = "es-US", + FR_CA = "fr-CA", + FR_FR = "fr-FR", + IT_IT = "it-IT", + JA_JP = "ja-JP", + KO_KR = "ko-KR", + PT_BR = "pt-BR", + ZH_CN = "zh-CN", +} + +export enum TranscribeRegion { + AP_NORTHEAST_1 = "ap-northeast-1", + AP_NORTHEAST_2 = "ap-northeast-2", + AP_SOUTHEAST_2 = "ap-southeast-2", + AUTO = "auto", + CA_CENTRAL_1 = "ca-central-1", + EU_CENTRAL_1 = "eu-central-1", + EU_WEST_1 = "eu-west-1", + EU_WEST_2 = "eu-west-2", + SA_EAST_1 = "sa-east-1", + US_EAST_1 = "us-east-1", + US_EAST_2 = "us-east-2", + US_WEST_2 = "us-west-2", +} + +export enum TranscribeVocabularyFilterMethod { + MASK = "mask", + REMOVE = "remove", + TAG = "tag", +} + +/** + *

Settings specific to the Amazon Transcribe engine.

+ */ +export interface EngineTranscribeSettings { + /** + *

The language code specified for the Amazon Transcribe engine.

+ */ + LanguageCode: TranscribeLanguageCode | string | undefined; + + /** + *

The filtering method passed to Amazon Transcribe.

+ */ + VocabularyFilterMethod?: TranscribeVocabularyFilterMethod | string; + + /** + *

The name of the vocabulary filter passed to Amazon Transcribe.

+ */ + VocabularyFilterName?: string; + + /** + *

The name of the vocabulary passed to Amazon Transcribe.

+ */ + VocabularyName?: string; + + /** + *

The AWS Region passed to Amazon Transcribe. If you don't specify a Region, Amazon Chime uses the meeting's Region.

+ */ + Region?: TranscribeRegion | string; +} + +export namespace EngineTranscribeSettings { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EngineTranscribeSettings): any => ({ + ...obj, + }); +} + +/** + *

The configuration for the current transcription operation. Must contain EngineTranscribeSettings or EngineTranscribeMedicalSettings.

+ */ +export interface TranscriptionConfiguration { + /** + *

The transcription configuration settings passed to Amazon Transcribe.

+ */ + EngineTranscribeSettings?: EngineTranscribeSettings; + + /** + *

The transcription configuration settings passed to Amazon Transcribe Medical.

+ */ + EngineTranscribeMedicalSettings?: EngineTranscribeMedicalSettings; +} + +export namespace TranscriptionConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TranscriptionConfiguration): any => ({ + ...obj, + }); +} + +export interface StartMeetingTranscriptionRequest { + /** + *

The unique ID of the meeting being transcribed.

+ */ + MeetingId: string | undefined; + + /** + *

The configuration for the current transcription operation. Must contain EngineTranscribeSettings or + * EngineTranscribeMedicalSettings.

+ */ + TranscriptionConfiguration: TranscriptionConfiguration | undefined; +} + +export namespace StartMeetingTranscriptionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartMeetingTranscriptionRequest): any => ({ + ...obj, + }); +} + +export interface StopMeetingTranscriptionRequest { + /** + *

The unique ID of the meeting for which you stop transcription.

+ */ + MeetingId: string | undefined; +} + +export namespace StopMeetingTranscriptionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StopMeetingTranscriptionRequest): any => ({ + ...obj, + }); +} diff --git a/clients/client-chime-sdk-meetings/src/pagination/Interfaces.ts b/clients/client-chime-sdk-meetings/src/pagination/Interfaces.ts new file mode 100644 index 000000000000..12cc595d82b5 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/pagination/Interfaces.ts @@ -0,0 +1,8 @@ +import { PaginationConfiguration } from "@aws-sdk/types"; + +import { ChimeSDKMeetings } from "../ChimeSDKMeetings"; +import { ChimeSDKMeetingsClient } from "../ChimeSDKMeetingsClient"; + +export interface ChimeSDKMeetingsPaginationConfiguration extends PaginationConfiguration { + client: ChimeSDKMeetings | ChimeSDKMeetingsClient; +} diff --git a/clients/client-chime-sdk-meetings/src/pagination/ListAttendeesPaginator.ts b/clients/client-chime-sdk-meetings/src/pagination/ListAttendeesPaginator.ts new file mode 100644 index 000000000000..ba0f449ae9fa --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/pagination/ListAttendeesPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { ChimeSDKMeetings } from "../ChimeSDKMeetings"; +import { ChimeSDKMeetingsClient } from "../ChimeSDKMeetingsClient"; +import { + ListAttendeesCommand, + ListAttendeesCommandInput, + ListAttendeesCommandOutput, +} from "../commands/ListAttendeesCommand"; +import { ChimeSDKMeetingsPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: ChimeSDKMeetingsClient, + input: ListAttendeesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListAttendeesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: ChimeSDKMeetings, + input: ListAttendeesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listAttendees(input, ...args); +}; +export async function* paginateListAttendees( + config: ChimeSDKMeetingsPaginationConfiguration, + input: ListAttendeesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListAttendeesCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof ChimeSDKMeetings) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof ChimeSDKMeetingsClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected ChimeSDKMeetings | ChimeSDKMeetingsClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-chime-sdk-meetings/src/pagination/index.ts b/clients/client-chime-sdk-meetings/src/pagination/index.ts new file mode 100644 index 000000000000..3d89ff0f54c4 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/pagination/index.ts @@ -0,0 +1,2 @@ +export * from "./Interfaces"; +export * from "./ListAttendeesPaginator"; diff --git a/clients/client-chime-sdk-meetings/src/protocols/Aws_restJson1.ts b/clients/client-chime-sdk-meetings/src/protocols/Aws_restJson1.ts new file mode 100644 index 000000000000..f601604f9374 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/protocols/Aws_restJson1.ts @@ -0,0 +1,1764 @@ +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { + expectNonNull as __expectNonNull, + expectObject as __expectObject, + expectString as __expectString, + extendedEncodeURIComponent as __extendedEncodeURIComponent, +} from "@aws-sdk/smithy-client"; +import { + Endpoint as __Endpoint, + MetadataBearer as __MetadataBearer, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, + SmithyException as __SmithyException, +} from "@aws-sdk/types"; +import { v4 as generateIdempotencyToken } from "uuid"; + +import { + BatchCreateAttendeeCommandInput, + BatchCreateAttendeeCommandOutput, +} from "../commands/BatchCreateAttendeeCommand"; +import { CreateAttendeeCommandInput, CreateAttendeeCommandOutput } from "../commands/CreateAttendeeCommand"; +import { CreateMeetingCommandInput, CreateMeetingCommandOutput } from "../commands/CreateMeetingCommand"; +import { + CreateMeetingWithAttendeesCommandInput, + CreateMeetingWithAttendeesCommandOutput, +} from "../commands/CreateMeetingWithAttendeesCommand"; +import { DeleteAttendeeCommandInput, DeleteAttendeeCommandOutput } from "../commands/DeleteAttendeeCommand"; +import { DeleteMeetingCommandInput, DeleteMeetingCommandOutput } from "../commands/DeleteMeetingCommand"; +import { GetAttendeeCommandInput, GetAttendeeCommandOutput } from "../commands/GetAttendeeCommand"; +import { GetMeetingCommandInput, GetMeetingCommandOutput } from "../commands/GetMeetingCommand"; +import { ListAttendeesCommandInput, ListAttendeesCommandOutput } from "../commands/ListAttendeesCommand"; +import { + StartMeetingTranscriptionCommandInput, + StartMeetingTranscriptionCommandOutput, +} from "../commands/StartMeetingTranscriptionCommand"; +import { + StopMeetingTranscriptionCommandInput, + StopMeetingTranscriptionCommandOutput, +} from "../commands/StopMeetingTranscriptionCommand"; +import { + Attendee, + BadRequestException, + CreateAttendeeError, + CreateAttendeeRequestItem, + EngineTranscribeMedicalSettings, + EngineTranscribeSettings, + ForbiddenException, + LimitExceededException, + MediaPlacement, + Meeting, + NotFoundException, + NotificationsConfiguration, + ServiceUnavailableException, + TranscriptionConfiguration, + UnauthorizedException, + UnprocessableEntityException, +} from "../models/models_0"; + +export const serializeAws_restJson1BatchCreateAttendeeCommand = async ( + input: BatchCreateAttendeeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/attendees"; + if (input.MeetingId !== undefined) { + const labelValue: string = input.MeetingId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: MeetingId."); + } + resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: MeetingId."); + } + const query: any = { + operation: "batch-create", + }; + let body: any; + body = JSON.stringify({ + ...(input.Attendees !== undefined && + input.Attendees !== null && { + Attendees: serializeAws_restJson1CreateAttendeeRequestItemList(input.Attendees, context), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1CreateAttendeeCommand = async ( + input: CreateAttendeeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/attendees"; + if (input.MeetingId !== undefined) { + const labelValue: string = input.MeetingId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: MeetingId."); + } + resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: MeetingId."); + } + let body: any; + body = JSON.stringify({ + ...(input.ExternalUserId !== undefined && + input.ExternalUserId !== null && { ExternalUserId: input.ExternalUserId }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1CreateMeetingCommand = async ( + input: CreateMeetingCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings"; + let body: any; + body = JSON.stringify({ + ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), + ...(input.ExternalMeetingId !== undefined && + input.ExternalMeetingId !== null && { ExternalMeetingId: input.ExternalMeetingId }), + ...(input.MediaRegion !== undefined && input.MediaRegion !== null && { MediaRegion: input.MediaRegion }), + ...(input.MeetingHostId !== undefined && input.MeetingHostId !== null && { MeetingHostId: input.MeetingHostId }), + ...(input.NotificationsConfiguration !== undefined && + input.NotificationsConfiguration !== null && { + NotificationsConfiguration: serializeAws_restJson1NotificationsConfiguration( + input.NotificationsConfiguration, + context + ), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1CreateMeetingWithAttendeesCommand = async ( + input: CreateMeetingWithAttendeesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings"; + const query: any = { + operation: "create-attendees", + }; + let body: any; + body = JSON.stringify({ + ...(input.Attendees !== undefined && + input.Attendees !== null && { + Attendees: serializeAws_restJson1CreateMeetingWithAttendeesRequestItemList(input.Attendees, context), + }), + ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), + ...(input.ExternalMeetingId !== undefined && + input.ExternalMeetingId !== null && { ExternalMeetingId: input.ExternalMeetingId }), + ...(input.MediaRegion !== undefined && input.MediaRegion !== null && { MediaRegion: input.MediaRegion }), + ...(input.MeetingHostId !== undefined && input.MeetingHostId !== null && { MeetingHostId: input.MeetingHostId }), + ...(input.NotificationsConfiguration !== undefined && + input.NotificationsConfiguration !== null && { + NotificationsConfiguration: serializeAws_restJson1NotificationsConfiguration( + input.NotificationsConfiguration, + context + ), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1DeleteAttendeeCommand = async ( + input: DeleteAttendeeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/meetings/{MeetingId}/attendees/{AttendeeId}"; + if (input.MeetingId !== undefined) { + const labelValue: string = input.MeetingId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: MeetingId."); + } + resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: MeetingId."); + } + if (input.AttendeeId !== undefined) { + const labelValue: string = input.AttendeeId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AttendeeId."); + } + resolvedPath = resolvedPath.replace("{AttendeeId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AttendeeId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteMeetingCommand = async ( + input: DeleteMeetingCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}"; + if (input.MeetingId !== undefined) { + const labelValue: string = input.MeetingId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: MeetingId."); + } + resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: MeetingId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetAttendeeCommand = async ( + input: GetAttendeeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/meetings/{MeetingId}/attendees/{AttendeeId}"; + if (input.MeetingId !== undefined) { + const labelValue: string = input.MeetingId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: MeetingId."); + } + resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: MeetingId."); + } + if (input.AttendeeId !== undefined) { + const labelValue: string = input.AttendeeId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: AttendeeId."); + } + resolvedPath = resolvedPath.replace("{AttendeeId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: AttendeeId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetMeetingCommand = async ( + input: GetMeetingCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}"; + if (input.MeetingId !== undefined) { + const labelValue: string = input.MeetingId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: MeetingId."); + } + resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: MeetingId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1ListAttendeesCommand = async ( + input: ListAttendeesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/attendees"; + if (input.MeetingId !== undefined) { + const labelValue: string = input.MeetingId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: MeetingId."); + } + resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: MeetingId."); + } + const query: any = { + ...(input.NextToken !== undefined && { "next-token": input.NextToken }), + ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1StartMeetingTranscriptionCommand = async ( + input: StartMeetingTranscriptionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/transcription"; + if (input.MeetingId !== undefined) { + const labelValue: string = input.MeetingId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: MeetingId."); + } + resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: MeetingId."); + } + const query: any = { + operation: "start", + }; + let body: any; + body = JSON.stringify({ + ...(input.TranscriptionConfiguration !== undefined && + input.TranscriptionConfiguration !== null && { + TranscriptionConfiguration: serializeAws_restJson1TranscriptionConfiguration( + input.TranscriptionConfiguration, + context + ), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1StopMeetingTranscriptionCommand = async ( + input: StopMeetingTranscriptionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/transcription"; + if (input.MeetingId !== undefined) { + const labelValue: string = input.MeetingId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: MeetingId."); + } + resolvedPath = resolvedPath.replace("{MeetingId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: MeetingId."); + } + const query: any = { + operation: "stop", + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const deserializeAws_restJson1BatchCreateAttendeeCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1BatchCreateAttendeeCommandError(output, context); + } + const contents: BatchCreateAttendeeCommandOutput = { + $metadata: deserializeMetadata(output), + Attendees: undefined, + Errors: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Attendees !== undefined && data.Attendees !== null) { + contents.Attendees = deserializeAws_restJson1AttendeeList(data.Attendees, context); + } + if (data.Errors !== undefined && data.Errors !== null) { + contents.Errors = deserializeAws_restJson1BatchCreateAttendeeErrorList(data.Errors, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1BatchCreateAttendeeCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.chimesdkmeetings#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ForbiddenException": + case "com.amazonaws.chimesdkmeetings#ForbiddenException": + response = { + ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.chimesdkmeetings#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.chimesdkmeetings#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.chimesdkmeetings#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.chimesdkmeetings#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateAttendeeCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateAttendeeCommandError(output, context); + } + const contents: CreateAttendeeCommandOutput = { + $metadata: deserializeMetadata(output), + Attendee: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Attendee !== undefined && data.Attendee !== null) { + contents.Attendee = deserializeAws_restJson1Attendee(data.Attendee, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateAttendeeCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.chimesdkmeetings#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ForbiddenException": + case "com.amazonaws.chimesdkmeetings#ForbiddenException": + response = { + ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.chimesdkmeetings#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.chimesdkmeetings#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.chimesdkmeetings#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.chimesdkmeetings#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnprocessableEntityException": + case "com.amazonaws.chimesdkmeetings#UnprocessableEntityException": + response = { + ...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateMeetingCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateMeetingCommandError(output, context); + } + const contents: CreateMeetingCommandOutput = { + $metadata: deserializeMetadata(output), + Meeting: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Meeting !== undefined && data.Meeting !== null) { + contents.Meeting = deserializeAws_restJson1Meeting(data.Meeting, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateMeetingCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.chimesdkmeetings#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.chimesdkmeetings#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.chimesdkmeetings#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.chimesdkmeetings#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateMeetingWithAttendeesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateMeetingWithAttendeesCommandError(output, context); + } + const contents: CreateMeetingWithAttendeesCommandOutput = { + $metadata: deserializeMetadata(output), + Attendees: undefined, + Errors: undefined, + Meeting: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Attendees !== undefined && data.Attendees !== null) { + contents.Attendees = deserializeAws_restJson1AttendeeList(data.Attendees, context); + } + if (data.Errors !== undefined && data.Errors !== null) { + contents.Errors = deserializeAws_restJson1BatchCreateAttendeeErrorList(data.Errors, context); + } + if (data.Meeting !== undefined && data.Meeting !== null) { + contents.Meeting = deserializeAws_restJson1Meeting(data.Meeting, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateMeetingWithAttendeesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.chimesdkmeetings#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.chimesdkmeetings#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.chimesdkmeetings#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.chimesdkmeetings#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteAttendeeCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteAttendeeCommandError(output, context); + } + const contents: DeleteAttendeeCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteAttendeeCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ForbiddenException": + case "com.amazonaws.chimesdkmeetings#ForbiddenException": + response = { + ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.chimesdkmeetings#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteMeetingCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteMeetingCommandError(output, context); + } + const contents: DeleteMeetingCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteMeetingCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.chimesdkmeetings#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ForbiddenException": + case "com.amazonaws.chimesdkmeetings#ForbiddenException": + response = { + ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetAttendeeCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetAttendeeCommandError(output, context); + } + const contents: GetAttendeeCommandOutput = { + $metadata: deserializeMetadata(output), + Attendee: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Attendee !== undefined && data.Attendee !== null) { + contents.Attendee = deserializeAws_restJson1Attendee(data.Attendee, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetAttendeeCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.chimesdkmeetings#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ForbiddenException": + case "com.amazonaws.chimesdkmeetings#ForbiddenException": + response = { + ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.chimesdkmeetings#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1GetMeetingCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetMeetingCommandError(output, context); + } + const contents: GetMeetingCommandOutput = { + $metadata: deserializeMetadata(output), + Meeting: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Meeting !== undefined && data.Meeting !== null) { + contents.Meeting = deserializeAws_restJson1Meeting(data.Meeting, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1GetMeetingCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.chimesdkmeetings#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ForbiddenException": + case "com.amazonaws.chimesdkmeetings#ForbiddenException": + response = { + ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.chimesdkmeetings#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1ListAttendeesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListAttendeesCommandError(output, context); + } + const contents: ListAttendeesCommandOutput = { + $metadata: deserializeMetadata(output), + Attendees: undefined, + NextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Attendees !== undefined && data.Attendees !== null) { + contents.Attendees = deserializeAws_restJson1AttendeeList(data.Attendees, context); + } + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListAttendeesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.chimesdkmeetings#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ForbiddenException": + case "com.amazonaws.chimesdkmeetings#ForbiddenException": + response = { + ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.chimesdkmeetings#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1StartMeetingTranscriptionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StartMeetingTranscriptionCommandError(output, context); + } + const contents: StartMeetingTranscriptionCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StartMeetingTranscriptionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.chimesdkmeetings#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ForbiddenException": + case "com.amazonaws.chimesdkmeetings#ForbiddenException": + response = { + ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.chimesdkmeetings#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.chimesdkmeetings#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.chimesdkmeetings#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.chimesdkmeetings#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnprocessableEntityException": + case "com.amazonaws.chimesdkmeetings#UnprocessableEntityException": + response = { + ...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1StopMeetingTranscriptionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StopMeetingTranscriptionCommandError(output, context); + } + const contents: StopMeetingTranscriptionCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StopMeetingTranscriptionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BadRequestException": + case "com.amazonaws.chimesdkmeetings#BadRequestException": + response = { + ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ForbiddenException": + case "com.amazonaws.chimesdkmeetings#ForbiddenException": + response = { + ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NotFoundException": + case "com.amazonaws.chimesdkmeetings#NotFoundException": + response = { + ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceUnavailableException": + case "com.amazonaws.chimesdkmeetings#ServiceUnavailableException": + response = { + ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnauthorizedException": + case "com.amazonaws.chimesdkmeetings#UnauthorizedException": + response = { + ...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "UnprocessableEntityException": + case "com.amazonaws.chimesdkmeetings#UnprocessableEntityException": + response = { + ...(await deserializeAws_restJson1UnprocessableEntityExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +const deserializeAws_restJson1BadRequestExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: BadRequestException = { + name: "BadRequestException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Code: undefined, + Message: undefined, + RequestId: undefined, + }; + const data: any = parsedOutput.body; + if (data.Code !== undefined && data.Code !== null) { + contents.Code = __expectString(data.Code); + } + if (data.Message !== undefined && data.Message !== null) { + contents.Message = __expectString(data.Message); + } + if (data.RequestId !== undefined && data.RequestId !== null) { + contents.RequestId = __expectString(data.RequestId); + } + return contents; +}; + +const deserializeAws_restJson1ForbiddenExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ForbiddenException = { + name: "ForbiddenException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Code: undefined, + Message: undefined, + RequestId: undefined, + }; + const data: any = parsedOutput.body; + if (data.Code !== undefined && data.Code !== null) { + contents.Code = __expectString(data.Code); + } + if (data.Message !== undefined && data.Message !== null) { + contents.Message = __expectString(data.Message); + } + if (data.RequestId !== undefined && data.RequestId !== null) { + contents.RequestId = __expectString(data.RequestId); + } + return contents; +}; + +const deserializeAws_restJson1LimitExceededExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: LimitExceededException = { + name: "LimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Code: undefined, + Message: undefined, + RequestId: undefined, + }; + const data: any = parsedOutput.body; + if (data.Code !== undefined && data.Code !== null) { + contents.Code = __expectString(data.Code); + } + if (data.Message !== undefined && data.Message !== null) { + contents.Message = __expectString(data.Message); + } + if (data.RequestId !== undefined && data.RequestId !== null) { + contents.RequestId = __expectString(data.RequestId); + } + return contents; +}; + +const deserializeAws_restJson1NotFoundExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: NotFoundException = { + name: "NotFoundException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Code: undefined, + Message: undefined, + RequestId: undefined, + }; + const data: any = parsedOutput.body; + if (data.Code !== undefined && data.Code !== null) { + contents.Code = __expectString(data.Code); + } + if (data.Message !== undefined && data.Message !== null) { + contents.Message = __expectString(data.Message); + } + if (data.RequestId !== undefined && data.RequestId !== null) { + contents.RequestId = __expectString(data.RequestId); + } + return contents; +}; + +const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ServiceUnavailableException = { + name: "ServiceUnavailableException", + $fault: "server", + $metadata: deserializeMetadata(parsedOutput), + Code: undefined, + Message: undefined, + RequestId: undefined, + RetryAfterSeconds: undefined, + }; + if (parsedOutput.headers["retry-after"] !== undefined) { + contents.RetryAfterSeconds = parsedOutput.headers["retry-after"]; + } + const data: any = parsedOutput.body; + if (data.Code !== undefined && data.Code !== null) { + contents.Code = __expectString(data.Code); + } + if (data.Message !== undefined && data.Message !== null) { + contents.Message = __expectString(data.Message); + } + if (data.RequestId !== undefined && data.RequestId !== null) { + contents.RequestId = __expectString(data.RequestId); + } + return contents; +}; + +const deserializeAws_restJson1UnauthorizedExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: UnauthorizedException = { + name: "UnauthorizedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Code: undefined, + Message: undefined, + RequestId: undefined, + }; + const data: any = parsedOutput.body; + if (data.Code !== undefined && data.Code !== null) { + contents.Code = __expectString(data.Code); + } + if (data.Message !== undefined && data.Message !== null) { + contents.Message = __expectString(data.Message); + } + if (data.RequestId !== undefined && data.RequestId !== null) { + contents.RequestId = __expectString(data.RequestId); + } + return contents; +}; + +const deserializeAws_restJson1UnprocessableEntityExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: UnprocessableEntityException = { + name: "UnprocessableEntityException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Code: undefined, + Message: undefined, + RequestId: undefined, + }; + const data: any = parsedOutput.body; + if (data.Code !== undefined && data.Code !== null) { + contents.Code = __expectString(data.Code); + } + if (data.Message !== undefined && data.Message !== null) { + contents.Message = __expectString(data.Message); + } + if (data.RequestId !== undefined && data.RequestId !== null) { + contents.RequestId = __expectString(data.RequestId); + } + return contents; +}; + +const serializeAws_restJson1CreateAttendeeRequestItem = ( + input: CreateAttendeeRequestItem, + context: __SerdeContext +): any => { + return { + ...(input.ExternalUserId !== undefined && + input.ExternalUserId !== null && { ExternalUserId: input.ExternalUserId }), + }; +}; + +const serializeAws_restJson1CreateAttendeeRequestItemList = ( + input: CreateAttendeeRequestItem[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return serializeAws_restJson1CreateAttendeeRequestItem(entry, context); + }); +}; + +const serializeAws_restJson1CreateMeetingWithAttendeesRequestItemList = ( + input: CreateAttendeeRequestItem[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return serializeAws_restJson1CreateAttendeeRequestItem(entry, context); + }); +}; + +const serializeAws_restJson1EngineTranscribeMedicalSettings = ( + input: EngineTranscribeMedicalSettings, + context: __SerdeContext +): any => { + return { + ...(input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode }), + ...(input.Region !== undefined && input.Region !== null && { Region: input.Region }), + ...(input.Specialty !== undefined && input.Specialty !== null && { Specialty: input.Specialty }), + ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }), + ...(input.VocabularyName !== undefined && + input.VocabularyName !== null && { VocabularyName: input.VocabularyName }), + }; +}; + +const serializeAws_restJson1EngineTranscribeSettings = ( + input: EngineTranscribeSettings, + context: __SerdeContext +): any => { + return { + ...(input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode }), + ...(input.Region !== undefined && input.Region !== null && { Region: input.Region }), + ...(input.VocabularyFilterMethod !== undefined && + input.VocabularyFilterMethod !== null && { VocabularyFilterMethod: input.VocabularyFilterMethod }), + ...(input.VocabularyFilterName !== undefined && + input.VocabularyFilterName !== null && { VocabularyFilterName: input.VocabularyFilterName }), + ...(input.VocabularyName !== undefined && + input.VocabularyName !== null && { VocabularyName: input.VocabularyName }), + }; +}; + +const serializeAws_restJson1NotificationsConfiguration = ( + input: NotificationsConfiguration, + context: __SerdeContext +): any => { + return { + ...(input.LambdaFunctionArn !== undefined && + input.LambdaFunctionArn !== null && { LambdaFunctionArn: input.LambdaFunctionArn }), + ...(input.SnsTopicArn !== undefined && input.SnsTopicArn !== null && { SnsTopicArn: input.SnsTopicArn }), + ...(input.SqsQueueArn !== undefined && input.SqsQueueArn !== null && { SqsQueueArn: input.SqsQueueArn }), + }; +}; + +const serializeAws_restJson1TranscriptionConfiguration = ( + input: TranscriptionConfiguration, + context: __SerdeContext +): any => { + return { + ...(input.EngineTranscribeMedicalSettings !== undefined && + input.EngineTranscribeMedicalSettings !== null && { + EngineTranscribeMedicalSettings: serializeAws_restJson1EngineTranscribeMedicalSettings( + input.EngineTranscribeMedicalSettings, + context + ), + }), + ...(input.EngineTranscribeSettings !== undefined && + input.EngineTranscribeSettings !== null && { + EngineTranscribeSettings: serializeAws_restJson1EngineTranscribeSettings( + input.EngineTranscribeSettings, + context + ), + }), + }; +}; + +const deserializeAws_restJson1Attendee = (output: any, context: __SerdeContext): Attendee => { + return { + AttendeeId: __expectString(output.AttendeeId), + ExternalUserId: __expectString(output.ExternalUserId), + JoinToken: __expectString(output.JoinToken), + } as any; +}; + +const deserializeAws_restJson1AttendeeList = (output: any, context: __SerdeContext): Attendee[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1Attendee(entry, context); + }); +}; + +const deserializeAws_restJson1BatchCreateAttendeeErrorList = ( + output: any, + context: __SerdeContext +): CreateAttendeeError[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1CreateAttendeeError(entry, context); + }); +}; + +const deserializeAws_restJson1CreateAttendeeError = (output: any, context: __SerdeContext): CreateAttendeeError => { + return { + ErrorCode: __expectString(output.ErrorCode), + ErrorMessage: __expectString(output.ErrorMessage), + ExternalUserId: __expectString(output.ExternalUserId), + } as any; +}; + +const deserializeAws_restJson1MediaPlacement = (output: any, context: __SerdeContext): MediaPlacement => { + return { + AudioFallbackUrl: __expectString(output.AudioFallbackUrl), + AudioHostUrl: __expectString(output.AudioHostUrl), + EventIngestionUrl: __expectString(output.EventIngestionUrl), + ScreenDataUrl: __expectString(output.ScreenDataUrl), + ScreenSharingUrl: __expectString(output.ScreenSharingUrl), + ScreenViewingUrl: __expectString(output.ScreenViewingUrl), + SignalingUrl: __expectString(output.SignalingUrl), + TurnControlUrl: __expectString(output.TurnControlUrl), + } as any; +}; + +const deserializeAws_restJson1Meeting = (output: any, context: __SerdeContext): Meeting => { + return { + ExternalMeetingId: __expectString(output.ExternalMeetingId), + MediaPlacement: + output.MediaPlacement !== undefined && output.MediaPlacement !== null + ? deserializeAws_restJson1MediaPlacement(output.MediaPlacement, context) + : undefined, + MediaRegion: __expectString(output.MediaRegion), + MeetingHostId: __expectString(output.MeetingHostId), + MeetingId: __expectString(output.MeetingId), + } as any; +}; + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Collect low-level response body stream to Uint8Array. +const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise => { + if (streamBody instanceof Uint8Array) { + return Promise.resolve(streamBody); + } + return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); +}; + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const isSerializableHeaderValue = (value: any): boolean => + value !== undefined && + value !== null && + value !== "" && + (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && + (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); + +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => { + const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + + const sanitizeErrorCode = (rawValue: string): string => { + let cleanValue = rawValue; + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } + + return ""; +}; diff --git a/clients/client-chime-sdk-meetings/src/runtimeConfig.browser.ts b/clients/client-chime-sdk-meetings/src/runtimeConfig.browser.ts new file mode 100644 index 000000000000..1effcb3f3ed7 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/runtimeConfig.browser.ts @@ -0,0 +1,44 @@ +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver"; +import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; +import { invalidProvider } from "@aws-sdk/invalid-dependency"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser"; +import { ChimeSDKMeetingsClientConfig } from "./ChimeSDKMeetingsClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: ChimeSDKMeetingsClientConfig) => { + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: config?.requestHandler ?? new FetchHttpHandler(), + retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-chime-sdk-meetings/src/runtimeConfig.native.ts b/clients/client-chime-sdk-meetings/src/runtimeConfig.native.ts new file mode 100644 index 000000000000..7602b8cca136 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/runtimeConfig.native.ts @@ -0,0 +1,17 @@ +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { ChimeSDKMeetingsClientConfig } from "./ChimeSDKMeetingsClient"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: ChimeSDKMeetingsClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-chime-sdk-meetings/src/runtimeConfig.shared.ts b/clients/client-chime-sdk-meetings/src/runtimeConfig.shared.ts new file mode 100644 index 000000000000..81caf38094ef --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/runtimeConfig.shared.ts @@ -0,0 +1,17 @@ +import { Logger as __Logger } from "@aws-sdk/types"; +import { parseUrl } from "@aws-sdk/url-parser"; + +import { ChimeSDKMeetingsClientConfig } from "./ChimeSDKMeetingsClient"; +import { defaultRegionInfoProvider } from "./endpoints"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: ChimeSDKMeetingsClientConfig) => ({ + apiVersion: "2021-07-15", + disableHostPrefix: config?.disableHostPrefix ?? false, + logger: config?.logger ?? ({} as __Logger), + regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider, + serviceId: config?.serviceId ?? "Chime SDK Meetings", + urlParser: config?.urlParser ?? parseUrl, +}); diff --git a/clients/client-chime-sdk-meetings/src/runtimeConfig.ts b/clients/client-chime-sdk-meetings/src/runtimeConfig.ts new file mode 100644 index 000000000000..546481252f51 --- /dev/null +++ b/clients/client-chime-sdk-meetings/src/runtimeConfig.ts @@ -0,0 +1,53 @@ +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@aws-sdk/config-resolver"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { Hash } from "@aws-sdk/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider"; +import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; +import { ChimeSDKMeetingsClientConfig } from "./ChimeSDKMeetingsClient"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: ChimeSDKMeetingsClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "node", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new NodeHttpHandler(), + retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-chime-sdk-meetings/tsconfig.es.json b/clients/client-chime-sdk-meetings/tsconfig.es.json new file mode 100644 index 000000000000..4c72364cd1a0 --- /dev/null +++ b/clients/client-chime-sdk-meetings/tsconfig.es.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "target": "es5", + "module": "esnext", + "moduleResolution": "node", + "lib": ["dom", "es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"], + "outDir": "dist-es" + } +} diff --git a/clients/client-chime-sdk-meetings/tsconfig.json b/clients/client-chime-sdk-meetings/tsconfig.json new file mode 100644 index 000000000000..093039289c53 --- /dev/null +++ b/clients/client-chime-sdk-meetings/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compilerOptions": { + "rootDir": "./src", + "alwaysStrict": true, + "target": "ES2018", + "module": "commonjs", + "strict": true, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "incremental": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "outDir": "dist-cjs", + "removeComments": true + }, + "typedocOptions": { + "exclude": ["**/node_modules/**", "**/*.spec.ts", "**/protocols/*.ts", "**/e2e/*.ts", "**/endpoints.ts"], + "excludeNotExported": true, + "excludePrivate": true, + "hideGenerator": true, + "ignoreCompilerErrors": true, + "includeDeclarations": true, + "stripInternal": true, + "readme": "README.md", + "mode": "file", + "out": "docs", + "theme": "minimal", + "plugin": ["@aws-sdk/service-client-documentation-generator"] + }, + "exclude": ["test/**/*"] +} diff --git a/clients/client-chime-sdk-meetings/tsconfig.types.json b/clients/client-chime-sdk-meetings/tsconfig.types.json new file mode 100644 index 000000000000..4c3dfa7b3d25 --- /dev/null +++ b/clients/client-chime-sdk-meetings/tsconfig.types.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types", + "emitDeclarationOnly": true + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/clients/client-cloudfront/src/CloudFront.ts b/clients/client-cloudfront/src/CloudFront.ts index d05ed1b2165d..42a869864afa 100644 --- a/clients/client-cloudfront/src/CloudFront.ts +++ b/clients/client-cloudfront/src/CloudFront.ts @@ -71,6 +71,11 @@ import { CreateRealtimeLogConfigCommandInput, CreateRealtimeLogConfigCommandOutput, } from "./commands/CreateRealtimeLogConfigCommand"; +import { + CreateResponseHeadersPolicyCommand, + CreateResponseHeadersPolicyCommandInput, + CreateResponseHeadersPolicyCommandOutput, +} from "./commands/CreateResponseHeadersPolicyCommand"; import { CreateStreamingDistributionCommand, CreateStreamingDistributionCommandInput, @@ -136,6 +141,11 @@ import { DeleteRealtimeLogConfigCommandInput, DeleteRealtimeLogConfigCommandOutput, } from "./commands/DeleteRealtimeLogConfigCommand"; +import { + DeleteResponseHeadersPolicyCommand, + DeleteResponseHeadersPolicyCommandInput, + DeleteResponseHeadersPolicyCommandOutput, +} from "./commands/DeleteResponseHeadersPolicyCommand"; import { DeleteStreamingDistributionCommand, DeleteStreamingDistributionCommandInput, @@ -238,6 +248,16 @@ import { GetRealtimeLogConfigCommandInput, GetRealtimeLogConfigCommandOutput, } from "./commands/GetRealtimeLogConfigCommand"; +import { + GetResponseHeadersPolicyCommand, + GetResponseHeadersPolicyCommandInput, + GetResponseHeadersPolicyCommandOutput, +} from "./commands/GetResponseHeadersPolicyCommand"; +import { + GetResponseHeadersPolicyConfigCommand, + GetResponseHeadersPolicyConfigCommandInput, + GetResponseHeadersPolicyConfigCommandOutput, +} from "./commands/GetResponseHeadersPolicyConfigCommand"; import { GetStreamingDistributionCommand, GetStreamingDistributionCommandInput, @@ -283,6 +303,11 @@ import { ListDistributionsByRealtimeLogConfigCommandInput, ListDistributionsByRealtimeLogConfigCommandOutput, } from "./commands/ListDistributionsByRealtimeLogConfigCommand"; +import { + ListDistributionsByResponseHeadersPolicyIdCommand, + ListDistributionsByResponseHeadersPolicyIdCommandInput, + ListDistributionsByResponseHeadersPolicyIdCommandOutput, +} from "./commands/ListDistributionsByResponseHeadersPolicyIdCommand"; import { ListDistributionsByWebACLIdCommand, ListDistributionsByWebACLIdCommandInput, @@ -333,6 +358,11 @@ import { ListRealtimeLogConfigsCommandInput, ListRealtimeLogConfigsCommandOutput, } from "./commands/ListRealtimeLogConfigsCommand"; +import { + ListResponseHeadersPoliciesCommand, + ListResponseHeadersPoliciesCommandInput, + ListResponseHeadersPoliciesCommandOutput, +} from "./commands/ListResponseHeadersPoliciesCommand"; import { ListStreamingDistributionsCommand, ListStreamingDistributionsCommandInput, @@ -409,6 +439,11 @@ import { UpdateRealtimeLogConfigCommandInput, UpdateRealtimeLogConfigCommandOutput, } from "./commands/UpdateRealtimeLogConfigCommand"; +import { + UpdateResponseHeadersPolicyCommand, + UpdateResponseHeadersPolicyCommandInput, + UpdateResponseHeadersPolicyCommandOutput, +} from "./commands/UpdateResponseHeadersPolicyCommand"; import { UpdateStreamingDistributionCommand, UpdateStreamingDistributionCommandInput, @@ -962,6 +997,45 @@ export class CloudFront extends CloudFrontClient { } } + /** + *

Creates a response headers policy.

+ *

A response headers policy contains information about a set of HTTP response headers + * and their values. To create a response headers policy, you provide some metadata about + * the policy, and a set of configurations that specify the response headers.

+ *

After you create a response headers policy, you can use its ID to attach it to one or more + * cache behaviors in a CloudFront distribution. When it’s attached to a cache behavior, CloudFront + * adds the headers in the policy to HTTP responses that it sends for requests that match + * the cache behavior.

+ */ + public createResponseHeadersPolicy( + args: CreateResponseHeadersPolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createResponseHeadersPolicy( + args: CreateResponseHeadersPolicyCommandInput, + cb: (err: any, data?: CreateResponseHeadersPolicyCommandOutput) => void + ): void; + public createResponseHeadersPolicy( + args: CreateResponseHeadersPolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateResponseHeadersPolicyCommandOutput) => void + ): void; + public createResponseHeadersPolicy( + args: CreateResponseHeadersPolicyCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateResponseHeadersPolicyCommandOutput) => void), + cb?: (err: any, data?: CreateResponseHeadersPolicyCommandOutput) => void + ): Promise | void { + const command = new CreateResponseHeadersPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

This API is deprecated. * Amazon CloudFront is deprecating real-time messaging protocol (RTMP) distributions on December 31, 2020. @@ -1412,6 +1486,44 @@ export class CloudFront extends CloudFrontClient { } } + /** + *

Deletes a response headers policy.

+ *

You cannot delete a response headers policy if it’s attached to a cache behavior. + * First update your distributions to remove the response headers policy from all cache + * behaviors, then delete the response headers policy.

+ *

To delete a response headers policy, you must provide the policy’s identifier and + * version. To get these values, you can use ListResponseHeadersPolicies or + * GetResponseHeadersPolicy.

+ */ + public deleteResponseHeadersPolicy( + args: DeleteResponseHeadersPolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteResponseHeadersPolicy( + args: DeleteResponseHeadersPolicyCommandInput, + cb: (err: any, data?: DeleteResponseHeadersPolicyCommandOutput) => void + ): void; + public deleteResponseHeadersPolicy( + args: DeleteResponseHeadersPolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteResponseHeadersPolicyCommandOutput) => void + ): void; + public deleteResponseHeadersPolicy( + args: DeleteResponseHeadersPolicyCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteResponseHeadersPolicyCommandOutput) => void), + cb?: (err: any, data?: DeleteResponseHeadersPolicyCommandOutput) => void + ): Promise | void { + const command = new DeleteResponseHeadersPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Delete a streaming distribution. To delete an RTMP distribution using the CloudFront API, * perform the following steps.

@@ -2208,6 +2320,83 @@ export class CloudFront extends CloudFrontClient { } } + /** + *

Gets a response headers policy, including metadata (the policy’s identifier and the date and + * time when the policy was last modified).

+ *

To get a response headers policy, you must provide the policy’s identifier. If the + * response headers policy is attached to a distribution’s cache behavior, you can get the + * policy’s identifier using ListDistributions or + * GetDistribution. If the response headers policy is not attached to a cache + * behavior, you can get the identifier using + * ListResponseHeadersPolicies.

+ */ + public getResponseHeadersPolicy( + args: GetResponseHeadersPolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getResponseHeadersPolicy( + args: GetResponseHeadersPolicyCommandInput, + cb: (err: any, data?: GetResponseHeadersPolicyCommandOutput) => void + ): void; + public getResponseHeadersPolicy( + args: GetResponseHeadersPolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetResponseHeadersPolicyCommandOutput) => void + ): void; + public getResponseHeadersPolicy( + args: GetResponseHeadersPolicyCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetResponseHeadersPolicyCommandOutput) => void), + cb?: (err: any, data?: GetResponseHeadersPolicyCommandOutput) => void + ): Promise | void { + const command = new GetResponseHeadersPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

Gets a response headers policy configuration.

+ *

To get a response headers policy configuration, you must provide the policy’s + * identifier. If the response headers policy is attached to a distribution’s cache + * behavior, you can get the policy’s identifier using ListDistributions or + * GetDistribution. If the response headers policy is not attached to a + * cache behavior, you can get the identifier using + * ListResponseHeadersPolicies.

+ */ + public getResponseHeadersPolicyConfig( + args: GetResponseHeadersPolicyConfigCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getResponseHeadersPolicyConfig( + args: GetResponseHeadersPolicyConfigCommandInput, + cb: (err: any, data?: GetResponseHeadersPolicyConfigCommandOutput) => void + ): void; + public getResponseHeadersPolicyConfig( + args: GetResponseHeadersPolicyConfigCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetResponseHeadersPolicyConfigCommandOutput) => void + ): void; + public getResponseHeadersPolicyConfig( + args: GetResponseHeadersPolicyConfigCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetResponseHeadersPolicyConfigCommandOutput) => void), + cb?: (err: any, data?: GetResponseHeadersPolicyConfigCommandOutput) => void + ): Promise | void { + const command = new GetResponseHeadersPolicyConfigCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Gets information about a specified RTMP distribution, including the distribution configuration.

*/ @@ -2275,7 +2464,7 @@ export class CloudFront extends CloudFrontClient { /** *

Gets a list of cache policies.

*

You can optionally apply a filter to return only the managed policies created by Amazon Web Services, or - * only the custom policies created in your account.

+ * only the custom policies created in your Amazon Web Services account.

*

You can optionally specify the maximum number of items to receive in the response. If * the total number of items in the list exceeds the maximum that you specify, or the * default maximum, the response is paginated. To get the next page of items, send a @@ -2586,6 +2775,46 @@ export class CloudFront extends CloudFrontClient { } } + /** + *

Gets a list of distribution IDs for distributions that have a cache behavior that’s + * associated with the specified response headers policy.

+ *

You can optionally specify the maximum number of items to receive in the response. If + * the total number of items in the list exceeds the maximum that you specify, or the + * default maximum, the response is paginated. To get the next page of items, send a + * subsequent request that specifies the NextMarker value from the current + * response as the Marker value in the subsequent request.

+ */ + public listDistributionsByResponseHeadersPolicyId( + args: ListDistributionsByResponseHeadersPolicyIdCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listDistributionsByResponseHeadersPolicyId( + args: ListDistributionsByResponseHeadersPolicyIdCommandInput, + cb: (err: any, data?: ListDistributionsByResponseHeadersPolicyIdCommandOutput) => void + ): void; + public listDistributionsByResponseHeadersPolicyId( + args: ListDistributionsByResponseHeadersPolicyIdCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListDistributionsByResponseHeadersPolicyIdCommandOutput) => void + ): void; + public listDistributionsByResponseHeadersPolicyId( + args: ListDistributionsByResponseHeadersPolicyIdCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListDistributionsByResponseHeadersPolicyIdCommandOutput) => void), + cb?: (err: any, data?: ListDistributionsByResponseHeadersPolicyIdCommandOutput) => void + ): Promise | void { + const command = new ListDistributionsByResponseHeadersPolicyIdCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

List the distributions that are associated with a specified WAF web ACL.

*/ @@ -2683,7 +2912,7 @@ export class CloudFront extends CloudFrontClient { } /** - *

Gets a list of all CloudFront functions in your account.

+ *

Gets a list of all CloudFront functions in your Amazon Web Services account.

*

You can optionally apply a filter to return only the functions that are in the * specified stage, either DEVELOPMENT or LIVE.

*

You can optionally specify the maximum number of items to receive in the response. If @@ -2793,7 +3022,7 @@ export class CloudFront extends CloudFrontClient { /** *

Gets a list of origin request policies.

*

You can optionally apply a filter to return only the managed policies created by Amazon Web Services, or - * only the custom policies created in your account.

+ * only the custom policies created in your Amazon Web Services account.

*

You can optionally specify the maximum number of items to receive in the response. If * the total number of items in the list exceeds the maximum that you specify, or the * default maximum, the response is paginated. To get the next page of items, send a @@ -2898,6 +3127,45 @@ export class CloudFront extends CloudFrontClient { } } + /** + *

Gets a list of response headers policies.

+ *

You can optionally apply a filter to get only the managed policies created by Amazon Web Services, + * or only the custom policies created in your Amazon Web Services account.

+ *

You can optionally specify the maximum number of items to receive in the response. If + * the total number of items in the list exceeds the maximum that you specify, or the + * default maximum, the response is paginated. To get the next page of items, send a + * subsequent request that specifies the NextMarker value from the current + * response as the Marker value in the subsequent request.

+ */ + public listResponseHeadersPolicies( + args: ListResponseHeadersPoliciesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listResponseHeadersPolicies( + args: ListResponseHeadersPoliciesCommandInput, + cb: (err: any, data?: ListResponseHeadersPoliciesCommandOutput) => void + ): void; + public listResponseHeadersPolicies( + args: ListResponseHeadersPoliciesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListResponseHeadersPoliciesCommandOutput) => void + ): void; + public listResponseHeadersPolicies( + args: ListResponseHeadersPoliciesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListResponseHeadersPoliciesCommandOutput) => void), + cb?: (err: any, data?: ListResponseHeadersPoliciesCommandOutput) => void + ): Promise | void { + const command = new ListResponseHeadersPoliciesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

List streaming distributions.

*/ @@ -3572,6 +3840,56 @@ export class CloudFront extends CloudFrontClient { } } + /** + *

Updates a response headers policy.

+ *

When you update a response headers policy, the entire policy is replaced. You cannot + * update some policy fields independent of others. To update a response headers policy + * configuration:

+ *
    + *
  1. + *

    Use GetResponseHeadersPolicyConfig to get the current policy’s + * configuration.

    + *
  2. + *
  3. + *

    Modify the fields in the response headers policy configuration that you want + * to update.

    + *
  4. + *
  5. + *

    Call UpdateResponseHeadersPolicy, providing the entire response + * headers policy configuration, including the fields that you modified and those + * that you didn’t.

    + *
  6. + *
+ */ + public updateResponseHeadersPolicy( + args: UpdateResponseHeadersPolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateResponseHeadersPolicy( + args: UpdateResponseHeadersPolicyCommandInput, + cb: (err: any, data?: UpdateResponseHeadersPolicyCommandOutput) => void + ): void; + public updateResponseHeadersPolicy( + args: UpdateResponseHeadersPolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateResponseHeadersPolicyCommandOutput) => void + ): void; + public updateResponseHeadersPolicy( + args: UpdateResponseHeadersPolicyCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateResponseHeadersPolicyCommandOutput) => void), + cb?: (err: any, data?: UpdateResponseHeadersPolicyCommandOutput) => void + ): Promise | void { + const command = new UpdateResponseHeadersPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Update a streaming distribution.

*/ diff --git a/clients/client-cloudfront/src/CloudFrontClient.ts b/clients/client-cloudfront/src/CloudFrontClient.ts index 10e4cb9ceb9a..4e7acfb6887c 100644 --- a/clients/client-cloudfront/src/CloudFrontClient.ts +++ b/clients/client-cloudfront/src/CloudFrontClient.ts @@ -84,6 +84,10 @@ import { CreateRealtimeLogConfigCommandInput, CreateRealtimeLogConfigCommandOutput, } from "./commands/CreateRealtimeLogConfigCommand"; +import { + CreateResponseHeadersPolicyCommandInput, + CreateResponseHeadersPolicyCommandOutput, +} from "./commands/CreateResponseHeadersPolicyCommand"; import { CreateStreamingDistributionCommandInput, CreateStreamingDistributionCommandOutput, @@ -121,6 +125,10 @@ import { DeleteRealtimeLogConfigCommandInput, DeleteRealtimeLogConfigCommandOutput, } from "./commands/DeleteRealtimeLogConfigCommand"; +import { + DeleteResponseHeadersPolicyCommandInput, + DeleteResponseHeadersPolicyCommandOutput, +} from "./commands/DeleteResponseHeadersPolicyCommand"; import { DeleteStreamingDistributionCommandInput, DeleteStreamingDistributionCommandOutput, @@ -182,6 +190,14 @@ import { GetRealtimeLogConfigCommandInput, GetRealtimeLogConfigCommandOutput, } from "./commands/GetRealtimeLogConfigCommand"; +import { + GetResponseHeadersPolicyCommandInput, + GetResponseHeadersPolicyCommandOutput, +} from "./commands/GetResponseHeadersPolicyCommand"; +import { + GetResponseHeadersPolicyConfigCommandInput, + GetResponseHeadersPolicyConfigCommandOutput, +} from "./commands/GetResponseHeadersPolicyConfigCommand"; import { GetStreamingDistributionCommandInput, GetStreamingDistributionCommandOutput, @@ -215,6 +231,10 @@ import { ListDistributionsByRealtimeLogConfigCommandInput, ListDistributionsByRealtimeLogConfigCommandOutput, } from "./commands/ListDistributionsByRealtimeLogConfigCommand"; +import { + ListDistributionsByResponseHeadersPolicyIdCommandInput, + ListDistributionsByResponseHeadersPolicyIdCommandOutput, +} from "./commands/ListDistributionsByResponseHeadersPolicyIdCommand"; import { ListDistributionsByWebACLIdCommandInput, ListDistributionsByWebACLIdCommandOutput, @@ -240,6 +260,10 @@ import { ListRealtimeLogConfigsCommandInput, ListRealtimeLogConfigsCommandOutput, } from "./commands/ListRealtimeLogConfigsCommand"; +import { + ListResponseHeadersPoliciesCommandInput, + ListResponseHeadersPoliciesCommandOutput, +} from "./commands/ListResponseHeadersPoliciesCommand"; import { ListStreamingDistributionsCommandInput, ListStreamingDistributionsCommandOutput, @@ -277,6 +301,10 @@ import { UpdateRealtimeLogConfigCommandInput, UpdateRealtimeLogConfigCommandOutput, } from "./commands/UpdateRealtimeLogConfigCommand"; +import { + UpdateResponseHeadersPolicyCommandInput, + UpdateResponseHeadersPolicyCommandOutput, +} from "./commands/UpdateResponseHeadersPolicyCommand"; import { UpdateStreamingDistributionCommandInput, UpdateStreamingDistributionCommandOutput, @@ -298,6 +326,7 @@ export type ServiceInputTypes = | CreateOriginRequestPolicyCommandInput | CreatePublicKeyCommandInput | CreateRealtimeLogConfigCommandInput + | CreateResponseHeadersPolicyCommandInput | CreateStreamingDistributionCommandInput | CreateStreamingDistributionWithTagsCommandInput | DeleteCachePolicyCommandInput @@ -311,6 +340,7 @@ export type ServiceInputTypes = | DeleteOriginRequestPolicyCommandInput | DeletePublicKeyCommandInput | DeleteRealtimeLogConfigCommandInput + | DeleteResponseHeadersPolicyCommandInput | DeleteStreamingDistributionCommandInput | DescribeFunctionCommandInput | GetCachePolicyCommandInput @@ -333,6 +363,8 @@ export type ServiceInputTypes = | GetPublicKeyCommandInput | GetPublicKeyConfigCommandInput | GetRealtimeLogConfigCommandInput + | GetResponseHeadersPolicyCommandInput + | GetResponseHeadersPolicyConfigCommandInput | GetStreamingDistributionCommandInput | GetStreamingDistributionConfigCommandInput | ListCachePoliciesCommandInput @@ -342,6 +374,7 @@ export type ServiceInputTypes = | ListDistributionsByKeyGroupCommandInput | ListDistributionsByOriginRequestPolicyIdCommandInput | ListDistributionsByRealtimeLogConfigCommandInput + | ListDistributionsByResponseHeadersPolicyIdCommandInput | ListDistributionsByWebACLIdCommandInput | ListDistributionsCommandInput | ListFieldLevelEncryptionConfigsCommandInput @@ -352,6 +385,7 @@ export type ServiceInputTypes = | ListOriginRequestPoliciesCommandInput | ListPublicKeysCommandInput | ListRealtimeLogConfigsCommandInput + | ListResponseHeadersPoliciesCommandInput | ListStreamingDistributionsCommandInput | ListTagsForResourceCommandInput | PublishFunctionCommandInput @@ -368,6 +402,7 @@ export type ServiceInputTypes = | UpdateOriginRequestPolicyCommandInput | UpdatePublicKeyCommandInput | UpdateRealtimeLogConfigCommandInput + | UpdateResponseHeadersPolicyCommandInput | UpdateStreamingDistributionCommandInput; export type ServiceOutputTypes = @@ -385,6 +420,7 @@ export type ServiceOutputTypes = | CreateOriginRequestPolicyCommandOutput | CreatePublicKeyCommandOutput | CreateRealtimeLogConfigCommandOutput + | CreateResponseHeadersPolicyCommandOutput | CreateStreamingDistributionCommandOutput | CreateStreamingDistributionWithTagsCommandOutput | DeleteCachePolicyCommandOutput @@ -398,6 +434,7 @@ export type ServiceOutputTypes = | DeleteOriginRequestPolicyCommandOutput | DeletePublicKeyCommandOutput | DeleteRealtimeLogConfigCommandOutput + | DeleteResponseHeadersPolicyCommandOutput | DeleteStreamingDistributionCommandOutput | DescribeFunctionCommandOutput | GetCachePolicyCommandOutput @@ -420,6 +457,8 @@ export type ServiceOutputTypes = | GetPublicKeyCommandOutput | GetPublicKeyConfigCommandOutput | GetRealtimeLogConfigCommandOutput + | GetResponseHeadersPolicyCommandOutput + | GetResponseHeadersPolicyConfigCommandOutput | GetStreamingDistributionCommandOutput | GetStreamingDistributionConfigCommandOutput | ListCachePoliciesCommandOutput @@ -429,6 +468,7 @@ export type ServiceOutputTypes = | ListDistributionsByKeyGroupCommandOutput | ListDistributionsByOriginRequestPolicyIdCommandOutput | ListDistributionsByRealtimeLogConfigCommandOutput + | ListDistributionsByResponseHeadersPolicyIdCommandOutput | ListDistributionsByWebACLIdCommandOutput | ListDistributionsCommandOutput | ListFieldLevelEncryptionConfigsCommandOutput @@ -439,6 +479,7 @@ export type ServiceOutputTypes = | ListOriginRequestPoliciesCommandOutput | ListPublicKeysCommandOutput | ListRealtimeLogConfigsCommandOutput + | ListResponseHeadersPoliciesCommandOutput | ListStreamingDistributionsCommandOutput | ListTagsForResourceCommandOutput | PublishFunctionCommandOutput @@ -455,6 +496,7 @@ export type ServiceOutputTypes = | UpdateOriginRequestPolicyCommandOutput | UpdatePublicKeyCommandOutput | UpdateRealtimeLogConfigCommandOutput + | UpdateResponseHeadersPolicyCommandOutput | UpdateStreamingDistributionCommandOutput; export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { diff --git a/clients/client-cloudfront/src/commands/CreateResponseHeadersPolicyCommand.ts b/clients/client-cloudfront/src/commands/CreateResponseHeadersPolicyCommand.ts new file mode 100644 index 000000000000..49d8c510a44e --- /dev/null +++ b/clients/client-cloudfront/src/commands/CreateResponseHeadersPolicyCommand.ts @@ -0,0 +1,105 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; +import { CreateResponseHeadersPolicyRequest, CreateResponseHeadersPolicyResult } from "../models/models_0"; +import { + deserializeAws_restXmlCreateResponseHeadersPolicyCommand, + serializeAws_restXmlCreateResponseHeadersPolicyCommand, +} from "../protocols/Aws_restXml"; + +export interface CreateResponseHeadersPolicyCommandInput extends CreateResponseHeadersPolicyRequest {} +export interface CreateResponseHeadersPolicyCommandOutput extends CreateResponseHeadersPolicyResult, __MetadataBearer {} + +/** + *

Creates a response headers policy.

+ *

A response headers policy contains information about a set of HTTP response headers + * and their values. To create a response headers policy, you provide some metadata about + * the policy, and a set of configurations that specify the response headers.

+ *

After you create a response headers policy, you can use its ID to attach it to one or more + * cache behaviors in a CloudFront distribution. When it’s attached to a cache behavior, CloudFront + * adds the headers in the policy to HTTP responses that it sends for requests that match + * the cache behavior.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudFrontClient, CreateResponseHeadersPolicyCommand } from "@aws-sdk/client-cloudfront"; // ES Modules import + * // const { CloudFrontClient, CreateResponseHeadersPolicyCommand } = require("@aws-sdk/client-cloudfront"); // CommonJS import + * const client = new CloudFrontClient(config); + * const command = new CreateResponseHeadersPolicyCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateResponseHeadersPolicyCommandInput} for command's `input` shape. + * @see {@link CreateResponseHeadersPolicyCommandOutput} for command's `response` shape. + * @see {@link CloudFrontClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateResponseHeadersPolicyCommand extends $Command< + CreateResponseHeadersPolicyCommandInput, + CreateResponseHeadersPolicyCommandOutput, + CloudFrontClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateResponseHeadersPolicyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudFrontClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudFrontClient"; + const commandName = "CreateResponseHeadersPolicyCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateResponseHeadersPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateResponseHeadersPolicyResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateResponseHeadersPolicyCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restXmlCreateResponseHeadersPolicyCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restXmlCreateResponseHeadersPolicyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudfront/src/commands/DeleteMonitoringSubscriptionCommand.ts b/clients/client-cloudfront/src/commands/DeleteMonitoringSubscriptionCommand.ts index 6c89d0afbfc0..f8a2986080a6 100644 --- a/clients/client-cloudfront/src/commands/DeleteMonitoringSubscriptionCommand.ts +++ b/clients/client-cloudfront/src/commands/DeleteMonitoringSubscriptionCommand.ts @@ -12,7 +12,8 @@ import { } from "@aws-sdk/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; -import { DeleteMonitoringSubscriptionRequest, DeleteMonitoringSubscriptionResult } from "../models/models_0"; +import { DeleteMonitoringSubscriptionRequest } from "../models/models_0"; +import { DeleteMonitoringSubscriptionResult } from "../models/models_1"; import { deserializeAws_restXmlDeleteMonitoringSubscriptionCommand, serializeAws_restXmlDeleteMonitoringSubscriptionCommand, diff --git a/clients/client-cloudfront/src/commands/DeleteOriginRequestPolicyCommand.ts b/clients/client-cloudfront/src/commands/DeleteOriginRequestPolicyCommand.ts index 85dcac588b65..a9fae3225dfa 100644 --- a/clients/client-cloudfront/src/commands/DeleteOriginRequestPolicyCommand.ts +++ b/clients/client-cloudfront/src/commands/DeleteOriginRequestPolicyCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; -import { DeleteOriginRequestPolicyRequest } from "../models/models_0"; +import { DeleteOriginRequestPolicyRequest } from "../models/models_1"; import { deserializeAws_restXmlDeleteOriginRequestPolicyCommand, serializeAws_restXmlDeleteOriginRequestPolicyCommand, diff --git a/clients/client-cloudfront/src/commands/DeletePublicKeyCommand.ts b/clients/client-cloudfront/src/commands/DeletePublicKeyCommand.ts index 1b9b6b6c6491..cadbe94c24d4 100644 --- a/clients/client-cloudfront/src/commands/DeletePublicKeyCommand.ts +++ b/clients/client-cloudfront/src/commands/DeletePublicKeyCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; -import { DeletePublicKeyRequest } from "../models/models_0"; +import { DeletePublicKeyRequest } from "../models/models_1"; import { deserializeAws_restXmlDeletePublicKeyCommand, serializeAws_restXmlDeletePublicKeyCommand, diff --git a/clients/client-cloudfront/src/commands/DeleteRealtimeLogConfigCommand.ts b/clients/client-cloudfront/src/commands/DeleteRealtimeLogConfigCommand.ts index e47f083b15d1..8b4d5b5dc73e 100644 --- a/clients/client-cloudfront/src/commands/DeleteRealtimeLogConfigCommand.ts +++ b/clients/client-cloudfront/src/commands/DeleteRealtimeLogConfigCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; -import { DeleteRealtimeLogConfigRequest } from "../models/models_0"; +import { DeleteRealtimeLogConfigRequest } from "../models/models_1"; import { deserializeAws_restXmlDeleteRealtimeLogConfigCommand, serializeAws_restXmlDeleteRealtimeLogConfigCommand, diff --git a/clients/client-cloudfront/src/commands/DeleteResponseHeadersPolicyCommand.ts b/clients/client-cloudfront/src/commands/DeleteResponseHeadersPolicyCommand.ts new file mode 100644 index 000000000000..f576494738ce --- /dev/null +++ b/clients/client-cloudfront/src/commands/DeleteResponseHeadersPolicyCommand.ts @@ -0,0 +1,104 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; +import { DeleteResponseHeadersPolicyRequest } from "../models/models_1"; +import { + deserializeAws_restXmlDeleteResponseHeadersPolicyCommand, + serializeAws_restXmlDeleteResponseHeadersPolicyCommand, +} from "../protocols/Aws_restXml"; + +export interface DeleteResponseHeadersPolicyCommandInput extends DeleteResponseHeadersPolicyRequest {} +export interface DeleteResponseHeadersPolicyCommandOutput extends __MetadataBearer {} + +/** + *

Deletes a response headers policy.

+ *

You cannot delete a response headers policy if it’s attached to a cache behavior. + * First update your distributions to remove the response headers policy from all cache + * behaviors, then delete the response headers policy.

+ *

To delete a response headers policy, you must provide the policy’s identifier and + * version. To get these values, you can use ListResponseHeadersPolicies or + * GetResponseHeadersPolicy.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudFrontClient, DeleteResponseHeadersPolicyCommand } from "@aws-sdk/client-cloudfront"; // ES Modules import + * // const { CloudFrontClient, DeleteResponseHeadersPolicyCommand } = require("@aws-sdk/client-cloudfront"); // CommonJS import + * const client = new CloudFrontClient(config); + * const command = new DeleteResponseHeadersPolicyCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteResponseHeadersPolicyCommandInput} for command's `input` shape. + * @see {@link DeleteResponseHeadersPolicyCommandOutput} for command's `response` shape. + * @see {@link CloudFrontClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteResponseHeadersPolicyCommand extends $Command< + DeleteResponseHeadersPolicyCommandInput, + DeleteResponseHeadersPolicyCommandOutput, + CloudFrontClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteResponseHeadersPolicyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudFrontClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudFrontClient"; + const commandName = "DeleteResponseHeadersPolicyCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteResponseHeadersPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteResponseHeadersPolicyCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restXmlDeleteResponseHeadersPolicyCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restXmlDeleteResponseHeadersPolicyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudfront/src/commands/DeleteStreamingDistributionCommand.ts b/clients/client-cloudfront/src/commands/DeleteStreamingDistributionCommand.ts index 6d054e8aa27d..5341014ff284 100644 --- a/clients/client-cloudfront/src/commands/DeleteStreamingDistributionCommand.ts +++ b/clients/client-cloudfront/src/commands/DeleteStreamingDistributionCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; -import { DeleteStreamingDistributionRequest } from "../models/models_0"; +import { DeleteStreamingDistributionRequest } from "../models/models_1"; import { deserializeAws_restXmlDeleteStreamingDistributionCommand, serializeAws_restXmlDeleteStreamingDistributionCommand, diff --git a/clients/client-cloudfront/src/commands/DescribeFunctionCommand.ts b/clients/client-cloudfront/src/commands/DescribeFunctionCommand.ts index ab7d7cfda502..1e65d0042596 100644 --- a/clients/client-cloudfront/src/commands/DescribeFunctionCommand.ts +++ b/clients/client-cloudfront/src/commands/DescribeFunctionCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; -import { DescribeFunctionRequest, DescribeFunctionResult } from "../models/models_0"; +import { DescribeFunctionRequest, DescribeFunctionResult } from "../models/models_1"; import { deserializeAws_restXmlDescribeFunctionCommand, serializeAws_restXmlDescribeFunctionCommand, diff --git a/clients/client-cloudfront/src/commands/GetCachePolicyCommand.ts b/clients/client-cloudfront/src/commands/GetCachePolicyCommand.ts index afa63ce2b0ce..02828c60e00a 100644 --- a/clients/client-cloudfront/src/commands/GetCachePolicyCommand.ts +++ b/clients/client-cloudfront/src/commands/GetCachePolicyCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; -import { GetCachePolicyRequest, GetCachePolicyResult } from "../models/models_0"; +import { GetCachePolicyRequest, GetCachePolicyResult } from "../models/models_1"; import { deserializeAws_restXmlGetCachePolicyCommand, serializeAws_restXmlGetCachePolicyCommand, diff --git a/clients/client-cloudfront/src/commands/GetCachePolicyConfigCommand.ts b/clients/client-cloudfront/src/commands/GetCachePolicyConfigCommand.ts index ea0bab76c55a..7b8b38bd2eb6 100644 --- a/clients/client-cloudfront/src/commands/GetCachePolicyConfigCommand.ts +++ b/clients/client-cloudfront/src/commands/GetCachePolicyConfigCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; -import { GetCachePolicyConfigRequest, GetCachePolicyConfigResult } from "../models/models_0"; +import { GetCachePolicyConfigRequest, GetCachePolicyConfigResult } from "../models/models_1"; import { deserializeAws_restXmlGetCachePolicyConfigCommand, serializeAws_restXmlGetCachePolicyConfigCommand, diff --git a/clients/client-cloudfront/src/commands/GetCloudFrontOriginAccessIdentityCommand.ts b/clients/client-cloudfront/src/commands/GetCloudFrontOriginAccessIdentityCommand.ts index 1cd98248dcc3..32f4a3275405 100644 --- a/clients/client-cloudfront/src/commands/GetCloudFrontOriginAccessIdentityCommand.ts +++ b/clients/client-cloudfront/src/commands/GetCloudFrontOriginAccessIdentityCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; -import { GetCloudFrontOriginAccessIdentityRequest, GetCloudFrontOriginAccessIdentityResult } from "../models/models_0"; +import { GetCloudFrontOriginAccessIdentityRequest, GetCloudFrontOriginAccessIdentityResult } from "../models/models_1"; import { deserializeAws_restXmlGetCloudFrontOriginAccessIdentityCommand, serializeAws_restXmlGetCloudFrontOriginAccessIdentityCommand, diff --git a/clients/client-cloudfront/src/commands/GetCloudFrontOriginAccessIdentityConfigCommand.ts b/clients/client-cloudfront/src/commands/GetCloudFrontOriginAccessIdentityConfigCommand.ts index abfa72d66228..92fa10e14eef 100644 --- a/clients/client-cloudfront/src/commands/GetCloudFrontOriginAccessIdentityConfigCommand.ts +++ b/clients/client-cloudfront/src/commands/GetCloudFrontOriginAccessIdentityConfigCommand.ts @@ -15,7 +15,7 @@ import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } import { GetCloudFrontOriginAccessIdentityConfigRequest, GetCloudFrontOriginAccessIdentityConfigResult, -} from "../models/models_0"; +} from "../models/models_1"; import { deserializeAws_restXmlGetCloudFrontOriginAccessIdentityConfigCommand, serializeAws_restXmlGetCloudFrontOriginAccessIdentityConfigCommand, diff --git a/clients/client-cloudfront/src/commands/GetDistributionCommand.ts b/clients/client-cloudfront/src/commands/GetDistributionCommand.ts index cb90a4a8b809..3b443a6fb0a2 100644 --- a/clients/client-cloudfront/src/commands/GetDistributionCommand.ts +++ b/clients/client-cloudfront/src/commands/GetDistributionCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; -import { GetDistributionRequest, GetDistributionResult } from "../models/models_0"; +import { GetDistributionRequest, GetDistributionResult } from "../models/models_1"; import { deserializeAws_restXmlGetDistributionCommand, serializeAws_restXmlGetDistributionCommand, diff --git a/clients/client-cloudfront/src/commands/GetDistributionConfigCommand.ts b/clients/client-cloudfront/src/commands/GetDistributionConfigCommand.ts index df53302aa5ac..51c7d4a8dec0 100644 --- a/clients/client-cloudfront/src/commands/GetDistributionConfigCommand.ts +++ b/clients/client-cloudfront/src/commands/GetDistributionConfigCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; -import { GetDistributionConfigRequest, GetDistributionConfigResult } from "../models/models_0"; +import { GetDistributionConfigRequest, GetDistributionConfigResult } from "../models/models_1"; import { deserializeAws_restXmlGetDistributionConfigCommand, serializeAws_restXmlGetDistributionConfigCommand, diff --git a/clients/client-cloudfront/src/commands/GetFieldLevelEncryptionCommand.ts b/clients/client-cloudfront/src/commands/GetFieldLevelEncryptionCommand.ts index 46525038a818..a829064c57bb 100644 --- a/clients/client-cloudfront/src/commands/GetFieldLevelEncryptionCommand.ts +++ b/clients/client-cloudfront/src/commands/GetFieldLevelEncryptionCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; -import { GetFieldLevelEncryptionRequest, GetFieldLevelEncryptionResult } from "../models/models_0"; +import { GetFieldLevelEncryptionRequest, GetFieldLevelEncryptionResult } from "../models/models_1"; import { deserializeAws_restXmlGetFieldLevelEncryptionCommand, serializeAws_restXmlGetFieldLevelEncryptionCommand, diff --git a/clients/client-cloudfront/src/commands/GetResponseHeadersPolicyCommand.ts b/clients/client-cloudfront/src/commands/GetResponseHeadersPolicyCommand.ts new file mode 100644 index 000000000000..d052280f5c88 --- /dev/null +++ b/clients/client-cloudfront/src/commands/GetResponseHeadersPolicyCommand.ts @@ -0,0 +1,102 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; +import { GetResponseHeadersPolicyRequest, GetResponseHeadersPolicyResult } from "../models/models_1"; +import { + deserializeAws_restXmlGetResponseHeadersPolicyCommand, + serializeAws_restXmlGetResponseHeadersPolicyCommand, +} from "../protocols/Aws_restXml"; + +export interface GetResponseHeadersPolicyCommandInput extends GetResponseHeadersPolicyRequest {} +export interface GetResponseHeadersPolicyCommandOutput extends GetResponseHeadersPolicyResult, __MetadataBearer {} + +/** + *

Gets a response headers policy, including metadata (the policy’s identifier and the date and + * time when the policy was last modified).

+ *

To get a response headers policy, you must provide the policy’s identifier. If the + * response headers policy is attached to a distribution’s cache behavior, you can get the + * policy’s identifier using ListDistributions or + * GetDistribution. If the response headers policy is not attached to a cache + * behavior, you can get the identifier using + * ListResponseHeadersPolicies.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudFrontClient, GetResponseHeadersPolicyCommand } from "@aws-sdk/client-cloudfront"; // ES Modules import + * // const { CloudFrontClient, GetResponseHeadersPolicyCommand } = require("@aws-sdk/client-cloudfront"); // CommonJS import + * const client = new CloudFrontClient(config); + * const command = new GetResponseHeadersPolicyCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetResponseHeadersPolicyCommandInput} for command's `input` shape. + * @see {@link GetResponseHeadersPolicyCommandOutput} for command's `response` shape. + * @see {@link CloudFrontClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetResponseHeadersPolicyCommand extends $Command< + GetResponseHeadersPolicyCommandInput, + GetResponseHeadersPolicyCommandOutput, + CloudFrontClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetResponseHeadersPolicyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudFrontClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudFrontClient"; + const commandName = "GetResponseHeadersPolicyCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetResponseHeadersPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetResponseHeadersPolicyResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetResponseHeadersPolicyCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restXmlGetResponseHeadersPolicyCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restXmlGetResponseHeadersPolicyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudfront/src/commands/GetResponseHeadersPolicyConfigCommand.ts b/clients/client-cloudfront/src/commands/GetResponseHeadersPolicyConfigCommand.ts new file mode 100644 index 000000000000..4dd9d9848915 --- /dev/null +++ b/clients/client-cloudfront/src/commands/GetResponseHeadersPolicyConfigCommand.ts @@ -0,0 +1,109 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; +import { GetResponseHeadersPolicyConfigRequest, GetResponseHeadersPolicyConfigResult } from "../models/models_1"; +import { + deserializeAws_restXmlGetResponseHeadersPolicyConfigCommand, + serializeAws_restXmlGetResponseHeadersPolicyConfigCommand, +} from "../protocols/Aws_restXml"; + +export interface GetResponseHeadersPolicyConfigCommandInput extends GetResponseHeadersPolicyConfigRequest {} +export interface GetResponseHeadersPolicyConfigCommandOutput + extends GetResponseHeadersPolicyConfigResult, + __MetadataBearer {} + +/** + *

Gets a response headers policy configuration.

+ *

To get a response headers policy configuration, you must provide the policy’s + * identifier. If the response headers policy is attached to a distribution’s cache + * behavior, you can get the policy’s identifier using ListDistributions or + * GetDistribution. If the response headers policy is not attached to a + * cache behavior, you can get the identifier using + * ListResponseHeadersPolicies.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudFrontClient, GetResponseHeadersPolicyConfigCommand } from "@aws-sdk/client-cloudfront"; // ES Modules import + * // const { CloudFrontClient, GetResponseHeadersPolicyConfigCommand } = require("@aws-sdk/client-cloudfront"); // CommonJS import + * const client = new CloudFrontClient(config); + * const command = new GetResponseHeadersPolicyConfigCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetResponseHeadersPolicyConfigCommandInput} for command's `input` shape. + * @see {@link GetResponseHeadersPolicyConfigCommandOutput} for command's `response` shape. + * @see {@link CloudFrontClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetResponseHeadersPolicyConfigCommand extends $Command< + GetResponseHeadersPolicyConfigCommandInput, + GetResponseHeadersPolicyConfigCommandOutput, + CloudFrontClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetResponseHeadersPolicyConfigCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudFrontClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudFrontClient"; + const commandName = "GetResponseHeadersPolicyConfigCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetResponseHeadersPolicyConfigRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetResponseHeadersPolicyConfigResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetResponseHeadersPolicyConfigCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restXmlGetResponseHeadersPolicyConfigCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restXmlGetResponseHeadersPolicyConfigCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudfront/src/commands/ListCachePoliciesCommand.ts b/clients/client-cloudfront/src/commands/ListCachePoliciesCommand.ts index e8c43588a6c0..1e9923dbc0d3 100644 --- a/clients/client-cloudfront/src/commands/ListCachePoliciesCommand.ts +++ b/clients/client-cloudfront/src/commands/ListCachePoliciesCommand.ts @@ -24,7 +24,7 @@ export interface ListCachePoliciesCommandOutput extends ListCachePoliciesResult, /** *

Gets a list of cache policies.

*

You can optionally apply a filter to return only the managed policies created by Amazon Web Services, or - * only the custom policies created in your account.

+ * only the custom policies created in your Amazon Web Services account.

*

You can optionally specify the maximum number of items to receive in the response. If * the total number of items in the list exceeds the maximum that you specify, or the * default maximum, the response is paginated. To get the next page of items, send a diff --git a/clients/client-cloudfront/src/commands/ListDistributionsByResponseHeadersPolicyIdCommand.ts b/clients/client-cloudfront/src/commands/ListDistributionsByResponseHeadersPolicyIdCommand.ts new file mode 100644 index 000000000000..283e5947f2f8 --- /dev/null +++ b/clients/client-cloudfront/src/commands/ListDistributionsByResponseHeadersPolicyIdCommand.ts @@ -0,0 +1,116 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; +import { + ListDistributionsByResponseHeadersPolicyIdRequest, + ListDistributionsByResponseHeadersPolicyIdResult, +} from "../models/models_1"; +import { + deserializeAws_restXmlListDistributionsByResponseHeadersPolicyIdCommand, + serializeAws_restXmlListDistributionsByResponseHeadersPolicyIdCommand, +} from "../protocols/Aws_restXml"; + +export interface ListDistributionsByResponseHeadersPolicyIdCommandInput + extends ListDistributionsByResponseHeadersPolicyIdRequest {} +export interface ListDistributionsByResponseHeadersPolicyIdCommandOutput + extends ListDistributionsByResponseHeadersPolicyIdResult, + __MetadataBearer {} + +/** + *

Gets a list of distribution IDs for distributions that have a cache behavior that’s + * associated with the specified response headers policy.

+ *

You can optionally specify the maximum number of items to receive in the response. If + * the total number of items in the list exceeds the maximum that you specify, or the + * default maximum, the response is paginated. To get the next page of items, send a + * subsequent request that specifies the NextMarker value from the current + * response as the Marker value in the subsequent request.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudFrontClient, ListDistributionsByResponseHeadersPolicyIdCommand } from "@aws-sdk/client-cloudfront"; // ES Modules import + * // const { CloudFrontClient, ListDistributionsByResponseHeadersPolicyIdCommand } = require("@aws-sdk/client-cloudfront"); // CommonJS import + * const client = new CloudFrontClient(config); + * const command = new ListDistributionsByResponseHeadersPolicyIdCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListDistributionsByResponseHeadersPolicyIdCommandInput} for command's `input` shape. + * @see {@link ListDistributionsByResponseHeadersPolicyIdCommandOutput} for command's `response` shape. + * @see {@link CloudFrontClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListDistributionsByResponseHeadersPolicyIdCommand extends $Command< + ListDistributionsByResponseHeadersPolicyIdCommandInput, + ListDistributionsByResponseHeadersPolicyIdCommandOutput, + CloudFrontClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListDistributionsByResponseHeadersPolicyIdCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudFrontClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListDistributionsByResponseHeadersPolicyIdCommandInput, + ListDistributionsByResponseHeadersPolicyIdCommandOutput + > { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudFrontClient"; + const commandName = "ListDistributionsByResponseHeadersPolicyIdCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListDistributionsByResponseHeadersPolicyIdRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListDistributionsByResponseHeadersPolicyIdResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListDistributionsByResponseHeadersPolicyIdCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restXmlListDistributionsByResponseHeadersPolicyIdCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restXmlListDistributionsByResponseHeadersPolicyIdCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudfront/src/commands/ListFunctionsCommand.ts b/clients/client-cloudfront/src/commands/ListFunctionsCommand.ts index a55a5d7b5c67..f17dfff07c4b 100644 --- a/clients/client-cloudfront/src/commands/ListFunctionsCommand.ts +++ b/clients/client-cloudfront/src/commands/ListFunctionsCommand.ts @@ -22,7 +22,7 @@ export interface ListFunctionsCommandInput extends ListFunctionsRequest {} export interface ListFunctionsCommandOutput extends ListFunctionsResult, __MetadataBearer {} /** - *

Gets a list of all CloudFront functions in your account.

+ *

Gets a list of all CloudFront functions in your Amazon Web Services account.

*

You can optionally apply a filter to return only the functions that are in the * specified stage, either DEVELOPMENT or LIVE.

*

You can optionally specify the maximum number of items to receive in the response. If diff --git a/clients/client-cloudfront/src/commands/ListOriginRequestPoliciesCommand.ts b/clients/client-cloudfront/src/commands/ListOriginRequestPoliciesCommand.ts index 116c584bca28..046c59476170 100644 --- a/clients/client-cloudfront/src/commands/ListOriginRequestPoliciesCommand.ts +++ b/clients/client-cloudfront/src/commands/ListOriginRequestPoliciesCommand.ts @@ -24,7 +24,7 @@ export interface ListOriginRequestPoliciesCommandOutput extends ListOriginReques /** *

Gets a list of origin request policies.

*

You can optionally apply a filter to return only the managed policies created by Amazon Web Services, or - * only the custom policies created in your account.

+ * only the custom policies created in your Amazon Web Services account.

*

You can optionally specify the maximum number of items to receive in the response. If * the total number of items in the list exceeds the maximum that you specify, or the * default maximum, the response is paginated. To get the next page of items, send a diff --git a/clients/client-cloudfront/src/commands/ListResponseHeadersPoliciesCommand.ts b/clients/client-cloudfront/src/commands/ListResponseHeadersPoliciesCommand.ts new file mode 100644 index 000000000000..be9d0c61da24 --- /dev/null +++ b/clients/client-cloudfront/src/commands/ListResponseHeadersPoliciesCommand.ts @@ -0,0 +1,105 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; +import { ListResponseHeadersPoliciesRequest, ListResponseHeadersPoliciesResult } from "../models/models_1"; +import { + deserializeAws_restXmlListResponseHeadersPoliciesCommand, + serializeAws_restXmlListResponseHeadersPoliciesCommand, +} from "../protocols/Aws_restXml"; + +export interface ListResponseHeadersPoliciesCommandInput extends ListResponseHeadersPoliciesRequest {} +export interface ListResponseHeadersPoliciesCommandOutput extends ListResponseHeadersPoliciesResult, __MetadataBearer {} + +/** + *

Gets a list of response headers policies.

+ *

You can optionally apply a filter to get only the managed policies created by Amazon Web Services, + * or only the custom policies created in your Amazon Web Services account.

+ *

You can optionally specify the maximum number of items to receive in the response. If + * the total number of items in the list exceeds the maximum that you specify, or the + * default maximum, the response is paginated. To get the next page of items, send a + * subsequent request that specifies the NextMarker value from the current + * response as the Marker value in the subsequent request.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudFrontClient, ListResponseHeadersPoliciesCommand } from "@aws-sdk/client-cloudfront"; // ES Modules import + * // const { CloudFrontClient, ListResponseHeadersPoliciesCommand } = require("@aws-sdk/client-cloudfront"); // CommonJS import + * const client = new CloudFrontClient(config); + * const command = new ListResponseHeadersPoliciesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListResponseHeadersPoliciesCommandInput} for command's `input` shape. + * @see {@link ListResponseHeadersPoliciesCommandOutput} for command's `response` shape. + * @see {@link CloudFrontClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListResponseHeadersPoliciesCommand extends $Command< + ListResponseHeadersPoliciesCommandInput, + ListResponseHeadersPoliciesCommandOutput, + CloudFrontClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListResponseHeadersPoliciesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudFrontClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudFrontClient"; + const commandName = "ListResponseHeadersPoliciesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListResponseHeadersPoliciesRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListResponseHeadersPoliciesResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListResponseHeadersPoliciesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restXmlListResponseHeadersPoliciesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restXmlListResponseHeadersPoliciesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudfront/src/commands/UpdateResponseHeadersPolicyCommand.ts b/clients/client-cloudfront/src/commands/UpdateResponseHeadersPolicyCommand.ts new file mode 100644 index 000000000000..63647eba3f7b --- /dev/null +++ b/clients/client-cloudfront/src/commands/UpdateResponseHeadersPolicyCommand.ts @@ -0,0 +1,116 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; +import { UpdateResponseHeadersPolicyRequest, UpdateResponseHeadersPolicyResult } from "../models/models_1"; +import { + deserializeAws_restXmlUpdateResponseHeadersPolicyCommand, + serializeAws_restXmlUpdateResponseHeadersPolicyCommand, +} from "../protocols/Aws_restXml"; + +export interface UpdateResponseHeadersPolicyCommandInput extends UpdateResponseHeadersPolicyRequest {} +export interface UpdateResponseHeadersPolicyCommandOutput extends UpdateResponseHeadersPolicyResult, __MetadataBearer {} + +/** + *

Updates a response headers policy.

+ *

When you update a response headers policy, the entire policy is replaced. You cannot + * update some policy fields independent of others. To update a response headers policy + * configuration:

+ *
    + *
  1. + *

    Use GetResponseHeadersPolicyConfig to get the current policy’s + * configuration.

    + *
  2. + *
  3. + *

    Modify the fields in the response headers policy configuration that you want + * to update.

    + *
  4. + *
  5. + *

    Call UpdateResponseHeadersPolicy, providing the entire response + * headers policy configuration, including the fields that you modified and those + * that you didn’t.

    + *
  6. + *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudFrontClient, UpdateResponseHeadersPolicyCommand } from "@aws-sdk/client-cloudfront"; // ES Modules import + * // const { CloudFrontClient, UpdateResponseHeadersPolicyCommand } = require("@aws-sdk/client-cloudfront"); // CommonJS import + * const client = new CloudFrontClient(config); + * const command = new UpdateResponseHeadersPolicyCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateResponseHeadersPolicyCommandInput} for command's `input` shape. + * @see {@link UpdateResponseHeadersPolicyCommandOutput} for command's `response` shape. + * @see {@link CloudFrontClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateResponseHeadersPolicyCommand extends $Command< + UpdateResponseHeadersPolicyCommandInput, + UpdateResponseHeadersPolicyCommandOutput, + CloudFrontClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateResponseHeadersPolicyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudFrontClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudFrontClient"; + const commandName = "UpdateResponseHeadersPolicyCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateResponseHeadersPolicyRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateResponseHeadersPolicyResult.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateResponseHeadersPolicyCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restXmlUpdateResponseHeadersPolicyCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restXmlUpdateResponseHeadersPolicyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-cloudfront/src/commands/index.ts b/clients/client-cloudfront/src/commands/index.ts index 89d9a278fb43..5795484b92d8 100644 --- a/clients/client-cloudfront/src/commands/index.ts +++ b/clients/client-cloudfront/src/commands/index.ts @@ -12,6 +12,7 @@ export * from "./CreateMonitoringSubscriptionCommand"; export * from "./CreateOriginRequestPolicyCommand"; export * from "./CreatePublicKeyCommand"; export * from "./CreateRealtimeLogConfigCommand"; +export * from "./CreateResponseHeadersPolicyCommand"; export * from "./CreateStreamingDistributionCommand"; export * from "./CreateStreamingDistributionWithTagsCommand"; export * from "./DeleteCachePolicyCommand"; @@ -25,6 +26,7 @@ export * from "./DeleteMonitoringSubscriptionCommand"; export * from "./DeleteOriginRequestPolicyCommand"; export * from "./DeletePublicKeyCommand"; export * from "./DeleteRealtimeLogConfigCommand"; +export * from "./DeleteResponseHeadersPolicyCommand"; export * from "./DeleteStreamingDistributionCommand"; export * from "./DescribeFunctionCommand"; export * from "./GetCachePolicyCommand"; @@ -47,6 +49,8 @@ export * from "./GetOriginRequestPolicyConfigCommand"; export * from "./GetPublicKeyCommand"; export * from "./GetPublicKeyConfigCommand"; export * from "./GetRealtimeLogConfigCommand"; +export * from "./GetResponseHeadersPolicyCommand"; +export * from "./GetResponseHeadersPolicyConfigCommand"; export * from "./GetStreamingDistributionCommand"; export * from "./GetStreamingDistributionConfigCommand"; export * from "./ListCachePoliciesCommand"; @@ -56,6 +60,7 @@ export * from "./ListDistributionsByCachePolicyIdCommand"; export * from "./ListDistributionsByKeyGroupCommand"; export * from "./ListDistributionsByOriginRequestPolicyIdCommand"; export * from "./ListDistributionsByRealtimeLogConfigCommand"; +export * from "./ListDistributionsByResponseHeadersPolicyIdCommand"; export * from "./ListDistributionsByWebACLIdCommand"; export * from "./ListDistributionsCommand"; export * from "./ListFieldLevelEncryptionConfigsCommand"; @@ -66,6 +71,7 @@ export * from "./ListKeyGroupsCommand"; export * from "./ListOriginRequestPoliciesCommand"; export * from "./ListPublicKeysCommand"; export * from "./ListRealtimeLogConfigsCommand"; +export * from "./ListResponseHeadersPoliciesCommand"; export * from "./ListStreamingDistributionsCommand"; export * from "./ListTagsForResourceCommand"; export * from "./PublishFunctionCommand"; @@ -82,4 +88,5 @@ export * from "./UpdateKeyGroupCommand"; export * from "./UpdateOriginRequestPolicyCommand"; export * from "./UpdatePublicKeyCommand"; export * from "./UpdateRealtimeLogConfigCommand"; +export * from "./UpdateResponseHeadersPolicyCommand"; export * from "./UpdateStreamingDistributionCommand"; diff --git a/clients/client-cloudfront/src/models/models_0.ts b/clients/client-cloudfront/src/models/models_0.ts index 39a59ceafb8c..8454010ba726 100644 --- a/clients/client-cloudfront/src/models/models_0.ts +++ b/clients/client-cloudfront/src/models/models_0.ts @@ -1,6 +1,17 @@ import { SENSITIVE_STRING } from "@aws-sdk/smithy-client"; import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; +export enum ResponseHeadersPolicyAccessControlAllowMethodsValues { + ALL = "ALL", + DELETE = "DELETE", + GET = "GET", + HEAD = "HEAD", + OPTIONS = "OPTIONS", + PATCH = "PATCH", + POST = "POST", + PUT = "PUT", +} + /** *

Access denied.

*/ @@ -102,13 +113,13 @@ export namespace ActiveTrustedKeyGroups { } /** - *

A list of accounts and the active CloudFront key pairs in each account that CloudFront can use to + *

A list of Amazon Web Services accounts and the active CloudFront key pairs in each account that CloudFront can use to * verify the signatures of signed URLs and signed cookies.

*/ export interface Signer { /** - *

An account number that contains active CloudFront key pairs that CloudFront can use to verify the - * signatures of signed URLs and signed cookies. If the account that owns the key pairs + *

An Amazon Web Services account number that contains active CloudFront key pairs that CloudFront can use to verify the + * signatures of signed URLs and signed cookies. If the Amazon Web Services account that owns the key pairs * is the same account that owns the CloudFront distribution, the value of this field is * self.

*/ @@ -130,24 +141,24 @@ export namespace Signer { } /** - *

A list of accounts and the active CloudFront key pairs in each account that CloudFront can use + *

A list of Amazon Web Services accounts and the active CloudFront key pairs in each account that CloudFront can use * to verify the signatures of signed URLs and signed cookies.

*/ export interface ActiveTrustedSigners { /** - *

This field is true if any of the accounts in the list have active CloudFront + *

This field is true if any of the Amazon Web Services accounts in the list have active CloudFront * key pairs that CloudFront can use to verify the signatures of signed URLs and signed cookies. * If not, this field is false.

*/ Enabled: boolean | undefined; /** - *

The number of accounts in the list.

+ *

The number of Amazon Web Services accounts in the list.

*/ Quantity: number | undefined; /** - *

A list of accounts and the identifiers of active CloudFront key pairs in each account that + *

A list of Amazon Web Services accounts and the identifiers of active CloudFront key pairs in each account that * CloudFront can use to verify the signatures of signed URLs and signed cookies.

*/ Items?: Signer[]; @@ -883,24 +894,24 @@ export namespace TrustedKeyGroups { } /** - *

A list of accounts whose public keys CloudFront can use to verify the signatures of signed + *

A list of Amazon Web Services accounts whose public keys CloudFront can use to verify the signatures of signed * URLs and signed cookies.

*/ export interface TrustedSigners { /** - *

This field is true if any of the accounts have public keys that CloudFront can + *

This field is true if any of the Amazon Web Services accounts have public keys that CloudFront can * use to verify the signatures of signed URLs and signed cookies. If not, this field is * false.

*/ Enabled: boolean | undefined; /** - *

The number of accounts in the list.

+ *

The number of Amazon Web Services accounts in the list.

*/ Quantity: number | undefined; /** - *

A list of account identifiers.

+ *

A list of Amazon Web Services account identifiers.

*/ Items?: string[]; } @@ -965,11 +976,11 @@ export interface CacheBehavior { *

We recommend using TrustedKeyGroups instead of * TrustedSigners.

* - *

A list of account IDs whose public keys CloudFront can use to validate signed URLs or signed + *

A list of Amazon Web Services account IDs whose public keys CloudFront can use to validate signed URLs or signed * cookies.

*

When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies * for all requests that match the cache behavior. The URLs or cookies must be signed with - * the private key of a CloudFront key pair in the trusted signer’s account. The signed URL + * the private key of a CloudFront key pair in the trusted signer’s Amazon Web Services account. The signed URL * or cookie contains information about which public key CloudFront should use to verify the * signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

*/ @@ -1101,6 +1112,11 @@ export interface CacheBehavior { */ OriginRequestPolicyId?: string; + /** + *

The identifier for a response headers policy.

+ */ + ResponseHeadersPolicyId?: string; + /** * @deprecated * @@ -1692,7 +1708,7 @@ export type CachePolicyType = "custom" | "managed"; export interface CachePolicySummary { /** *

The type of cache policy, either managed (created by Amazon Web Services) or - * custom (created in this account).

+ * custom (created in this Amazon Web Services account).

*/ Type: CachePolicyType | string | undefined; @@ -1828,7 +1844,7 @@ export namespace InconsistentQuantities { } /** - *

You have reached the maximum number of cache policies for this account. For more + *

You have reached the maximum number of cache policies for this Amazon Web Services account. For more * information, see Quotas (formerly known as limits) in the * Amazon CloudFront Developer Guide.

*/ @@ -2252,11 +2268,11 @@ export interface DefaultCacheBehavior { *

We recommend using TrustedKeyGroups instead of * TrustedSigners.

* - *

A list of account IDs whose public keys CloudFront can use to validate signed URLs or signed + *

A list of Amazon Web Services account IDs whose public keys CloudFront can use to validate signed URLs or signed * cookies.

*

When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies * for all requests that match the cache behavior. The URLs or cookies must be signed with - * the private key of a CloudFront key pair in a trusted signer’s account. The signed URL or + * the private key of a CloudFront key pair in a trusted signer’s Amazon Web Services account. The signed URL or * cookie contains information about which public key CloudFront should use to verify the * signature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

*/ @@ -2390,6 +2406,11 @@ export interface DefaultCacheBehavior { */ OriginRequestPolicyId?: string; + /** + *

The identifier for a response headers policy.

+ */ + ResponseHeadersPolicyId?: string; + /** * @deprecated * @@ -2686,6 +2707,7 @@ export namespace OriginCustomHeader { */ export const filterSensitiveLog = (obj: OriginCustomHeader): any => ({ ...obj, + ...(obj.HeaderValue && { HeaderValue: SENSITIVE_STRING }), }); } @@ -2713,6 +2735,7 @@ export namespace CustomHeaders { */ export const filterSensitiveLog = (obj: CustomHeaders): any => ({ ...obj, + ...(obj.Items && { Items: obj.Items.map((item) => OriginCustomHeader.filterSensitiveLog(item)) }), }); } @@ -2841,13 +2864,13 @@ export interface OriginShield { Enabled: boolean | undefined; /** - *

The Region for Origin Shield.

- *

Specify the Region that has the lowest latency to your origin. + *

The Amazon Web Services Region for Origin Shield.

+ *

Specify the Amazon Web Services Region that has the lowest latency to your origin. * To specify a region, use the region code, not the region name. * For example, specify the US East (Ohio) region as us-east-2.

- *

When you enable CloudFront Origin Shield, you must specify the Region for Origin - * Shield. For the list of Regions that you can specify, and for help choosing the best - * Region for your origin, see Choosing the Region for Origin Shield in the + *

When you enable CloudFront Origin Shield, you must specify the Amazon Web Services Region for Origin + * Shield. For the list of Amazon Web Services Regions that you can specify, and for help choosing the best + * Region for your origin, see Choosing the Amazon Web Services Region for Origin Shield in the * Amazon CloudFront Developer Guide.

*/ OriginShieldRegion?: string; @@ -3017,6 +3040,7 @@ export namespace Origin { */ export const filterSensitiveLog = (obj: Origin): any => ({ ...obj, + ...(obj.CustomHeaders && { CustomHeaders: CustomHeaders.filterSensitiveLog(obj.CustomHeaders) }), }); } @@ -3538,7 +3562,7 @@ export interface DistributionConfig { * content (or restrict access but not by IP address), you can create two distributions. For more * information, see * Creating a Signed URL Using a Custom Policy in the Amazon CloudFront Developer Guide.

- *

If you're using an Route 53 Amazon Web Services Integration alias resource record set to route traffic to your CloudFront + *

If you're using an Route 53 Amazon Web Services Integration alias resource record set to route traffic to your CloudFront * distribution, you need to create a second alias resource record set when both of the following * are true:

*
    @@ -3550,9 +3574,9 @@ export interface DistributionConfig { * *
*

For more information, see Routing Traffic - * to an Amazon CloudFront Web Distribution by Using Your Domain Name in the Route 53 Amazon Web Services Integration + * to an Amazon CloudFront Web Distribution by Using Your Domain Name in the Route 53 Amazon Web Services Integration * Developer Guide.

- *

If you created a CNAME resource record set, either with Route 53 Amazon Web Services Integration or with another DNS + *

If you created a CNAME resource record set, either with Route 53 Amazon Web Services Integration or with another DNS * service, you don't need to make any changes. A CNAME record will route traffic to your * distribution regardless of the IP address format of the viewer request.

*/ @@ -3605,7 +3629,7 @@ export interface Distribution { /** *

The ARN (Amazon Resource Name) for the distribution. For example: * arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where - * 123456789012 is your account ID.

+ * 123456789012 is your Amazon Web Services account ID.

*/ ARN: string | undefined; @@ -3638,7 +3662,7 @@ export interface Distribution { * *

CloudFront automatically adds this field to the response if you’ve configured a cache behavior in * this distribution to serve private content using trusted signers. This field contains a - * list of account IDs and the active CloudFront key pairs in each account that CloudFront can use + * list of Amazon Web Services account IDs and the active CloudFront key pairs in each account that CloudFront can use * to verify the signatures of signed URLs or signed cookies.

*/ ActiveTrustedSigners?: ActiveTrustedSigners; @@ -4224,7 +4248,25 @@ export namespace NoSuchRealtimeLogConfig { } /** - *

The specified real-time log configuration belongs to a different account.

+ *

The response headers policy does not exist.

+ */ +export interface NoSuchResponseHeadersPolicy extends __SmithyException, $MetadataBearer { + name: "NoSuchResponseHeadersPolicy"; + $fault: "client"; + Message?: string; +} + +export namespace NoSuchResponseHeadersPolicy { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NoSuchResponseHeadersPolicy): any => ({ + ...obj, + }); +} + +/** + *

The specified real-time log configuration belongs to a different Amazon Web Services account.

*/ export interface RealtimeLogConfigOwnerMismatch extends __SmithyException, $MetadataBearer { name: "RealtimeLogConfigOwnerMismatch"; @@ -4391,6 +4433,27 @@ export namespace TooManyDistributionsAssociatedToOriginRequestPolicy { }); } +/** + *

The maximum number of distributions have been associated with the specified response headers + * policy.

+ *

For more information, see Quotas (formerly known as limits) in the + * Amazon CloudFront Developer Guide.

+ */ +export interface TooManyDistributionsAssociatedToResponseHeadersPolicy extends __SmithyException, $MetadataBearer { + name: "TooManyDistributionsAssociatedToResponseHeadersPolicy"; + $fault: "client"; + Message?: string; +} + +export namespace TooManyDistributionsAssociatedToResponseHeadersPolicy { + /** + * @internal + */ + export const filterSensitiveLog = (obj: TooManyDistributionsAssociatedToResponseHeadersPolicy): any => ({ + ...obj, + }); +} + /** *

You have reached the maximum number of distributions that are associated with a CloudFront * function. For more information, see Quotas (formerly known as limits) in the @@ -5632,7 +5695,7 @@ export namespace CreateFunctionResult { } /** - *

A function with the same name already exists in this account. To create a + *

A function with the same name already exists in this Amazon Web Services account. To create a * function, you must provide a unique name. To update an existing function, use * UpdateFunction.

*/ @@ -5671,7 +5734,7 @@ export namespace FunctionSizeLimitExceeded { } /** - *

You have reached the maximum number of CloudFront functions for this account. For more + *

You have reached the maximum number of CloudFront functions for this Amazon Web Services account. For more * information, see Quotas (formerly known as limits) in the * Amazon CloudFront Developer Guide.

*/ @@ -5998,7 +6061,7 @@ export namespace KeyGroupAlreadyExists { } /** - *

You have reached the maximum number of key groups for this account. For more + *

You have reached the maximum number of key groups for this Amazon Web Services account. For more * information, see Quotas (formerly known as limits) in the * Amazon CloudFront Developer Guide.

*/ @@ -6490,7 +6553,7 @@ export namespace TooManyHeadersInOriginRequestPolicy { } /** - *

You have reached the maximum number of origin request policies for this account. + *

You have reached the maximum number of origin request policies for this Amazon Web Services account. * For more information, see Quotas (formerly known as limits) in the * Amazon CloudFront Developer Guide.

*/ @@ -6847,7 +6910,7 @@ export namespace RealtimeLogConfigAlreadyExists { } /** - *

You have reached the maximum number of real-time log configurations for this account. + *

You have reached the maximum number of real-time log configurations for this Amazon Web Services account. * For more information, see Quotas (formerly known as limits) in the * Amazon CloudFront Developer Guide.

*/ @@ -6867,1367 +6930,1633 @@ export namespace TooManyRealtimeLogConfigs { } /** - *

A complex type that controls whether access logs are written for this streaming distribution.

+ *

A list of HTTP header names that CloudFront includes as values for the + * Access-Control-Allow-Headers HTTP response header.

+ *

For more information about the Access-Control-Allow-Headers HTTP response + * header, see Access-Control-Allow-Headers in the MDN Web Docs.

*/ -export interface StreamingLoggingConfig { - /** - *

Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket. If you don't - * want to enable logging when you create a streaming distribution or if you want to disable - * logging for an existing streaming distribution, specify false for - * Enabled, and specify empty Bucket and Prefix - * elements. If you specify false for Enabled but you specify values - * for Bucket and Prefix, the values are automatically deleted. - *

- */ - Enabled: boolean | undefined; - +export interface ResponseHeadersPolicyAccessControlAllowHeaders { /** - *

The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.

+ *

The number of HTTP header names in the list.

*/ - Bucket: string | undefined; + Quantity: number | undefined; /** - *

An optional string that you want CloudFront to prefix to the access log filenames for this streaming distribution, for example, - * myprefix/. If you want to enable logging, but you don't want to specify a prefix, you still must include - * an empty Prefix element in the Logging element.

+ *

The list of HTTP header names. You can specify * to allow all headers.

*/ - Prefix: string | undefined; + Items: string[] | undefined; } -export namespace StreamingLoggingConfig { +export namespace ResponseHeadersPolicyAccessControlAllowHeaders { /** * @internal */ - export const filterSensitiveLog = (obj: StreamingLoggingConfig): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyAccessControlAllowHeaders): any => ({ ...obj, }); } /** - *

A complex type that contains information about the Amazon S3 bucket from which you want - * CloudFront to get your media files for distribution.

+ *

A list of HTTP methods that CloudFront includes as values for the + * Access-Control-Allow-Methods HTTP response header.

+ *

For more information about the Access-Control-Allow-Methods HTTP response + * header, see Access-Control-Allow-Methods in the MDN Web Docs.

*/ -export interface S3Origin { +export interface ResponseHeadersPolicyAccessControlAllowMethods { /** - *

The DNS name of the Amazon S3 origin.

+ *

The number of HTTP methods in the list.

*/ - DomainName: string | undefined; + Quantity: number | undefined; /** - *

The CloudFront origin access identity to associate with the distribution. Use an origin - * access identity to configure the distribution so that end users can only access objects in an - * Amazon S3 bucket through CloudFront.

- *

If you want end users to be able to access objects using either the CloudFront URL or the - * Amazon S3 URL, specify an empty OriginAccessIdentity element.

- *

To delete the origin access identity from an existing distribution, update the - * distribution configuration and include an empty OriginAccessIdentity - * element.

- *

To replace the origin access identity, update the distribution configuration and - * specify the new origin access identity.

- *

For more information, see Using an Origin Access - * Identity to Restrict Access to Your Amazon S3 Content in the - * Amazon CloudFront Developer Guide.

+ *

The list of HTTP methods. Valid values are:

+ *
    + *
  • + *

    + * GET + *

    + *
  • + *
  • + *

    + * DELETE + *

    + *
  • + *
  • + *

    + * HEAD + *

    + *
  • + *
  • + *

    + * OPTIONS + *

    + *
  • + *
  • + *

    + * PATCH + *

    + *
  • + *
  • + *

    + * POST + *

    + *
  • + *
  • + *

    + * PUT + *

    + *
  • + *
  • + *

    + * ALL + *

    + *
  • + *
+ *

+ * ALL is a special value that includes all of the listed HTTP + * methods.

*/ - OriginAccessIdentity: string | undefined; + Items: (ResponseHeadersPolicyAccessControlAllowMethodsValues | string)[] | undefined; } -export namespace S3Origin { +export namespace ResponseHeadersPolicyAccessControlAllowMethods { /** * @internal */ - export const filterSensitiveLog = (obj: S3Origin): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyAccessControlAllowMethods): any => ({ ...obj, }); } /** - *

The RTMP distribution's configuration information.

+ *

A list of origins (domain names) that CloudFront can use as the value for the + * Access-Control-Allow-Origin HTTP response header.

+ *

For more information about the Access-Control-Allow-Origin HTTP response + * header, see Access-Control-Allow-Origin in the MDN Web Docs.

*/ -export interface StreamingDistributionConfig { - /** - *

A unique value (for example, a date-time stamp) that ensures that the request can't be - * replayed.

- *

If the value of CallerReference is new (regardless of the content of the - * StreamingDistributionConfig object), CloudFront creates a new distribution.

- *

If CallerReference is a value that you already sent in a previous request to - * create a distribution, CloudFront returns a DistributionAlreadyExists error.

- */ - CallerReference: string | undefined; - - /** - *

A complex type that contains information about the Amazon S3 bucket from which you want - * CloudFront to get your media files for distribution.

- */ - S3Origin: S3Origin | undefined; - - /** - *

A complex type that contains information about CNAMEs (alternate domain names), if any, - * for this streaming distribution.

- */ - Aliases?: Aliases; - - /** - *

Any comments you want to include about the streaming distribution.

- */ - Comment: string | undefined; - - /** - *

A complex type that controls whether access logs are written for the streaming - * distribution.

- */ - Logging?: StreamingLoggingConfig; - - /** - *

A complex type that specifies any accounts that you want to permit to create signed - * URLs for private content. If you want the distribution to use signed URLs, include this - * element; if you want the distribution to use public URLs, remove this element. For more - * information, see Serving Private Content through - * CloudFront in the Amazon CloudFront Developer Guide.

- */ - TrustedSigners: TrustedSigners | undefined; - +export interface ResponseHeadersPolicyAccessControlAllowOrigins { /** - *

A complex type that contains information about price class for this streaming - * distribution.

+ *

The number of origins in the list.

*/ - PriceClass?: PriceClass | string; + Quantity: number | undefined; /** - *

Whether the streaming distribution is enabled to accept user requests for - * content.

+ *

The list of origins (domain names). You can specify * to allow all + * origins.

*/ - Enabled: boolean | undefined; + Items: string[] | undefined; } -export namespace StreamingDistributionConfig { +export namespace ResponseHeadersPolicyAccessControlAllowOrigins { /** * @internal */ - export const filterSensitiveLog = (obj: StreamingDistributionConfig): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyAccessControlAllowOrigins): any => ({ ...obj, }); } /** - *

The request to create a new streaming distribution.

+ *

A list of HTTP headers that CloudFront includes as values for the + * Access-Control-Expose-Headers HTTP response header.

+ *

For more information about the Access-Control-Expose-Headers HTTP + * response header, see Access-Control-Expose-Headers in the MDN Web Docs.

*/ -export interface CreateStreamingDistributionRequest { +export interface ResponseHeadersPolicyAccessControlExposeHeaders { /** - *

The streaming distribution's configuration information.

+ *

The number of HTTP headers in the list.

*/ - StreamingDistributionConfig: StreamingDistributionConfig | undefined; + Quantity: number | undefined; + + /** + *

The list of HTTP headers. You can specify * to expose all headers.

+ */ + Items?: string[]; } -export namespace CreateStreamingDistributionRequest { +export namespace ResponseHeadersPolicyAccessControlExposeHeaders { /** * @internal */ - export const filterSensitiveLog = (obj: CreateStreamingDistributionRequest): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyAccessControlExposeHeaders): any => ({ ...obj, }); } /** - *

A streaming distribution tells CloudFront where you want RTMP content to be delivered from, and the details about how to - * track and manage content delivery.

+ *

A configuration for a set of HTTP response headers that are used for cross-origin resource + * sharing (CORS). CloudFront adds these headers to HTTP responses that it sends for CORS + * requests that match a cache behavior associated with this response headers + * policy.

+ *

For more information about CORS, see Cross-Origin Resource + * Sharing (CORS) in the MDN Web Docs.

*/ -export interface StreamingDistribution { +export interface ResponseHeadersPolicyCorsConfig { /** - *

The identifier for the RTMP distribution. For example: - * EGTXBD79EXAMPLE.

+ *

A list of origins (domain names) that CloudFront can use as the value for the + * Access-Control-Allow-Origin HTTP response header.

+ *

For more information about the Access-Control-Allow-Origin HTTP response + * header, see Access-Control-Allow-Origin in the MDN Web Docs.

*/ - Id: string | undefined; + AccessControlAllowOrigins: ResponseHeadersPolicyAccessControlAllowOrigins | undefined; /** - *

The ARN (Amazon Resource Name) for the distribution. For example: - * arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where - * 123456789012 is your account ID.

+ *

A list of HTTP header names that CloudFront includes as values for the + * Access-Control-Allow-Headers HTTP response header.

+ *

For more information about the Access-Control-Allow-Headers HTTP response + * header, see Access-Control-Allow-Headers in the MDN Web Docs.

*/ - ARN: string | undefined; + AccessControlAllowHeaders: ResponseHeadersPolicyAccessControlAllowHeaders | undefined; /** - *

The current status of the RTMP distribution. When the status is Deployed, - * the distribution's information is propagated to all CloudFront edge locations.

+ *

A list of HTTP methods that CloudFront includes as values for the + * Access-Control-Allow-Methods HTTP response header.

+ *

For more information about the Access-Control-Allow-Methods HTTP response + * header, see Access-Control-Allow-Methods in the MDN Web Docs.

*/ - Status: string | undefined; + AccessControlAllowMethods: ResponseHeadersPolicyAccessControlAllowMethods | undefined; /** - *

The date and time that the distribution was last modified.

+ *

A Boolean that CloudFront uses as the value for the Access-Control-Allow-Credentials + * HTTP response header.

+ *

For more information about the Access-Control-Allow-Credentials HTTP + * response header, see Access-Control-Allow-Credentials in the MDN Web Docs.

*/ - LastModifiedTime?: Date; + AccessControlAllowCredentials: boolean | undefined; /** - *

The domain name that corresponds to the streaming distribution, for example, s5c39gqb8ow64r.cloudfront.net.

+ *

A list of HTTP headers that CloudFront includes as values for the + * Access-Control-Expose-Headers HTTP response header.

+ *

For more information about the Access-Control-Expose-Headers HTTP + * response header, see Access-Control-Expose-Headers in the MDN Web Docs.

*/ - DomainName: string | undefined; + AccessControlExposeHeaders?: ResponseHeadersPolicyAccessControlExposeHeaders; /** - *

A complex type that lists the accounts, if any, that you included in the - * TrustedSigners complex type for this distribution. These are the accounts that - * you want to allow to create signed URLs for private content.

- *

The Signer complex type lists the account number of the trusted - * signer or self if the signer is the account that created the distribution. - * The Signer element also includes the IDs of any active CloudFront key pairs that are - * associated with the trusted signer's account. If no KeyPairId element - * appears for a Signer, that signer can't create signed URLs.

- *

For more information, see Serving Private - * Content through CloudFront in the Amazon CloudFront Developer Guide.

+ *

A number that CloudFront uses as the value for the Access-Control-Max-Age HTTP + * response header.

+ *

For more information about the Access-Control-Max-Age HTTP response + * header, see Access-Control-Max-Age in the MDN Web Docs.

*/ - ActiveTrustedSigners: ActiveTrustedSigners | undefined; + AccessControlMaxAgeSec?: number; /** - *

The current configuration information for the RTMP distribution.

+ *

A Boolean that determines whether CloudFront overrides HTTP response headers received from the + * origin with the ones specified in this response headers policy.

*/ - StreamingDistributionConfig: StreamingDistributionConfig | undefined; + OriginOverride: boolean | undefined; } -export namespace StreamingDistribution { +export namespace ResponseHeadersPolicyCorsConfig { /** * @internal */ - export const filterSensitiveLog = (obj: StreamingDistribution): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyCorsConfig): any => ({ ...obj, }); } /** - *

The returned result of the corresponding request.

+ *

An HTTP response header name and its value. CloudFront includes this header in HTTP responses that + * it sends for requests that match a cache behavior that’s associated with this response + * headers policy.

*/ -export interface CreateStreamingDistributionResult { +export interface ResponseHeadersPolicyCustomHeader { /** - *

The streaming distribution's information.

+ *

The HTTP response header name.

*/ - StreamingDistribution?: StreamingDistribution; + Header: string | undefined; /** - *

The fully qualified URI of the new streaming distribution resource just created.

+ *

The value for the HTTP response header.

*/ - Location?: string; + Value: string | undefined; /** - *

The current version of the streaming distribution created.

+ *

A Boolean that determines whether CloudFront overrides a response header with the same name + * received from the origin with the header specified here.

*/ - ETag?: string; + Override: boolean | undefined; } -export namespace CreateStreamingDistributionResult { +export namespace ResponseHeadersPolicyCustomHeader { /** * @internal */ - export const filterSensitiveLog = (obj: CreateStreamingDistributionResult): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyCustomHeader): any => ({ ...obj, }); } /** - *

The caller reference you attempted to create the streaming distribution with - * is associated with another distribution

+ *

A list of HTTP response header names and their values. CloudFront includes these headers in HTTP + * responses that it sends for requests that match a cache behavior that’s associated with + * this response headers policy.

*/ -export interface StreamingDistributionAlreadyExists extends __SmithyException, $MetadataBearer { - name: "StreamingDistributionAlreadyExists"; - $fault: "client"; - Message?: string; +export interface ResponseHeadersPolicyCustomHeadersConfig { + /** + *

The number of HTTP response headers in the list.

+ */ + Quantity: number | undefined; + + /** + *

The list of HTTP response headers and their values.

+ */ + Items?: ResponseHeadersPolicyCustomHeader[]; } -export namespace StreamingDistributionAlreadyExists { +export namespace ResponseHeadersPolicyCustomHeadersConfig { /** * @internal */ - export const filterSensitiveLog = (obj: StreamingDistributionAlreadyExists): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyCustomHeadersConfig): any => ({ ...obj, }); } /** - *

Your request contains more CNAMEs than are allowed per distribution.

+ *

The policy directives and their values that CloudFront includes as values for the + * Content-Security-Policy HTTP response header.

+ *

For more information about the Content-Security-Policy HTTP response + * header, see Content-Security-Policy in the MDN Web Docs.

*/ -export interface TooManyStreamingDistributionCNAMEs extends __SmithyException, $MetadataBearer { - name: "TooManyStreamingDistributionCNAMEs"; - $fault: "client"; - Message?: string; +export interface ResponseHeadersPolicyContentSecurityPolicy { + /** + *

A Boolean that determines whether CloudFront overrides the Content-Security-Policy + * HTTP response header received from the origin with the one specified in this response + * headers policy.

+ */ + Override: boolean | undefined; + + /** + *

The policy directives and their values that CloudFront includes as values for the + * Content-Security-Policy HTTP response header.

+ */ + ContentSecurityPolicy: string | undefined; } -export namespace TooManyStreamingDistributionCNAMEs { +export namespace ResponseHeadersPolicyContentSecurityPolicy { /** * @internal */ - export const filterSensitiveLog = (obj: TooManyStreamingDistributionCNAMEs): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyContentSecurityPolicy): any => ({ ...obj, }); } /** - *

Processing your request would cause you to exceed the maximum number of streaming distributions allowed.

+ *

Determines whether CloudFront includes the X-Content-Type-Options HTTP response + * header with its value set to nosniff.

+ *

For more information about the X-Content-Type-Options HTTP response + * header, see X-Content-Type-Options in the MDN Web Docs.

*/ -export interface TooManyStreamingDistributions extends __SmithyException, $MetadataBearer { - name: "TooManyStreamingDistributions"; - $fault: "client"; - Message?: string; +export interface ResponseHeadersPolicyContentTypeOptions { + /** + *

A Boolean that determines whether CloudFront overrides the X-Content-Type-Options + * HTTP response header received from the origin with the one specified in this response + * headers policy.

+ */ + Override: boolean | undefined; } -export namespace TooManyStreamingDistributions { +export namespace ResponseHeadersPolicyContentTypeOptions { /** * @internal */ - export const filterSensitiveLog = (obj: TooManyStreamingDistributions): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyContentTypeOptions): any => ({ ...obj, }); } +export enum FrameOptionsList { + DENY = "DENY", + SAMEORIGIN = "SAMEORIGIN", +} + /** - *

A streaming distribution Configuration and a list of tags to be associated with the - * streaming distribution.

+ *

Determines whether CloudFront includes the X-Frame-Options HTTP response header and + * the header’s value.

+ *

For more information about the X-Frame-Options HTTP response header, see + * X-Frame-Options in the MDN Web Docs.

*/ -export interface StreamingDistributionConfigWithTags { +export interface ResponseHeadersPolicyFrameOptions { /** - *

A streaming distribution Configuration.

+ *

A Boolean that determines whether CloudFront overrides the X-Frame-Options HTTP + * response header received from the origin with the one specified in this response headers + * policy.

*/ - StreamingDistributionConfig: StreamingDistributionConfig | undefined; + Override: boolean | undefined; /** - *

A complex type that contains zero or more Tag elements.

+ *

The value of the X-Frame-Options HTTP response header. Valid values are + * DENY and SAMEORIGIN.

+ *

For more information about these values, see X-Frame-Options in the MDN Web Docs.

*/ - Tags: Tags | undefined; + FrameOption: FrameOptionsList | string | undefined; } -export namespace StreamingDistributionConfigWithTags { +export namespace ResponseHeadersPolicyFrameOptions { /** * @internal */ - export const filterSensitiveLog = (obj: StreamingDistributionConfigWithTags): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyFrameOptions): any => ({ ...obj, }); } +export enum ReferrerPolicyList { + no_referrer = "no-referrer", + no_referrer_when_downgrade = "no-referrer-when-downgrade", + origin = "origin", + origin_when_cross_origin = "origin-when-cross-origin", + same_origin = "same-origin", + strict_origin = "strict-origin", + strict_origin_when_cross_origin = "strict-origin-when-cross-origin", + unsafe_url = "unsafe-url", +} + /** - *

The request to create a new streaming distribution with tags.

+ *

Determines whether CloudFront includes the Referrer-Policy HTTP response header and + * the header’s value.

+ *

For more information about the Referrer-Policy HTTP response header, see + * Referrer-Policy in the MDN Web Docs.

*/ -export interface CreateStreamingDistributionWithTagsRequest { +export interface ResponseHeadersPolicyReferrerPolicy { /** - *

The streaming distribution's configuration information.

+ *

A Boolean that determines whether CloudFront overrides the Referrer-Policy HTTP + * response header received from the origin with the one specified in this response headers + * policy.

*/ - StreamingDistributionConfigWithTags: StreamingDistributionConfigWithTags | undefined; + Override: boolean | undefined; + + /** + *

The value of the Referrer-Policy HTTP response header. Valid values + * are:

+ *
    + *
  • + *

    + * no-referrer + *

    + *
  • + *
  • + *

    + * no-referrer-when-downgrade + *

    + *
  • + *
  • + *

    + * origin + *

    + *
  • + *
  • + *

    + * origin-when-cross-origin + *

    + *
  • + *
  • + *

    + * same-origin + *

    + *
  • + *
  • + *

    + * strict-origin + *

    + *
  • + *
  • + *

    + * strict-origin-when-cross-origin + *

    + *
  • + *
  • + *

    + * unsafe-url + *

    + *
  • + *
+ *

For more information about these values, see Referrer-Policy in the MDN Web Docs.

+ */ + ReferrerPolicy: ReferrerPolicyList | string | undefined; } -export namespace CreateStreamingDistributionWithTagsRequest { +export namespace ResponseHeadersPolicyReferrerPolicy { /** * @internal */ - export const filterSensitiveLog = (obj: CreateStreamingDistributionWithTagsRequest): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyReferrerPolicy): any => ({ ...obj, }); } /** - *

The returned result of the corresponding request.

+ *

Determines whether CloudFront includes the Strict-Transport-Security HTTP response + * header and the header’s value.

+ *

For more information about the Strict-Transport-Security HTTP response + * header, see Strict-Transport-Security in the MDN Web Docs.

*/ -export interface CreateStreamingDistributionWithTagsResult { +export interface ResponseHeadersPolicyStrictTransportSecurity { /** - *

The streaming distribution's information.

+ *

A Boolean that determines whether CloudFront overrides the Strict-Transport-Security + * HTTP response header received from the origin with the one specified in this response + * headers policy.

*/ - StreamingDistribution?: StreamingDistribution; + Override: boolean | undefined; /** - *

The fully qualified URI of the new streaming distribution resource just created.

+ *

A Boolean that determines whether CloudFront includes the includeSubDomains directive + * in the Strict-Transport-Security HTTP response header.

*/ - Location?: string; + IncludeSubdomains?: boolean; /** - *

The current version of the distribution created.

+ *

A Boolean that determines whether CloudFront includes the preload directive in the + * Strict-Transport-Security HTTP response header.

*/ - ETag?: string; + Preload?: boolean; + + /** + *

A number that CloudFront uses as the value for the max-age directive in the + * Strict-Transport-Security HTTP response header.

+ */ + AccessControlMaxAgeSec: number | undefined; } -export namespace CreateStreamingDistributionWithTagsResult { +export namespace ResponseHeadersPolicyStrictTransportSecurity { /** * @internal */ - export const filterSensitiveLog = (obj: CreateStreamingDistributionWithTagsResult): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyStrictTransportSecurity): any => ({ ...obj, }); } -export interface DeleteCachePolicyRequest { +/** + *

Determines whether CloudFront includes the X-XSS-Protection HTTP response header and + * the header’s value.

+ *

For more information about the X-XSS-Protection HTTP response header, see + * X-XSS-Protection in the MDN Web Docs.

+ */ +export interface ResponseHeadersPolicyXSSProtection { /** - *

The unique identifier for the cache policy that you are deleting. To get the - * identifier, you can use ListCachePolicies.

+ *

A Boolean that determines whether CloudFront overrides the X-XSS-Protection HTTP + * response header received from the origin with the one specified in this response headers + * policy.

*/ - Id: string | undefined; + Override: boolean | undefined; /** - *

The version of the cache policy that you are deleting. The version is the cache - * policy’s ETag value, which you can get using - * ListCachePolicies, GetCachePolicy, or - * GetCachePolicyConfig.

+ *

A Boolean that determines the value of the X-XSS-Protection HTTP response + * header. When this setting is true, the value of the + * X-XSS-Protection header is 1. When this setting is + * false, the value of the X-XSS-Protection header is + * 0.

+ *

For more information about these settings, see X-XSS-Protection in the MDN Web Docs.

*/ - IfMatch?: string; + Protection: boolean | undefined; + + /** + *

A Boolean that determines whether CloudFront includes the mode=block directive in the + * X-XSS-Protection header.

+ *

For more information about this directive, see X-XSS-Protection in the MDN Web Docs.

+ */ + ModeBlock?: boolean; + + /** + *

A reporting URI, which CloudFront uses as the value of the report directive in the + * X-XSS-Protection header.

+ *

You cannot specify a ReportUri when ModeBlock is + * true.

+ *

For more information about using a reporting URL, see X-XSS-Protection in the MDN Web Docs.

+ */ + ReportUri?: string; } -export namespace DeleteCachePolicyRequest { +export namespace ResponseHeadersPolicyXSSProtection { /** * @internal */ - export const filterSensitiveLog = (obj: DeleteCachePolicyRequest): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyXSSProtection): any => ({ ...obj, }); } /** - *

You cannot delete a managed policy.

+ *

A configuration for a set of security-related HTTP response headers. CloudFront adds these headers + * to HTTP responses that it sends for requests that match a cache behavior associated with + * this response headers policy.

*/ -export interface IllegalDelete extends __SmithyException, $MetadataBearer { - name: "IllegalDelete"; - $fault: "client"; - Message?: string; +export interface ResponseHeadersPolicySecurityHeadersConfig { + /** + *

Determines whether CloudFront includes the X-XSS-Protection HTTP response header and + * the header’s value.

+ *

For more information about the X-XSS-Protection HTTP response header, see + * X-XSS-Protection in the MDN Web Docs.

+ */ + XSSProtection?: ResponseHeadersPolicyXSSProtection; + + /** + *

Determines whether CloudFront includes the X-Frame-Options HTTP response header and + * the header’s value.

+ *

For more information about the X-Frame-Options HTTP response header, see + * X-Frame-Options in the MDN Web Docs.

+ */ + FrameOptions?: ResponseHeadersPolicyFrameOptions; + + /** + *

Determines whether CloudFront includes the Referrer-Policy HTTP response header and + * the header’s value.

+ *

For more information about the Referrer-Policy HTTP response header, see + * Referrer-Policy in the MDN Web Docs.

+ */ + ReferrerPolicy?: ResponseHeadersPolicyReferrerPolicy; + + /** + *

The policy directives and their values that CloudFront includes as values for the + * Content-Security-Policy HTTP response header.

+ *

For more information about the Content-Security-Policy HTTP response + * header, see Content-Security-Policy in the MDN Web Docs.

+ */ + ContentSecurityPolicy?: ResponseHeadersPolicyContentSecurityPolicy; + + /** + *

Determines whether CloudFront includes the X-Content-Type-Options HTTP response + * header with its value set to nosniff.

+ *

For more information about the X-Content-Type-Options HTTP response + * header, see X-Content-Type-Options in the MDN Web Docs.

+ */ + ContentTypeOptions?: ResponseHeadersPolicyContentTypeOptions; + + /** + *

Determines whether CloudFront includes the Strict-Transport-Security HTTP response + * header and the header’s value.

+ *

For more information about the Strict-Transport-Security HTTP response + * header, see Strict-Transport-Security in the MDN Web Docs.

+ */ + StrictTransportSecurity?: ResponseHeadersPolicyStrictTransportSecurity; } -export namespace IllegalDelete { +export namespace ResponseHeadersPolicySecurityHeadersConfig { /** * @internal */ - export const filterSensitiveLog = (obj: IllegalDelete): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicySecurityHeadersConfig): any => ({ ...obj, }); } /** - *

The If-Match version is missing or not valid.

+ *

A response headers policy configuration.

+ *

A response headers policy configuration contains metadata about the response headers policy, + * and configurations for sets of HTTP response headers and their values. CloudFront adds the + * headers in the policy to HTTP responses that it sends for requests that match a cache + * behavior associated with the policy.

*/ -export interface InvalidIfMatchVersion extends __SmithyException, $MetadataBearer { - name: "InvalidIfMatchVersion"; - $fault: "client"; - Message?: string; +export interface ResponseHeadersPolicyConfig { + /** + *

A comment to describe the response headers policy.

+ *

The comment cannot be longer than 128 characters.

+ */ + Comment?: string; + + /** + *

A name to identify the response headers policy.

+ *

The name must be unique for response headers policies in this Amazon Web Services account.

+ */ + Name: string | undefined; + + /** + *

A configuration for a set of HTTP response headers that are used for cross-origin + * resource sharing (CORS).

+ */ + CorsConfig?: ResponseHeadersPolicyCorsConfig; + + /** + *

A configuration for a set of security-related HTTP response headers.

+ */ + SecurityHeadersConfig?: ResponseHeadersPolicySecurityHeadersConfig; + + /** + *

A configuration for a set of custom HTTP response headers.

+ */ + CustomHeadersConfig?: ResponseHeadersPolicyCustomHeadersConfig; } -export namespace InvalidIfMatchVersion { +export namespace ResponseHeadersPolicyConfig { /** * @internal */ - export const filterSensitiveLog = (obj: InvalidIfMatchVersion): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyConfig): any => ({ ...obj, }); } -/** - *

The precondition in one or more of the request fields evaluated to - * false.

- */ -export interface PreconditionFailed extends __SmithyException, $MetadataBearer { - name: "PreconditionFailed"; - $fault: "client"; - Message?: string; +export interface CreateResponseHeadersPolicyRequest { + /** + *

Contains metadata about the response headers policy, and a set of configurations that + * specify the response headers.

+ */ + ResponseHeadersPolicyConfig: ResponseHeadersPolicyConfig | undefined; } -export namespace PreconditionFailed { +export namespace CreateResponseHeadersPolicyRequest { /** * @internal */ - export const filterSensitiveLog = (obj: PreconditionFailed): any => ({ + export const filterSensitiveLog = (obj: CreateResponseHeadersPolicyRequest): any => ({ ...obj, }); } /** - *

The Origin Access Identity specified is already in use.

+ *

A response headers policy.

+ *

A response headers policy contains information about a set of HTTP response headers + * and their values.

+ *

After you create a response headers policy, you can use its ID to attach it to one or more + * cache behaviors in a CloudFront distribution. When it’s attached to a cache behavior, CloudFront + * adds the headers in the policy to HTTP responses that it sends for requests that match + * the cache behavior.

+ *

For more information, see Adding HTTP headers to CloudFront responses in the + * Amazon CloudFront Developer Guide.

*/ -export interface CloudFrontOriginAccessIdentityInUse extends __SmithyException, $MetadataBearer { - name: "CloudFrontOriginAccessIdentityInUse"; - $fault: "client"; - Message?: string; +export interface ResponseHeadersPolicy { + /** + *

The identifier for the response headers policy.

+ */ + Id: string | undefined; + + /** + *

The date and time when the response headers policy was last modified.

+ */ + LastModifiedTime: Date | undefined; + + /** + *

A response headers policy configuration.

+ *

A response headers policy contains information about a set of HTTP response headers and + * their values. CloudFront adds the headers in the policy to HTTP responses that it sends for + * requests that match a cache behavior that’s associated with the policy.

+ */ + ResponseHeadersPolicyConfig: ResponseHeadersPolicyConfig | undefined; } -export namespace CloudFrontOriginAccessIdentityInUse { +export namespace ResponseHeadersPolicy { /** * @internal */ - export const filterSensitiveLog = (obj: CloudFrontOriginAccessIdentityInUse): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicy): any => ({ ...obj, }); } -/** - *

Deletes a origin access identity.

- */ -export interface DeleteCloudFrontOriginAccessIdentityRequest { +export interface CreateResponseHeadersPolicyResult { /** - *

The origin access identity's ID.

+ *

Contains a response headers policy.

*/ - Id: string | undefined; + ResponseHeadersPolicy?: ResponseHeadersPolicy; /** - *

The value of the ETag header you received from a previous GET - * or PUT request. For example: E2QWRUHAPOMQZL.

+ *

The URL of the response headers policy.

*/ - IfMatch?: string; + Location?: string; + + /** + *

The version identifier for the current version of the response headers policy.

+ */ + ETag?: string; } -export namespace DeleteCloudFrontOriginAccessIdentityRequest { +export namespace CreateResponseHeadersPolicyResult { /** * @internal */ - export const filterSensitiveLog = (obj: DeleteCloudFrontOriginAccessIdentityRequest): any => ({ + export const filterSensitiveLog = (obj: CreateResponseHeadersPolicyResult): any => ({ ...obj, }); } /** - *

The specified origin access identity does not exist.

+ *

A response headers policy with this name already exists. You must provide a unique name. To + * modify an existing response headers policy, use + * UpdateResponseHeadersPolicy.

*/ -export interface NoSuchCloudFrontOriginAccessIdentity extends __SmithyException, $MetadataBearer { - name: "NoSuchCloudFrontOriginAccessIdentity"; +export interface ResponseHeadersPolicyAlreadyExists extends __SmithyException, $MetadataBearer { + name: "ResponseHeadersPolicyAlreadyExists"; $fault: "client"; Message?: string; } -export namespace NoSuchCloudFrontOriginAccessIdentity { +export namespace ResponseHeadersPolicyAlreadyExists { /** * @internal */ - export const filterSensitiveLog = (obj: NoSuchCloudFrontOriginAccessIdentity): any => ({ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyAlreadyExists): any => ({ ...obj, }); } /** - *

This action deletes a web distribution. To delete a web distribution using the CloudFront - * API, perform the following steps.

- *

- * To delete a web distribution using the CloudFront API: - *

- *
    - *
  1. - *

    Disable the web distribution

    - *
  2. - *
  3. - *

    Submit a GET Distribution Config request to get the current - * configuration and the Etag header for the distribution.

    - *
  4. - *
  5. - *

    Update the XML document that was returned in the response to your GET - * Distribution Config request to change the value of Enabled to - * false.

    - *
  6. - *
  7. - *

    Submit a PUT Distribution Config request to update the configuration - * for your distribution. In the request body, include the XML document that you updated in - * Step 3. Set the value of the HTTP If-Match header to the value of the - * ETag header that CloudFront returned when you submitted the GET - * Distribution Config request in Step 2.

    - *
  8. - *
  9. - *

    Review the response to the PUT Distribution Config request to confirm - * that the distribution was successfully disabled.

    - *
  10. - *
  11. - *

    Submit a GET Distribution request to confirm that your changes have - * propagated. When propagation is complete, the value of Status is - * Deployed.

    - *
  12. - *
  13. - *

    Submit a DELETE Distribution request. Set the value of the HTTP - * If-Match header to the value of the ETag header that CloudFront - * returned when you submitted the GET Distribution Config request in Step - * 6.

    - *
  14. - *
  15. - *

    Review the response to your DELETE Distribution request to confirm - * that the distribution was successfully deleted.

    - *
  16. - *
- *

For information about deleting a distribution using the CloudFront console, see Deleting a Distribution in the + *

The number of custom headers in the response headers policy exceeds the maximum.

+ *

For more information, see Quotas (formerly known as limits) in the * Amazon CloudFront Developer Guide.

*/ -export interface DeleteDistributionRequest { - /** - *

The distribution ID.

- */ - Id: string | undefined; - - /** - *

The value of the ETag header that you received when you disabled the - * distribution. For example: E2QWRUHAPOMQZL.

- */ - IfMatch?: string; +export interface TooManyCustomHeadersInResponseHeadersPolicy extends __SmithyException, $MetadataBearer { + name: "TooManyCustomHeadersInResponseHeadersPolicy"; + $fault: "client"; + Message?: string; } -export namespace DeleteDistributionRequest { +export namespace TooManyCustomHeadersInResponseHeadersPolicy { /** * @internal */ - export const filterSensitiveLog = (obj: DeleteDistributionRequest): any => ({ + export const filterSensitiveLog = (obj: TooManyCustomHeadersInResponseHeadersPolicy): any => ({ ...obj, }); } /** - *

The specified CloudFront distribution is not disabled. You must disable - * the distribution before you can delete it.

+ *

You have reached the maximum number of response headers policies for this + * Amazon Web Services account.

+ *

For more information, see Quotas (formerly known as limits) in the + * Amazon CloudFront Developer Guide.

*/ -export interface DistributionNotDisabled extends __SmithyException, $MetadataBearer { - name: "DistributionNotDisabled"; +export interface TooManyResponseHeadersPolicies extends __SmithyException, $MetadataBearer { + name: "TooManyResponseHeadersPolicies"; $fault: "client"; Message?: string; } -export namespace DistributionNotDisabled { +export namespace TooManyResponseHeadersPolicies { /** * @internal */ - export const filterSensitiveLog = (obj: DistributionNotDisabled): any => ({ + export const filterSensitiveLog = (obj: TooManyResponseHeadersPolicies): any => ({ ...obj, }); } -export interface DeleteFieldLevelEncryptionConfigRequest { +/** + *

A complex type that controls whether access logs are written for this streaming distribution.

+ */ +export interface StreamingLoggingConfig { /** - *

The ID of the configuration you want to delete from CloudFront.

+ *

Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket. If you don't + * want to enable logging when you create a streaming distribution or if you want to disable + * logging for an existing streaming distribution, specify false for + * Enabled, and specify empty Bucket and Prefix + * elements. If you specify false for Enabled but you specify values + * for Bucket and Prefix, the values are automatically deleted. + *

*/ - Id: string | undefined; + Enabled: boolean | undefined; /** - *

The value of the ETag header that you received when retrieving the - * configuration identity to delete. For example: E2QWRUHAPOMQZL.

+ *

The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.

*/ - IfMatch?: string; + Bucket: string | undefined; + + /** + *

An optional string that you want CloudFront to prefix to the access log filenames for this streaming distribution, for example, + * myprefix/. If you want to enable logging, but you don't want to specify a prefix, you still must include + * an empty Prefix element in the Logging element.

+ */ + Prefix: string | undefined; } -export namespace DeleteFieldLevelEncryptionConfigRequest { +export namespace StreamingLoggingConfig { /** * @internal */ - export const filterSensitiveLog = (obj: DeleteFieldLevelEncryptionConfigRequest): any => ({ + export const filterSensitiveLog = (obj: StreamingLoggingConfig): any => ({ ...obj, }); } /** - *

The specified configuration for field-level encryption is in use.

+ *

A complex type that contains information about the Amazon S3 bucket from which you want + * CloudFront to get your media files for distribution.

*/ -export interface FieldLevelEncryptionConfigInUse extends __SmithyException, $MetadataBearer { - name: "FieldLevelEncryptionConfigInUse"; - $fault: "client"; - Message?: string; +export interface S3Origin { + /** + *

The DNS name of the Amazon S3 origin.

+ */ + DomainName: string | undefined; + + /** + *

The CloudFront origin access identity to associate with the distribution. Use an origin + * access identity to configure the distribution so that end users can only access objects in an + * Amazon S3 bucket through CloudFront.

+ *

If you want end users to be able to access objects using either the CloudFront URL or the + * Amazon S3 URL, specify an empty OriginAccessIdentity element.

+ *

To delete the origin access identity from an existing distribution, update the + * distribution configuration and include an empty OriginAccessIdentity + * element.

+ *

To replace the origin access identity, update the distribution configuration and + * specify the new origin access identity.

+ *

For more information, see Using an Origin Access + * Identity to Restrict Access to Your Amazon S3 Content in the + * Amazon CloudFront Developer Guide.

+ */ + OriginAccessIdentity: string | undefined; } -export namespace FieldLevelEncryptionConfigInUse { +export namespace S3Origin { /** * @internal */ - export const filterSensitiveLog = (obj: FieldLevelEncryptionConfigInUse): any => ({ + export const filterSensitiveLog = (obj: S3Origin): any => ({ ...obj, }); } -export interface DeleteFieldLevelEncryptionProfileRequest { +/** + *

The RTMP distribution's configuration information.

+ */ +export interface StreamingDistributionConfig { /** - *

Request the ID of the profile you want to delete from CloudFront.

+ *

A unique value (for example, a date-time stamp) that ensures that the request can't be + * replayed.

+ *

If the value of CallerReference is new (regardless of the content of the + * StreamingDistributionConfig object), CloudFront creates a new distribution.

+ *

If CallerReference is a value that you already sent in a previous request to + * create a distribution, CloudFront returns a DistributionAlreadyExists error.

*/ - Id: string | undefined; + CallerReference: string | undefined; /** - *

The value of the ETag header that you received when retrieving the - * profile to delete. For example: E2QWRUHAPOMQZL.

+ *

A complex type that contains information about the Amazon S3 bucket from which you want + * CloudFront to get your media files for distribution.

*/ - IfMatch?: string; -} + S3Origin: S3Origin | undefined; -export namespace DeleteFieldLevelEncryptionProfileRequest { /** - * @internal + *

A complex type that contains information about CNAMEs (alternate domain names), if any, + * for this streaming distribution.

*/ - export const filterSensitiveLog = (obj: DeleteFieldLevelEncryptionProfileRequest): any => ({ - ...obj, - }); -} + Aliases?: Aliases; -/** - *

The specified profile for field-level encryption is in use.

- */ -export interface FieldLevelEncryptionProfileInUse extends __SmithyException, $MetadataBearer { - name: "FieldLevelEncryptionProfileInUse"; - $fault: "client"; - Message?: string; -} + /** + *

Any comments you want to include about the streaming distribution.

+ */ + Comment: string | undefined; -export namespace FieldLevelEncryptionProfileInUse { /** - * @internal + *

A complex type that controls whether access logs are written for the streaming + * distribution.

+ */ + Logging?: StreamingLoggingConfig; + + /** + *

A complex type that specifies any Amazon Web Services accounts that you want to permit to create signed + * URLs for private content. If you want the distribution to use signed URLs, include this + * element; if you want the distribution to use public URLs, remove this element. For more + * information, see Serving Private Content through + * CloudFront in the Amazon CloudFront Developer Guide.

*/ - export const filterSensitiveLog = (obj: FieldLevelEncryptionProfileInUse): any => ({ - ...obj, - }); -} + TrustedSigners: TrustedSigners | undefined; -export interface DeleteFunctionRequest { /** - *

The name of the function that you are deleting.

+ *

A complex type that contains information about price class for this streaming + * distribution.

*/ - Name: string | undefined; + PriceClass?: PriceClass | string; /** - *

The current version (ETag value) of the function that you are deleting, which - * you can get using DescribeFunction.

+ *

Whether the streaming distribution is enabled to accept user requests for + * content.

*/ - IfMatch: string | undefined; + Enabled: boolean | undefined; } -export namespace DeleteFunctionRequest { +export namespace StreamingDistributionConfig { /** * @internal */ - export const filterSensitiveLog = (obj: DeleteFunctionRequest): any => ({ + export const filterSensitiveLog = (obj: StreamingDistributionConfig): any => ({ ...obj, }); } /** - *

Cannot delete the function because it’s attached to one or more cache - * behaviors.

+ *

The request to create a new streaming distribution.

*/ -export interface FunctionInUse extends __SmithyException, $MetadataBearer { - name: "FunctionInUse"; - $fault: "client"; - Message?: string; +export interface CreateStreamingDistributionRequest { + /** + *

The streaming distribution's configuration information.

+ */ + StreamingDistributionConfig: StreamingDistributionConfig | undefined; } -export namespace FunctionInUse { +export namespace CreateStreamingDistributionRequest { /** * @internal */ - export const filterSensitiveLog = (obj: FunctionInUse): any => ({ + export const filterSensitiveLog = (obj: CreateStreamingDistributionRequest): any => ({ ...obj, }); } /** - *

The function does not exist.

+ *

A streaming distribution tells CloudFront where you want RTMP content to be delivered from, and the details about how to + * track and manage content delivery.

*/ -export interface NoSuchFunctionExists extends __SmithyException, $MetadataBearer { - name: "NoSuchFunctionExists"; - $fault: "client"; - Message?: string; -} +export interface StreamingDistribution { + /** + *

The identifier for the RTMP distribution. For example: + * EGTXBD79EXAMPLE.

+ */ + Id: string | undefined; -export namespace NoSuchFunctionExists { /** - * @internal + *

The ARN (Amazon Resource Name) for the distribution. For example: + * arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where + * 123456789012 is your Amazon Web Services account ID.

*/ - export const filterSensitiveLog = (obj: NoSuchFunctionExists): any => ({ - ...obj, - }); -} + ARN: string | undefined; -export interface DeleteKeyGroupRequest { /** - *

The identifier of the key group that you are deleting. To get the identifier, use - * ListKeyGroups.

+ *

The current status of the RTMP distribution. When the status is Deployed, + * the distribution's information is propagated to all CloudFront edge locations.

*/ - Id: string | undefined; + Status: string | undefined; /** - *

The version of the key group that you are deleting. The version is the key group’s - * ETag value. To get the ETag, use GetKeyGroup or - * GetKeyGroupConfig.

+ *

The date and time that the distribution was last modified.

*/ - IfMatch?: string; -} + LastModifiedTime?: Date; -export namespace DeleteKeyGroupRequest { /** - * @internal + *

The domain name that corresponds to the streaming distribution, for example, s5c39gqb8ow64r.cloudfront.net.

*/ - export const filterSensitiveLog = (obj: DeleteKeyGroupRequest): any => ({ - ...obj, - }); -} + DomainName: string | undefined; -/** - *

A resource that was specified is not valid.

- */ -export interface NoSuchResource extends __SmithyException, $MetadataBearer { - name: "NoSuchResource"; - $fault: "client"; - Message?: string; + /** + *

A complex type that lists the Amazon Web Services accounts, if any, that you included in the + * TrustedSigners complex type for this distribution. These are the accounts that + * you want to allow to create signed URLs for private content.

+ *

The Signer complex type lists the Amazon Web Services account number of the trusted + * signer or self if the signer is the Amazon Web Services account that created the distribution. + * The Signer element also includes the IDs of any active CloudFront key pairs that are + * associated with the trusted signer's Amazon Web Services account. If no KeyPairId element + * appears for a Signer, that signer can't create signed URLs.

+ *

For more information, see Serving Private + * Content through CloudFront in the Amazon CloudFront Developer Guide.

+ */ + ActiveTrustedSigners: ActiveTrustedSigners | undefined; + + /** + *

The current configuration information for the RTMP distribution.

+ */ + StreamingDistributionConfig: StreamingDistributionConfig | undefined; } -export namespace NoSuchResource { +export namespace StreamingDistribution { /** * @internal */ - export const filterSensitiveLog = (obj: NoSuchResource): any => ({ + export const filterSensitiveLog = (obj: StreamingDistribution): any => ({ ...obj, }); } /** - *

Cannot delete this resource because it is in use.

+ *

The returned result of the corresponding request.

*/ -export interface ResourceInUse extends __SmithyException, $MetadataBearer { - name: "ResourceInUse"; - $fault: "client"; - Message?: string; -} +export interface CreateStreamingDistributionResult { + /** + *

The streaming distribution's information.

+ */ + StreamingDistribution?: StreamingDistribution; -export namespace ResourceInUse { /** - * @internal + *

The fully qualified URI of the new streaming distribution resource just created.

*/ - export const filterSensitiveLog = (obj: ResourceInUse): any => ({ - ...obj, - }); -} + Location?: string; -export interface DeleteMonitoringSubscriptionRequest { /** - *

The ID of the distribution that you are disabling metrics for.

+ *

The current version of the streaming distribution created.

*/ - DistributionId: string | undefined; + ETag?: string; } -export namespace DeleteMonitoringSubscriptionRequest { +export namespace CreateStreamingDistributionResult { /** * @internal */ - export const filterSensitiveLog = (obj: DeleteMonitoringSubscriptionRequest): any => ({ + export const filterSensitiveLog = (obj: CreateStreamingDistributionResult): any => ({ ...obj, }); } -export interface DeleteMonitoringSubscriptionResult {} +/** + *

The caller reference you attempted to create the streaming distribution with + * is associated with another distribution

+ */ +export interface StreamingDistributionAlreadyExists extends __SmithyException, $MetadataBearer { + name: "StreamingDistributionAlreadyExists"; + $fault: "client"; + Message?: string; +} -export namespace DeleteMonitoringSubscriptionResult { +export namespace StreamingDistributionAlreadyExists { /** * @internal */ - export const filterSensitiveLog = (obj: DeleteMonitoringSubscriptionResult): any => ({ + export const filterSensitiveLog = (obj: StreamingDistributionAlreadyExists): any => ({ ...obj, }); } -export interface DeleteOriginRequestPolicyRequest { - /** - *

The unique identifier for the origin request policy that you are deleting. To get the - * identifier, you can use ListOriginRequestPolicies.

- */ - Id: string | undefined; - - /** - *

The version of the origin request policy that you are deleting. The version is the origin - * request policy’s ETag value, which you can get using - * ListOriginRequestPolicies, GetOriginRequestPolicy, or - * GetOriginRequestPolicyConfig.

- */ - IfMatch?: string; +/** + *

Your request contains more CNAMEs than are allowed per distribution.

+ */ +export interface TooManyStreamingDistributionCNAMEs extends __SmithyException, $MetadataBearer { + name: "TooManyStreamingDistributionCNAMEs"; + $fault: "client"; + Message?: string; } -export namespace DeleteOriginRequestPolicyRequest { +export namespace TooManyStreamingDistributionCNAMEs { /** * @internal */ - export const filterSensitiveLog = (obj: DeleteOriginRequestPolicyRequest): any => ({ + export const filterSensitiveLog = (obj: TooManyStreamingDistributionCNAMEs): any => ({ ...obj, }); } /** - *

Cannot delete the origin request policy because it is attached to one or more cache - * behaviors.

+ *

Processing your request would cause you to exceed the maximum number of streaming distributions allowed.

*/ -export interface OriginRequestPolicyInUse extends __SmithyException, $MetadataBearer { - name: "OriginRequestPolicyInUse"; +export interface TooManyStreamingDistributions extends __SmithyException, $MetadataBearer { + name: "TooManyStreamingDistributions"; $fault: "client"; Message?: string; } -export namespace OriginRequestPolicyInUse { +export namespace TooManyStreamingDistributions { /** * @internal */ - export const filterSensitiveLog = (obj: OriginRequestPolicyInUse): any => ({ + export const filterSensitiveLog = (obj: TooManyStreamingDistributions): any => ({ ...obj, }); } -export interface DeletePublicKeyRequest { +/** + *

A streaming distribution Configuration and a list of tags to be associated with the + * streaming distribution.

+ */ +export interface StreamingDistributionConfigWithTags { /** - *

The ID of the public key you want to remove from CloudFront.

+ *

A streaming distribution Configuration.

*/ - Id: string | undefined; + StreamingDistributionConfig: StreamingDistributionConfig | undefined; /** - *

The value of the ETag header that you received when retrieving the - * public key identity to delete. For example: E2QWRUHAPOMQZL.

+ *

A complex type that contains zero or more Tag elements.

*/ - IfMatch?: string; + Tags: Tags | undefined; } -export namespace DeletePublicKeyRequest { +export namespace StreamingDistributionConfigWithTags { /** * @internal */ - export const filterSensitiveLog = (obj: DeletePublicKeyRequest): any => ({ + export const filterSensitiveLog = (obj: StreamingDistributionConfigWithTags): any => ({ ...obj, }); } /** - *

The specified public key is in use.

+ *

The request to create a new streaming distribution with tags.

*/ -export interface PublicKeyInUse extends __SmithyException, $MetadataBearer { - name: "PublicKeyInUse"; - $fault: "client"; - Message?: string; +export interface CreateStreamingDistributionWithTagsRequest { + /** + *

The streaming distribution's configuration information.

+ */ + StreamingDistributionConfigWithTags: StreamingDistributionConfigWithTags | undefined; } -export namespace PublicKeyInUse { +export namespace CreateStreamingDistributionWithTagsRequest { /** * @internal */ - export const filterSensitiveLog = (obj: PublicKeyInUse): any => ({ + export const filterSensitiveLog = (obj: CreateStreamingDistributionWithTagsRequest): any => ({ ...obj, }); } -export interface DeleteRealtimeLogConfigRequest { +/** + *

The returned result of the corresponding request.

+ */ +export interface CreateStreamingDistributionWithTagsResult { /** - *

The name of the real-time log configuration to delete.

+ *

The streaming distribution's information.

*/ - Name?: string; + StreamingDistribution?: StreamingDistribution; /** - *

The Amazon Resource Name (ARN) of the real-time log configuration to delete.

+ *

The fully qualified URI of the new streaming distribution resource just created.

*/ - ARN?: string; -} + Location?: string; -export namespace DeleteRealtimeLogConfigRequest { /** - * @internal + *

The current version of the distribution created.

*/ - export const filterSensitiveLog = (obj: DeleteRealtimeLogConfigRequest): any => ({ - ...obj, - }); -} - -/** - *

Cannot delete the real-time log configuration because it is attached to one or more cache - * behaviors.

- */ -export interface RealtimeLogConfigInUse extends __SmithyException, $MetadataBearer { - name: "RealtimeLogConfigInUse"; - $fault: "client"; - Message?: string; + ETag?: string; } -export namespace RealtimeLogConfigInUse { +export namespace CreateStreamingDistributionWithTagsResult { /** * @internal */ - export const filterSensitiveLog = (obj: RealtimeLogConfigInUse): any => ({ + export const filterSensitiveLog = (obj: CreateStreamingDistributionWithTagsResult): any => ({ ...obj, }); } -/** - *

The request to delete a streaming distribution.

- */ -export interface DeleteStreamingDistributionRequest { +export interface DeleteCachePolicyRequest { /** - *

The distribution ID.

+ *

The unique identifier for the cache policy that you are deleting. To get the + * identifier, you can use ListCachePolicies.

*/ Id: string | undefined; /** - *

The value of the ETag header that you received when you disabled the - * streaming distribution. For example: E2QWRUHAPOMQZL.

+ *

The version of the cache policy that you are deleting. The version is the cache + * policy’s ETag value, which you can get using + * ListCachePolicies, GetCachePolicy, or + * GetCachePolicyConfig.

*/ IfMatch?: string; } -export namespace DeleteStreamingDistributionRequest { +export namespace DeleteCachePolicyRequest { /** * @internal */ - export const filterSensitiveLog = (obj: DeleteStreamingDistributionRequest): any => ({ + export const filterSensitiveLog = (obj: DeleteCachePolicyRequest): any => ({ ...obj, }); } /** - *

The specified streaming distribution does not exist.

+ *

You cannot delete a managed policy.

*/ -export interface NoSuchStreamingDistribution extends __SmithyException, $MetadataBearer { - name: "NoSuchStreamingDistribution"; +export interface IllegalDelete extends __SmithyException, $MetadataBearer { + name: "IllegalDelete"; $fault: "client"; Message?: string; } -export namespace NoSuchStreamingDistribution { +export namespace IllegalDelete { /** * @internal */ - export const filterSensitiveLog = (obj: NoSuchStreamingDistribution): any => ({ + export const filterSensitiveLog = (obj: IllegalDelete): any => ({ ...obj, }); } /** - *

The specified CloudFront distribution is not disabled. You must disable - * the distribution before you can delete it.

+ *

The If-Match version is missing or not valid.

*/ -export interface StreamingDistributionNotDisabled extends __SmithyException, $MetadataBearer { - name: "StreamingDistributionNotDisabled"; +export interface InvalidIfMatchVersion extends __SmithyException, $MetadataBearer { + name: "InvalidIfMatchVersion"; $fault: "client"; Message?: string; } -export namespace StreamingDistributionNotDisabled { +export namespace InvalidIfMatchVersion { /** * @internal */ - export const filterSensitiveLog = (obj: StreamingDistributionNotDisabled): any => ({ + export const filterSensitiveLog = (obj: InvalidIfMatchVersion): any => ({ ...obj, }); } -export interface DescribeFunctionRequest { +/** + *

The precondition in one or more of the request fields evaluated to + * false.

+ */ +export interface PreconditionFailed extends __SmithyException, $MetadataBearer { + name: "PreconditionFailed"; + $fault: "client"; + Message?: string; +} + +export namespace PreconditionFailed { /** - *

The name of the function that you are getting information about.

+ * @internal */ - Name: string | undefined; + export const filterSensitiveLog = (obj: PreconditionFailed): any => ({ + ...obj, + }); +} - /** - *

The function’s stage, either DEVELOPMENT or LIVE.

- */ - Stage?: FunctionStage | string; +/** + *

The Origin Access Identity specified is already in use.

+ */ +export interface CloudFrontOriginAccessIdentityInUse extends __SmithyException, $MetadataBearer { + name: "CloudFrontOriginAccessIdentityInUse"; + $fault: "client"; + Message?: string; } -export namespace DescribeFunctionRequest { +export namespace CloudFrontOriginAccessIdentityInUse { /** * @internal */ - export const filterSensitiveLog = (obj: DescribeFunctionRequest): any => ({ + export const filterSensitiveLog = (obj: CloudFrontOriginAccessIdentityInUse): any => ({ ...obj, }); } -export interface DescribeFunctionResult { +/** + *

Deletes a origin access identity.

+ */ +export interface DeleteCloudFrontOriginAccessIdentityRequest { /** - *

Contains configuration information and metadata about a CloudFront function.

+ *

The origin access identity's ID.

*/ - FunctionSummary?: FunctionSummary; + Id: string | undefined; /** - *

The version identifier for the current version of the CloudFront function.

+ *

The value of the ETag header you received from a previous GET + * or PUT request. For example: E2QWRUHAPOMQZL.

*/ - ETag?: string; + IfMatch?: string; } -export namespace DescribeFunctionResult { +export namespace DeleteCloudFrontOriginAccessIdentityRequest { /** * @internal */ - export const filterSensitiveLog = (obj: DescribeFunctionResult): any => ({ + export const filterSensitiveLog = (obj: DeleteCloudFrontOriginAccessIdentityRequest): any => ({ ...obj, }); } -export interface GetCachePolicyRequest { - /** - *

The unique identifier for the cache policy. If the cache policy is attached to a - * distribution’s cache behavior, you can get the policy’s identifier using - * ListDistributions or GetDistribution. If the cache policy is - * not attached to a cache behavior, you can get the identifier using - * ListCachePolicies.

- */ - Id: string | undefined; +/** + *

The specified origin access identity does not exist.

+ */ +export interface NoSuchCloudFrontOriginAccessIdentity extends __SmithyException, $MetadataBearer { + name: "NoSuchCloudFrontOriginAccessIdentity"; + $fault: "client"; + Message?: string; } -export namespace GetCachePolicyRequest { +export namespace NoSuchCloudFrontOriginAccessIdentity { /** * @internal */ - export const filterSensitiveLog = (obj: GetCachePolicyRequest): any => ({ + export const filterSensitiveLog = (obj: NoSuchCloudFrontOriginAccessIdentity): any => ({ ...obj, }); } -export interface GetCachePolicyResult { +/** + *

This action deletes a web distribution. To delete a web distribution using the CloudFront + * API, perform the following steps.

+ *

+ * To delete a web distribution using the CloudFront API: + *

+ *
    + *
  1. + *

    Disable the web distribution

    + *
  2. + *
  3. + *

    Submit a GET Distribution Config request to get the current + * configuration and the Etag header for the distribution.

    + *
  4. + *
  5. + *

    Update the XML document that was returned in the response to your GET + * Distribution Config request to change the value of Enabled to + * false.

    + *
  6. + *
  7. + *

    Submit a PUT Distribution Config request to update the configuration + * for your distribution. In the request body, include the XML document that you updated in + * Step 3. Set the value of the HTTP If-Match header to the value of the + * ETag header that CloudFront returned when you submitted the GET + * Distribution Config request in Step 2.

    + *
  8. + *
  9. + *

    Review the response to the PUT Distribution Config request to confirm + * that the distribution was successfully disabled.

    + *
  10. + *
  11. + *

    Submit a GET Distribution request to confirm that your changes have + * propagated. When propagation is complete, the value of Status is + * Deployed.

    + *
  12. + *
  13. + *

    Submit a DELETE Distribution request. Set the value of the HTTP + * If-Match header to the value of the ETag header that CloudFront + * returned when you submitted the GET Distribution Config request in Step + * 6.

    + *
  14. + *
  15. + *

    Review the response to your DELETE Distribution request to confirm + * that the distribution was successfully deleted.

    + *
  16. + *
+ *

For information about deleting a distribution using the CloudFront console, see Deleting a Distribution in the + * Amazon CloudFront Developer Guide.

+ */ +export interface DeleteDistributionRequest { /** - *

The cache policy.

+ *

The distribution ID.

*/ - CachePolicy?: CachePolicy; + Id: string | undefined; /** - *

The current version of the cache policy.

+ *

The value of the ETag header that you received when you disabled the + * distribution. For example: E2QWRUHAPOMQZL.

*/ - ETag?: string; + IfMatch?: string; } -export namespace GetCachePolicyResult { +export namespace DeleteDistributionRequest { /** * @internal */ - export const filterSensitiveLog = (obj: GetCachePolicyResult): any => ({ + export const filterSensitiveLog = (obj: DeleteDistributionRequest): any => ({ ...obj, }); } -export interface GetCachePolicyConfigRequest { - /** - *

The unique identifier for the cache policy. If the cache policy is attached to a - * distribution’s cache behavior, you can get the policy’s identifier using - * ListDistributions or GetDistribution. If the cache policy is - * not attached to a cache behavior, you can get the identifier using - * ListCachePolicies.

- */ - Id: string | undefined; +/** + *

The specified CloudFront distribution is not disabled. You must disable + * the distribution before you can delete it.

+ */ +export interface DistributionNotDisabled extends __SmithyException, $MetadataBearer { + name: "DistributionNotDisabled"; + $fault: "client"; + Message?: string; } -export namespace GetCachePolicyConfigRequest { +export namespace DistributionNotDisabled { /** * @internal */ - export const filterSensitiveLog = (obj: GetCachePolicyConfigRequest): any => ({ + export const filterSensitiveLog = (obj: DistributionNotDisabled): any => ({ ...obj, }); } -export interface GetCachePolicyConfigResult { +export interface DeleteFieldLevelEncryptionConfigRequest { /** - *

The cache policy configuration.

+ *

The ID of the configuration you want to delete from CloudFront.

*/ - CachePolicyConfig?: CachePolicyConfig; + Id: string | undefined; /** - *

The current version of the cache policy.

+ *

The value of the ETag header that you received when retrieving the + * configuration identity to delete. For example: E2QWRUHAPOMQZL.

*/ - ETag?: string; + IfMatch?: string; } -export namespace GetCachePolicyConfigResult { +export namespace DeleteFieldLevelEncryptionConfigRequest { /** * @internal */ - export const filterSensitiveLog = (obj: GetCachePolicyConfigResult): any => ({ + export const filterSensitiveLog = (obj: DeleteFieldLevelEncryptionConfigRequest): any => ({ ...obj, }); } /** - *

The request to get an origin access identity's information.

+ *

The specified configuration for field-level encryption is in use.

*/ -export interface GetCloudFrontOriginAccessIdentityRequest { - /** - *

The identity's ID.

- */ - Id: string | undefined; +export interface FieldLevelEncryptionConfigInUse extends __SmithyException, $MetadataBearer { + name: "FieldLevelEncryptionConfigInUse"; + $fault: "client"; + Message?: string; } -export namespace GetCloudFrontOriginAccessIdentityRequest { +export namespace FieldLevelEncryptionConfigInUse { /** * @internal */ - export const filterSensitiveLog = (obj: GetCloudFrontOriginAccessIdentityRequest): any => ({ + export const filterSensitiveLog = (obj: FieldLevelEncryptionConfigInUse): any => ({ ...obj, }); } -/** - *

The returned result of the corresponding request.

- */ -export interface GetCloudFrontOriginAccessIdentityResult { +export interface DeleteFieldLevelEncryptionProfileRequest { /** - *

The origin access identity's information.

+ *

Request the ID of the profile you want to delete from CloudFront.

*/ - CloudFrontOriginAccessIdentity?: CloudFrontOriginAccessIdentity; + Id: string | undefined; /** - *

The current version of the origin access identity's information. For example: - * E2QWRUHAPOMQZL.

+ *

The value of the ETag header that you received when retrieving the + * profile to delete. For example: E2QWRUHAPOMQZL.

*/ - ETag?: string; + IfMatch?: string; } -export namespace GetCloudFrontOriginAccessIdentityResult { +export namespace DeleteFieldLevelEncryptionProfileRequest { /** * @internal */ - export const filterSensitiveLog = (obj: GetCloudFrontOriginAccessIdentityResult): any => ({ + export const filterSensitiveLog = (obj: DeleteFieldLevelEncryptionProfileRequest): any => ({ ...obj, }); } /** - *

The origin access identity's configuration information. For more information, see - * CloudFrontOriginAccessIdentityConfig.

+ *

The specified profile for field-level encryption is in use.

*/ -export interface GetCloudFrontOriginAccessIdentityConfigRequest { - /** - *

The identity's ID.

- */ - Id: string | undefined; +export interface FieldLevelEncryptionProfileInUse extends __SmithyException, $MetadataBearer { + name: "FieldLevelEncryptionProfileInUse"; + $fault: "client"; + Message?: string; } -export namespace GetCloudFrontOriginAccessIdentityConfigRequest { +export namespace FieldLevelEncryptionProfileInUse { /** * @internal */ - export const filterSensitiveLog = (obj: GetCloudFrontOriginAccessIdentityConfigRequest): any => ({ + export const filterSensitiveLog = (obj: FieldLevelEncryptionProfileInUse): any => ({ ...obj, }); } -/** - *

The returned result of the corresponding request.

- */ -export interface GetCloudFrontOriginAccessIdentityConfigResult { +export interface DeleteFunctionRequest { /** - *

The origin access identity's configuration information.

+ *

The name of the function that you are deleting.

*/ - CloudFrontOriginAccessIdentityConfig?: CloudFrontOriginAccessIdentityConfig; + Name: string | undefined; /** - *

The current version of the configuration. For example: - * E2QWRUHAPOMQZL.

+ *

The current version (ETag value) of the function that you are deleting, which + * you can get using DescribeFunction.

*/ - ETag?: string; + IfMatch: string | undefined; } -export namespace GetCloudFrontOriginAccessIdentityConfigResult { +export namespace DeleteFunctionRequest { /** * @internal */ - export const filterSensitiveLog = (obj: GetCloudFrontOriginAccessIdentityConfigResult): any => ({ + export const filterSensitiveLog = (obj: DeleteFunctionRequest): any => ({ ...obj, }); } /** - *

The request to get a distribution's information.

+ *

Cannot delete the function because it’s attached to one or more cache + * behaviors.

*/ -export interface GetDistributionRequest { - /** - *

The distribution's ID. If the ID is empty, an empty distribution configuration is returned.

- */ - Id: string | undefined; +export interface FunctionInUse extends __SmithyException, $MetadataBearer { + name: "FunctionInUse"; + $fault: "client"; + Message?: string; } -export namespace GetDistributionRequest { +export namespace FunctionInUse { /** * @internal */ - export const filterSensitiveLog = (obj: GetDistributionRequest): any => ({ + export const filterSensitiveLog = (obj: FunctionInUse): any => ({ ...obj, }); } /** - *

The returned result of the corresponding request.

+ *

The function does not exist.

*/ -export interface GetDistributionResult { - /** - *

The distribution's information.

- */ - Distribution?: Distribution; - - /** - *

The current version of the distribution's information. For example: - * E2QWRUHAPOMQZL.

- */ - ETag?: string; +export interface NoSuchFunctionExists extends __SmithyException, $MetadataBearer { + name: "NoSuchFunctionExists"; + $fault: "client"; + Message?: string; } -export namespace GetDistributionResult { +export namespace NoSuchFunctionExists { /** * @internal */ - export const filterSensitiveLog = (obj: GetDistributionResult): any => ({ + export const filterSensitiveLog = (obj: NoSuchFunctionExists): any => ({ ...obj, - ...(obj.Distribution && { Distribution: Distribution.filterSensitiveLog(obj.Distribution) }), }); } -/** - *

The request to get a distribution configuration.

- */ -export interface GetDistributionConfigRequest { +export interface DeleteKeyGroupRequest { /** - *

The distribution's ID. If the ID is empty, an empty distribution configuration is returned.

+ *

The identifier of the key group that you are deleting. To get the identifier, use + * ListKeyGroups.

*/ Id: string | undefined; + + /** + *

The version of the key group that you are deleting. The version is the key group’s + * ETag value. To get the ETag, use GetKeyGroup or + * GetKeyGroupConfig.

+ */ + IfMatch?: string; } -export namespace GetDistributionConfigRequest { +export namespace DeleteKeyGroupRequest { /** * @internal */ - export const filterSensitiveLog = (obj: GetDistributionConfigRequest): any => ({ + export const filterSensitiveLog = (obj: DeleteKeyGroupRequest): any => ({ ...obj, }); } /** - *

The returned result of the corresponding request.

+ *

A resource that was specified is not valid.

*/ -export interface GetDistributionConfigResult { - /** - *

The distribution's configuration information.

- */ - DistributionConfig?: DistributionConfig; - - /** - *

The current version of the configuration. For example: - * E2QWRUHAPOMQZL.

- */ - ETag?: string; +export interface NoSuchResource extends __SmithyException, $MetadataBearer { + name: "NoSuchResource"; + $fault: "client"; + Message?: string; } -export namespace GetDistributionConfigResult { +export namespace NoSuchResource { /** * @internal */ - export const filterSensitiveLog = (obj: GetDistributionConfigResult): any => ({ + export const filterSensitiveLog = (obj: NoSuchResource): any => ({ ...obj, - ...(obj.DistributionConfig && { - DistributionConfig: DistributionConfig.filterSensitiveLog(obj.DistributionConfig), - }), }); } -export interface GetFieldLevelEncryptionRequest { - /** - *

Request the ID for the field-level encryption configuration information.

- */ - Id: string | undefined; +/** + *

Cannot delete this resource because it is in use.

+ */ +export interface ResourceInUse extends __SmithyException, $MetadataBearer { + name: "ResourceInUse"; + $fault: "client"; + Message?: string; } -export namespace GetFieldLevelEncryptionRequest { +export namespace ResourceInUse { /** * @internal */ - export const filterSensitiveLog = (obj: GetFieldLevelEncryptionRequest): any => ({ + export const filterSensitiveLog = (obj: ResourceInUse): any => ({ ...obj, }); } -export interface GetFieldLevelEncryptionResult { - /** - *

Return the field-level encryption configuration information.

- */ - FieldLevelEncryption?: FieldLevelEncryption; - +export interface DeleteMonitoringSubscriptionRequest { /** - *

The current version of the field level encryption configuration. For example: E2QWRUHAPOMQZL.

+ *

The ID of the distribution that you are disabling metrics for.

*/ - ETag?: string; + DistributionId: string | undefined; } -export namespace GetFieldLevelEncryptionResult { +export namespace DeleteMonitoringSubscriptionRequest { /** * @internal */ - export const filterSensitiveLog = (obj: GetFieldLevelEncryptionResult): any => ({ + export const filterSensitiveLog = (obj: DeleteMonitoringSubscriptionRequest): any => ({ ...obj, }); } diff --git a/clients/client-cloudfront/src/models/models_1.ts b/clients/client-cloudfront/src/models/models_1.ts index a49835affe58..208a6f6dcd64 100644 --- a/clients/client-cloudfront/src/models/models_1.ts +++ b/clients/client-cloudfront/src/models/models_1.ts @@ -39,6 +39,8 @@ import { PublicKeyConfig, QueryArgProfileConfig, RealtimeLogConfig, + ResponseHeadersPolicy, + ResponseHeadersPolicyConfig, Restrictions, S3Origin, StreamingDistribution, @@ -48,6 +50,590 @@ import { ViewerCertificate, } from "./models_0"; +export interface DeleteMonitoringSubscriptionResult {} + +export namespace DeleteMonitoringSubscriptionResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteMonitoringSubscriptionResult): any => ({ + ...obj, + }); +} + +export interface DeleteOriginRequestPolicyRequest { + /** + *

The unique identifier for the origin request policy that you are deleting. To get the + * identifier, you can use ListOriginRequestPolicies.

+ */ + Id: string | undefined; + + /** + *

The version of the origin request policy that you are deleting. The version is the origin + * request policy’s ETag value, which you can get using + * ListOriginRequestPolicies, GetOriginRequestPolicy, or + * GetOriginRequestPolicyConfig.

+ */ + IfMatch?: string; +} + +export namespace DeleteOriginRequestPolicyRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteOriginRequestPolicyRequest): any => ({ + ...obj, + }); +} + +/** + *

Cannot delete the origin request policy because it is attached to one or more cache + * behaviors.

+ */ +export interface OriginRequestPolicyInUse extends __SmithyException, $MetadataBearer { + name: "OriginRequestPolicyInUse"; + $fault: "client"; + Message?: string; +} + +export namespace OriginRequestPolicyInUse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: OriginRequestPolicyInUse): any => ({ + ...obj, + }); +} + +export interface DeletePublicKeyRequest { + /** + *

The ID of the public key you want to remove from CloudFront.

+ */ + Id: string | undefined; + + /** + *

The value of the ETag header that you received when retrieving the + * public key identity to delete. For example: E2QWRUHAPOMQZL.

+ */ + IfMatch?: string; +} + +export namespace DeletePublicKeyRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeletePublicKeyRequest): any => ({ + ...obj, + }); +} + +/** + *

The specified public key is in use.

+ */ +export interface PublicKeyInUse extends __SmithyException, $MetadataBearer { + name: "PublicKeyInUse"; + $fault: "client"; + Message?: string; +} + +export namespace PublicKeyInUse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PublicKeyInUse): any => ({ + ...obj, + }); +} + +export interface DeleteRealtimeLogConfigRequest { + /** + *

The name of the real-time log configuration to delete.

+ */ + Name?: string; + + /** + *

The Amazon Resource Name (ARN) of the real-time log configuration to delete.

+ */ + ARN?: string; +} + +export namespace DeleteRealtimeLogConfigRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteRealtimeLogConfigRequest): any => ({ + ...obj, + }); +} + +/** + *

Cannot delete the real-time log configuration because it is attached to one or more cache + * behaviors.

+ */ +export interface RealtimeLogConfigInUse extends __SmithyException, $MetadataBearer { + name: "RealtimeLogConfigInUse"; + $fault: "client"; + Message?: string; +} + +export namespace RealtimeLogConfigInUse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RealtimeLogConfigInUse): any => ({ + ...obj, + }); +} + +export interface DeleteResponseHeadersPolicyRequest { + /** + *

The identifier for the response headers policy that you are deleting.

+ *

To get the identifier, you can use ListResponseHeadersPolicies.

+ */ + Id: string | undefined; + + /** + *

The version of the response headers policy that you are deleting.

+ *

The version is the response headers policy’s ETag value, which you can + * get using ListResponseHeadersPolicies, + * GetResponseHeadersPolicy, or + * GetResponseHeadersPolicyConfig.

+ */ + IfMatch?: string; +} + +export namespace DeleteResponseHeadersPolicyRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteResponseHeadersPolicyRequest): any => ({ + ...obj, + }); +} + +/** + *

Cannot delete the response headers policy because it is attached to one or more cache + * behaviors in a CloudFront distribution.

+ */ +export interface ResponseHeadersPolicyInUse extends __SmithyException, $MetadataBearer { + name: "ResponseHeadersPolicyInUse"; + $fault: "client"; + Message?: string; +} + +export namespace ResponseHeadersPolicyInUse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyInUse): any => ({ + ...obj, + }); +} + +/** + *

The request to delete a streaming distribution.

+ */ +export interface DeleteStreamingDistributionRequest { + /** + *

The distribution ID.

+ */ + Id: string | undefined; + + /** + *

The value of the ETag header that you received when you disabled the + * streaming distribution. For example: E2QWRUHAPOMQZL.

+ */ + IfMatch?: string; +} + +export namespace DeleteStreamingDistributionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteStreamingDistributionRequest): any => ({ + ...obj, + }); +} + +/** + *

The specified streaming distribution does not exist.

+ */ +export interface NoSuchStreamingDistribution extends __SmithyException, $MetadataBearer { + name: "NoSuchStreamingDistribution"; + $fault: "client"; + Message?: string; +} + +export namespace NoSuchStreamingDistribution { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NoSuchStreamingDistribution): any => ({ + ...obj, + }); +} + +/** + *

The specified CloudFront distribution is not disabled. You must disable + * the distribution before you can delete it.

+ */ +export interface StreamingDistributionNotDisabled extends __SmithyException, $MetadataBearer { + name: "StreamingDistributionNotDisabled"; + $fault: "client"; + Message?: string; +} + +export namespace StreamingDistributionNotDisabled { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StreamingDistributionNotDisabled): any => ({ + ...obj, + }); +} + +export interface DescribeFunctionRequest { + /** + *

The name of the function that you are getting information about.

+ */ + Name: string | undefined; + + /** + *

The function’s stage, either DEVELOPMENT or LIVE.

+ */ + Stage?: FunctionStage | string; +} + +export namespace DescribeFunctionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeFunctionRequest): any => ({ + ...obj, + }); +} + +export interface DescribeFunctionResult { + /** + *

Contains configuration information and metadata about a CloudFront function.

+ */ + FunctionSummary?: FunctionSummary; + + /** + *

The version identifier for the current version of the CloudFront function.

+ */ + ETag?: string; +} + +export namespace DescribeFunctionResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeFunctionResult): any => ({ + ...obj, + }); +} + +export interface GetCachePolicyRequest { + /** + *

The unique identifier for the cache policy. If the cache policy is attached to a + * distribution’s cache behavior, you can get the policy’s identifier using + * ListDistributions or GetDistribution. If the cache policy is + * not attached to a cache behavior, you can get the identifier using + * ListCachePolicies.

+ */ + Id: string | undefined; +} + +export namespace GetCachePolicyRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetCachePolicyRequest): any => ({ + ...obj, + }); +} + +export interface GetCachePolicyResult { + /** + *

The cache policy.

+ */ + CachePolicy?: CachePolicy; + + /** + *

The current version of the cache policy.

+ */ + ETag?: string; +} + +export namespace GetCachePolicyResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetCachePolicyResult): any => ({ + ...obj, + }); +} + +export interface GetCachePolicyConfigRequest { + /** + *

The unique identifier for the cache policy. If the cache policy is attached to a + * distribution’s cache behavior, you can get the policy’s identifier using + * ListDistributions or GetDistribution. If the cache policy is + * not attached to a cache behavior, you can get the identifier using + * ListCachePolicies.

+ */ + Id: string | undefined; +} + +export namespace GetCachePolicyConfigRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetCachePolicyConfigRequest): any => ({ + ...obj, + }); +} + +export interface GetCachePolicyConfigResult { + /** + *

The cache policy configuration.

+ */ + CachePolicyConfig?: CachePolicyConfig; + + /** + *

The current version of the cache policy.

+ */ + ETag?: string; +} + +export namespace GetCachePolicyConfigResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetCachePolicyConfigResult): any => ({ + ...obj, + }); +} + +/** + *

The request to get an origin access identity's information.

+ */ +export interface GetCloudFrontOriginAccessIdentityRequest { + /** + *

The identity's ID.

+ */ + Id: string | undefined; +} + +export namespace GetCloudFrontOriginAccessIdentityRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetCloudFrontOriginAccessIdentityRequest): any => ({ + ...obj, + }); +} + +/** + *

The returned result of the corresponding request.

+ */ +export interface GetCloudFrontOriginAccessIdentityResult { + /** + *

The origin access identity's information.

+ */ + CloudFrontOriginAccessIdentity?: CloudFrontOriginAccessIdentity; + + /** + *

The current version of the origin access identity's information. For example: + * E2QWRUHAPOMQZL.

+ */ + ETag?: string; +} + +export namespace GetCloudFrontOriginAccessIdentityResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetCloudFrontOriginAccessIdentityResult): any => ({ + ...obj, + }); +} + +/** + *

The origin access identity's configuration information. For more information, see + * CloudFrontOriginAccessIdentityConfig.

+ */ +export interface GetCloudFrontOriginAccessIdentityConfigRequest { + /** + *

The identity's ID.

+ */ + Id: string | undefined; +} + +export namespace GetCloudFrontOriginAccessIdentityConfigRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetCloudFrontOriginAccessIdentityConfigRequest): any => ({ + ...obj, + }); +} + +/** + *

The returned result of the corresponding request.

+ */ +export interface GetCloudFrontOriginAccessIdentityConfigResult { + /** + *

The origin access identity's configuration information.

+ */ + CloudFrontOriginAccessIdentityConfig?: CloudFrontOriginAccessIdentityConfig; + + /** + *

The current version of the configuration. For example: + * E2QWRUHAPOMQZL.

+ */ + ETag?: string; +} + +export namespace GetCloudFrontOriginAccessIdentityConfigResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetCloudFrontOriginAccessIdentityConfigResult): any => ({ + ...obj, + }); +} + +/** + *

The request to get a distribution's information.

+ */ +export interface GetDistributionRequest { + /** + *

The distribution's ID. If the ID is empty, an empty distribution configuration is returned.

+ */ + Id: string | undefined; +} + +export namespace GetDistributionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetDistributionRequest): any => ({ + ...obj, + }); +} + +/** + *

The returned result of the corresponding request.

+ */ +export interface GetDistributionResult { + /** + *

The distribution's information.

+ */ + Distribution?: Distribution; + + /** + *

The current version of the distribution's information. For example: + * E2QWRUHAPOMQZL.

+ */ + ETag?: string; +} + +export namespace GetDistributionResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetDistributionResult): any => ({ + ...obj, + ...(obj.Distribution && { Distribution: Distribution.filterSensitiveLog(obj.Distribution) }), + }); +} + +/** + *

The request to get a distribution configuration.

+ */ +export interface GetDistributionConfigRequest { + /** + *

The distribution's ID. If the ID is empty, an empty distribution configuration is returned.

+ */ + Id: string | undefined; +} + +export namespace GetDistributionConfigRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetDistributionConfigRequest): any => ({ + ...obj, + }); +} + +/** + *

The returned result of the corresponding request.

+ */ +export interface GetDistributionConfigResult { + /** + *

The distribution's configuration information.

+ */ + DistributionConfig?: DistributionConfig; + + /** + *

The current version of the configuration. For example: + * E2QWRUHAPOMQZL.

+ */ + ETag?: string; +} + +export namespace GetDistributionConfigResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetDistributionConfigResult): any => ({ + ...obj, + ...(obj.DistributionConfig && { + DistributionConfig: DistributionConfig.filterSensitiveLog(obj.DistributionConfig), + }), + }); +} + +export interface GetFieldLevelEncryptionRequest { + /** + *

Request the ID for the field-level encryption configuration information.

+ */ + Id: string | undefined; +} + +export namespace GetFieldLevelEncryptionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetFieldLevelEncryptionRequest): any => ({ + ...obj, + }); +} + +export interface GetFieldLevelEncryptionResult { + /** + *

Return the field-level encryption configuration information.

+ */ + FieldLevelEncryption?: FieldLevelEncryption; + + /** + *

The current version of the field level encryption configuration. For example: E2QWRUHAPOMQZL.

+ */ + ETag?: string; +} + +export namespace GetFieldLevelEncryptionResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetFieldLevelEncryptionResult): any => ({ + ...obj, + }); +} + export interface GetFieldLevelEncryptionConfigRequest { /** *

Request the ID for the field-level encryption configuration information.

@@ -546,27 +1132,111 @@ export interface GetRealtimeLogConfigRequest { ARN?: string; } -export namespace GetRealtimeLogConfigRequest { +export namespace GetRealtimeLogConfigRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetRealtimeLogConfigRequest): any => ({ + ...obj, + }); +} + +export interface GetRealtimeLogConfigResult { + /** + *

A real-time log configuration.

+ */ + RealtimeLogConfig?: RealtimeLogConfig; +} + +export namespace GetRealtimeLogConfigResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetRealtimeLogConfigResult): any => ({ + ...obj, + }); +} + +export interface GetResponseHeadersPolicyRequest { + /** + *

The identifier for the response headers policy.

+ *

If the response headers policy is attached to a distribution’s cache behavior, you can + * get the policy’s identifier using ListDistributions or + * GetDistribution. If the response headers policy is not attached to a + * cache behavior, you can get the identifier using + * ListResponseHeadersPolicies.

+ */ + Id: string | undefined; +} + +export namespace GetResponseHeadersPolicyRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetResponseHeadersPolicyRequest): any => ({ + ...obj, + }); +} + +export interface GetResponseHeadersPolicyResult { + /** + *

Contains a response headers policy.

+ */ + ResponseHeadersPolicy?: ResponseHeadersPolicy; + + /** + *

The version identifier for the current version of the response headers policy.

+ */ + ETag?: string; +} + +export namespace GetResponseHeadersPolicyResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetResponseHeadersPolicyResult): any => ({ + ...obj, + }); +} + +export interface GetResponseHeadersPolicyConfigRequest { + /** + *

The identifier for the response headers policy.

+ *

If the response headers policy is attached to a distribution’s cache behavior, you can + * get the policy’s identifier using ListDistributions or + * GetDistribution. If the response headers policy is not attached to a + * cache behavior, you can get the identifier using + * ListResponseHeadersPolicies.

+ */ + Id: string | undefined; +} + +export namespace GetResponseHeadersPolicyConfigRequest { /** * @internal */ - export const filterSensitiveLog = (obj: GetRealtimeLogConfigRequest): any => ({ + export const filterSensitiveLog = (obj: GetResponseHeadersPolicyConfigRequest): any => ({ ...obj, }); } -export interface GetRealtimeLogConfigResult { +export interface GetResponseHeadersPolicyConfigResult { /** - *

A real-time log configuration.

+ *

Contains a response headers policy.

*/ - RealtimeLogConfig?: RealtimeLogConfig; + ResponseHeadersPolicyConfig?: ResponseHeadersPolicyConfig; + + /** + *

The version identifier for the current version of the response headers policy.

+ */ + ETag?: string; } -export namespace GetRealtimeLogConfigResult { +export namespace GetResponseHeadersPolicyConfigResult { /** * @internal */ - export const filterSensitiveLog = (obj: GetRealtimeLogConfigResult): any => ({ + export const filterSensitiveLog = (obj: GetResponseHeadersPolicyConfigResult): any => ({ ...obj, }); } @@ -670,7 +1340,7 @@ export interface ListCachePoliciesRequest { * *
  • *

    - * custom – Returns only the custom policies created in your account.

    + * custom – Returns only the custom policies created in your Amazon Web Services account.

    *
  • * */ @@ -816,13 +1486,13 @@ export interface CloudFrontOriginAccessIdentityList { IsTruncated: boolean | undefined; /** - *

    The number of CloudFront origin access identities that were created by the current account.

    + *

    The number of CloudFront origin access identities that were created by the current Amazon Web Services account.

    */ Quantity: number | undefined; /** *

    A complex type that contains one CloudFrontOriginAccessIdentitySummary - * element for each origin access identity that was created by the current account.

    + * element for each origin access identity that was created by the current Amazon Web Services account.

    */ Items?: CloudFrontOriginAccessIdentitySummary[]; } @@ -1019,7 +1689,7 @@ export interface DistributionSummary { /** *

    The ARN (Amazon Resource Name) for the distribution. For example: * arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where - * 123456789012 is your account ID.

    + * 123456789012 is your Amazon Web Services account ID.

    */ ARN: string | undefined; @@ -1170,13 +1840,13 @@ export interface DistributionList { IsTruncated: boolean | undefined; /** - *

    The number of distributions that were created by the current account.

    + *

    The number of distributions that were created by the current Amazon Web Services account.

    */ Quantity: number | undefined; /** *

    A complex type that contains one DistributionSummary element for each - * distribution that was created by the current account.

    + * distribution that was created by the current Amazon Web Services account.

    */ Items?: DistributionSummary[]; } @@ -1444,6 +2114,52 @@ export namespace ListDistributionsByRealtimeLogConfigResult { }); } +export interface ListDistributionsByResponseHeadersPolicyIdRequest { + /** + *

    Use this field when paginating results to indicate where to begin in your list of + * distribution IDs. The response includes distribution IDs in the list that occur after + * the marker. To get the next page of the list, set this field’s value to the value of + * NextMarker from the current page’s response.

    + */ + Marker?: string; + + /** + *

    The maximum number of distribution IDs that you want to get in the response.

    + */ + MaxItems?: number; + + /** + *

    The ID of the response headers policy whose associated distribution IDs you want to + * list.

    + */ + ResponseHeadersPolicyId: string | undefined; +} + +export namespace ListDistributionsByResponseHeadersPolicyIdRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListDistributionsByResponseHeadersPolicyIdRequest): any => ({ + ...obj, + }); +} + +export interface ListDistributionsByResponseHeadersPolicyIdResult { + /** + *

    A list of distribution IDs.

    + */ + DistributionIdList?: DistributionIdList; +} + +export namespace ListDistributionsByResponseHeadersPolicyIdResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListDistributionsByResponseHeadersPolicyIdResult): any => ({ + ...obj, + }); +} + /** *

    The request to list distributions that are associated with a specified WAF web * ACL.

    @@ -1914,14 +2630,14 @@ export interface InvalidationList { IsTruncated: boolean | undefined; /** - *

    The number of invalidation batches that were created by the current account. + *

    The number of invalidation batches that were created by the current Amazon Web Services account. *

    */ Quantity: number | undefined; /** *

    A complex type that contains one InvalidationSummary element for each - * invalidation batch created by the current account.

    + * invalidation batch created by the current Amazon Web Services account.

    */ Items?: InvalidationSummary[]; } @@ -2062,7 +2778,7 @@ export interface ListOriginRequestPoliciesRequest { * *
  • *

    - * custom – Returns only the custom policies created in your account.

    + * custom – Returns only the custom policies created in your Amazon Web Services account.

    *
  • * */ @@ -2097,7 +2813,7 @@ export namespace ListOriginRequestPoliciesRequest { export interface OriginRequestPolicySummary { /** *

    The type of origin request policy, either managed (created by Amazon Web Services) or - * custom (created in this account).

    + * custom (created in this Amazon Web Services account).

    */ Type: OriginRequestPolicyType | string | undefined; @@ -2367,6 +3083,129 @@ export namespace ListRealtimeLogConfigsResult { }); } +export enum ResponseHeadersPolicyType { + custom = "custom", + managed = "managed", +} + +export interface ListResponseHeadersPoliciesRequest { + /** + *

    A filter to get only the specified kind of response headers policies. Valid values + * are:

    + *
      + *
    • + *

      + * managed – Gets only the managed policies created by Amazon Web Services.

      + *
    • + *
    • + *

      + * custom – Gets only the custom policies created in your + * Amazon Web Services account.

      + *
    • + *
    + */ + Type?: ResponseHeadersPolicyType | string; + + /** + *

    Use this field when paginating results to indicate where to begin in your list of response + * headers policies. The response includes response headers policies in the list that occur + * after the marker. To get the next page of the list, set this field’s value to the value + * of NextMarker from the current page’s response.

    + */ + Marker?: string; + + /** + *

    The maximum number of response headers policies that you want to get in the response.

    + */ + MaxItems?: number; +} + +export namespace ListResponseHeadersPoliciesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListResponseHeadersPoliciesRequest): any => ({ + ...obj, + }); +} + +/** + *

    Contains a response headers policy.

    + */ +export interface ResponseHeadersPolicySummary { + /** + *

    The type of response headers policy, either managed (created by Amazon Web Services) or + * custom (created in this Amazon Web Services account).

    + */ + Type: ResponseHeadersPolicyType | string | undefined; + + /** + *

    The response headers policy.

    + */ + ResponseHeadersPolicy: ResponseHeadersPolicy | undefined; +} + +export namespace ResponseHeadersPolicySummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResponseHeadersPolicySummary): any => ({ + ...obj, + }); +} + +/** + *

    A list of response headers policies.

    + */ +export interface ResponseHeadersPolicyList { + /** + *

    If there are more items in the list than are in this response, this element is present. It + * contains the value that you should use in the Marker field of a subsequent + * request to continue listing response headers policies where you left off.

    + */ + NextMarker?: string; + + /** + *

    The maximum number of response headers policies requested.

    + */ + MaxItems: number | undefined; + + /** + *

    The number of response headers policies returned.

    + */ + Quantity: number | undefined; + + /** + *

    The response headers policies in the list.

    + */ + Items?: ResponseHeadersPolicySummary[]; +} + +export namespace ResponseHeadersPolicyList { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResponseHeadersPolicyList): any => ({ + ...obj, + }); +} + +export interface ListResponseHeadersPoliciesResult { + /** + *

    A list of response headers policies.

    + */ + ResponseHeadersPolicyList?: ResponseHeadersPolicyList; +} + +export namespace ListResponseHeadersPoliciesResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListResponseHeadersPoliciesResult): any => ({ + ...obj, + }); +} + /** *

    The request to list your streaming distributions.

    */ @@ -2403,7 +3242,7 @@ export interface StreamingDistributionSummary { /** *

    The ARN (Amazon Resource Name) for the streaming distribution. For example: * arn:aws:cloudfront::123456789012:streaming-distribution/EDFDVBD632BHDS5, where - * 123456789012 is your account ID.

    + * 123456789012 is your Amazon Web Services account ID.

    */ ARN: string | undefined; @@ -2437,7 +3276,7 @@ export interface StreamingDistributionSummary { Aliases: Aliases | undefined; /** - *

    A complex type that specifies the accounts, if any, that you want to allow to + *

    A complex type that specifies the Amazon Web Services accounts, if any, that you want to allow to * create signed URLs for private content. If you want to require signed URLs in requests for * objects in the target origin that match the PathPattern for this cache behavior, * specify true for Enabled, and specify the applicable values for @@ -2508,14 +3347,14 @@ export interface StreamingDistributionList { IsTruncated: boolean | undefined; /** - *

    The number of streaming distributions that were created by the current account. + *

    The number of streaming distributions that were created by the current Amazon Web Services account. *

    */ Quantity: number | undefined; /** *

    A complex type that contains one StreamingDistributionSummary element for - * each distribution that was created by the current account.

    + * each distribution that was created by the current Amazon Web Services account.

    */ Items?: StreamingDistributionSummary[]; } @@ -2743,6 +3582,9 @@ export namespace TestResult { */ export const filterSensitiveLog = (obj: TestResult): any => ({ ...obj, + ...(obj.FunctionExecutionLogs && { FunctionExecutionLogs: SENSITIVE_STRING }), + ...(obj.FunctionErrorMessage && { FunctionErrorMessage: SENSITIVE_STRING }), + ...(obj.FunctionOutput && { FunctionOutput: SENSITIVE_STRING }), }); } @@ -2760,6 +3602,7 @@ export namespace TestFunctionResult { */ export const filterSensitiveLog = (obj: TestFunctionResult): any => ({ ...obj, + ...(obj.TestResult && { TestResult: TestResult.filterSensitiveLog(obj.TestResult) }), }); } @@ -2807,6 +3650,11 @@ export namespace UntagResourceRequest { } export interface UpdateCachePolicyRequest { + /** + *

    A cache policy configuration.

    + */ + CachePolicyConfig: CachePolicyConfig | undefined; + /** *

    The unique identifier for the cache policy that you are updating. The identifier is returned * in a cache behavior’s CachePolicyId field in the response to @@ -2820,11 +3668,6 @@ export interface UpdateCachePolicyRequest { * GetCachePolicyConfig.

    */ IfMatch?: string; - - /** - *

    A cache policy configuration.

    - */ - CachePolicyConfig: CachePolicyConfig | undefined; } export namespace UpdateCachePolicyRequest { @@ -2861,6 +3704,11 @@ export namespace UpdateCachePolicyResult { *

    The request to update an origin access identity.

    */ export interface UpdateCloudFrontOriginAccessIdentityRequest { + /** + *

    The identity's configuration information.

    + */ + CloudFrontOriginAccessIdentityConfig: CloudFrontOriginAccessIdentityConfig | undefined; + /** *

    The identity's id.

    */ @@ -2871,11 +3719,6 @@ export interface UpdateCloudFrontOriginAccessIdentityRequest { * identity's configuration. For example: E2QWRUHAPOMQZL.

    */ IfMatch?: string; - - /** - *

    The identity's configuration information.

    - */ - CloudFrontOriginAccessIdentityConfig: CloudFrontOriginAccessIdentityConfig | undefined; } export namespace UpdateCloudFrontOriginAccessIdentityRequest { @@ -2916,6 +3759,11 @@ export namespace UpdateCloudFrontOriginAccessIdentityResult { *

    The request to update a distribution.

    */ export interface UpdateDistributionRequest { + /** + *

    The distribution's configuration information.

    + */ + DistributionConfig: DistributionConfig | undefined; + /** *

    The distribution's id.

    */ @@ -2926,11 +3774,6 @@ export interface UpdateDistributionRequest { * distribution's configuration. For example: E2QWRUHAPOMQZL.

    */ IfMatch?: string; - - /** - *

    The distribution's configuration information.

    - */ - DistributionConfig: DistributionConfig | undefined; } export namespace UpdateDistributionRequest { @@ -2972,6 +3815,11 @@ export namespace UpdateDistributionResult { } export interface UpdateFieldLevelEncryptionConfigRequest { + /** + *

    Request to update a field-level encryption configuration.

    + */ + FieldLevelEncryptionConfig: FieldLevelEncryptionConfig | undefined; + /** *

    The ID of the configuration you want to update.

    */ @@ -2982,11 +3830,6 @@ export interface UpdateFieldLevelEncryptionConfigRequest { * For example: E2QWRUHAPOMQZL.

    */ IfMatch?: string; - - /** - *

    Request to update a field-level encryption configuration.

    - */ - FieldLevelEncryptionConfig: FieldLevelEncryptionConfig | undefined; } export namespace UpdateFieldLevelEncryptionConfigRequest { @@ -3021,6 +3864,11 @@ export namespace UpdateFieldLevelEncryptionConfigResult { } export interface UpdateFieldLevelEncryptionProfileRequest { + /** + *

    Request to update a field-level encryption profile.

    + */ + FieldLevelEncryptionProfileConfig: FieldLevelEncryptionProfileConfig | undefined; + /** *

    The ID of the field-level encryption profile request.

    */ @@ -3031,11 +3879,6 @@ export interface UpdateFieldLevelEncryptionProfileRequest { * For example: E2QWRUHAPOMQZL.

    */ IfMatch?: string; - - /** - *

    Request to update a field-level encryption profile.

    - */ - FieldLevelEncryptionProfileConfig: FieldLevelEncryptionProfileConfig | undefined; } export namespace UpdateFieldLevelEncryptionProfileRequest { @@ -3124,6 +3967,11 @@ export namespace UpdateFunctionResult { } export interface UpdateKeyGroupRequest { + /** + *

    The key group configuration.

    + */ + KeyGroupConfig: KeyGroupConfig | undefined; + /** *

    The identifier of the key group that you are updating.

    */ @@ -3134,11 +3982,6 @@ export interface UpdateKeyGroupRequest { * ETag value.

    */ IfMatch?: string; - - /** - *

    The key group configuration.

    - */ - KeyGroupConfig: KeyGroupConfig | undefined; } export namespace UpdateKeyGroupRequest { @@ -3172,6 +4015,11 @@ export namespace UpdateKeyGroupResult { } export interface UpdateOriginRequestPolicyRequest { + /** + *

    An origin request policy configuration.

    + */ + OriginRequestPolicyConfig: OriginRequestPolicyConfig | undefined; + /** *

    The unique identifier for the origin request policy that you are updating. The identifier is * returned in a cache behavior’s OriginRequestPolicyId field in the response @@ -3185,11 +4033,6 @@ export interface UpdateOriginRequestPolicyRequest { * GetOriginRequestPolicyConfig.

    */ IfMatch?: string; - - /** - *

    An origin request policy configuration.

    - */ - OriginRequestPolicyConfig: OriginRequestPolicyConfig | undefined; } export namespace UpdateOriginRequestPolicyRequest { @@ -3223,6 +4066,11 @@ export namespace UpdateOriginRequestPolicyResult { } export interface UpdatePublicKeyRequest { + /** + *

    A public key configuration.

    + */ + PublicKeyConfig: PublicKeyConfig | undefined; + /** *

    The identifier of the public key that you are updating.

    */ @@ -3233,11 +4081,6 @@ export interface UpdatePublicKeyRequest { * For example: E2QWRUHAPOMQZL.

    */ IfMatch?: string; - - /** - *

    A public key configuration.

    - */ - PublicKeyConfig: PublicKeyConfig | undefined; } export namespace UpdatePublicKeyRequest { @@ -3327,10 +4170,64 @@ export namespace UpdateRealtimeLogConfigResult { }); } +export interface UpdateResponseHeadersPolicyRequest { + /** + *

    A response headers policy configuration.

    + */ + ResponseHeadersPolicyConfig: ResponseHeadersPolicyConfig | undefined; + + /** + *

    The identifier for the response headers policy that you are updating.

    + */ + Id: string | undefined; + + /** + *

    The version of the response headers policy that you are updating.

    + *

    The version is returned in the cache policy’s ETag field in the response + * to GetResponseHeadersPolicyConfig.

    + */ + IfMatch?: string; +} + +export namespace UpdateResponseHeadersPolicyRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateResponseHeadersPolicyRequest): any => ({ + ...obj, + }); +} + +export interface UpdateResponseHeadersPolicyResult { + /** + *

    A response headers policy.

    + */ + ResponseHeadersPolicy?: ResponseHeadersPolicy; + + /** + *

    The current version of the response headers policy.

    + */ + ETag?: string; +} + +export namespace UpdateResponseHeadersPolicyResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateResponseHeadersPolicyResult): any => ({ + ...obj, + }); +} + /** *

    The request to update a streaming distribution.

    */ export interface UpdateStreamingDistributionRequest { + /** + *

    The streaming distribution's configuration information.

    + */ + StreamingDistributionConfig: StreamingDistributionConfig | undefined; + /** *

    The streaming distribution's id.

    */ @@ -3341,11 +4238,6 @@ export interface UpdateStreamingDistributionRequest { * streaming distribution's configuration. For example: E2QWRUHAPOMQZL.

    */ IfMatch?: string; - - /** - *

    The streaming distribution's configuration information.

    - */ - StreamingDistributionConfig: StreamingDistributionConfig | undefined; } export namespace UpdateStreamingDistributionRequest { diff --git a/clients/client-cloudfront/src/protocols/Aws_restXml.ts b/clients/client-cloudfront/src/protocols/Aws_restXml.ts index 2c2fe6ee3b83..e1ded2a56277 100644 --- a/clients/client-cloudfront/src/protocols/Aws_restXml.ts +++ b/clients/client-cloudfront/src/protocols/Aws_restXml.ts @@ -57,6 +57,10 @@ import { CreateRealtimeLogConfigCommandInput, CreateRealtimeLogConfigCommandOutput, } from "../commands/CreateRealtimeLogConfigCommand"; +import { + CreateResponseHeadersPolicyCommandInput, + CreateResponseHeadersPolicyCommandOutput, +} from "../commands/CreateResponseHeadersPolicyCommand"; import { CreateStreamingDistributionCommandInput, CreateStreamingDistributionCommandOutput, @@ -94,6 +98,10 @@ import { DeleteRealtimeLogConfigCommandInput, DeleteRealtimeLogConfigCommandOutput, } from "../commands/DeleteRealtimeLogConfigCommand"; +import { + DeleteResponseHeadersPolicyCommandInput, + DeleteResponseHeadersPolicyCommandOutput, +} from "../commands/DeleteResponseHeadersPolicyCommand"; import { DeleteStreamingDistributionCommandInput, DeleteStreamingDistributionCommandOutput, @@ -155,6 +163,14 @@ import { GetRealtimeLogConfigCommandInput, GetRealtimeLogConfigCommandOutput, } from "../commands/GetRealtimeLogConfigCommand"; +import { + GetResponseHeadersPolicyCommandInput, + GetResponseHeadersPolicyCommandOutput, +} from "../commands/GetResponseHeadersPolicyCommand"; +import { + GetResponseHeadersPolicyConfigCommandInput, + GetResponseHeadersPolicyConfigCommandOutput, +} from "../commands/GetResponseHeadersPolicyConfigCommand"; import { GetStreamingDistributionCommandInput, GetStreamingDistributionCommandOutput, @@ -188,6 +204,10 @@ import { ListDistributionsByRealtimeLogConfigCommandInput, ListDistributionsByRealtimeLogConfigCommandOutput, } from "../commands/ListDistributionsByRealtimeLogConfigCommand"; +import { + ListDistributionsByResponseHeadersPolicyIdCommandInput, + ListDistributionsByResponseHeadersPolicyIdCommandOutput, +} from "../commands/ListDistributionsByResponseHeadersPolicyIdCommand"; import { ListDistributionsByWebACLIdCommandInput, ListDistributionsByWebACLIdCommandOutput, @@ -213,6 +233,10 @@ import { ListRealtimeLogConfigsCommandInput, ListRealtimeLogConfigsCommandOutput, } from "../commands/ListRealtimeLogConfigsCommand"; +import { + ListResponseHeadersPoliciesCommandInput, + ListResponseHeadersPoliciesCommandOutput, +} from "../commands/ListResponseHeadersPoliciesCommand"; import { ListStreamingDistributionsCommandInput, ListStreamingDistributionsCommandOutput, @@ -250,6 +274,10 @@ import { UpdateRealtimeLogConfigCommandInput, UpdateRealtimeLogConfigCommandOutput, } from "../commands/UpdateRealtimeLogConfigCommand"; +import { + UpdateResponseHeadersPolicyCommandInput, + UpdateResponseHeadersPolicyCommandOutput, +} from "../commands/UpdateResponseHeadersPolicyCommand"; import { UpdateStreamingDistributionCommandInput, UpdateStreamingDistributionCommandOutput, @@ -372,7 +400,7 @@ import { NoSuchPublicKey, NoSuchRealtimeLogConfig, NoSuchResource, - NoSuchStreamingDistribution, + NoSuchResponseHeadersPolicy, Origin, OriginCustomHeader, OriginGroup, @@ -385,7 +413,6 @@ import { OriginRequestPolicyConfig, OriginRequestPolicyCookiesConfig, OriginRequestPolicyHeadersConfig, - OriginRequestPolicyInUse, OriginRequestPolicyQueryStringsConfig, Origins, OriginShield, @@ -396,7 +423,6 @@ import { PublicKey, PublicKeyAlreadyExists, PublicKeyConfig, - PublicKeyInUse, QueryArgProfile, QueryArgProfileConfig, QueryArgProfileEmpty, @@ -405,10 +431,27 @@ import { QueryStringNames, RealtimeLogConfig, RealtimeLogConfigAlreadyExists, - RealtimeLogConfigInUse, RealtimeLogConfigOwnerMismatch, RealtimeMetricsSubscriptionConfig, ResourceInUse, + ResponseHeadersPolicy, + ResponseHeadersPolicyAccessControlAllowHeaders, + ResponseHeadersPolicyAccessControlAllowMethods, + ResponseHeadersPolicyAccessControlAllowMethodsValues, + ResponseHeadersPolicyAccessControlAllowOrigins, + ResponseHeadersPolicyAccessControlExposeHeaders, + ResponseHeadersPolicyAlreadyExists, + ResponseHeadersPolicyConfig, + ResponseHeadersPolicyContentSecurityPolicy, + ResponseHeadersPolicyContentTypeOptions, + ResponseHeadersPolicyCorsConfig, + ResponseHeadersPolicyCustomHeader, + ResponseHeadersPolicyCustomHeadersConfig, + ResponseHeadersPolicyFrameOptions, + ResponseHeadersPolicyReferrerPolicy, + ResponseHeadersPolicySecurityHeadersConfig, + ResponseHeadersPolicyStrictTransportSecurity, + ResponseHeadersPolicyXSSProtection, Restrictions, S3Origin, S3OriginConfig, @@ -419,7 +462,6 @@ import { StreamingDistributionAlreadyExists, StreamingDistributionConfig, StreamingDistributionConfigWithTags, - StreamingDistributionNotDisabled, StreamingLoggingConfig, Tag, Tags, @@ -430,12 +472,14 @@ import { TooManyCookieNamesInWhiteList, TooManyCookiesInCachePolicy, TooManyCookiesInOriginRequestPolicy, + TooManyCustomHeadersInResponseHeadersPolicy, TooManyDistributionCNAMEs, TooManyDistributions, TooManyDistributionsAssociatedToCachePolicy, TooManyDistributionsAssociatedToFieldLevelEncryptionConfig, TooManyDistributionsAssociatedToKeyGroup, TooManyDistributionsAssociatedToOriginRequestPolicy, + TooManyDistributionsAssociatedToResponseHeadersPolicy, TooManyDistributionsWithFunctionAssociations, TooManyDistributionsWithLambdaAssociations, TooManyDistributionsWithSingleFunctionARN, @@ -464,6 +508,7 @@ import { TooManyQueryStringsInCachePolicy, TooManyQueryStringsInOriginRequestPolicy, TooManyRealtimeLogConfigs, + TooManyResponseHeadersPolicies, TooManyStreamingDistributionCNAMEs, TooManyStreamingDistributions, TooManyTrustedSigners, @@ -492,12 +537,20 @@ import { KeyGroupList, KeyGroupSummary, NoSuchInvalidation, + NoSuchStreamingDistribution, + OriginRequestPolicyInUse, OriginRequestPolicyList, OriginRequestPolicySummary, + PublicKeyInUse, PublicKeyList, PublicKeySummary, + RealtimeLogConfigInUse, RealtimeLogConfigs, + ResponseHeadersPolicyInUse, + ResponseHeadersPolicyList, + ResponseHeadersPolicySummary, StreamingDistributionList, + StreamingDistributionNotDisabled, StreamingDistributionSummary, TagKeys, TestFunctionFailed, @@ -1009,6 +1062,38 @@ export const serializeAws_restXmlCreateRealtimeLogConfigCommand = async ( }); }; +export const serializeAws_restXmlCreateResponseHeadersPolicyCommand = async ( + input: CreateResponseHeadersPolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/xml", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy"; + let body: any; + if (input.ResponseHeadersPolicyConfig !== undefined) { + body = serializeAws_restXmlResponseHeadersPolicyConfig(input.ResponseHeadersPolicyConfig, context); + } + let contents: any; + if (input.ResponseHeadersPolicyConfig !== undefined) { + contents = serializeAws_restXmlResponseHeadersPolicyConfig(input.ResponseHeadersPolicyConfig, context); + body = ''; + contents.addAttribute("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/"); + body += contents.toString(); + } + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restXmlCreateStreamingDistributionCommand = async ( input: CreateStreamingDistributionCommandInput, context: __SerdeContext @@ -1425,6 +1510,37 @@ export const serializeAws_restXmlDeleteRealtimeLogConfigCommand = async ( }); }; +export const serializeAws_restXmlDeleteResponseHeadersPolicyCommand = async ( + input: DeleteResponseHeadersPolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + ...(isSerializableHeaderValue(input.IfMatch) && { "if-match": input.IfMatch! }), + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy/{Id}"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restXmlDeleteStreamingDistributionCommand = async ( input: DeleteStreamingDistributionCommandInput, context: __SerdeContext @@ -2095,6 +2211,65 @@ export const serializeAws_restXmlGetRealtimeLogConfigCommand = async ( }); }; +export const serializeAws_restXmlGetResponseHeadersPolicyCommand = async ( + input: GetResponseHeadersPolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy/{Id}"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restXmlGetResponseHeadersPolicyConfigCommand = async ( + input: GetResponseHeadersPolicyConfigCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/2020-05-31/response-headers-policy/{Id}/config"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restXmlGetStreamingDistributionCommand = async ( input: GetStreamingDistributionCommandInput, context: __SerdeContext @@ -2410,6 +2585,41 @@ export const serializeAws_restXmlListDistributionsByRealtimeLogConfigCommand = a }); }; +export const serializeAws_restXmlListDistributionsByResponseHeadersPolicyIdCommand = async ( + input: ListDistributionsByResponseHeadersPolicyIdCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/2020-05-31/distributionsByResponseHeadersPolicyId/{ResponseHeadersPolicyId}"; + if (input.ResponseHeadersPolicyId !== undefined) { + const labelValue: string = input.ResponseHeadersPolicyId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: ResponseHeadersPolicyId."); + } + resolvedPath = resolvedPath.replace("{ResponseHeadersPolicyId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: ResponseHeadersPolicyId."); + } + const query: any = { + ...(input.Marker !== undefined && { Marker: input.Marker }), + ...(input.MaxItems !== undefined && { MaxItems: input.MaxItems.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + export const serializeAws_restXmlListDistributionsByWebACLIdCommand = async ( input: ListDistributionsByWebACLIdCommandInput, context: __SerdeContext @@ -2655,6 +2865,32 @@ export const serializeAws_restXmlListRealtimeLogConfigsCommand = async ( }); }; +export const serializeAws_restXmlListResponseHeadersPoliciesCommand = async ( + input: ListResponseHeadersPoliciesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy"; + const query: any = { + ...(input.Type !== undefined && { Type: input.Type }), + ...(input.Marker !== undefined && { Marker: input.Marker }), + ...(input.MaxItems !== undefined && { MaxItems: input.MaxItems.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + export const serializeAws_restXmlListStreamingDistributionsCommand = async ( input: ListStreamingDistributionsCommandInput, context: __SerdeContext @@ -3297,6 +3533,48 @@ export const serializeAws_restXmlUpdateRealtimeLogConfigCommand = async ( }); }; +export const serializeAws_restXmlUpdateResponseHeadersPolicyCommand = async ( + input: UpdateResponseHeadersPolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/xml", + ...(isSerializableHeaderValue(input.IfMatch) && { "if-match": input.IfMatch! }), + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy/{Id}"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + if (input.ResponseHeadersPolicyConfig !== undefined) { + body = serializeAws_restXmlResponseHeadersPolicyConfig(input.ResponseHeadersPolicyConfig, context); + } + let contents: any; + if (input.ResponseHeadersPolicyConfig !== undefined) { + contents = serializeAws_restXmlResponseHeadersPolicyConfig(input.ResponseHeadersPolicyConfig, context); + body = ''; + contents.addAttribute("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/"); + body += contents.toString(); + } + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restXmlUpdateStreamingDistributionCommand = async ( input: UpdateStreamingDistributionCommandInput, context: __SerdeContext @@ -3936,6 +4214,14 @@ const deserializeAws_restXmlCreateDistributionCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "NoSuchResponseHeadersPolicy": + case "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy": + response = { + ...(await deserializeAws_restXmlNoSuchResponseHeadersPolicyResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "RealtimeLogConfigOwnerMismatch": case "com.amazonaws.cloudfront#RealtimeLogConfigOwnerMismatch": response = { @@ -4022,6 +4308,17 @@ const deserializeAws_restXmlCreateDistributionCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "TooManyDistributionsAssociatedToResponseHeadersPolicy": + case "com.amazonaws.cloudfront#TooManyDistributionsAssociatedToResponseHeadersPolicy": + response = { + ...(await deserializeAws_restXmlTooManyDistributionsAssociatedToResponseHeadersPolicyResponse( + parsedOutput, + context + )), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "TooManyDistributionsWithFunctionAssociations": case "com.amazonaws.cloudfront#TooManyDistributionsWithFunctionAssociations": response = { @@ -4462,6 +4759,14 @@ const deserializeAws_restXmlCreateDistributionWithTagsCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "NoSuchResponseHeadersPolicy": + case "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy": + response = { + ...(await deserializeAws_restXmlNoSuchResponseHeadersPolicyResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "RealtimeLogConfigOwnerMismatch": case "com.amazonaws.cloudfront#RealtimeLogConfigOwnerMismatch": response = { @@ -4548,6 +4853,17 @@ const deserializeAws_restXmlCreateDistributionWithTagsCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "TooManyDistributionsAssociatedToResponseHeadersPolicy": + case "com.amazonaws.cloudfront#TooManyDistributionsAssociatedToResponseHeadersPolicy": + response = { + ...(await deserializeAws_restXmlTooManyDistributionsAssociatedToResponseHeadersPolicyResponse( + parsedOutput, + context + )), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "TooManyDistributionsWithFunctionAssociations": case "com.amazonaws.cloudfront#TooManyDistributionsWithFunctionAssociations": response = { @@ -5536,18 +5852,18 @@ const deserializeAws_restXmlCreateRealtimeLogConfigCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restXmlCreateStreamingDistributionCommand = async ( +export const deserializeAws_restXmlCreateResponseHeadersPolicyCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 201 && output.statusCode >= 300) { - return deserializeAws_restXmlCreateStreamingDistributionCommandError(output, context); + return deserializeAws_restXmlCreateResponseHeadersPolicyCommandError(output, context); } - const contents: CreateStreamingDistributionCommandOutput = { + const contents: CreateResponseHeadersPolicyCommandOutput = { $metadata: deserializeMetadata(output), ETag: undefined, Location: undefined, - StreamingDistribution: undefined, + ResponseHeadersPolicy: undefined, }; if (output.headers["location"] !== undefined) { contents.Location = output.headers["location"]; @@ -5556,14 +5872,14 @@ export const deserializeAws_restXmlCreateStreamingDistributionCommand = async ( contents.ETag = output.headers["etag"]; } const data: { [key: string]: any } | undefined = __expectObject(await parseBody(output.body, context)); - contents.StreamingDistribution = deserializeAws_restXmlStreamingDistribution(data, context); + contents.ResponseHeadersPolicy = deserializeAws_restXmlResponseHeadersPolicy(data, context); return Promise.resolve(contents); }; -const deserializeAws_restXmlCreateStreamingDistributionCommandError = async ( +const deserializeAws_restXmlCreateResponseHeadersPolicyCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -5580,14 +5896,6 @@ const deserializeAws_restXmlCreateStreamingDistributionCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "CNAMEAlreadyExists": - case "com.amazonaws.cloudfront#CNAMEAlreadyExists": - response = { - ...(await deserializeAws_restXmlCNAMEAlreadyExistsResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InconsistentQuantities": case "com.amazonaws.cloudfront#InconsistentQuantities": response = { @@ -5604,18 +5912,127 @@ const deserializeAws_restXmlCreateStreamingDistributionCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "InvalidOrigin": - case "com.amazonaws.cloudfront#InvalidOrigin": + case "ResponseHeadersPolicyAlreadyExists": + case "com.amazonaws.cloudfront#ResponseHeadersPolicyAlreadyExists": response = { - ...(await deserializeAws_restXmlInvalidOriginResponse(parsedOutput, context)), + ...(await deserializeAws_restXmlResponseHeadersPolicyAlreadyExistsResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; break; - case "InvalidOriginAccessIdentity": - case "com.amazonaws.cloudfront#InvalidOriginAccessIdentity": + case "TooManyCustomHeadersInResponseHeadersPolicy": + case "com.amazonaws.cloudfront#TooManyCustomHeadersInResponseHeadersPolicy": response = { - ...(await deserializeAws_restXmlInvalidOriginAccessIdentityResponse(parsedOutput, context)), + ...(await deserializeAws_restXmlTooManyCustomHeadersInResponseHeadersPolicyResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyResponseHeadersPolicies": + case "com.amazonaws.cloudfront#TooManyResponseHeadersPolicies": + response = { + ...(await deserializeAws_restXmlTooManyResponseHeadersPoliciesResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restXmlCreateStreamingDistributionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restXmlCreateStreamingDistributionCommandError(output, context); + } + const contents: CreateStreamingDistributionCommandOutput = { + $metadata: deserializeMetadata(output), + ETag: undefined, + Location: undefined, + StreamingDistribution: undefined, + }; + if (output.headers["location"] !== undefined) { + contents.Location = output.headers["location"]; + } + if (output.headers["etag"] !== undefined) { + contents.ETag = output.headers["etag"]; + } + const data: { [key: string]: any } | undefined = __expectObject(await parseBody(output.body, context)); + contents.StreamingDistribution = deserializeAws_restXmlStreamingDistribution(data, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restXmlCreateStreamingDistributionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestXmlErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDenied": + case "com.amazonaws.cloudfront#AccessDenied": + response = { + ...(await deserializeAws_restXmlAccessDeniedResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "CNAMEAlreadyExists": + case "com.amazonaws.cloudfront#CNAMEAlreadyExists": + response = { + ...(await deserializeAws_restXmlCNAMEAlreadyExistsResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InconsistentQuantities": + case "com.amazonaws.cloudfront#InconsistentQuantities": + response = { + ...(await deserializeAws_restXmlInconsistentQuantitiesResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidArgument": + case "com.amazonaws.cloudfront#InvalidArgument": + response = { + ...(await deserializeAws_restXmlInvalidArgumentResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidOrigin": + case "com.amazonaws.cloudfront#InvalidOrigin": + response = { + ...(await deserializeAws_restXmlInvalidOriginResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidOriginAccessIdentity": + case "com.amazonaws.cloudfront#InvalidOriginAccessIdentity": + response = { + ...(await deserializeAws_restXmlInvalidOriginAccessIdentityResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -6739,6 +7156,97 @@ const deserializeAws_restXmlDeleteRealtimeLogConfigCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restXmlDeleteResponseHeadersPolicyCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restXmlDeleteResponseHeadersPolicyCommandError(output, context); + } + const contents: DeleteResponseHeadersPolicyCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restXmlDeleteResponseHeadersPolicyCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestXmlErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDenied": + case "com.amazonaws.cloudfront#AccessDenied": + response = { + ...(await deserializeAws_restXmlAccessDeniedResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "IllegalDelete": + case "com.amazonaws.cloudfront#IllegalDelete": + response = { + ...(await deserializeAws_restXmlIllegalDeleteResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidIfMatchVersion": + case "com.amazonaws.cloudfront#InvalidIfMatchVersion": + response = { + ...(await deserializeAws_restXmlInvalidIfMatchVersionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NoSuchResponseHeadersPolicy": + case "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy": + response = { + ...(await deserializeAws_restXmlNoSuchResponseHeadersPolicyResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PreconditionFailed": + case "com.amazonaws.cloudfront#PreconditionFailed": + response = { + ...(await deserializeAws_restXmlPreconditionFailedResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResponseHeadersPolicyInUse": + case "com.amazonaws.cloudfront#ResponseHeadersPolicyInUse": + response = { + ...(await deserializeAws_restXmlResponseHeadersPolicyInUseResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restXmlDeleteStreamingDistributionCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -8192,30 +8700,30 @@ const deserializeAws_restXmlGetRealtimeLogConfigCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restXmlGetStreamingDistributionCommand = async ( +export const deserializeAws_restXmlGetResponseHeadersPolicyCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetStreamingDistributionCommandError(output, context); + return deserializeAws_restXmlGetResponseHeadersPolicyCommandError(output, context); } - const contents: GetStreamingDistributionCommandOutput = { + const contents: GetResponseHeadersPolicyCommandOutput = { $metadata: deserializeMetadata(output), ETag: undefined, - StreamingDistribution: undefined, + ResponseHeadersPolicy: undefined, }; if (output.headers["etag"] !== undefined) { contents.ETag = output.headers["etag"]; } const data: { [key: string]: any } | undefined = __expectObject(await parseBody(output.body, context)); - contents.StreamingDistribution = deserializeAws_restXmlStreamingDistribution(data, context); + contents.ResponseHeadersPolicy = deserializeAws_restXmlResponseHeadersPolicy(data, context); return Promise.resolve(contents); }; -const deserializeAws_restXmlGetStreamingDistributionCommandError = async ( +const deserializeAws_restXmlGetResponseHeadersPolicyCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -8232,10 +8740,10 @@ const deserializeAws_restXmlGetStreamingDistributionCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "NoSuchStreamingDistribution": - case "com.amazonaws.cloudfront#NoSuchStreamingDistribution": + case "NoSuchResponseHeadersPolicy": + case "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy": response = { - ...(await deserializeAws_restXmlNoSuchStreamingDistributionResponse(parsedOutput, context)), + ...(await deserializeAws_restXmlNoSuchResponseHeadersPolicyResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -8257,30 +8765,30 @@ const deserializeAws_restXmlGetStreamingDistributionCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restXmlGetStreamingDistributionConfigCommand = async ( +export const deserializeAws_restXmlGetResponseHeadersPolicyConfigCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetStreamingDistributionConfigCommandError(output, context); + return deserializeAws_restXmlGetResponseHeadersPolicyConfigCommandError(output, context); } - const contents: GetStreamingDistributionConfigCommandOutput = { + const contents: GetResponseHeadersPolicyConfigCommandOutput = { $metadata: deserializeMetadata(output), ETag: undefined, - StreamingDistributionConfig: undefined, + ResponseHeadersPolicyConfig: undefined, }; if (output.headers["etag"] !== undefined) { contents.ETag = output.headers["etag"]; } const data: { [key: string]: any } | undefined = __expectObject(await parseBody(output.body, context)); - contents.StreamingDistributionConfig = deserializeAws_restXmlStreamingDistributionConfig(data, context); + contents.ResponseHeadersPolicyConfig = deserializeAws_restXmlResponseHeadersPolicyConfig(data, context); return Promise.resolve(contents); }; -const deserializeAws_restXmlGetStreamingDistributionConfigCommandError = async ( +const deserializeAws_restXmlGetResponseHeadersPolicyConfigCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -8297,10 +8805,10 @@ const deserializeAws_restXmlGetStreamingDistributionConfigCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "NoSuchStreamingDistribution": - case "com.amazonaws.cloudfront#NoSuchStreamingDistribution": + case "NoSuchResponseHeadersPolicy": + case "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy": response = { - ...(await deserializeAws_restXmlNoSuchStreamingDistributionResponse(parsedOutput, context)), + ...(await deserializeAws_restXmlNoSuchResponseHeadersPolicyResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -8322,26 +8830,30 @@ const deserializeAws_restXmlGetStreamingDistributionConfigCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restXmlListCachePoliciesCommand = async ( +export const deserializeAws_restXmlGetStreamingDistributionCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlListCachePoliciesCommandError(output, context); + return deserializeAws_restXmlGetStreamingDistributionCommandError(output, context); } - const contents: ListCachePoliciesCommandOutput = { + const contents: GetStreamingDistributionCommandOutput = { $metadata: deserializeMetadata(output), - CachePolicyList: undefined, + ETag: undefined, + StreamingDistribution: undefined, }; + if (output.headers["etag"] !== undefined) { + contents.ETag = output.headers["etag"]; + } const data: { [key: string]: any } | undefined = __expectObject(await parseBody(output.body, context)); - contents.CachePolicyList = deserializeAws_restXmlCachePolicyList(data, context); + contents.StreamingDistribution = deserializeAws_restXmlStreamingDistribution(data, context); return Promise.resolve(contents); }; -const deserializeAws_restXmlListCachePoliciesCommandError = async ( +const deserializeAws_restXmlGetStreamingDistributionCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -8358,18 +8870,10 @@ const deserializeAws_restXmlListCachePoliciesCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "InvalidArgument": - case "com.amazonaws.cloudfront#InvalidArgument": - response = { - ...(await deserializeAws_restXmlInvalidArgumentResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; - case "NoSuchCachePolicy": - case "com.amazonaws.cloudfront#NoSuchCachePolicy": + case "NoSuchStreamingDistribution": + case "com.amazonaws.cloudfront#NoSuchStreamingDistribution": response = { - ...(await deserializeAws_restXmlNoSuchCachePolicyResponse(parsedOutput, context)), + ...(await deserializeAws_restXmlNoSuchStreamingDistributionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -8391,19 +8895,153 @@ const deserializeAws_restXmlListCachePoliciesCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restXmlListCloudFrontOriginAccessIdentitiesCommand = async ( +export const deserializeAws_restXmlGetStreamingDistributionConfigCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlListCloudFrontOriginAccessIdentitiesCommandError(output, context); + return deserializeAws_restXmlGetStreamingDistributionConfigCommandError(output, context); } - const contents: ListCloudFrontOriginAccessIdentitiesCommandOutput = { + const contents: GetStreamingDistributionConfigCommandOutput = { $metadata: deserializeMetadata(output), - CloudFrontOriginAccessIdentityList: undefined, + ETag: undefined, + StreamingDistributionConfig: undefined, }; + if (output.headers["etag"] !== undefined) { + contents.ETag = output.headers["etag"]; + } const data: { [key: string]: any } | undefined = __expectObject(await parseBody(output.body, context)); - contents.CloudFrontOriginAccessIdentityList = deserializeAws_restXmlCloudFrontOriginAccessIdentityList(data, context); + contents.StreamingDistributionConfig = deserializeAws_restXmlStreamingDistributionConfig(data, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restXmlGetStreamingDistributionConfigCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestXmlErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDenied": + case "com.amazonaws.cloudfront#AccessDenied": + response = { + ...(await deserializeAws_restXmlAccessDeniedResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NoSuchStreamingDistribution": + case "com.amazonaws.cloudfront#NoSuchStreamingDistribution": + response = { + ...(await deserializeAws_restXmlNoSuchStreamingDistributionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restXmlListCachePoliciesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restXmlListCachePoliciesCommandError(output, context); + } + const contents: ListCachePoliciesCommandOutput = { + $metadata: deserializeMetadata(output), + CachePolicyList: undefined, + }; + const data: { [key: string]: any } | undefined = __expectObject(await parseBody(output.body, context)); + contents.CachePolicyList = deserializeAws_restXmlCachePolicyList(data, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restXmlListCachePoliciesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestXmlErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDenied": + case "com.amazonaws.cloudfront#AccessDenied": + response = { + ...(await deserializeAws_restXmlAccessDeniedResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidArgument": + case "com.amazonaws.cloudfront#InvalidArgument": + response = { + ...(await deserializeAws_restXmlInvalidArgumentResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NoSuchCachePolicy": + case "com.amazonaws.cloudfront#NoSuchCachePolicy": + response = { + ...(await deserializeAws_restXmlNoSuchCachePolicyResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restXmlListCloudFrontOriginAccessIdentitiesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restXmlListCloudFrontOriginAccessIdentitiesCommandError(output, context); + } + const contents: ListCloudFrontOriginAccessIdentitiesCommandOutput = { + $metadata: deserializeMetadata(output), + CloudFrontOriginAccessIdentityList: undefined, + }; + const data: { [key: string]: any } | undefined = __expectObject(await parseBody(output.body, context)); + contents.CloudFrontOriginAccessIdentityList = deserializeAws_restXmlCloudFrontOriginAccessIdentityList(data, context); return Promise.resolve(contents); }; @@ -8810,6 +9448,75 @@ const deserializeAws_restXmlListDistributionsByRealtimeLogConfigCommandError = a return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restXmlListDistributionsByResponseHeadersPolicyIdCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restXmlListDistributionsByResponseHeadersPolicyIdCommandError(output, context); + } + const contents: ListDistributionsByResponseHeadersPolicyIdCommandOutput = { + $metadata: deserializeMetadata(output), + DistributionIdList: undefined, + }; + const data: { [key: string]: any } | undefined = __expectObject(await parseBody(output.body, context)); + contents.DistributionIdList = deserializeAws_restXmlDistributionIdList(data, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restXmlListDistributionsByResponseHeadersPolicyIdCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestXmlErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDenied": + case "com.amazonaws.cloudfront#AccessDenied": + response = { + ...(await deserializeAws_restXmlAccessDeniedResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidArgument": + case "com.amazonaws.cloudfront#InvalidArgument": + response = { + ...(await deserializeAws_restXmlInvalidArgumentResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NoSuchResponseHeadersPolicy": + case "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy": + response = { + ...(await deserializeAws_restXmlNoSuchResponseHeadersPolicyResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restXmlListDistributionsByWebACLIdCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -9351,6 +10058,75 @@ const deserializeAws_restXmlListRealtimeLogConfigsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restXmlListResponseHeadersPoliciesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restXmlListResponseHeadersPoliciesCommandError(output, context); + } + const contents: ListResponseHeadersPoliciesCommandOutput = { + $metadata: deserializeMetadata(output), + ResponseHeadersPolicyList: undefined, + }; + const data: { [key: string]: any } | undefined = __expectObject(await parseBody(output.body, context)); + contents.ResponseHeadersPolicyList = deserializeAws_restXmlResponseHeadersPolicyList(data, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restXmlListResponseHeadersPoliciesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestXmlErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDenied": + case "com.amazonaws.cloudfront#AccessDenied": + response = { + ...(await deserializeAws_restXmlAccessDeniedResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidArgument": + case "com.amazonaws.cloudfront#InvalidArgument": + response = { + ...(await deserializeAws_restXmlInvalidArgumentResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NoSuchResponseHeadersPolicy": + case "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy": + response = { + ...(await deserializeAws_restXmlNoSuchResponseHeadersPolicyResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restXmlListStreamingDistributionsCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -10350,6 +11126,14 @@ const deserializeAws_restXmlUpdateDistributionCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "NoSuchResponseHeadersPolicy": + case "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy": + response = { + ...(await deserializeAws_restXmlNoSuchResponseHeadersPolicyResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "PreconditionFailed": case "com.amazonaws.cloudfront#PreconditionFailed": response = { @@ -10436,8 +11220,19 @@ const deserializeAws_restXmlUpdateDistributionCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "TooManyDistributionsWithFunctionAssociations": - case "com.amazonaws.cloudfront#TooManyDistributionsWithFunctionAssociations": + case "TooManyDistributionsAssociatedToResponseHeadersPolicy": + case "com.amazonaws.cloudfront#TooManyDistributionsAssociatedToResponseHeadersPolicy": + response = { + ...(await deserializeAws_restXmlTooManyDistributionsAssociatedToResponseHeadersPolicyResponse( + parsedOutput, + context + )), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyDistributionsWithFunctionAssociations": + case "com.amazonaws.cloudfront#TooManyDistributionsWithFunctionAssociations": response = { ...(await deserializeAws_restXmlTooManyDistributionsWithFunctionAssociationsResponse(parsedOutput, context)), name: errorCode, @@ -11354,6 +12149,127 @@ const deserializeAws_restXmlUpdateRealtimeLogConfigCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restXmlUpdateResponseHeadersPolicyCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restXmlUpdateResponseHeadersPolicyCommandError(output, context); + } + const contents: UpdateResponseHeadersPolicyCommandOutput = { + $metadata: deserializeMetadata(output), + ETag: undefined, + ResponseHeadersPolicy: undefined, + }; + if (output.headers["etag"] !== undefined) { + contents.ETag = output.headers["etag"]; + } + const data: { [key: string]: any } | undefined = __expectObject(await parseBody(output.body, context)); + contents.ResponseHeadersPolicy = deserializeAws_restXmlResponseHeadersPolicy(data, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restXmlUpdateResponseHeadersPolicyCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestXmlErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDenied": + case "com.amazonaws.cloudfront#AccessDenied": + response = { + ...(await deserializeAws_restXmlAccessDeniedResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "IllegalUpdate": + case "com.amazonaws.cloudfront#IllegalUpdate": + response = { + ...(await deserializeAws_restXmlIllegalUpdateResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InconsistentQuantities": + case "com.amazonaws.cloudfront#InconsistentQuantities": + response = { + ...(await deserializeAws_restXmlInconsistentQuantitiesResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidArgument": + case "com.amazonaws.cloudfront#InvalidArgument": + response = { + ...(await deserializeAws_restXmlInvalidArgumentResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidIfMatchVersion": + case "com.amazonaws.cloudfront#InvalidIfMatchVersion": + response = { + ...(await deserializeAws_restXmlInvalidIfMatchVersionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "NoSuchResponseHeadersPolicy": + case "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy": + response = { + ...(await deserializeAws_restXmlNoSuchResponseHeadersPolicyResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "PreconditionFailed": + case "com.amazonaws.cloudfront#PreconditionFailed": + response = { + ...(await deserializeAws_restXmlPreconditionFailedResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResponseHeadersPolicyAlreadyExists": + case "com.amazonaws.cloudfront#ResponseHeadersPolicyAlreadyExists": + response = { + ...(await deserializeAws_restXmlResponseHeadersPolicyAlreadyExistsResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "TooManyCustomHeadersInResponseHeadersPolicy": + case "com.amazonaws.cloudfront#TooManyCustomHeadersInResponseHeadersPolicy": + response = { + ...(await deserializeAws_restXmlTooManyCustomHeadersInResponseHeadersPolicyResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.Error.code || parsedBody.Error.Code || errorCode; + response = { + ...parsedBody.Error, + name: `${errorCode}`, + message: parsedBody.Error.message || parsedBody.Error.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restXmlUpdateStreamingDistributionCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -12527,6 +13443,23 @@ const deserializeAws_restXmlNoSuchResourceResponse = async ( return contents; }; +const deserializeAws_restXmlNoSuchResponseHeadersPolicyResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: NoSuchResponseHeadersPolicy = { + name: "NoSuchResponseHeadersPolicy", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Message: undefined, + }; + const data: any = parsedOutput.body.Error; + if (data["Message"] !== undefined) { + contents.Message = __expectString(data["Message"]); + } + return contents; +}; + const deserializeAws_restXmlNoSuchStreamingDistributionResponse = async ( parsedOutput: any, context: __SerdeContext @@ -12714,6 +13647,40 @@ const deserializeAws_restXmlResourceInUseResponse = async ( return contents; }; +const deserializeAws_restXmlResponseHeadersPolicyAlreadyExistsResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ResponseHeadersPolicyAlreadyExists = { + name: "ResponseHeadersPolicyAlreadyExists", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Message: undefined, + }; + const data: any = parsedOutput.body.Error; + if (data["Message"] !== undefined) { + contents.Message = __expectString(data["Message"]); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyInUseResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: ResponseHeadersPolicyInUse = { + name: "ResponseHeadersPolicyInUse", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Message: undefined, + }; + const data: any = parsedOutput.body.Error; + if (data["Message"] !== undefined) { + contents.Message = __expectString(data["Message"]); + } + return contents; +}; + const deserializeAws_restXmlStreamingDistributionAlreadyExistsResponse = async ( parsedOutput: any, context: __SerdeContext @@ -12884,6 +13851,23 @@ const deserializeAws_restXmlTooManyCookiesInOriginRequestPolicyResponse = async return contents; }; +const deserializeAws_restXmlTooManyCustomHeadersInResponseHeadersPolicyResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: TooManyCustomHeadersInResponseHeadersPolicy = { + name: "TooManyCustomHeadersInResponseHeadersPolicy", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Message: undefined, + }; + const data: any = parsedOutput.body.Error; + if (data["Message"] !== undefined) { + contents.Message = __expectString(data["Message"]); + } + return contents; +}; + const deserializeAws_restXmlTooManyDistributionCNAMEsResponse = async ( parsedOutput: any, context: __SerdeContext @@ -12986,6 +13970,23 @@ const deserializeAws_restXmlTooManyDistributionsAssociatedToOriginRequestPolicyR return contents; }; +const deserializeAws_restXmlTooManyDistributionsAssociatedToResponseHeadersPolicyResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: TooManyDistributionsAssociatedToResponseHeadersPolicy = { + name: "TooManyDistributionsAssociatedToResponseHeadersPolicy", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Message: undefined, + }; + const data: any = parsedOutput.body.Error; + if (data["Message"] !== undefined) { + contents.Message = __expectString(data["Message"]); + } + return contents; +}; + const deserializeAws_restXmlTooManyDistributionsWithFunctionAssociationsResponse = async ( parsedOutput: any, context: __SerdeContext @@ -13462,6 +14463,23 @@ const deserializeAws_restXmlTooManyRealtimeLogConfigsResponse = async ( return contents; }; +const deserializeAws_restXmlTooManyResponseHeadersPoliciesResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: TooManyResponseHeadersPolicies = { + name: "TooManyResponseHeadersPolicies", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Message: undefined, + }; + const data: any = parsedOutput.body.Error; + if (data["Message"] !== undefined) { + contents.Message = __expectString(data["Message"]); + } + return contents; +}; + const deserializeAws_restXmlTooManyStreamingDistributionCNAMEsResponse = async ( parsedOutput: any, context: __SerdeContext @@ -13564,6 +14582,59 @@ const deserializeAws_restXmlUnsupportedOperationResponse = async ( return contents; }; +const serializeAws_restXmlAccessControlAllowHeadersList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + const node = new __XmlNode("string").addChildNode(new __XmlText(entry)); + return node.withName("Header"); + }); +}; + +const serializeAws_restXmlAccessControlAllowMethodsList = ( + input: (ResponseHeadersPolicyAccessControlAllowMethodsValues | string)[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + const node = new __XmlNode("ResponseHeadersPolicyAccessControlAllowMethodsValues").addChildNode( + new __XmlText(entry) + ); + return node.withName("Method"); + }); +}; + +const serializeAws_restXmlAccessControlAllowOriginsList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + const node = new __XmlNode("string").addChildNode(new __XmlText(entry)); + return node.withName("Origin"); + }); +}; + +const serializeAws_restXmlAccessControlExposeHeadersList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + const node = new __XmlNode("string").addChildNode(new __XmlText(entry)); + return node.withName("Header"); + }); +}; + const serializeAws_restXmlAliases = (input: Aliases, context: __SerdeContext): any => { const bodyNode = new __XmlNode("Aliases"); if (input.Quantity !== undefined && input.Quantity !== null) { @@ -13698,6 +14769,12 @@ const serializeAws_restXmlCacheBehavior = (input: CacheBehavior, context: __Serd .withName("OriginRequestPolicyId"); bodyNode.addChildNode(node); } + if (input.ResponseHeadersPolicyId !== undefined && input.ResponseHeadersPolicyId !== null) { + const node = new __XmlNode("string") + .addChildNode(new __XmlText(input.ResponseHeadersPolicyId)) + .withName("ResponseHeadersPolicyId"); + bodyNode.addChildNode(node); + } if (input.ForwardedValues !== undefined && input.ForwardedValues !== null) { const node = serializeAws_restXmlForwardedValues(input.ForwardedValues, context).withName("ForwardedValues"); bodyNode.addChildNode(node); @@ -14152,6 +15229,12 @@ const serializeAws_restXmlDefaultCacheBehavior = (input: DefaultCacheBehavior, c .withName("OriginRequestPolicyId"); bodyNode.addChildNode(node); } + if (input.ResponseHeadersPolicyId !== undefined && input.ResponseHeadersPolicyId !== null) { + const node = new __XmlNode("string") + .addChildNode(new __XmlText(input.ResponseHeadersPolicyId)) + .withName("ResponseHeadersPolicyId"); + bodyNode.addChildNode(node); + } if (input.ForwardedValues !== undefined && input.ForwardedValues !== null) { const node = serializeAws_restXmlForwardedValues(input.ForwardedValues, context).withName("ForwardedValues"); bodyNode.addChildNode(node); @@ -14789,7 +15872,9 @@ const serializeAws_restXmlOriginCustomHeader = (input: OriginCustomHeader, conte bodyNode.addChildNode(node); } if (input.HeaderValue !== undefined && input.HeaderValue !== null) { - const node = new __XmlNode("string").addChildNode(new __XmlText(input.HeaderValue)).withName("HeaderValue"); + const node = new __XmlNode("sensitiveStringType") + .addChildNode(new __XmlText(input.HeaderValue)) + .withName("HeaderValue"); bodyNode.addChildNode(node); } return bodyNode; @@ -15279,10 +16364,398 @@ const serializeAws_restXmlRealtimeMetricsSubscriptionConfig = ( return bodyNode; }; -const serializeAws_restXmlRestrictions = (input: Restrictions, context: __SerdeContext): any => { - const bodyNode = new __XmlNode("Restrictions"); - if (input.GeoRestriction !== undefined && input.GeoRestriction !== null) { - const node = serializeAws_restXmlGeoRestriction(input.GeoRestriction, context).withName("GeoRestriction"); +const serializeAws_restXmlResponseHeadersPolicyAccessControlAllowHeaders = ( + input: ResponseHeadersPolicyAccessControlAllowHeaders, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyAccessControlAllowHeaders"); + if (input.Quantity !== undefined && input.Quantity !== null) { + const node = new __XmlNode("integer").addChildNode(new __XmlText(String(input.Quantity))).withName("Quantity"); + bodyNode.addChildNode(node); + } + if (input.Items !== undefined && input.Items !== null) { + const nodes = serializeAws_restXmlAccessControlAllowHeadersList(input.Items, context); + const containerNode = new __XmlNode("Items"); + nodes.map((node: any) => { + containerNode.addChildNode(node); + }); + bodyNode.addChildNode(containerNode); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicyAccessControlAllowMethods = ( + input: ResponseHeadersPolicyAccessControlAllowMethods, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyAccessControlAllowMethods"); + if (input.Quantity !== undefined && input.Quantity !== null) { + const node = new __XmlNode("integer").addChildNode(new __XmlText(String(input.Quantity))).withName("Quantity"); + bodyNode.addChildNode(node); + } + if (input.Items !== undefined && input.Items !== null) { + const nodes = serializeAws_restXmlAccessControlAllowMethodsList(input.Items, context); + const containerNode = new __XmlNode("Items"); + nodes.map((node: any) => { + containerNode.addChildNode(node); + }); + bodyNode.addChildNode(containerNode); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicyAccessControlAllowOrigins = ( + input: ResponseHeadersPolicyAccessControlAllowOrigins, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyAccessControlAllowOrigins"); + if (input.Quantity !== undefined && input.Quantity !== null) { + const node = new __XmlNode("integer").addChildNode(new __XmlText(String(input.Quantity))).withName("Quantity"); + bodyNode.addChildNode(node); + } + if (input.Items !== undefined && input.Items !== null) { + const nodes = serializeAws_restXmlAccessControlAllowOriginsList(input.Items, context); + const containerNode = new __XmlNode("Items"); + nodes.map((node: any) => { + containerNode.addChildNode(node); + }); + bodyNode.addChildNode(containerNode); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicyAccessControlExposeHeaders = ( + input: ResponseHeadersPolicyAccessControlExposeHeaders, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyAccessControlExposeHeaders"); + if (input.Quantity !== undefined && input.Quantity !== null) { + const node = new __XmlNode("integer").addChildNode(new __XmlText(String(input.Quantity))).withName("Quantity"); + bodyNode.addChildNode(node); + } + if (input.Items !== undefined && input.Items !== null) { + const nodes = serializeAws_restXmlAccessControlExposeHeadersList(input.Items, context); + const containerNode = new __XmlNode("Items"); + nodes.map((node: any) => { + containerNode.addChildNode(node); + }); + bodyNode.addChildNode(containerNode); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicyConfig = ( + input: ResponseHeadersPolicyConfig, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyConfig"); + if (input.Comment !== undefined && input.Comment !== null) { + const node = new __XmlNode("string").addChildNode(new __XmlText(input.Comment)).withName("Comment"); + bodyNode.addChildNode(node); + } + if (input.Name !== undefined && input.Name !== null) { + const node = new __XmlNode("string").addChildNode(new __XmlText(input.Name)).withName("Name"); + bodyNode.addChildNode(node); + } + if (input.CorsConfig !== undefined && input.CorsConfig !== null) { + const node = serializeAws_restXmlResponseHeadersPolicyCorsConfig(input.CorsConfig, context).withName("CorsConfig"); + bodyNode.addChildNode(node); + } + if (input.SecurityHeadersConfig !== undefined && input.SecurityHeadersConfig !== null) { + const node = serializeAws_restXmlResponseHeadersPolicySecurityHeadersConfig( + input.SecurityHeadersConfig, + context + ).withName("SecurityHeadersConfig"); + bodyNode.addChildNode(node); + } + if (input.CustomHeadersConfig !== undefined && input.CustomHeadersConfig !== null) { + const node = serializeAws_restXmlResponseHeadersPolicyCustomHeadersConfig( + input.CustomHeadersConfig, + context + ).withName("CustomHeadersConfig"); + bodyNode.addChildNode(node); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicyContentSecurityPolicy = ( + input: ResponseHeadersPolicyContentSecurityPolicy, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyContentSecurityPolicy"); + if (input.Override !== undefined && input.Override !== null) { + const node = new __XmlNode("boolean").addChildNode(new __XmlText(String(input.Override))).withName("Override"); + bodyNode.addChildNode(node); + } + if (input.ContentSecurityPolicy !== undefined && input.ContentSecurityPolicy !== null) { + const node = new __XmlNode("string") + .addChildNode(new __XmlText(input.ContentSecurityPolicy)) + .withName("ContentSecurityPolicy"); + bodyNode.addChildNode(node); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicyContentTypeOptions = ( + input: ResponseHeadersPolicyContentTypeOptions, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyContentTypeOptions"); + if (input.Override !== undefined && input.Override !== null) { + const node = new __XmlNode("boolean").addChildNode(new __XmlText(String(input.Override))).withName("Override"); + bodyNode.addChildNode(node); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicyCorsConfig = ( + input: ResponseHeadersPolicyCorsConfig, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyCorsConfig"); + if (input.AccessControlAllowOrigins !== undefined && input.AccessControlAllowOrigins !== null) { + const node = serializeAws_restXmlResponseHeadersPolicyAccessControlAllowOrigins( + input.AccessControlAllowOrigins, + context + ).withName("AccessControlAllowOrigins"); + bodyNode.addChildNode(node); + } + if (input.AccessControlAllowHeaders !== undefined && input.AccessControlAllowHeaders !== null) { + const node = serializeAws_restXmlResponseHeadersPolicyAccessControlAllowHeaders( + input.AccessControlAllowHeaders, + context + ).withName("AccessControlAllowHeaders"); + bodyNode.addChildNode(node); + } + if (input.AccessControlAllowMethods !== undefined && input.AccessControlAllowMethods !== null) { + const node = serializeAws_restXmlResponseHeadersPolicyAccessControlAllowMethods( + input.AccessControlAllowMethods, + context + ).withName("AccessControlAllowMethods"); + bodyNode.addChildNode(node); + } + if (input.AccessControlAllowCredentials !== undefined && input.AccessControlAllowCredentials !== null) { + const node = new __XmlNode("boolean") + .addChildNode(new __XmlText(String(input.AccessControlAllowCredentials))) + .withName("AccessControlAllowCredentials"); + bodyNode.addChildNode(node); + } + if (input.AccessControlExposeHeaders !== undefined && input.AccessControlExposeHeaders !== null) { + const node = serializeAws_restXmlResponseHeadersPolicyAccessControlExposeHeaders( + input.AccessControlExposeHeaders, + context + ).withName("AccessControlExposeHeaders"); + bodyNode.addChildNode(node); + } + if (input.AccessControlMaxAgeSec !== undefined && input.AccessControlMaxAgeSec !== null) { + const node = new __XmlNode("integer") + .addChildNode(new __XmlText(String(input.AccessControlMaxAgeSec))) + .withName("AccessControlMaxAgeSec"); + bodyNode.addChildNode(node); + } + if (input.OriginOverride !== undefined && input.OriginOverride !== null) { + const node = new __XmlNode("boolean") + .addChildNode(new __XmlText(String(input.OriginOverride))) + .withName("OriginOverride"); + bodyNode.addChildNode(node); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicyCustomHeader = ( + input: ResponseHeadersPolicyCustomHeader, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyCustomHeader"); + if (input.Header !== undefined && input.Header !== null) { + const node = new __XmlNode("string").addChildNode(new __XmlText(input.Header)).withName("Header"); + bodyNode.addChildNode(node); + } + if (input.Value !== undefined && input.Value !== null) { + const node = new __XmlNode("string").addChildNode(new __XmlText(input.Value)).withName("Value"); + bodyNode.addChildNode(node); + } + if (input.Override !== undefined && input.Override !== null) { + const node = new __XmlNode("boolean").addChildNode(new __XmlText(String(input.Override))).withName("Override"); + bodyNode.addChildNode(node); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicyCustomHeaderList = ( + input: ResponseHeadersPolicyCustomHeader[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + const node = serializeAws_restXmlResponseHeadersPolicyCustomHeader(entry, context); + return node.withName("ResponseHeadersPolicyCustomHeader"); + }); +}; + +const serializeAws_restXmlResponseHeadersPolicyCustomHeadersConfig = ( + input: ResponseHeadersPolicyCustomHeadersConfig, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyCustomHeadersConfig"); + if (input.Quantity !== undefined && input.Quantity !== null) { + const node = new __XmlNode("integer").addChildNode(new __XmlText(String(input.Quantity))).withName("Quantity"); + bodyNode.addChildNode(node); + } + if (input.Items !== undefined && input.Items !== null) { + const nodes = serializeAws_restXmlResponseHeadersPolicyCustomHeaderList(input.Items, context); + const containerNode = new __XmlNode("Items"); + nodes.map((node: any) => { + containerNode.addChildNode(node); + }); + bodyNode.addChildNode(containerNode); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicyFrameOptions = ( + input: ResponseHeadersPolicyFrameOptions, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyFrameOptions"); + if (input.Override !== undefined && input.Override !== null) { + const node = new __XmlNode("boolean").addChildNode(new __XmlText(String(input.Override))).withName("Override"); + bodyNode.addChildNode(node); + } + if (input.FrameOption !== undefined && input.FrameOption !== null) { + const node = new __XmlNode("FrameOptionsList") + .addChildNode(new __XmlText(input.FrameOption)) + .withName("FrameOption"); + bodyNode.addChildNode(node); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicyReferrerPolicy = ( + input: ResponseHeadersPolicyReferrerPolicy, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyReferrerPolicy"); + if (input.Override !== undefined && input.Override !== null) { + const node = new __XmlNode("boolean").addChildNode(new __XmlText(String(input.Override))).withName("Override"); + bodyNode.addChildNode(node); + } + if (input.ReferrerPolicy !== undefined && input.ReferrerPolicy !== null) { + const node = new __XmlNode("ReferrerPolicyList") + .addChildNode(new __XmlText(input.ReferrerPolicy)) + .withName("ReferrerPolicy"); + bodyNode.addChildNode(node); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicySecurityHeadersConfig = ( + input: ResponseHeadersPolicySecurityHeadersConfig, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicySecurityHeadersConfig"); + if (input.XSSProtection !== undefined && input.XSSProtection !== null) { + const node = serializeAws_restXmlResponseHeadersPolicyXSSProtection(input.XSSProtection, context).withName( + "XSSProtection" + ); + bodyNode.addChildNode(node); + } + if (input.FrameOptions !== undefined && input.FrameOptions !== null) { + const node = serializeAws_restXmlResponseHeadersPolicyFrameOptions(input.FrameOptions, context).withName( + "FrameOptions" + ); + bodyNode.addChildNode(node); + } + if (input.ReferrerPolicy !== undefined && input.ReferrerPolicy !== null) { + const node = serializeAws_restXmlResponseHeadersPolicyReferrerPolicy(input.ReferrerPolicy, context).withName( + "ReferrerPolicy" + ); + bodyNode.addChildNode(node); + } + if (input.ContentSecurityPolicy !== undefined && input.ContentSecurityPolicy !== null) { + const node = serializeAws_restXmlResponseHeadersPolicyContentSecurityPolicy( + input.ContentSecurityPolicy, + context + ).withName("ContentSecurityPolicy"); + bodyNode.addChildNode(node); + } + if (input.ContentTypeOptions !== undefined && input.ContentTypeOptions !== null) { + const node = serializeAws_restXmlResponseHeadersPolicyContentTypeOptions( + input.ContentTypeOptions, + context + ).withName("ContentTypeOptions"); + bodyNode.addChildNode(node); + } + if (input.StrictTransportSecurity !== undefined && input.StrictTransportSecurity !== null) { + const node = serializeAws_restXmlResponseHeadersPolicyStrictTransportSecurity( + input.StrictTransportSecurity, + context + ).withName("StrictTransportSecurity"); + bodyNode.addChildNode(node); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicyStrictTransportSecurity = ( + input: ResponseHeadersPolicyStrictTransportSecurity, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyStrictTransportSecurity"); + if (input.Override !== undefined && input.Override !== null) { + const node = new __XmlNode("boolean").addChildNode(new __XmlText(String(input.Override))).withName("Override"); + bodyNode.addChildNode(node); + } + if (input.IncludeSubdomains !== undefined && input.IncludeSubdomains !== null) { + const node = new __XmlNode("boolean") + .addChildNode(new __XmlText(String(input.IncludeSubdomains))) + .withName("IncludeSubdomains"); + bodyNode.addChildNode(node); + } + if (input.Preload !== undefined && input.Preload !== null) { + const node = new __XmlNode("boolean").addChildNode(new __XmlText(String(input.Preload))).withName("Preload"); + bodyNode.addChildNode(node); + } + if (input.AccessControlMaxAgeSec !== undefined && input.AccessControlMaxAgeSec !== null) { + const node = new __XmlNode("integer") + .addChildNode(new __XmlText(String(input.AccessControlMaxAgeSec))) + .withName("AccessControlMaxAgeSec"); + bodyNode.addChildNode(node); + } + return bodyNode; +}; + +const serializeAws_restXmlResponseHeadersPolicyXSSProtection = ( + input: ResponseHeadersPolicyXSSProtection, + context: __SerdeContext +): any => { + const bodyNode = new __XmlNode("ResponseHeadersPolicyXSSProtection"); + if (input.Override !== undefined && input.Override !== null) { + const node = new __XmlNode("boolean").addChildNode(new __XmlText(String(input.Override))).withName("Override"); + bodyNode.addChildNode(node); + } + if (input.Protection !== undefined && input.Protection !== null) { + const node = new __XmlNode("boolean").addChildNode(new __XmlText(String(input.Protection))).withName("Protection"); + bodyNode.addChildNode(node); + } + if (input.ModeBlock !== undefined && input.ModeBlock !== null) { + const node = new __XmlNode("boolean").addChildNode(new __XmlText(String(input.ModeBlock))).withName("ModeBlock"); + bodyNode.addChildNode(node); + } + if (input.ReportUri !== undefined && input.ReportUri !== null) { + const node = new __XmlNode("string").addChildNode(new __XmlText(input.ReportUri)).withName("ReportUri"); + bodyNode.addChildNode(node); + } + return bodyNode; +}; + +const serializeAws_restXmlRestrictions = (input: Restrictions, context: __SerdeContext): any => { + const bodyNode = new __XmlNode("Restrictions"); + if (input.GeoRestriction !== undefined && input.GeoRestriction !== null) { + const node = serializeAws_restXmlGeoRestriction(input.GeoRestriction, context).withName("GeoRestriction"); bodyNode.addChildNode(node); } return bodyNode; @@ -15592,33 +17065,80 @@ const serializeAws_restXmlViewerCertificate = (input: ViewerCertificate, context return bodyNode; }; -const deserializeAws_restXmlActiveTrustedKeyGroups = (output: any, context: __SerdeContext): ActiveTrustedKeyGroups => { - const contents: any = { - Enabled: undefined, - Quantity: undefined, - Items: undefined, - }; - if (output["Enabled"] !== undefined) { - contents.Enabled = __parseBoolean(output["Enabled"]); - } - if (output["Quantity"] !== undefined) { - contents.Quantity = __strictParseInt32(output["Quantity"]) as number; - } - if (output.Items === "") { - contents.Items = []; - } - if (output["Items"] !== undefined && output["Items"]["KeyGroup"] !== undefined) { - contents.Items = deserializeAws_restXmlKGKeyPairIdsList( - __getArrayIfSingleItem(output["Items"]["KeyGroup"]), - context - ); - } - return contents; -}; - -const deserializeAws_restXmlActiveTrustedSigners = (output: any, context: __SerdeContext): ActiveTrustedSigners => { - const contents: any = { - Enabled: undefined, +const deserializeAws_restXmlAccessControlAllowHeadersList = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restXmlAccessControlAllowMethodsList = ( + output: any, + context: __SerdeContext +): (ResponseHeadersPolicyAccessControlAllowMethodsValues | string)[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restXmlAccessControlAllowOriginsList = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restXmlAccessControlExposeHeadersList = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_restXmlActiveTrustedKeyGroups = (output: any, context: __SerdeContext): ActiveTrustedKeyGroups => { + const contents: any = { + Enabled: undefined, + Quantity: undefined, + Items: undefined, + }; + if (output["Enabled"] !== undefined) { + contents.Enabled = __parseBoolean(output["Enabled"]); + } + if (output["Quantity"] !== undefined) { + contents.Quantity = __strictParseInt32(output["Quantity"]) as number; + } + if (output.Items === "") { + contents.Items = []; + } + if (output["Items"] !== undefined && output["Items"]["KeyGroup"] !== undefined) { + contents.Items = deserializeAws_restXmlKGKeyPairIdsList( + __getArrayIfSingleItem(output["Items"]["KeyGroup"]), + context + ); + } + return contents; +}; + +const deserializeAws_restXmlActiveTrustedSigners = (output: any, context: __SerdeContext): ActiveTrustedSigners => { + const contents: any = { + Enabled: undefined, Quantity: undefined, Items: undefined, }; @@ -15738,6 +17258,7 @@ const deserializeAws_restXmlCacheBehavior = (output: any, context: __SerdeContex RealtimeLogConfigArn: undefined, CachePolicyId: undefined, OriginRequestPolicyId: undefined, + ResponseHeadersPolicyId: undefined, ForwardedValues: undefined, MinTTL: undefined, DefaultTTL: undefined, @@ -15788,6 +17309,9 @@ const deserializeAws_restXmlCacheBehavior = (output: any, context: __SerdeContex if (output["OriginRequestPolicyId"] !== undefined) { contents.OriginRequestPolicyId = __expectString(output["OriginRequestPolicyId"]); } + if (output["ResponseHeadersPolicyId"] !== undefined) { + contents.ResponseHeadersPolicyId = __expectString(output["ResponseHeadersPolicyId"]); + } if (output["ForwardedValues"] !== undefined) { contents.ForwardedValues = deserializeAws_restXmlForwardedValues(output["ForwardedValues"], context); } @@ -16404,6 +17928,7 @@ const deserializeAws_restXmlDefaultCacheBehavior = (output: any, context: __Serd RealtimeLogConfigArn: undefined, CachePolicyId: undefined, OriginRequestPolicyId: undefined, + ResponseHeadersPolicyId: undefined, ForwardedValues: undefined, MinTTL: undefined, DefaultTTL: undefined, @@ -16451,6 +17976,9 @@ const deserializeAws_restXmlDefaultCacheBehavior = (output: any, context: __Serd if (output["OriginRequestPolicyId"] !== undefined) { contents.OriginRequestPolicyId = __expectString(output["OriginRequestPolicyId"]); } + if (output["ResponseHeadersPolicyId"] !== undefined) { + contents.ResponseHeadersPolicyId = __expectString(output["ResponseHeadersPolicyId"]); + } if (output["ForwardedValues"] !== undefined) { contents.ForwardedValues = deserializeAws_restXmlForwardedValues(output["ForwardedValues"], context); } @@ -18536,6 +20064,485 @@ const deserializeAws_restXmlRealtimeMetricsSubscriptionConfig = ( return contents; }; +const deserializeAws_restXmlResponseHeadersPolicy = (output: any, context: __SerdeContext): ResponseHeadersPolicy => { + const contents: any = { + Id: undefined, + LastModifiedTime: undefined, + ResponseHeadersPolicyConfig: undefined, + }; + if (output["Id"] !== undefined) { + contents.Id = __expectString(output["Id"]); + } + if (output["LastModifiedTime"] !== undefined) { + contents.LastModifiedTime = __expectNonNull(__parseRfc3339DateTime(output["LastModifiedTime"])); + } + if (output["ResponseHeadersPolicyConfig"] !== undefined) { + contents.ResponseHeadersPolicyConfig = deserializeAws_restXmlResponseHeadersPolicyConfig( + output["ResponseHeadersPolicyConfig"], + context + ); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyAccessControlAllowHeaders = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyAccessControlAllowHeaders => { + const contents: any = { + Quantity: undefined, + Items: undefined, + }; + if (output["Quantity"] !== undefined) { + contents.Quantity = __strictParseInt32(output["Quantity"]) as number; + } + if (output.Items === "") { + contents.Items = []; + } + if (output["Items"] !== undefined && output["Items"]["Header"] !== undefined) { + contents.Items = deserializeAws_restXmlAccessControlAllowHeadersList( + __getArrayIfSingleItem(output["Items"]["Header"]), + context + ); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyAccessControlAllowMethods = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyAccessControlAllowMethods => { + const contents: any = { + Quantity: undefined, + Items: undefined, + }; + if (output["Quantity"] !== undefined) { + contents.Quantity = __strictParseInt32(output["Quantity"]) as number; + } + if (output.Items === "") { + contents.Items = []; + } + if (output["Items"] !== undefined && output["Items"]["Method"] !== undefined) { + contents.Items = deserializeAws_restXmlAccessControlAllowMethodsList( + __getArrayIfSingleItem(output["Items"]["Method"]), + context + ); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyAccessControlAllowOrigins = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyAccessControlAllowOrigins => { + const contents: any = { + Quantity: undefined, + Items: undefined, + }; + if (output["Quantity"] !== undefined) { + contents.Quantity = __strictParseInt32(output["Quantity"]) as number; + } + if (output.Items === "") { + contents.Items = []; + } + if (output["Items"] !== undefined && output["Items"]["Origin"] !== undefined) { + contents.Items = deserializeAws_restXmlAccessControlAllowOriginsList( + __getArrayIfSingleItem(output["Items"]["Origin"]), + context + ); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyAccessControlExposeHeaders = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyAccessControlExposeHeaders => { + const contents: any = { + Quantity: undefined, + Items: undefined, + }; + if (output["Quantity"] !== undefined) { + contents.Quantity = __strictParseInt32(output["Quantity"]) as number; + } + if (output.Items === "") { + contents.Items = []; + } + if (output["Items"] !== undefined && output["Items"]["Header"] !== undefined) { + contents.Items = deserializeAws_restXmlAccessControlExposeHeadersList( + __getArrayIfSingleItem(output["Items"]["Header"]), + context + ); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyConfig = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyConfig => { + const contents: any = { + Comment: undefined, + Name: undefined, + CorsConfig: undefined, + SecurityHeadersConfig: undefined, + CustomHeadersConfig: undefined, + }; + if (output["Comment"] !== undefined) { + contents.Comment = __expectString(output["Comment"]); + } + if (output["Name"] !== undefined) { + contents.Name = __expectString(output["Name"]); + } + if (output["CorsConfig"] !== undefined) { + contents.CorsConfig = deserializeAws_restXmlResponseHeadersPolicyCorsConfig(output["CorsConfig"], context); + } + if (output["SecurityHeadersConfig"] !== undefined) { + contents.SecurityHeadersConfig = deserializeAws_restXmlResponseHeadersPolicySecurityHeadersConfig( + output["SecurityHeadersConfig"], + context + ); + } + if (output["CustomHeadersConfig"] !== undefined) { + contents.CustomHeadersConfig = deserializeAws_restXmlResponseHeadersPolicyCustomHeadersConfig( + output["CustomHeadersConfig"], + context + ); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyContentSecurityPolicy = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyContentSecurityPolicy => { + const contents: any = { + Override: undefined, + ContentSecurityPolicy: undefined, + }; + if (output["Override"] !== undefined) { + contents.Override = __parseBoolean(output["Override"]); + } + if (output["ContentSecurityPolicy"] !== undefined) { + contents.ContentSecurityPolicy = __expectString(output["ContentSecurityPolicy"]); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyContentTypeOptions = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyContentTypeOptions => { + const contents: any = { + Override: undefined, + }; + if (output["Override"] !== undefined) { + contents.Override = __parseBoolean(output["Override"]); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyCorsConfig = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyCorsConfig => { + const contents: any = { + AccessControlAllowOrigins: undefined, + AccessControlAllowHeaders: undefined, + AccessControlAllowMethods: undefined, + AccessControlAllowCredentials: undefined, + AccessControlExposeHeaders: undefined, + AccessControlMaxAgeSec: undefined, + OriginOverride: undefined, + }; + if (output["AccessControlAllowOrigins"] !== undefined) { + contents.AccessControlAllowOrigins = deserializeAws_restXmlResponseHeadersPolicyAccessControlAllowOrigins( + output["AccessControlAllowOrigins"], + context + ); + } + if (output["AccessControlAllowHeaders"] !== undefined) { + contents.AccessControlAllowHeaders = deserializeAws_restXmlResponseHeadersPolicyAccessControlAllowHeaders( + output["AccessControlAllowHeaders"], + context + ); + } + if (output["AccessControlAllowMethods"] !== undefined) { + contents.AccessControlAllowMethods = deserializeAws_restXmlResponseHeadersPolicyAccessControlAllowMethods( + output["AccessControlAllowMethods"], + context + ); + } + if (output["AccessControlAllowCredentials"] !== undefined) { + contents.AccessControlAllowCredentials = __parseBoolean(output["AccessControlAllowCredentials"]); + } + if (output["AccessControlExposeHeaders"] !== undefined) { + contents.AccessControlExposeHeaders = deserializeAws_restXmlResponseHeadersPolicyAccessControlExposeHeaders( + output["AccessControlExposeHeaders"], + context + ); + } + if (output["AccessControlMaxAgeSec"] !== undefined) { + contents.AccessControlMaxAgeSec = __strictParseInt32(output["AccessControlMaxAgeSec"]) as number; + } + if (output["OriginOverride"] !== undefined) { + contents.OriginOverride = __parseBoolean(output["OriginOverride"]); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyCustomHeader = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyCustomHeader => { + const contents: any = { + Header: undefined, + Value: undefined, + Override: undefined, + }; + if (output["Header"] !== undefined) { + contents.Header = __expectString(output["Header"]); + } + if (output["Value"] !== undefined) { + contents.Value = __expectString(output["Value"]); + } + if (output["Override"] !== undefined) { + contents.Override = __parseBoolean(output["Override"]); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyCustomHeaderList = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyCustomHeader[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restXmlResponseHeadersPolicyCustomHeader(entry, context); + }); +}; + +const deserializeAws_restXmlResponseHeadersPolicyCustomHeadersConfig = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyCustomHeadersConfig => { + const contents: any = { + Quantity: undefined, + Items: undefined, + }; + if (output["Quantity"] !== undefined) { + contents.Quantity = __strictParseInt32(output["Quantity"]) as number; + } + if (output.Items === "") { + contents.Items = []; + } + if (output["Items"] !== undefined && output["Items"]["ResponseHeadersPolicyCustomHeader"] !== undefined) { + contents.Items = deserializeAws_restXmlResponseHeadersPolicyCustomHeaderList( + __getArrayIfSingleItem(output["Items"]["ResponseHeadersPolicyCustomHeader"]), + context + ); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyFrameOptions = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyFrameOptions => { + const contents: any = { + Override: undefined, + FrameOption: undefined, + }; + if (output["Override"] !== undefined) { + contents.Override = __parseBoolean(output["Override"]); + } + if (output["FrameOption"] !== undefined) { + contents.FrameOption = __expectString(output["FrameOption"]); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyList = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyList => { + const contents: any = { + NextMarker: undefined, + MaxItems: undefined, + Quantity: undefined, + Items: undefined, + }; + if (output["NextMarker"] !== undefined) { + contents.NextMarker = __expectString(output["NextMarker"]); + } + if (output["MaxItems"] !== undefined) { + contents.MaxItems = __strictParseInt32(output["MaxItems"]) as number; + } + if (output["Quantity"] !== undefined) { + contents.Quantity = __strictParseInt32(output["Quantity"]) as number; + } + if (output.Items === "") { + contents.Items = []; + } + if (output["Items"] !== undefined && output["Items"]["ResponseHeadersPolicySummary"] !== undefined) { + contents.Items = deserializeAws_restXmlResponseHeadersPolicySummaryList( + __getArrayIfSingleItem(output["Items"]["ResponseHeadersPolicySummary"]), + context + ); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyReferrerPolicy = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyReferrerPolicy => { + const contents: any = { + Override: undefined, + ReferrerPolicy: undefined, + }; + if (output["Override"] !== undefined) { + contents.Override = __parseBoolean(output["Override"]); + } + if (output["ReferrerPolicy"] !== undefined) { + contents.ReferrerPolicy = __expectString(output["ReferrerPolicy"]); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicySecurityHeadersConfig = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicySecurityHeadersConfig => { + const contents: any = { + XSSProtection: undefined, + FrameOptions: undefined, + ReferrerPolicy: undefined, + ContentSecurityPolicy: undefined, + ContentTypeOptions: undefined, + StrictTransportSecurity: undefined, + }; + if (output["XSSProtection"] !== undefined) { + contents.XSSProtection = deserializeAws_restXmlResponseHeadersPolicyXSSProtection(output["XSSProtection"], context); + } + if (output["FrameOptions"] !== undefined) { + contents.FrameOptions = deserializeAws_restXmlResponseHeadersPolicyFrameOptions(output["FrameOptions"], context); + } + if (output["ReferrerPolicy"] !== undefined) { + contents.ReferrerPolicy = deserializeAws_restXmlResponseHeadersPolicyReferrerPolicy( + output["ReferrerPolicy"], + context + ); + } + if (output["ContentSecurityPolicy"] !== undefined) { + contents.ContentSecurityPolicy = deserializeAws_restXmlResponseHeadersPolicyContentSecurityPolicy( + output["ContentSecurityPolicy"], + context + ); + } + if (output["ContentTypeOptions"] !== undefined) { + contents.ContentTypeOptions = deserializeAws_restXmlResponseHeadersPolicyContentTypeOptions( + output["ContentTypeOptions"], + context + ); + } + if (output["StrictTransportSecurity"] !== undefined) { + contents.StrictTransportSecurity = deserializeAws_restXmlResponseHeadersPolicyStrictTransportSecurity( + output["StrictTransportSecurity"], + context + ); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicyStrictTransportSecurity = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyStrictTransportSecurity => { + const contents: any = { + Override: undefined, + IncludeSubdomains: undefined, + Preload: undefined, + AccessControlMaxAgeSec: undefined, + }; + if (output["Override"] !== undefined) { + contents.Override = __parseBoolean(output["Override"]); + } + if (output["IncludeSubdomains"] !== undefined) { + contents.IncludeSubdomains = __parseBoolean(output["IncludeSubdomains"]); + } + if (output["Preload"] !== undefined) { + contents.Preload = __parseBoolean(output["Preload"]); + } + if (output["AccessControlMaxAgeSec"] !== undefined) { + contents.AccessControlMaxAgeSec = __strictParseInt32(output["AccessControlMaxAgeSec"]) as number; + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicySummary = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicySummary => { + const contents: any = { + Type: undefined, + ResponseHeadersPolicy: undefined, + }; + if (output["Type"] !== undefined) { + contents.Type = __expectString(output["Type"]); + } + if (output["ResponseHeadersPolicy"] !== undefined) { + contents.ResponseHeadersPolicy = deserializeAws_restXmlResponseHeadersPolicy( + output["ResponseHeadersPolicy"], + context + ); + } + return contents; +}; + +const deserializeAws_restXmlResponseHeadersPolicySummaryList = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicySummary[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restXmlResponseHeadersPolicySummary(entry, context); + }); +}; + +const deserializeAws_restXmlResponseHeadersPolicyXSSProtection = ( + output: any, + context: __SerdeContext +): ResponseHeadersPolicyXSSProtection => { + const contents: any = { + Override: undefined, + Protection: undefined, + ModeBlock: undefined, + ReportUri: undefined, + }; + if (output["Override"] !== undefined) { + contents.Override = __parseBoolean(output["Override"]); + } + if (output["Protection"] !== undefined) { + contents.Protection = __parseBoolean(output["Protection"]); + } + if (output["ModeBlock"] !== undefined) { + contents.ModeBlock = __parseBoolean(output["ModeBlock"]); + } + if (output["ReportUri"] !== undefined) { + contents.ReportUri = __expectString(output["ReportUri"]); + } + return contents; +}; + const deserializeAws_restXmlRestrictions = (output: any, context: __SerdeContext): Restrictions => { const contents: any = { GeoRestriction: undefined, diff --git a/clients/client-connect/README.md b/clients/client-connect/README.md index 351d69986ce6..9ff2373a703c 100644 --- a/clients/client-connect/README.md +++ b/clients/client-connect/README.md @@ -17,7 +17,7 @@ to the number of requests that you can make per second. For more information, se Service Quotas in the Amazon Connect Administrator Guide.

    You can connect -programmatically to an AWS service by using an endpoint. For a list of Amazon Connect endpoints, see +programmatically to an Amazon Web Services service by using an endpoint. For a list of Amazon Connect endpoints, see Amazon Connect Endpoints.

    diff --git a/clients/client-connect/src/Connect.ts b/clients/client-connect/src/Connect.ts index a3d327853872..cd6cffca5516 100644 --- a/clients/client-connect/src/Connect.ts +++ b/clients/client-connect/src/Connect.ts @@ -76,6 +76,11 @@ import { CreateRoutingProfileCommandInput, CreateRoutingProfileCommandOutput, } from "./commands/CreateRoutingProfileCommand"; +import { + CreateSecurityProfileCommand, + CreateSecurityProfileCommandInput, + CreateSecurityProfileCommandOutput, +} from "./commands/CreateSecurityProfileCommand"; import { CreateUseCaseCommand, CreateUseCaseCommandInput, @@ -107,6 +112,11 @@ import { DeleteQuickConnectCommandInput, DeleteQuickConnectCommandOutput, } from "./commands/DeleteQuickConnectCommand"; +import { + DeleteSecurityProfileCommand, + DeleteSecurityProfileCommandInput, + DeleteSecurityProfileCommandOutput, +} from "./commands/DeleteSecurityProfileCommand"; import { DeleteUseCaseCommand, DeleteUseCaseCommandInput, @@ -163,6 +173,11 @@ import { DescribeRoutingProfileCommandInput, DescribeRoutingProfileCommandOutput, } from "./commands/DescribeRoutingProfileCommand"; +import { + DescribeSecurityProfileCommand, + DescribeSecurityProfileCommandInput, + DescribeSecurityProfileCommandOutput, +} from "./commands/DescribeSecurityProfileCommand"; import { DescribeUserCommand, DescribeUserCommandInput, @@ -317,6 +332,11 @@ import { ListSecurityKeysCommandInput, ListSecurityKeysCommandOutput, } from "./commands/ListSecurityKeysCommand"; +import { + ListSecurityProfilePermissionsCommand, + ListSecurityProfilePermissionsCommandInput, + ListSecurityProfilePermissionsCommandOutput, +} from "./commands/ListSecurityProfilePermissionsCommand"; import { ListSecurityProfilesCommand, ListSecurityProfilesCommandInput, @@ -353,6 +373,11 @@ import { StartContactRecordingCommandInput, StartContactRecordingCommandOutput, } from "./commands/StartContactRecordingCommand"; +import { + StartContactStreamingCommand, + StartContactStreamingCommandInput, + StartContactStreamingCommandOutput, +} from "./commands/StartContactStreamingCommand"; import { StartOutboundVoiceContactCommand, StartOutboundVoiceContactCommandInput, @@ -369,6 +394,11 @@ import { StopContactRecordingCommandInput, StopContactRecordingCommandOutput, } from "./commands/StopContactRecordingCommand"; +import { + StopContactStreamingCommand, + StopContactStreamingCommandInput, + StopContactStreamingCommandOutput, +} from "./commands/StopContactStreamingCommand"; import { SuspendContactRecordingCommand, SuspendContactRecordingCommandInput, @@ -470,6 +500,11 @@ import { UpdateRoutingProfileQueuesCommandInput, UpdateRoutingProfileQueuesCommandOutput, } from "./commands/UpdateRoutingProfileQueuesCommand"; +import { + UpdateSecurityProfileCommand, + UpdateSecurityProfileCommandInput, + UpdateSecurityProfileCommandOutput, +} from "./commands/UpdateSecurityProfileCommand"; import { UpdateUserHierarchyCommand, UpdateUserHierarchyCommandInput, @@ -518,7 +553,7 @@ import { ConnectClient } from "./ConnectClient"; * Service Quotas in the Amazon Connect Administrator Guide.

    *

    You can * connect - * programmatically to an AWS service by using an endpoint. For a list of Amazon Connect endpoints, see + * programmatically to an Amazon Web Services service by using an endpoint. For a list of Amazon Connect endpoints, see * Amazon Connect * Endpoints.

    * @@ -929,7 +964,7 @@ export class Connect extends ConnectClient { } /** - *

    Creates an AWS resource association with an Amazon Connect instance.

    + *

    Creates an Amazon Web Services resource association with an Amazon Connect instance.

    */ public createIntegrationAssociation( args: CreateIntegrationAssociationCommandInput, @@ -1051,6 +1086,39 @@ export class Connect extends ConnectClient { } } + /** + *

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

    + *

    Creates a security profile.

    + */ + public createSecurityProfile( + args: CreateSecurityProfileCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createSecurityProfile( + args: CreateSecurityProfileCommandInput, + cb: (err: any, data?: CreateSecurityProfileCommandOutput) => void + ): void; + public createSecurityProfile( + args: CreateSecurityProfileCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateSecurityProfileCommandOutput) => void + ): void; + public createSecurityProfile( + args: CreateSecurityProfileCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateSecurityProfileCommandOutput) => void), + cb?: (err: any, data?: CreateSecurityProfileCommandOutput) => void + ): Promise | void { + const command = new CreateSecurityProfileCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Creates a use case for an integration association.

    */ @@ -1212,7 +1280,7 @@ export class Connect extends ConnectClient { } /** - *

    Deletes an AWS resource association from an Amazon Connect instance. The association must not have + *

    Deletes an Amazon Web Services resource association from an Amazon Connect instance. The association must not have * any use cases associated with it.

    */ public deleteIntegrationAssociation( @@ -1276,6 +1344,39 @@ export class Connect extends ConnectClient { } } + /** + *

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

    + *

    Deletes a security profile.

    + */ + public deleteSecurityProfile( + args: DeleteSecurityProfileCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteSecurityProfile( + args: DeleteSecurityProfileCommandInput, + cb: (err: any, data?: DeleteSecurityProfileCommandOutput) => void + ): void; + public deleteSecurityProfile( + args: DeleteSecurityProfileCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteSecurityProfileCommandOutput) => void + ): void; + public deleteSecurityProfile( + args: DeleteSecurityProfileCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteSecurityProfileCommandOutput) => void), + cb?: (err: any, data?: DeleteSecurityProfileCommandOutput) => void + ): Promise | void { + const command = new DeleteSecurityProfileCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Deletes a use case from an integration association.

    */ @@ -1670,6 +1771,39 @@ export class Connect extends ConnectClient { } } + /** + *

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

    + *

    Gets basic information about the security profle.

    + */ + public describeSecurityProfile( + args: DescribeSecurityProfileCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeSecurityProfile( + args: DescribeSecurityProfileCommandInput, + cb: (err: any, data?: DescribeSecurityProfileCommandOutput) => void + ): void; + public describeSecurityProfile( + args: DescribeSecurityProfileCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeSecurityProfileCommandOutput) => void + ): void; + public describeSecurityProfile( + args: DescribeSecurityProfileCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeSecurityProfileCommandOutput) => void), + cb?: (err: any, data?: DescribeSecurityProfileCommandOutput) => void + ): Promise | void { + const command = new DescribeSecurityProfileCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Describes the specified user account. You can find the instance ID in the console (it’s the * final part of the ARN). The console does not display the user IDs. Instead, list the users and @@ -2440,7 +2574,7 @@ export class Connect extends ConnectClient { } /** - *

    Provides summary information about the AWS resource associations for the specified Amazon Connect + *

    Provides summary information about the Amazon Web Services resource associations for the specified Amazon Connect * instance.

    */ public listIntegrationAssociations( @@ -2792,7 +2926,41 @@ export class Connect extends ConnectClient { } /** - *

    Provides summary information about the security profiles for the specified Amazon Connect + *

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

    + *

    Lists the permissions granted to a security profile.

    + */ + public listSecurityProfilePermissions( + args: ListSecurityProfilePermissionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listSecurityProfilePermissions( + args: ListSecurityProfilePermissionsCommandInput, + cb: (err: any, data?: ListSecurityProfilePermissionsCommandOutput) => void + ): void; + public listSecurityProfilePermissions( + args: ListSecurityProfilePermissionsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListSecurityProfilePermissionsCommandOutput) => void + ): void; + public listSecurityProfilePermissions( + args: ListSecurityProfilePermissionsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListSecurityProfilePermissionsCommandOutput) => void), + cb?: (err: any, data?: ListSecurityProfilePermissionsCommandOutput) => void + ): Promise | void { + const command = new ListSecurityProfilePermissionsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

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

    + *

    Provides summary information about the security profiles for the specified Amazon Connect * instance.

    *

    For more information about security profiles, see Security Profiles in the * Amazon Connect Administrator Guide.

    @@ -3076,6 +3244,40 @@ export class Connect extends ConnectClient { } } + /** + *

    Initiates real-time message streaming for a new chat contact.

    + *

    For more information about message streaming, see Enable real-time chat message + * streaming in the Amazon Connect Administrator Guide.

    + */ + public startContactStreaming( + args: StartContactStreamingCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startContactStreaming( + args: StartContactStreamingCommandInput, + cb: (err: any, data?: StartContactStreamingCommandOutput) => void + ): void; + public startContactStreaming( + args: StartContactStreamingCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartContactStreamingCommandOutput) => void + ): void; + public startContactStreaming( + args: StartContactStreamingCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartContactStreamingCommandOutput) => void), + cb?: (err: any, data?: StartContactStreamingCommandOutput) => void + ): Promise | void { + const command = new StartContactStreamingCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Places an outbound call to a contact, and then initiates the contact flow. It performs the * actions in the contact flow that's specified (in ContactFlowId).

    @@ -3222,6 +3424,40 @@ export class Connect extends ConnectClient { } } + /** + *

    Ends message streaming on a specified contact. To restart message streaming on that + * contact, call the StartContactStreaming + * API.

    + */ + public stopContactStreaming( + args: StopContactStreamingCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public stopContactStreaming( + args: StopContactStreamingCommandInput, + cb: (err: any, data?: StopContactStreamingCommandOutput) => void + ): void; + public stopContactStreaming( + args: StopContactStreamingCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StopContactStreamingCommandOutput) => void + ): void; + public stopContactStreaming( + args: StopContactStreamingCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StopContactStreamingCommandOutput) => void), + cb?: (err: any, data?: StopContactStreamingCommandOutput) => void + ): Promise | void { + const command = new StopContactStreamingCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    When a contact is being recorded, this API suspends recording the call. For example, you * might suspend the call recording while collecting sensitive information, such as a credit card @@ -3934,6 +4170,39 @@ export class Connect extends ConnectClient { } } + /** + *

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

    + *

    Updates a security profile.

    + */ + public updateSecurityProfile( + args: UpdateSecurityProfileCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateSecurityProfile( + args: UpdateSecurityProfileCommandInput, + cb: (err: any, data?: UpdateSecurityProfileCommandOutput) => void + ): void; + public updateSecurityProfile( + args: UpdateSecurityProfileCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateSecurityProfileCommandOutput) => void + ): void; + public updateSecurityProfile( + args: UpdateSecurityProfileCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateSecurityProfileCommandOutput) => void), + cb?: (err: any, data?: UpdateSecurityProfileCommandOutput) => void + ): Promise | void { + const command = new UpdateSecurityProfileCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Assigns the specified hierarchy group to the specified user.

    */ diff --git a/clients/client-connect/src/ConnectClient.ts b/clients/client-connect/src/ConnectClient.ts index 26ac34e7d3d5..ea94233daf79 100644 --- a/clients/client-connect/src/ConnectClient.ts +++ b/clients/client-connect/src/ConnectClient.ts @@ -92,6 +92,10 @@ import { CreateRoutingProfileCommandInput, CreateRoutingProfileCommandOutput, } from "./commands/CreateRoutingProfileCommand"; +import { + CreateSecurityProfileCommandInput, + CreateSecurityProfileCommandOutput, +} from "./commands/CreateSecurityProfileCommand"; import { CreateUseCaseCommandInput, CreateUseCaseCommandOutput } from "./commands/CreateUseCaseCommand"; import { CreateUserCommandInput, CreateUserCommandOutput } from "./commands/CreateUserCommand"; import { @@ -108,6 +112,10 @@ import { DeleteIntegrationAssociationCommandOutput, } from "./commands/DeleteIntegrationAssociationCommand"; import { DeleteQuickConnectCommandInput, DeleteQuickConnectCommandOutput } from "./commands/DeleteQuickConnectCommand"; +import { + DeleteSecurityProfileCommandInput, + DeleteSecurityProfileCommandOutput, +} from "./commands/DeleteSecurityProfileCommand"; import { DeleteUseCaseCommandInput, DeleteUseCaseCommandOutput } from "./commands/DeleteUseCaseCommand"; import { DeleteUserCommandInput, DeleteUserCommandOutput } from "./commands/DeleteUserCommand"; import { @@ -144,6 +152,10 @@ import { DescribeRoutingProfileCommandInput, DescribeRoutingProfileCommandOutput, } from "./commands/DescribeRoutingProfileCommand"; +import { + DescribeSecurityProfileCommandInput, + DescribeSecurityProfileCommandOutput, +} from "./commands/DescribeSecurityProfileCommand"; import { DescribeUserCommandInput, DescribeUserCommandOutput } from "./commands/DescribeUserCommand"; import { DescribeUserHierarchyGroupCommandInput, @@ -235,6 +247,10 @@ import { ListRoutingProfilesCommandOutput, } from "./commands/ListRoutingProfilesCommand"; import { ListSecurityKeysCommandInput, ListSecurityKeysCommandOutput } from "./commands/ListSecurityKeysCommand"; +import { + ListSecurityProfilePermissionsCommandInput, + ListSecurityProfilePermissionsCommandOutput, +} from "./commands/ListSecurityProfilePermissionsCommand"; import { ListSecurityProfilesCommandInput, ListSecurityProfilesCommandOutput, @@ -258,6 +274,10 @@ import { StartContactRecordingCommandInput, StartContactRecordingCommandOutput, } from "./commands/StartContactRecordingCommand"; +import { + StartContactStreamingCommandInput, + StartContactStreamingCommandOutput, +} from "./commands/StartContactStreamingCommand"; import { StartOutboundVoiceContactCommandInput, StartOutboundVoiceContactCommandOutput, @@ -268,6 +288,10 @@ import { StopContactRecordingCommandInput, StopContactRecordingCommandOutput, } from "./commands/StopContactRecordingCommand"; +import { + StopContactStreamingCommandInput, + StopContactStreamingCommandOutput, +} from "./commands/StopContactStreamingCommand"; import { SuspendContactRecordingCommandInput, SuspendContactRecordingCommandOutput, @@ -337,6 +361,10 @@ import { UpdateRoutingProfileQueuesCommandInput, UpdateRoutingProfileQueuesCommandOutput, } from "./commands/UpdateRoutingProfileQueuesCommand"; +import { + UpdateSecurityProfileCommandInput, + UpdateSecurityProfileCommandOutput, +} from "./commands/UpdateSecurityProfileCommand"; import { UpdateUserHierarchyCommandInput, UpdateUserHierarchyCommandOutput, @@ -384,6 +412,7 @@ export type ServiceInputTypes = | CreateQueueCommandInput | CreateQuickConnectCommandInput | CreateRoutingProfileCommandInput + | CreateSecurityProfileCommandInput | CreateUseCaseCommandInput | CreateUserCommandInput | CreateUserHierarchyGroupCommandInput @@ -391,6 +420,7 @@ export type ServiceInputTypes = | DeleteInstanceCommandInput | DeleteIntegrationAssociationCommandInput | DeleteQuickConnectCommandInput + | DeleteSecurityProfileCommandInput | DeleteUseCaseCommandInput | DeleteUserCommandInput | DeleteUserHierarchyGroupCommandInput @@ -403,6 +433,7 @@ export type ServiceInputTypes = | DescribeQueueCommandInput | DescribeQuickConnectCommandInput | DescribeRoutingProfileCommandInput + | DescribeSecurityProfileCommandInput | DescribeUserCommandInput | DescribeUserHierarchyGroupCommandInput | DescribeUserHierarchyStructureCommandInput @@ -437,6 +468,7 @@ export type ServiceInputTypes = | ListRoutingProfileQueuesCommandInput | ListRoutingProfilesCommandInput | ListSecurityKeysCommandInput + | ListSecurityProfilePermissionsCommandInput | ListSecurityProfilesCommandInput | ListTagsForResourceCommandInput | ListUseCasesCommandInput @@ -445,10 +477,12 @@ export type ServiceInputTypes = | ResumeContactRecordingCommandInput | StartChatContactCommandInput | StartContactRecordingCommandInput + | StartContactStreamingCommandInput | StartOutboundVoiceContactCommandInput | StartTaskContactCommandInput | StopContactCommandInput | StopContactRecordingCommandInput + | StopContactStreamingCommandInput | SuspendContactRecordingCommandInput | TagResourceCommandInput | UntagResourceCommandInput @@ -470,6 +504,7 @@ export type ServiceInputTypes = | UpdateRoutingProfileDefaultOutboundQueueCommandInput | UpdateRoutingProfileNameCommandInput | UpdateRoutingProfileQueuesCommandInput + | UpdateSecurityProfileCommandInput | UpdateUserHierarchyCommandInput | UpdateUserHierarchyGroupNameCommandInput | UpdateUserHierarchyStructureCommandInput @@ -495,6 +530,7 @@ export type ServiceOutputTypes = | CreateQueueCommandOutput | CreateQuickConnectCommandOutput | CreateRoutingProfileCommandOutput + | CreateSecurityProfileCommandOutput | CreateUseCaseCommandOutput | CreateUserCommandOutput | CreateUserHierarchyGroupCommandOutput @@ -502,6 +538,7 @@ export type ServiceOutputTypes = | DeleteInstanceCommandOutput | DeleteIntegrationAssociationCommandOutput | DeleteQuickConnectCommandOutput + | DeleteSecurityProfileCommandOutput | DeleteUseCaseCommandOutput | DeleteUserCommandOutput | DeleteUserHierarchyGroupCommandOutput @@ -514,6 +551,7 @@ export type ServiceOutputTypes = | DescribeQueueCommandOutput | DescribeQuickConnectCommandOutput | DescribeRoutingProfileCommandOutput + | DescribeSecurityProfileCommandOutput | DescribeUserCommandOutput | DescribeUserHierarchyGroupCommandOutput | DescribeUserHierarchyStructureCommandOutput @@ -548,6 +586,7 @@ export type ServiceOutputTypes = | ListRoutingProfileQueuesCommandOutput | ListRoutingProfilesCommandOutput | ListSecurityKeysCommandOutput + | ListSecurityProfilePermissionsCommandOutput | ListSecurityProfilesCommandOutput | ListTagsForResourceCommandOutput | ListUseCasesCommandOutput @@ -556,10 +595,12 @@ export type ServiceOutputTypes = | ResumeContactRecordingCommandOutput | StartChatContactCommandOutput | StartContactRecordingCommandOutput + | StartContactStreamingCommandOutput | StartOutboundVoiceContactCommandOutput | StartTaskContactCommandOutput | StopContactCommandOutput | StopContactRecordingCommandOutput + | StopContactStreamingCommandOutput | SuspendContactRecordingCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput @@ -581,6 +622,7 @@ export type ServiceOutputTypes = | UpdateRoutingProfileDefaultOutboundQueueCommandOutput | UpdateRoutingProfileNameCommandOutput | UpdateRoutingProfileQueuesCommandOutput + | UpdateSecurityProfileCommandOutput | UpdateUserHierarchyCommandOutput | UpdateUserHierarchyGroupNameCommandOutput | UpdateUserHierarchyStructureCommandOutput @@ -748,7 +790,7 @@ export interface ConnectClientResolvedConfig extends ConnectClientResolvedConfig * Service Quotas in the Amazon Connect Administrator Guide.

    *

    You can * connect - * programmatically to an AWS service by using an endpoint. For a list of Amazon Connect endpoints, see + * programmatically to an Amazon Web Services service by using an endpoint. For a list of Amazon Connect endpoints, see * Amazon Connect * Endpoints.

    * diff --git a/clients/client-connect/src/commands/CreateIntegrationAssociationCommand.ts b/clients/client-connect/src/commands/CreateIntegrationAssociationCommand.ts index 2cef9d04667e..2635defd9c94 100644 --- a/clients/client-connect/src/commands/CreateIntegrationAssociationCommand.ts +++ b/clients/client-connect/src/commands/CreateIntegrationAssociationCommand.ts @@ -24,7 +24,7 @@ export interface CreateIntegrationAssociationCommandOutput __MetadataBearer {} /** - *

    Creates an AWS resource association with an Amazon Connect instance.

    + *

    Creates an Amazon Web Services resource association with an Amazon Connect instance.

    * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-connect/src/commands/CreateSecurityProfileCommand.ts b/clients/client-connect/src/commands/CreateSecurityProfileCommand.ts new file mode 100644 index 000000000000..385773437c5f --- /dev/null +++ b/clients/client-connect/src/commands/CreateSecurityProfileCommand.ts @@ -0,0 +1,96 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { CreateSecurityProfileRequest, CreateSecurityProfileResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateSecurityProfileCommand, + serializeAws_restJson1CreateSecurityProfileCommand, +} from "../protocols/Aws_restJson1"; + +export interface CreateSecurityProfileCommandInput extends CreateSecurityProfileRequest {} +export interface CreateSecurityProfileCommandOutput extends CreateSecurityProfileResponse, __MetadataBearer {} + +/** + *

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

    + *

    Creates a security profile.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, CreateSecurityProfileCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, CreateSecurityProfileCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new CreateSecurityProfileCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateSecurityProfileCommandInput} for command's `input` shape. + * @see {@link CreateSecurityProfileCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateSecurityProfileCommand extends $Command< + CreateSecurityProfileCommandInput, + CreateSecurityProfileCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateSecurityProfileCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "CreateSecurityProfileCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateSecurityProfileRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateSecurityProfileResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateSecurityProfileCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateSecurityProfileCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1CreateSecurityProfileCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/DeleteIntegrationAssociationCommand.ts b/clients/client-connect/src/commands/DeleteIntegrationAssociationCommand.ts index 62425034ca4e..07c5c777f346 100644 --- a/clients/client-connect/src/commands/DeleteIntegrationAssociationCommand.ts +++ b/clients/client-connect/src/commands/DeleteIntegrationAssociationCommand.ts @@ -22,7 +22,7 @@ export interface DeleteIntegrationAssociationCommandInput extends DeleteIntegrat export interface DeleteIntegrationAssociationCommandOutput extends __MetadataBearer {} /** - *

    Deletes an AWS resource association from an Amazon Connect instance. The association must not have + *

    Deletes an Amazon Web Services resource association from an Amazon Connect instance. The association must not have * any use cases associated with it.

    * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-connect/src/commands/DeleteSecurityProfileCommand.ts b/clients/client-connect/src/commands/DeleteSecurityProfileCommand.ts new file mode 100644 index 000000000000..f0469ff08718 --- /dev/null +++ b/clients/client-connect/src/commands/DeleteSecurityProfileCommand.ts @@ -0,0 +1,96 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { DeleteSecurityProfileRequest } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteSecurityProfileCommand, + serializeAws_restJson1DeleteSecurityProfileCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteSecurityProfileCommandInput extends DeleteSecurityProfileRequest {} +export interface DeleteSecurityProfileCommandOutput extends __MetadataBearer {} + +/** + *

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

    + *

    Deletes a security profile.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, DeleteSecurityProfileCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, DeleteSecurityProfileCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new DeleteSecurityProfileCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteSecurityProfileCommandInput} for command's `input` shape. + * @see {@link DeleteSecurityProfileCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteSecurityProfileCommand extends $Command< + DeleteSecurityProfileCommandInput, + DeleteSecurityProfileCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteSecurityProfileCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "DeleteSecurityProfileCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteSecurityProfileRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteSecurityProfileCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteSecurityProfileCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteSecurityProfileCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/DescribeSecurityProfileCommand.ts b/clients/client-connect/src/commands/DescribeSecurityProfileCommand.ts new file mode 100644 index 000000000000..89a0e5871f2f --- /dev/null +++ b/clients/client-connect/src/commands/DescribeSecurityProfileCommand.ts @@ -0,0 +1,96 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { DescribeSecurityProfileRequest, DescribeSecurityProfileResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DescribeSecurityProfileCommand, + serializeAws_restJson1DescribeSecurityProfileCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribeSecurityProfileCommandInput extends DescribeSecurityProfileRequest {} +export interface DescribeSecurityProfileCommandOutput extends DescribeSecurityProfileResponse, __MetadataBearer {} + +/** + *

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

    + *

    Gets basic information about the security profle.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, DescribeSecurityProfileCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, DescribeSecurityProfileCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new DescribeSecurityProfileCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeSecurityProfileCommandInput} for command's `input` shape. + * @see {@link DescribeSecurityProfileCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DescribeSecurityProfileCommand extends $Command< + DescribeSecurityProfileCommandInput, + DescribeSecurityProfileCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeSecurityProfileCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "DescribeSecurityProfileCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeSecurityProfileRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeSecurityProfileResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeSecurityProfileCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DescribeSecurityProfileCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DescribeSecurityProfileCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/ListIntegrationAssociationsCommand.ts b/clients/client-connect/src/commands/ListIntegrationAssociationsCommand.ts index 553bee306b38..1edfb4203f1a 100644 --- a/clients/client-connect/src/commands/ListIntegrationAssociationsCommand.ts +++ b/clients/client-connect/src/commands/ListIntegrationAssociationsCommand.ts @@ -24,7 +24,7 @@ export interface ListIntegrationAssociationsCommandOutput __MetadataBearer {} /** - *

    Provides summary information about the AWS resource associations for the specified Amazon Connect + *

    Provides summary information about the Amazon Web Services resource associations for the specified Amazon Connect * instance.

    * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-connect/src/commands/ListSecurityProfilePermissionsCommand.ts b/clients/client-connect/src/commands/ListSecurityProfilePermissionsCommand.ts new file mode 100644 index 000000000000..9ff6bf55e8c2 --- /dev/null +++ b/clients/client-connect/src/commands/ListSecurityProfilePermissionsCommand.ts @@ -0,0 +1,104 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { ListSecurityProfilePermissionsRequest, ListSecurityProfilePermissionsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListSecurityProfilePermissionsCommand, + serializeAws_restJson1ListSecurityProfilePermissionsCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListSecurityProfilePermissionsCommandInput extends ListSecurityProfilePermissionsRequest {} +export interface ListSecurityProfilePermissionsCommandOutput + extends ListSecurityProfilePermissionsResponse, + __MetadataBearer {} + +/** + *

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

    + *

    Lists the permissions granted to a security profile.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, ListSecurityProfilePermissionsCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, ListSecurityProfilePermissionsCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new ListSecurityProfilePermissionsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListSecurityProfilePermissionsCommandInput} for command's `input` shape. + * @see {@link ListSecurityProfilePermissionsCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListSecurityProfilePermissionsCommand extends $Command< + ListSecurityProfilePermissionsCommandInput, + ListSecurityProfilePermissionsCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListSecurityProfilePermissionsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "ListSecurityProfilePermissionsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListSecurityProfilePermissionsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListSecurityProfilePermissionsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListSecurityProfilePermissionsCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1ListSecurityProfilePermissionsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1ListSecurityProfilePermissionsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/ListSecurityProfilesCommand.ts b/clients/client-connect/src/commands/ListSecurityProfilesCommand.ts index 271f5d2b6b24..0d0223a1e05b 100644 --- a/clients/client-connect/src/commands/ListSecurityProfilesCommand.ts +++ b/clients/client-connect/src/commands/ListSecurityProfilesCommand.ts @@ -22,7 +22,8 @@ export interface ListSecurityProfilesCommandInput extends ListSecurityProfilesRe export interface ListSecurityProfilesCommandOutput extends ListSecurityProfilesResponse, __MetadataBearer {} /** - *

    Provides summary information about the security profiles for the specified Amazon Connect + *

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

    + *

    Provides summary information about the security profiles for the specified Amazon Connect * instance.

    *

    For more information about security profiles, see Security Profiles in the * Amazon Connect Administrator Guide.

    diff --git a/clients/client-connect/src/commands/StartContactStreamingCommand.ts b/clients/client-connect/src/commands/StartContactStreamingCommand.ts new file mode 100644 index 000000000000..e82ffe87c08d --- /dev/null +++ b/clients/client-connect/src/commands/StartContactStreamingCommand.ts @@ -0,0 +1,97 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { StartContactStreamingRequest, StartContactStreamingResponse } from "../models/models_0"; +import { + deserializeAws_restJson1StartContactStreamingCommand, + serializeAws_restJson1StartContactStreamingCommand, +} from "../protocols/Aws_restJson1"; + +export interface StartContactStreamingCommandInput extends StartContactStreamingRequest {} +export interface StartContactStreamingCommandOutput extends StartContactStreamingResponse, __MetadataBearer {} + +/** + *

    Initiates real-time message streaming for a new chat contact.

    + *

    For more information about message streaming, see Enable real-time chat message + * streaming in the Amazon Connect Administrator Guide.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, StartContactStreamingCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, StartContactStreamingCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new StartContactStreamingCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartContactStreamingCommandInput} for command's `input` shape. + * @see {@link StartContactStreamingCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for command's `input` shape. + * + */ +export class StartContactStreamingCommand extends $Command< + StartContactStreamingCommandInput, + StartContactStreamingCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartContactStreamingCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "StartContactStreamingCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartContactStreamingRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartContactStreamingResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StartContactStreamingCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StartContactStreamingCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1StartContactStreamingCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/StopContactStreamingCommand.ts b/clients/client-connect/src/commands/StopContactStreamingCommand.ts new file mode 100644 index 000000000000..d5570201e753 --- /dev/null +++ b/clients/client-connect/src/commands/StopContactStreamingCommand.ts @@ -0,0 +1,97 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { StopContactStreamingRequest, StopContactStreamingResponse } from "../models/models_0"; +import { + deserializeAws_restJson1StopContactStreamingCommand, + serializeAws_restJson1StopContactStreamingCommand, +} from "../protocols/Aws_restJson1"; + +export interface StopContactStreamingCommandInput extends StopContactStreamingRequest {} +export interface StopContactStreamingCommandOutput extends StopContactStreamingResponse, __MetadataBearer {} + +/** + *

    Ends message streaming on a specified contact. To restart message streaming on that + * contact, call the StartContactStreaming + * API.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, StopContactStreamingCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, StopContactStreamingCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new StopContactStreamingCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StopContactStreamingCommandInput} for command's `input` shape. + * @see {@link StopContactStreamingCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for command's `input` shape. + * + */ +export class StopContactStreamingCommand extends $Command< + StopContactStreamingCommandInput, + StopContactStreamingCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StopContactStreamingCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "StopContactStreamingCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StopContactStreamingRequest.filterSensitiveLog, + outputFilterSensitiveLog: StopContactStreamingResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StopContactStreamingCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StopContactStreamingCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1StopContactStreamingCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/UpdateSecurityProfileCommand.ts b/clients/client-connect/src/commands/UpdateSecurityProfileCommand.ts new file mode 100644 index 000000000000..4a2a8199b661 --- /dev/null +++ b/clients/client-connect/src/commands/UpdateSecurityProfileCommand.ts @@ -0,0 +1,96 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { UpdateSecurityProfileRequest } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateSecurityProfileCommand, + serializeAws_restJson1UpdateSecurityProfileCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateSecurityProfileCommandInput extends UpdateSecurityProfileRequest {} +export interface UpdateSecurityProfileCommandOutput extends __MetadataBearer {} + +/** + *

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

    + *

    Updates a security profile.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, UpdateSecurityProfileCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, UpdateSecurityProfileCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new UpdateSecurityProfileCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateSecurityProfileCommandInput} for command's `input` shape. + * @see {@link UpdateSecurityProfileCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateSecurityProfileCommand extends $Command< + UpdateSecurityProfileCommandInput, + UpdateSecurityProfileCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateSecurityProfileCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "UpdateSecurityProfileCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateSecurityProfileRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateSecurityProfileCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateSecurityProfileCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UpdateSecurityProfileCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/UpdateUserPhoneConfigCommand.ts b/clients/client-connect/src/commands/UpdateUserPhoneConfigCommand.ts index e4b6d9d7605c..04363eff2f50 100644 --- a/clients/client-connect/src/commands/UpdateUserPhoneConfigCommand.ts +++ b/clients/client-connect/src/commands/UpdateUserPhoneConfigCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateUserPhoneConfigRequest } from "../models/models_0"; +import { UpdateUserPhoneConfigRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateUserPhoneConfigCommand, serializeAws_restJson1UpdateUserPhoneConfigCommand, diff --git a/clients/client-connect/src/commands/UpdateUserRoutingProfileCommand.ts b/clients/client-connect/src/commands/UpdateUserRoutingProfileCommand.ts index abd525a190a8..a98f38de4dfa 100644 --- a/clients/client-connect/src/commands/UpdateUserRoutingProfileCommand.ts +++ b/clients/client-connect/src/commands/UpdateUserRoutingProfileCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateUserRoutingProfileRequest } from "../models/models_0"; +import { UpdateUserRoutingProfileRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateUserRoutingProfileCommand, serializeAws_restJson1UpdateUserRoutingProfileCommand, diff --git a/clients/client-connect/src/commands/UpdateUserSecurityProfilesCommand.ts b/clients/client-connect/src/commands/UpdateUserSecurityProfilesCommand.ts index c89536e7f3c9..b3356e27574c 100644 --- a/clients/client-connect/src/commands/UpdateUserSecurityProfilesCommand.ts +++ b/clients/client-connect/src/commands/UpdateUserSecurityProfilesCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { UpdateUserSecurityProfilesRequest } from "../models/models_0"; +import { UpdateUserSecurityProfilesRequest } from "../models/models_1"; import { deserializeAws_restJson1UpdateUserSecurityProfilesCommand, serializeAws_restJson1UpdateUserSecurityProfilesCommand, diff --git a/clients/client-connect/src/commands/index.ts b/clients/client-connect/src/commands/index.ts index 6e549f52297c..35aeebbd2abb 100644 --- a/clients/client-connect/src/commands/index.ts +++ b/clients/client-connect/src/commands/index.ts @@ -14,6 +14,7 @@ export * from "./CreateIntegrationAssociationCommand"; export * from "./CreateQueueCommand"; export * from "./CreateQuickConnectCommand"; export * from "./CreateRoutingProfileCommand"; +export * from "./CreateSecurityProfileCommand"; export * from "./CreateUseCaseCommand"; export * from "./CreateUserCommand"; export * from "./CreateUserHierarchyGroupCommand"; @@ -21,6 +22,7 @@ export * from "./DeleteHoursOfOperationCommand"; export * from "./DeleteInstanceCommand"; export * from "./DeleteIntegrationAssociationCommand"; export * from "./DeleteQuickConnectCommand"; +export * from "./DeleteSecurityProfileCommand"; export * from "./DeleteUseCaseCommand"; export * from "./DeleteUserCommand"; export * from "./DeleteUserHierarchyGroupCommand"; @@ -33,6 +35,7 @@ export * from "./DescribeInstanceStorageConfigCommand"; export * from "./DescribeQueueCommand"; export * from "./DescribeQuickConnectCommand"; export * from "./DescribeRoutingProfileCommand"; +export * from "./DescribeSecurityProfileCommand"; export * from "./DescribeUserCommand"; export * from "./DescribeUserHierarchyGroupCommand"; export * from "./DescribeUserHierarchyStructureCommand"; @@ -67,6 +70,7 @@ export * from "./ListQuickConnectsCommand"; export * from "./ListRoutingProfileQueuesCommand"; export * from "./ListRoutingProfilesCommand"; export * from "./ListSecurityKeysCommand"; +export * from "./ListSecurityProfilePermissionsCommand"; export * from "./ListSecurityProfilesCommand"; export * from "./ListTagsForResourceCommand"; export * from "./ListUseCasesCommand"; @@ -75,10 +79,12 @@ export * from "./ListUsersCommand"; export * from "./ResumeContactRecordingCommand"; export * from "./StartChatContactCommand"; export * from "./StartContactRecordingCommand"; +export * from "./StartContactStreamingCommand"; export * from "./StartOutboundVoiceContactCommand"; export * from "./StartTaskContactCommand"; export * from "./StopContactCommand"; export * from "./StopContactRecordingCommand"; +export * from "./StopContactStreamingCommand"; export * from "./SuspendContactRecordingCommand"; export * from "./TagResourceCommand"; export * from "./UntagResourceCommand"; @@ -100,6 +106,7 @@ export * from "./UpdateRoutingProfileConcurrencyCommand"; export * from "./UpdateRoutingProfileDefaultOutboundQueueCommand"; export * from "./UpdateRoutingProfileNameCommand"; export * from "./UpdateRoutingProfileQueuesCommand"; +export * from "./UpdateSecurityProfileCommand"; export * from "./UpdateUserHierarchyCommand"; export * from "./UpdateUserHierarchyGroupNameCommand"; export * from "./UpdateUserHierarchyStructureCommand"; diff --git a/clients/client-connect/src/models/index.ts b/clients/client-connect/src/models/index.ts index 09c5d6e09b8c..ae1cfffa2ca6 100644 --- a/clients/client-connect/src/models/index.ts +++ b/clients/client-connect/src/models/index.ts @@ -1 +1,2 @@ export * from "./models_0"; +export * from "./models_1"; diff --git a/clients/client-connect/src/models/models_0.ts b/clients/client-connect/src/models/models_0.ts index 381bc7da81f2..81d1fbad4d16 100644 --- a/clients/client-connect/src/models/models_0.ts +++ b/clients/client-connect/src/models/models_0.ts @@ -1,6 +1,24 @@ import { SENSITIVE_STRING } from "@aws-sdk/smithy-client"; import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; +/** + *

    You do not have sufficient access to perform this action.

    + */ +export interface AccessDeniedException extends __SmithyException, $MetadataBearer { + name: "AccessDeniedException"; + $fault: "client"; + Message?: string; +} + +export namespace AccessDeniedException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AccessDeniedException): any => ({ + ...obj, + }); +} + export enum AgentStatusState { DISABLED = "DISABLED", ENABLED = "ENABLED", @@ -52,7 +70,7 @@ export interface AgentStatus { State?: AgentStatusState | string; /** - *

    One or more tags.

    + *

    The tags used to organize, track, or control access for this resource.

    */ Tags?: { [key: string]: string }; } @@ -805,7 +823,7 @@ export interface CreateAgentStatusRequest { DisplayOrder?: number; /** - *

    One or more tags.

    + *

    The tags used to organize, track, or control access for this resource.

    */ Tags?: { [key: string]: string }; } @@ -1063,7 +1081,7 @@ export interface CreateHoursOfOperationRequest { Config: HoursOfOperationConfig[] | undefined; /** - *

    One or more tags.

    + *

    The tags used to organize, track, or control access for this resource.

    */ Tags?: { [key: string]: string }; } @@ -1212,7 +1230,7 @@ export interface CreateIntegrationAssociationRequest { SourceType?: SourceType | string; /** - *

    One or more tags.

    + *

    The tags used to organize, track, or control access for this resource.

    */ Tags?: { [key: string]: string }; } @@ -1313,7 +1331,7 @@ export interface CreateQueueRequest { QuickConnectIds?: string[]; /** - *

    One or more tags.

    + *

    The tags used to organize, track, or control access for this resource.

    */ Tags?: { [key: string]: string }; } @@ -1480,7 +1498,7 @@ export interface CreateQuickConnectRequest { QuickConnectConfig: QuickConnectConfig | undefined; /** - *

    One or more tags.

    + *

    The tags used to organize, track, or control access for this resource.

    */ Tags?: { [key: string]: string }; } @@ -1613,6 +1631,63 @@ export namespace CreateRoutingProfileResponse { }); } +export interface CreateSecurityProfileRequest { + /** + *

    The name of the security profile.

    + */ + SecurityProfileName: string | undefined; + + /** + *

    The description of the security profile.

    + */ + Description?: string; + + /** + *

    Permissions assigned to the security profile.

    + */ + Permissions?: string[]; + + /** + *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    + */ + InstanceId: string | undefined; + + /** + *

    The tags used to organize, track, or control access for this resource.

    + */ + Tags?: { [key: string]: string }; +} + +export namespace CreateSecurityProfileRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateSecurityProfileRequest): any => ({ + ...obj, + }); +} + +export interface CreateSecurityProfileResponse { + /** + *

    The identifier for the security profle.

    + */ + SecurityProfileId?: string; + + /** + *

    The Amazon Resource Name (ARN) for the security profile.

    + */ + SecurityProfileArn?: string; +} + +export namespace CreateSecurityProfileResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateSecurityProfileResponse): any => ({ + ...obj, + }); +} + export enum UseCaseType { CONNECT_CAMPAIGNS = "CONNECT_CAMPAIGNS", RULES_EVALUATION = "RULES_EVALUATION", @@ -1636,7 +1711,7 @@ export interface CreateUseCaseRequest { UseCaseType: UseCaseType | string | undefined; /** - *

    One or more tags.

    + *

    The tags used to organize, track, or control access for this resource.

    */ Tags?: { [key: string]: string }; } @@ -1960,6 +2035,64 @@ export namespace DeleteQuickConnectRequest { }); } +export interface DeleteSecurityProfileRequest { + /** + *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    + */ + InstanceId: string | undefined; + + /** + *

    The identifier for the security profle.

    + */ + SecurityProfileId: string | undefined; +} + +export namespace DeleteSecurityProfileRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteSecurityProfileRequest): any => ({ + ...obj, + }); +} + +export enum ResourceType { + CONTACT = "CONTACT", + CONTACT_FLOW = "CONTACT_FLOW", + HIERARCHY_GROUP = "HIERARCHY_GROUP", + HIERARCHY_LEVEL = "HIERARCHY_LEVEL", + INSTANCE = "INSTANCE", + PARTICIPANT = "PARTICIPANT", + USER = "USER", +} + +/** + *

    That resource is already in use. Please try another.

    + */ +export interface ResourceInUseException extends __SmithyException, $MetadataBearer { + name: "ResourceInUseException"; + $fault: "client"; + Message?: string; + /** + *

    The type of resource.

    + */ + ResourceType?: ResourceType | string; + + /** + *

    The identifier for the resource.

    + */ + ResourceId?: string; +} + +export namespace ResourceInUseException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResourceInUseException): any => ({ + ...obj, + }); +} + export interface DeleteUseCaseRequest { /** *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    @@ -2028,43 +2161,6 @@ export namespace DeleteUserHierarchyGroupRequest { }); } -export enum ResourceType { - CONTACT = "CONTACT", - CONTACT_FLOW = "CONTACT_FLOW", - HIERARCHY_GROUP = "HIERARCHY_GROUP", - HIERARCHY_LEVEL = "HIERARCHY_LEVEL", - INSTANCE = "INSTANCE", - PARTICIPANT = "PARTICIPANT", - USER = "USER", -} - -/** - *

    That resource is already in use. Please try another.

    - */ -export interface ResourceInUseException extends __SmithyException, $MetadataBearer { - name: "ResourceInUseException"; - $fault: "client"; - Message?: string; - /** - *

    The type of resource.

    - */ - ResourceType?: ResourceType | string; - - /** - *

    The identifier for the resource.

    - */ - ResourceId?: string; -} - -export namespace ResourceInUseException { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ResourceInUseException): any => ({ - ...obj, - }); -} - export interface DescribeAgentStatusRequest { /** *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    @@ -2263,7 +2359,7 @@ export interface HoursOfOperation { Config?: HoursOfOperationConfig[]; /** - *

    One or more tags.

    + *

    The tags used to organize, track, or control access for this resource.

    */ Tags?: { [key: string]: string }; } @@ -2604,7 +2700,7 @@ export interface Queue { Status?: QueueStatus | string; /** - *

    One or more tags.

    + *

    The tags used to organize, track, or control access for this resource.

    */ Tags?: { [key: string]: string }; } @@ -2685,7 +2781,7 @@ export interface QuickConnect { QuickConnectConfig?: QuickConnectConfig; /** - *

    One or more tags.

    + *

    The tags used to organize, track, or control access for this resource.

    */ Tags?: { [key: string]: string }; } @@ -2807,6 +2903,87 @@ export namespace DescribeRoutingProfileResponse { }); } +export interface DescribeSecurityProfileRequest { + /** + *

    The identifier for the security profle.

    + */ + SecurityProfileId: string | undefined; + + /** + *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    + */ + InstanceId: string | undefined; +} + +export namespace DescribeSecurityProfileRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeSecurityProfileRequest): any => ({ + ...obj, + }); +} + +/** + *

    Contains information about a security profile.

    + */ +export interface SecurityProfile { + /** + *

    The identifier for the security profile.

    + */ + Id?: string; + + /** + *

    The organization resource identifier for the security profile.

    + */ + OrganizationResourceId?: string; + + /** + *

    The Amazon Resource Name (ARN) for the secruity profile.

    + */ + Arn?: string; + + /** + *

    The name for the security profile.

    + */ + SecurityProfileName?: string; + + /** + *

    The description of the security profile.

    + */ + Description?: string; + + /** + *

    The tags used to organize, track, or control access for this resource.

    + */ + Tags?: { [key: string]: string }; +} + +export namespace SecurityProfile { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SecurityProfile): any => ({ + ...obj, + }); +} + +export interface DescribeSecurityProfileResponse { + /** + *

    The security profile.

    + */ + SecurityProfile?: SecurityProfile; +} + +export namespace DescribeSecurityProfileResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeSecurityProfileResponse): any => ({ + ...obj, + }); +} + export interface DescribeUserRequest { /** *

    The identifier of the user account.

    @@ -4757,7 +4934,7 @@ export interface ListIntegrationAssociationsRequest { InstanceId: string | undefined; /** - *

    + *

    The type of integration.

    */ IntegrationType?: IntegrationType | string; @@ -4886,7 +5063,7 @@ export namespace ListLambdaFunctionsRequest { export interface ListLambdaFunctionsResponse { /** - *

    The Lambdafunction ARNs associated with the specified instance.

    + *

    The Lambda function ARNs associated with the specified instance.

    */ LambdaFunctions?: string[]; @@ -5861,6 +6038,59 @@ export namespace ListSecurityKeysResponse { }); } +export interface ListSecurityProfilePermissionsRequest { + /** + *

    The identifier for the security profle.

    + */ + SecurityProfileId: string | undefined; + + /** + *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    + */ + InstanceId: string | undefined; + + /** + *

    The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

    + */ + NextToken?: string; + + /** + *

    The maximum number of results to return per page.

    + */ + MaxResults?: number; +} + +export namespace ListSecurityProfilePermissionsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListSecurityProfilePermissionsRequest): any => ({ + ...obj, + }); +} + +export interface ListSecurityProfilePermissionsResponse { + /** + *

    The permissions granted to the security profile.

    + */ + Permissions?: string[]; + + /** + *

    If there are additional results, this is the token for the next set of results.

    + */ + NextToken?: string; +} + +export namespace ListSecurityProfilePermissionsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListSecurityProfilePermissionsResponse): any => ({ + ...obj, + }); +} + export interface ListSecurityProfilesRequest { /** *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    @@ -6412,6 +6642,75 @@ export namespace StartContactRecordingResponse { }); } +/** + *

    The streaming configuration, such as the Amazon SNS streaming endpoint.

    + */ +export interface ChatStreamingConfiguration { + /** + *

    The Amazon Resource Name (ARN) of the standard Amazon SNS topic. The Amazon Resource Name (ARN) of the streaming endpoint that is used + * to publish real-time message streaming for chat conversations.

    + */ + StreamingEndpointArn: string | undefined; +} + +export namespace ChatStreamingConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ChatStreamingConfiguration): any => ({ + ...obj, + }); +} + +export interface StartContactStreamingRequest { + /** + *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    + */ + InstanceId: string | undefined; + + /** + *

    The identifier of the contact. This is the identifier of the contact associated with the + * first interaction with the contact center.

    + */ + ContactId: string | undefined; + + /** + *

    The streaming configuration, such as the Amazon SNS streaming endpoint.

    + */ + ChatStreamingConfiguration: ChatStreamingConfiguration | undefined; + + /** + *

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

    + */ + ClientToken?: string; +} + +export namespace StartContactStreamingRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartContactStreamingRequest): any => ({ + ...obj, + }); +} + +export interface StartContactStreamingResponse { + /** + *

    The identifier of the streaming configuration enabled.

    + */ + StreamingId: string | undefined; +} + +export namespace StartContactStreamingResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartContactStreamingResponse): any => ({ + ...obj, + }); +} + /** *

    Outbound calls to the destination number are not allowed.

    */ @@ -6781,6 +7080,44 @@ export namespace StopContactRecordingResponse { }); } +export interface StopContactStreamingRequest { + /** + *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    + */ + InstanceId: string | undefined; + + /** + *

    The identifier of the contact. This is the identifier of the contact that is associated with + * the first interaction with the contact center.

    + */ + ContactId: string | undefined; + + /** + *

    The identifier of the streaming configuration enabled.

    + */ + StreamingId: string | undefined; +} + +export namespace StopContactStreamingRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StopContactStreamingRequest): any => ({ + ...obj, + }); +} + +export interface StopContactStreamingResponse {} + +export namespace StopContactStreamingResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StopContactStreamingResponse): any => ({ + ...obj, + }); +} + export interface SuspendContactRecordingRequest { /** *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    @@ -7057,7 +7394,7 @@ export interface UpdateInstanceAttributeRequest { /** *

    The type of attribute.

    * - *

    Only allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature, contact AWS Support for allowlisting.

    + *

    Only allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature, contact Amazon Web Services Support for allowlisting.

    *
    */ AttributeType: InstanceAttributeType | string | undefined; @@ -7411,6 +7748,37 @@ export namespace UpdateRoutingProfileQueuesRequest { }); } +export interface UpdateSecurityProfileRequest { + /** + *

    The description of the security profile.

    + */ + Description?: string; + + /** + *

    The permissions granted to a security profile.

    + */ + Permissions?: string[]; + + /** + *

    The identifier for the security profle.

    + */ + SecurityProfileId: string | undefined; + + /** + *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    + */ + InstanceId: string | undefined; +} + +export namespace UpdateSecurityProfileRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateSecurityProfileRequest): any => ({ + ...obj, + }); +} + export interface UpdateUserHierarchyRequest { /** *

    The identifier of the hierarchy group.

    @@ -7569,81 +7937,3 @@ export namespace UpdateUserIdentityInfoRequest { ...obj, }); } - -export interface UpdateUserPhoneConfigRequest { - /** - *

    Information about phone configuration settings for the user.

    - */ - PhoneConfig: UserPhoneConfig | undefined; - - /** - *

    The identifier of the user account.

    - */ - UserId: string | undefined; - - /** - *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    - */ - InstanceId: string | undefined; -} - -export namespace UpdateUserPhoneConfigRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateUserPhoneConfigRequest): any => ({ - ...obj, - }); -} - -export interface UpdateUserRoutingProfileRequest { - /** - *

    The identifier of the routing profile for the user.

    - */ - RoutingProfileId: string | undefined; - - /** - *

    The identifier of the user account.

    - */ - UserId: string | undefined; - - /** - *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    - */ - InstanceId: string | undefined; -} - -export namespace UpdateUserRoutingProfileRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateUserRoutingProfileRequest): any => ({ - ...obj, - }); -} - -export interface UpdateUserSecurityProfilesRequest { - /** - *

    The identifiers of the security profiles for the user.

    - */ - SecurityProfileIds: string[] | undefined; - - /** - *

    The identifier of the user account.

    - */ - UserId: string | undefined; - - /** - *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    - */ - InstanceId: string | undefined; -} - -export namespace UpdateUserSecurityProfilesRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateUserSecurityProfilesRequest): any => ({ - ...obj, - }); -} diff --git a/clients/client-connect/src/models/models_1.ts b/clients/client-connect/src/models/models_1.ts new file mode 100644 index 000000000000..86a3d5522d3c --- /dev/null +++ b/clients/client-connect/src/models/models_1.ts @@ -0,0 +1,79 @@ +import { UserPhoneConfig } from "./models_0"; + +export interface UpdateUserPhoneConfigRequest { + /** + *

    Information about phone configuration settings for the user.

    + */ + PhoneConfig: UserPhoneConfig | undefined; + + /** + *

    The identifier of the user account.

    + */ + UserId: string | undefined; + + /** + *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    + */ + InstanceId: string | undefined; +} + +export namespace UpdateUserPhoneConfigRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateUserPhoneConfigRequest): any => ({ + ...obj, + }); +} + +export interface UpdateUserRoutingProfileRequest { + /** + *

    The identifier of the routing profile for the user.

    + */ + RoutingProfileId: string | undefined; + + /** + *

    The identifier of the user account.

    + */ + UserId: string | undefined; + + /** + *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    + */ + InstanceId: string | undefined; +} + +export namespace UpdateUserRoutingProfileRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateUserRoutingProfileRequest): any => ({ + ...obj, + }); +} + +export interface UpdateUserSecurityProfilesRequest { + /** + *

    The identifiers of the security profiles for the user.

    + */ + SecurityProfileIds: string[] | undefined; + + /** + *

    The identifier of the user account.

    + */ + UserId: string | undefined; + + /** + *

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    + */ + InstanceId: string | undefined; +} + +export namespace UpdateUserSecurityProfilesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateUserSecurityProfilesRequest): any => ({ + ...obj, + }); +} diff --git a/clients/client-connect/src/pagination/ListSecurityProfilePermissionsPaginator.ts b/clients/client-connect/src/pagination/ListSecurityProfilePermissionsPaginator.ts new file mode 100644 index 000000000000..612959e6c1e9 --- /dev/null +++ b/clients/client-connect/src/pagination/ListSecurityProfilePermissionsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListSecurityProfilePermissionsCommand, + ListSecurityProfilePermissionsCommandInput, + ListSecurityProfilePermissionsCommandOutput, +} from "../commands/ListSecurityProfilePermissionsCommand"; +import { Connect } from "../Connect"; +import { ConnectClient } from "../ConnectClient"; +import { ConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: ConnectClient, + input: ListSecurityProfilePermissionsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListSecurityProfilePermissionsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Connect, + input: ListSecurityProfilePermissionsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listSecurityProfilePermissions(input, ...args); +}; +export async function* paginateListSecurityProfilePermissions( + config: ConnectPaginationConfiguration, + input: ListSecurityProfilePermissionsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListSecurityProfilePermissionsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof Connect) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof ConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Connect | ConnectClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-connect/src/pagination/index.ts b/clients/client-connect/src/pagination/index.ts index d380a0dc5af6..32fd56f341a8 100644 --- a/clients/client-connect/src/pagination/index.ts +++ b/clients/client-connect/src/pagination/index.ts @@ -20,6 +20,7 @@ export * from "./ListQuickConnectsPaginator"; export * from "./ListRoutingProfileQueuesPaginator"; export * from "./ListRoutingProfilesPaginator"; export * from "./ListSecurityKeysPaginator"; +export * from "./ListSecurityProfilePermissionsPaginator"; export * from "./ListSecurityProfilesPaginator"; export * from "./ListUseCasesPaginator"; export * from "./ListUserHierarchyGroupsPaginator"; diff --git a/clients/client-connect/src/protocols/Aws_restJson1.ts b/clients/client-connect/src/protocols/Aws_restJson1.ts index 70ed15d4956c..1437ce934121 100644 --- a/clients/client-connect/src/protocols/Aws_restJson1.ts +++ b/clients/client-connect/src/protocols/Aws_restJson1.ts @@ -63,6 +63,10 @@ import { CreateRoutingProfileCommandInput, CreateRoutingProfileCommandOutput, } from "../commands/CreateRoutingProfileCommand"; +import { + CreateSecurityProfileCommandInput, + CreateSecurityProfileCommandOutput, +} from "../commands/CreateSecurityProfileCommand"; import { CreateUseCaseCommandInput, CreateUseCaseCommandOutput } from "../commands/CreateUseCaseCommand"; import { CreateUserCommandInput, CreateUserCommandOutput } from "../commands/CreateUserCommand"; import { @@ -79,6 +83,10 @@ import { DeleteIntegrationAssociationCommandOutput, } from "../commands/DeleteIntegrationAssociationCommand"; import { DeleteQuickConnectCommandInput, DeleteQuickConnectCommandOutput } from "../commands/DeleteQuickConnectCommand"; +import { + DeleteSecurityProfileCommandInput, + DeleteSecurityProfileCommandOutput, +} from "../commands/DeleteSecurityProfileCommand"; import { DeleteUseCaseCommandInput, DeleteUseCaseCommandOutput } from "../commands/DeleteUseCaseCommand"; import { DeleteUserCommandInput, DeleteUserCommandOutput } from "../commands/DeleteUserCommand"; import { @@ -115,6 +123,10 @@ import { DescribeRoutingProfileCommandInput, DescribeRoutingProfileCommandOutput, } from "../commands/DescribeRoutingProfileCommand"; +import { + DescribeSecurityProfileCommandInput, + DescribeSecurityProfileCommandOutput, +} from "../commands/DescribeSecurityProfileCommand"; import { DescribeUserCommandInput, DescribeUserCommandOutput } from "../commands/DescribeUserCommand"; import { DescribeUserHierarchyGroupCommandInput, @@ -206,6 +218,10 @@ import { ListRoutingProfilesCommandOutput, } from "../commands/ListRoutingProfilesCommand"; import { ListSecurityKeysCommandInput, ListSecurityKeysCommandOutput } from "../commands/ListSecurityKeysCommand"; +import { + ListSecurityProfilePermissionsCommandInput, + ListSecurityProfilePermissionsCommandOutput, +} from "../commands/ListSecurityProfilePermissionsCommand"; import { ListSecurityProfilesCommandInput, ListSecurityProfilesCommandOutput, @@ -229,6 +245,10 @@ import { StartContactRecordingCommandInput, StartContactRecordingCommandOutput, } from "../commands/StartContactRecordingCommand"; +import { + StartContactStreamingCommandInput, + StartContactStreamingCommandOutput, +} from "../commands/StartContactStreamingCommand"; import { StartOutboundVoiceContactCommandInput, StartOutboundVoiceContactCommandOutput, @@ -239,6 +259,10 @@ import { StopContactRecordingCommandInput, StopContactRecordingCommandOutput, } from "../commands/StopContactRecordingCommand"; +import { + StopContactStreamingCommandInput, + StopContactStreamingCommandOutput, +} from "../commands/StopContactStreamingCommand"; import { SuspendContactRecordingCommandInput, SuspendContactRecordingCommandOutput, @@ -308,6 +332,10 @@ import { UpdateRoutingProfileQueuesCommandInput, UpdateRoutingProfileQueuesCommandOutput, } from "../commands/UpdateRoutingProfileQueuesCommand"; +import { + UpdateSecurityProfileCommandInput, + UpdateSecurityProfileCommandOutput, +} from "../commands/UpdateSecurityProfileCommand"; import { UpdateUserHierarchyCommandInput, UpdateUserHierarchyCommandOutput, @@ -337,12 +365,14 @@ import { UpdateUserSecurityProfilesCommandOutput, } from "../commands/UpdateUserSecurityProfilesCommand"; import { + AccessDeniedException, AgentStatus, AgentStatusSummary, AnswerMachineDetectionConfig, Attribute, Channel, ChatMessage, + ChatStreamingConfiguration, ContactFlow, ContactFlowNotPublishedException, ContactFlowSummary, @@ -413,6 +443,7 @@ import { RoutingProfileSummary, S3Config, SecurityKey, + SecurityProfile, SecurityProfileSummary, ServiceQuotaExceededException, Threshold, @@ -1056,6 +1087,45 @@ export const serializeAws_restJson1CreateRoutingProfileCommand = async ( }); }; +export const serializeAws_restJson1CreateSecurityProfileCommand = async ( + input: CreateSecurityProfileCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/security-profiles/{InstanceId}"; + if (input.InstanceId !== undefined) { + const labelValue: string = input.InstanceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: InstanceId."); + } + resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: InstanceId."); + } + let body: any; + body = JSON.stringify({ + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.Permissions !== undefined && + input.Permissions !== null && { Permissions: serializeAws_restJson1PermissionsList(input.Permissions, context) }), + ...(input.SecurityProfileName !== undefined && + input.SecurityProfileName !== null && { SecurityProfileName: input.SecurityProfileName }), + ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1CreateUseCaseCommand = async ( input: CreateUseCaseCommandInput, context: __SerdeContext @@ -1332,6 +1402,45 @@ export const serializeAws_restJson1DeleteQuickConnectCommand = async ( }); }; +export const serializeAws_restJson1DeleteSecurityProfileCommand = async ( + input: DeleteSecurityProfileCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/security-profiles/{InstanceId}/{SecurityProfileId}"; + if (input.InstanceId !== undefined) { + const labelValue: string = input.InstanceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: InstanceId."); + } + resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: InstanceId."); + } + if (input.SecurityProfileId !== undefined) { + const labelValue: string = input.SecurityProfileId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: SecurityProfileId."); + } + resolvedPath = resolvedPath.replace("{SecurityProfileId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: SecurityProfileId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1DeleteUseCaseCommand = async ( input: DeleteUseCaseCommandInput, context: __SerdeContext @@ -1800,6 +1909,45 @@ export const serializeAws_restJson1DescribeRoutingProfileCommand = async ( }); }; +export const serializeAws_restJson1DescribeSecurityProfileCommand = async ( + input: DescribeSecurityProfileCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/security-profiles/{InstanceId}/{SecurityProfileId}"; + if (input.SecurityProfileId !== undefined) { + const labelValue: string = input.SecurityProfileId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: SecurityProfileId."); + } + resolvedPath = resolvedPath.replace("{SecurityProfileId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: SecurityProfileId."); + } + if (input.InstanceId !== undefined) { + const labelValue: string = input.InstanceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: InstanceId."); + } + resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: InstanceId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1DescribeUserCommand = async ( input: DescribeUserCommandInput, context: __SerdeContext @@ -3053,6 +3201,50 @@ export const serializeAws_restJson1ListSecurityKeysCommand = async ( }); }; +export const serializeAws_restJson1ListSecurityProfilePermissionsCommand = async ( + input: ListSecurityProfilePermissionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/security-profiles-permissions/{InstanceId}/{SecurityProfileId}"; + if (input.SecurityProfileId !== undefined) { + const labelValue: string = input.SecurityProfileId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: SecurityProfileId."); + } + resolvedPath = resolvedPath.replace("{SecurityProfileId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: SecurityProfileId."); + } + if (input.InstanceId !== undefined) { + const labelValue: string = input.InstanceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: InstanceId."); + } + resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: InstanceId."); + } + const query: any = { + ...(input.NextToken !== undefined && { nextToken: input.NextToken }), + ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + export const serializeAws_restJson1ListSecurityProfilesCommand = async ( input: ListSecurityProfilesCommandInput, context: __SerdeContext @@ -3327,6 +3519,40 @@ export const serializeAws_restJson1StartContactRecordingCommand = async ( }); }; +export const serializeAws_restJson1StartContactStreamingCommand = async ( + input: StartContactStreamingCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/start-streaming"; + let body: any; + body = JSON.stringify({ + ...(input.ChatStreamingConfiguration !== undefined && + input.ChatStreamingConfiguration !== null && { + ChatStreamingConfiguration: serializeAws_restJson1ChatStreamingConfiguration( + input.ChatStreamingConfiguration, + context + ), + }), + ClientToken: input.ClientToken ?? generateIdempotencyToken(), + ...(input.ContactId !== undefined && input.ContactId !== null && { ContactId: input.ContactId }), + ...(input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1StartOutboundVoiceContactCommand = async ( input: StartOutboundVoiceContactCommandInput, context: __SerdeContext @@ -3457,6 +3683,33 @@ export const serializeAws_restJson1StopContactRecordingCommand = async ( }); }; +export const serializeAws_restJson1StopContactStreamingCommand = async ( + input: StopContactStreamingCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/stop-streaming"; + let body: any; + body = JSON.stringify({ + ...(input.ContactId !== undefined && input.ContactId !== null && { ContactId: input.ContactId }), + ...(input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId }), + ...(input.StreamingId !== undefined && input.StreamingId !== null && { StreamingId: input.StreamingId }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1SuspendContactRecordingCommand = async ( input: SuspendContactRecordingCommandInput, context: __SerdeContext @@ -4358,6 +4611,52 @@ export const serializeAws_restJson1UpdateRoutingProfileQueuesCommand = async ( }); }; +export const serializeAws_restJson1UpdateSecurityProfileCommand = async ( + input: UpdateSecurityProfileCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/security-profiles/{InstanceId}/{SecurityProfileId}"; + if (input.SecurityProfileId !== undefined) { + const labelValue: string = input.SecurityProfileId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: SecurityProfileId."); + } + resolvedPath = resolvedPath.replace("{SecurityProfileId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: SecurityProfileId."); + } + if (input.InstanceId !== undefined) { + const labelValue: string = input.InstanceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: InstanceId."); + } + resolvedPath = resolvedPath.replace("{InstanceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: InstanceId."); + } + let body: any; + body = JSON.stringify({ + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.Permissions !== undefined && + input.Permissions !== null && { Permissions: serializeAws_restJson1PermissionsList(input.Permissions, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1UpdateUserHierarchyCommand = async ( input: UpdateUserHierarchyCommandInput, context: __SerdeContext @@ -6266,32 +6565,32 @@ const deserializeAws_restJson1CreateRoutingProfileCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1CreateUseCaseCommand = async ( +export const deserializeAws_restJson1CreateSecurityProfileCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1CreateUseCaseCommandError(output, context); + return deserializeAws_restJson1CreateSecurityProfileCommandError(output, context); } - const contents: CreateUseCaseCommandOutput = { + const contents: CreateSecurityProfileCommandOutput = { $metadata: deserializeMetadata(output), - UseCaseArn: undefined, - UseCaseId: undefined, + SecurityProfileArn: undefined, + SecurityProfileId: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UseCaseArn !== undefined && data.UseCaseArn !== null) { - contents.UseCaseArn = __expectString(data.UseCaseArn); + if (data.SecurityProfileArn !== undefined && data.SecurityProfileArn !== null) { + contents.SecurityProfileArn = __expectString(data.SecurityProfileArn); } - if (data.UseCaseId !== undefined && data.UseCaseId !== null) { - contents.UseCaseId = __expectString(data.UseCaseId); + if (data.SecurityProfileId !== undefined && data.SecurityProfileId !== null) { + contents.SecurityProfileId = __expectString(data.SecurityProfileId); } return Promise.resolve(contents); }; -const deserializeAws_restJson1CreateUseCaseCommandError = async ( +const deserializeAws_restJson1CreateSecurityProfileCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6316,6 +6615,14 @@ const deserializeAws_restJson1CreateUseCaseCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + response = { + ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InvalidRequestException": case "com.amazonaws.connect#InvalidRequestException": response = { @@ -6324,6 +6631,14 @@ const deserializeAws_restJson1CreateUseCaseCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "LimitExceededException": + case "com.amazonaws.connect#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ResourceNotFoundException": case "com.amazonaws.connect#ResourceNotFoundException": response = { @@ -6357,12 +6672,103 @@ const deserializeAws_restJson1CreateUseCaseCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1CreateUserCommand = async ( +export const deserializeAws_restJson1CreateUseCaseCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1CreateUserCommandError(output, context); + return deserializeAws_restJson1CreateUseCaseCommandError(output, context); + } + const contents: CreateUseCaseCommandOutput = { + $metadata: deserializeMetadata(output), + UseCaseArn: undefined, + UseCaseId: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.UseCaseArn !== undefined && data.UseCaseArn !== null) { + contents.UseCaseArn = __expectString(data.UseCaseArn); + } + if (data.UseCaseId !== undefined && data.UseCaseId !== null) { + contents.UseCaseId = __expectString(data.UseCaseId); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateUseCaseCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "DuplicateResourceException": + case "com.amazonaws.connect#DuplicateResourceException": + response = { + ...(await deserializeAws_restJson1DuplicateResourceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + response = { + ...(await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.connect#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateUserCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateUserCommandError(output, context); } const contents: CreateUserCommandOutput = { $metadata: deserializeMetadata(output), @@ -6879,6 +7285,105 @@ const deserializeAws_restJson1DeleteQuickConnectCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1DeleteSecurityProfileCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteSecurityProfileCommandError(output, context); + } + const contents: DeleteSecurityProfileCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteSecurityProfileCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.connect#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + response = { + ...(await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + response = { + ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.connect#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceInUseException": + case "com.amazonaws.connect#ResourceInUseException": + response = { + ...(await deserializeAws_restJson1ResourceInUseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1DeleteUseCaseCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -7903,6 +8408,93 @@ const deserializeAws_restJson1DescribeRoutingProfileCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1DescribeSecurityProfileCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribeSecurityProfileCommandError(output, context); + } + const contents: DescribeSecurityProfileCommandOutput = { + $metadata: deserializeMetadata(output), + SecurityProfile: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.SecurityProfile !== undefined && data.SecurityProfile !== null) { + contents.SecurityProfile = deserializeAws_restJson1SecurityProfile(data.SecurityProfile, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DescribeSecurityProfileCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + response = { + ...(await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + response = { + ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.connect#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1DescribeUserCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -10888,6 +11480,97 @@ const deserializeAws_restJson1ListSecurityKeysCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1ListSecurityProfilePermissionsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListSecurityProfilePermissionsCommandError(output, context); + } + const contents: ListSecurityProfilePermissionsCommandOutput = { + $metadata: deserializeMetadata(output), + NextToken: undefined, + Permissions: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); + } + if (data.Permissions !== undefined && data.Permissions !== null) { + contents.Permissions = deserializeAws_restJson1PermissionsList(data.Permissions, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListSecurityProfilePermissionsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + response = { + ...(await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + response = { + ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.connect#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1ListSecurityProfilesCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -11404,36 +12087,119 @@ const deserializeAws_restJson1ResumeContactRecordingCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1StartChatContactCommand = async ( +export const deserializeAws_restJson1StartChatContactCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StartChatContactCommandError(output, context); + } + const contents: StartChatContactCommandOutput = { + $metadata: deserializeMetadata(output), + ContactId: undefined, + ParticipantId: undefined, + ParticipantToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.ContactId !== undefined && data.ContactId !== null) { + contents.ContactId = __expectString(data.ContactId); + } + if (data.ParticipantId !== undefined && data.ParticipantId !== null) { + contents.ParticipantId = __expectString(data.ParticipantId); + } + if (data.ParticipantToken !== undefined && data.ParticipantToken !== null) { + contents.ParticipantToken = __expectString(data.ParticipantToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StartChatContactCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + response = { + ...(await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + response = { + ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.connect#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.connect#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1StartContactRecordingCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1StartChatContactCommandError(output, context); + return deserializeAws_restJson1StartContactRecordingCommandError(output, context); } - const contents: StartChatContactCommandOutput = { + const contents: StartContactRecordingCommandOutput = { $metadata: deserializeMetadata(output), - ContactId: undefined, - ParticipantId: undefined, - ParticipantToken: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactId !== undefined && data.ContactId !== null) { - contents.ContactId = __expectString(data.ContactId); - } - if (data.ParticipantId !== undefined && data.ParticipantId !== null) { - contents.ParticipantId = __expectString(data.ParticipantId); - } - if (data.ParticipantToken !== undefined && data.ParticipantToken !== null) { - contents.ParticipantToken = __expectString(data.ParticipantToken); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1StartChatContactCommandError = async ( +const deserializeAws_restJson1StartContactRecordingCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -11466,14 +12232,6 @@ const deserializeAws_restJson1StartChatContactCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "LimitExceededException": - case "com.amazonaws.connect#LimitExceededException": - response = { - ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ResourceNotFoundException": case "com.amazonaws.connect#ResourceNotFoundException": response = { @@ -11499,24 +12257,28 @@ const deserializeAws_restJson1StartChatContactCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1StartContactRecordingCommand = async ( +export const deserializeAws_restJson1StartContactStreamingCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1StartContactRecordingCommandError(output, context); + return deserializeAws_restJson1StartContactStreamingCommandError(output, context); } - const contents: StartContactRecordingCommandOutput = { + const contents: StartContactStreamingCommandOutput = { $metadata: deserializeMetadata(output), + StreamingId: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.StreamingId !== undefined && data.StreamingId !== null) { + contents.StreamingId = __expectString(data.StreamingId); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1StartContactRecordingCommandError = async ( +const deserializeAws_restJson1StartContactStreamingCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -11549,6 +12311,14 @@ const deserializeAws_restJson1StartContactRecordingCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "LimitExceededException": + case "com.amazonaws.connect#LimitExceededException": + response = { + ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ResourceNotFoundException": case "com.amazonaws.connect#ResourceNotFoundException": response = { @@ -11922,6 +12692,81 @@ const deserializeAws_restJson1StopContactRecordingCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1StopContactStreamingCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StopContactStreamingCommandError(output, context); + } + const contents: StopContactStreamingCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StopContactStreamingCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + response = { + ...(await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + response = { + ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.connect#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1SuspendContactRecordingCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -13697,6 +14542,89 @@ const deserializeAws_restJson1UpdateRoutingProfileQueuesCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_restJson1UpdateSecurityProfileCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateSecurityProfileCommandError(output, context); + } + const contents: UpdateSecurityProfileCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateSecurityProfileCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + response = { + ...(await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + response = { + ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.connect#InvalidRequestException": + response = { + ...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_restJson1UpdateUserHierarchyCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -14294,6 +15222,23 @@ const deserializeAws_restJson1UpdateUserSecurityProfilesCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +const deserializeAws_restJson1AccessDeniedExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: AccessDeniedException = { + name: "AccessDeniedException", + $fault: "client", + $metadata: deserializeMetadata(parsedOutput), + Message: undefined, + }; + const data: any = parsedOutput.body; + if (data.Message !== undefined && data.Message !== null) { + contents.Message = __expectString(data.Message); + } + return contents; +}; + const deserializeAws_restJson1ContactFlowNotPublishedExceptionResponse = async ( parsedOutput: any, context: __SerdeContext @@ -14618,6 +15563,16 @@ const serializeAws_restJson1ChatMessage = (input: ChatMessage, context: __SerdeC }; }; +const serializeAws_restJson1ChatStreamingConfiguration = ( + input: ChatStreamingConfiguration, + context: __SerdeContext +): any => { + return { + ...(input.StreamingEndpointArn !== undefined && + input.StreamingEndpointArn !== null && { StreamingEndpointArn: input.StreamingEndpointArn }), + }; +}; + const serializeAws_restJson1ContactReferences = (input: { [key: string]: Reference }, context: __SerdeContext): any => { return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => { if (value === null) { @@ -14858,6 +15813,17 @@ const serializeAws_restJson1ParticipantDetails = (input: ParticipantDetails, con }; }; +const serializeAws_restJson1PermissionsList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1PhoneNumberQuickConnectConfig = ( input: PhoneNumberQuickConnectConfig, context: __SerdeContext @@ -15730,6 +16696,17 @@ const deserializeAws_restJson1OutboundCallerConfig = (output: any, context: __Se } as any; }; +const deserializeAws_restJson1PermissionsList = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + const deserializeAws_restJson1PhoneNumberQuickConnectConfig = ( output: any, context: __SerdeContext @@ -16013,6 +16990,20 @@ const deserializeAws_restJson1SecurityKeysList = (output: any, context: __SerdeC }); }; +const deserializeAws_restJson1SecurityProfile = (output: any, context: __SerdeContext): SecurityProfile => { + return { + Arn: __expectString(output.Arn), + Description: __expectString(output.Description), + Id: __expectString(output.Id), + OrganizationResourceId: __expectString(output.OrganizationResourceId), + SecurityProfileName: __expectString(output.SecurityProfileName), + Tags: + output.Tags !== undefined && output.Tags !== null + ? deserializeAws_restJson1TagMap(output.Tags, context) + : undefined, + } as any; +}; + const deserializeAws_restJson1SecurityProfileIds = (output: any, context: __SerdeContext): string[] => { return (output || []) .filter((e: any) => e != null) diff --git a/clients/client-connectparticipant/src/models/models_0.ts b/clients/client-connectparticipant/src/models/models_0.ts index e13f4937ce62..16ffe0ad85b5 100644 --- a/clients/client-connectparticipant/src/models/models_0.ts +++ b/clients/client-connectparticipant/src/models/models_0.ts @@ -473,10 +473,6 @@ export enum ChatItemType { CONNECTION_ACK = "CONNECTION_ACK", EVENT = "EVENT", MESSAGE = "MESSAGE", - PARTICIPANT_ACTIVE = "PARTICIPANT_ACTIVE", - PARTICIPANT_DISENGAGED = "PARTICIPANT_DISENGAGED", - PARTICIPANT_ENGAGED = "PARTICIPANT_ENGAGED", - PARTICIPANT_INACTIVE = "PARTICIPANT_INACTIVE", PARTICIPANT_JOINED = "PARTICIPANT_JOINED", PARTICIPANT_LEFT = "PARTICIPANT_LEFT", TRANSFER_FAILED = "TRANSFER_FAILED", diff --git a/clients/client-datasync/src/DataSync.ts b/clients/client-datasync/src/DataSync.ts index 16d1502191eb..cec93a5266a0 100644 --- a/clients/client-datasync/src/DataSync.ts +++ b/clients/client-datasync/src/DataSync.ts @@ -16,6 +16,11 @@ import { CreateLocationFsxWindowsCommandInput, CreateLocationFsxWindowsCommandOutput, } from "./commands/CreateLocationFsxWindowsCommand"; +import { + CreateLocationHdfsCommand, + CreateLocationHdfsCommandInput, + CreateLocationHdfsCommandOutput, +} from "./commands/CreateLocationHdfsCommand"; import { CreateLocationNfsCommand, CreateLocationNfsCommandInput, @@ -59,6 +64,11 @@ import { DescribeLocationFsxWindowsCommandInput, DescribeLocationFsxWindowsCommandOutput, } from "./commands/DescribeLocationFsxWindowsCommand"; +import { + DescribeLocationHdfsCommand, + DescribeLocationHdfsCommandInput, + DescribeLocationHdfsCommandOutput, +} from "./commands/DescribeLocationHdfsCommand"; import { DescribeLocationNfsCommand, DescribeLocationNfsCommandInput, @@ -118,6 +128,11 @@ import { UntagResourceCommandOutput, } from "./commands/UntagResourceCommand"; import { UpdateAgentCommand, UpdateAgentCommandInput, UpdateAgentCommandOutput } from "./commands/UpdateAgentCommand"; +import { + UpdateLocationHdfsCommand, + UpdateLocationHdfsCommandInput, + UpdateLocationHdfsCommandOutput, +} from "./commands/UpdateLocationHdfsCommand"; import { UpdateLocationNfsCommand, UpdateLocationNfsCommandInput, @@ -294,6 +309,38 @@ export class DataSync extends DataSyncClient { } } + /** + *

    Creates an endpoint for a Hadoop Distributed File System (HDFS).

    + */ + public createLocationHdfs( + args: CreateLocationHdfsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createLocationHdfs( + args: CreateLocationHdfsCommandInput, + cb: (err: any, data?: CreateLocationHdfsCommandOutput) => void + ): void; + public createLocationHdfs( + args: CreateLocationHdfsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateLocationHdfsCommandOutput) => void + ): void; + public createLocationHdfs( + args: CreateLocationHdfsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateLocationHdfsCommandOutput) => void), + cb?: (err: any, data?: CreateLocationHdfsCommandOutput) => void + ): Promise | void { + const command = new CreateLocationHdfsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Defines a file system on a Network File System (NFS) server that can be read from or * written to.

    @@ -661,6 +708,39 @@ export class DataSync extends DataSyncClient { } } + /** + *

    Returns metadata, such as the authentication information about the Hadoop Distributed File + * System (HDFS) location.

    + */ + public describeLocationHdfs( + args: DescribeLocationHdfsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeLocationHdfs( + args: DescribeLocationHdfsCommandInput, + cb: (err: any, data?: DescribeLocationHdfsCommandOutput) => void + ): void; + public describeLocationHdfs( + args: DescribeLocationHdfsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeLocationHdfsCommandOutput) => void + ): void; + public describeLocationHdfs( + args: DescribeLocationHdfsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeLocationHdfsCommandOutput) => void), + cb?: (err: any, data?: DescribeLocationHdfsCommandOutput) => void + ): Promise | void { + const command = new DescribeLocationHdfsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Returns metadata, such as the path information, about an NFS location.

    */ @@ -1133,6 +1213,39 @@ export class DataSync extends DataSyncClient { } } + /** + *

    Updates some parameters of a previously created location for a Hadoop Distributed File + * System cluster.

    + */ + public updateLocationHdfs( + args: UpdateLocationHdfsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateLocationHdfs( + args: UpdateLocationHdfsCommandInput, + cb: (err: any, data?: UpdateLocationHdfsCommandOutput) => void + ): void; + public updateLocationHdfs( + args: UpdateLocationHdfsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateLocationHdfsCommandOutput) => void + ): void; + public updateLocationHdfs( + args: UpdateLocationHdfsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateLocationHdfsCommandOutput) => void), + cb?: (err: any, data?: UpdateLocationHdfsCommandOutput) => void + ): Promise | void { + const command = new UpdateLocationHdfsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Updates some of the parameters of a previously created location for Network File System (NFS) access. * For information about creating an NFS location, see Creating a location for NFS.

    diff --git a/clients/client-datasync/src/DataSyncClient.ts b/clients/client-datasync/src/DataSyncClient.ts index 836f8926391d..4d2f79efe89e 100644 --- a/clients/client-datasync/src/DataSyncClient.ts +++ b/clients/client-datasync/src/DataSyncClient.ts @@ -59,6 +59,7 @@ import { CreateLocationFsxWindowsCommandInput, CreateLocationFsxWindowsCommandOutput, } from "./commands/CreateLocationFsxWindowsCommand"; +import { CreateLocationHdfsCommandInput, CreateLocationHdfsCommandOutput } from "./commands/CreateLocationHdfsCommand"; import { CreateLocationNfsCommandInput, CreateLocationNfsCommandOutput } from "./commands/CreateLocationNfsCommand"; import { CreateLocationObjectStorageCommandInput, @@ -79,6 +80,10 @@ import { DescribeLocationFsxWindowsCommandInput, DescribeLocationFsxWindowsCommandOutput, } from "./commands/DescribeLocationFsxWindowsCommand"; +import { + DescribeLocationHdfsCommandInput, + DescribeLocationHdfsCommandOutput, +} from "./commands/DescribeLocationHdfsCommand"; import { DescribeLocationNfsCommandInput, DescribeLocationNfsCommandOutput, @@ -109,6 +114,7 @@ import { StartTaskExecutionCommandInput, StartTaskExecutionCommandOutput } from import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; import { UpdateAgentCommandInput, UpdateAgentCommandOutput } from "./commands/UpdateAgentCommand"; +import { UpdateLocationHdfsCommandInput, UpdateLocationHdfsCommandOutput } from "./commands/UpdateLocationHdfsCommand"; import { UpdateLocationNfsCommandInput, UpdateLocationNfsCommandOutput } from "./commands/UpdateLocationNfsCommand"; import { UpdateLocationObjectStorageCommandInput, @@ -127,6 +133,7 @@ export type ServiceInputTypes = | CreateAgentCommandInput | CreateLocationEfsCommandInput | CreateLocationFsxWindowsCommandInput + | CreateLocationHdfsCommandInput | CreateLocationNfsCommandInput | CreateLocationObjectStorageCommandInput | CreateLocationS3CommandInput @@ -138,6 +145,7 @@ export type ServiceInputTypes = | DescribeAgentCommandInput | DescribeLocationEfsCommandInput | DescribeLocationFsxWindowsCommandInput + | DescribeLocationHdfsCommandInput | DescribeLocationNfsCommandInput | DescribeLocationObjectStorageCommandInput | DescribeLocationS3CommandInput @@ -153,6 +161,7 @@ export type ServiceInputTypes = | TagResourceCommandInput | UntagResourceCommandInput | UpdateAgentCommandInput + | UpdateLocationHdfsCommandInput | UpdateLocationNfsCommandInput | UpdateLocationObjectStorageCommandInput | UpdateLocationSmbCommandInput @@ -164,6 +173,7 @@ export type ServiceOutputTypes = | CreateAgentCommandOutput | CreateLocationEfsCommandOutput | CreateLocationFsxWindowsCommandOutput + | CreateLocationHdfsCommandOutput | CreateLocationNfsCommandOutput | CreateLocationObjectStorageCommandOutput | CreateLocationS3CommandOutput @@ -175,6 +185,7 @@ export type ServiceOutputTypes = | DescribeAgentCommandOutput | DescribeLocationEfsCommandOutput | DescribeLocationFsxWindowsCommandOutput + | DescribeLocationHdfsCommandOutput | DescribeLocationNfsCommandOutput | DescribeLocationObjectStorageCommandOutput | DescribeLocationS3CommandOutput @@ -190,6 +201,7 @@ export type ServiceOutputTypes = | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAgentCommandOutput + | UpdateLocationHdfsCommandOutput | UpdateLocationNfsCommandOutput | UpdateLocationObjectStorageCommandOutput | UpdateLocationSmbCommandOutput diff --git a/clients/client-datasync/src/commands/CreateLocationHdfsCommand.ts b/clients/client-datasync/src/commands/CreateLocationHdfsCommand.ts new file mode 100644 index 000000000000..bc38621e5862 --- /dev/null +++ b/clients/client-datasync/src/commands/CreateLocationHdfsCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DataSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataSyncClient"; +import { CreateLocationHdfsRequest, CreateLocationHdfsResponse } from "../models/models_0"; +import { + deserializeAws_json1_1CreateLocationHdfsCommand, + serializeAws_json1_1CreateLocationHdfsCommand, +} from "../protocols/Aws_json1_1"; + +export interface CreateLocationHdfsCommandInput extends CreateLocationHdfsRequest {} +export interface CreateLocationHdfsCommandOutput extends CreateLocationHdfsResponse, __MetadataBearer {} + +/** + *

    Creates an endpoint for a Hadoop Distributed File System (HDFS).

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DataSyncClient, CreateLocationHdfsCommand } from "@aws-sdk/client-datasync"; // ES Modules import + * // const { DataSyncClient, CreateLocationHdfsCommand } = require("@aws-sdk/client-datasync"); // CommonJS import + * const client = new DataSyncClient(config); + * const command = new CreateLocationHdfsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateLocationHdfsCommandInput} for command's `input` shape. + * @see {@link CreateLocationHdfsCommandOutput} for command's `response` shape. + * @see {@link DataSyncClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateLocationHdfsCommand extends $Command< + CreateLocationHdfsCommandInput, + CreateLocationHdfsCommandOutput, + DataSyncClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateLocationHdfsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DataSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DataSyncClient"; + const commandName = "CreateLocationHdfsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateLocationHdfsRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateLocationHdfsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateLocationHdfsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1CreateLocationHdfsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1CreateLocationHdfsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-datasync/src/commands/DescribeLocationHdfsCommand.ts b/clients/client-datasync/src/commands/DescribeLocationHdfsCommand.ts new file mode 100644 index 000000000000..7f76efc458c4 --- /dev/null +++ b/clients/client-datasync/src/commands/DescribeLocationHdfsCommand.ts @@ -0,0 +1,96 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DataSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataSyncClient"; +import { DescribeLocationHdfsRequest, DescribeLocationHdfsResponse } from "../models/models_0"; +import { + deserializeAws_json1_1DescribeLocationHdfsCommand, + serializeAws_json1_1DescribeLocationHdfsCommand, +} from "../protocols/Aws_json1_1"; + +export interface DescribeLocationHdfsCommandInput extends DescribeLocationHdfsRequest {} +export interface DescribeLocationHdfsCommandOutput extends DescribeLocationHdfsResponse, __MetadataBearer {} + +/** + *

    Returns metadata, such as the authentication information about the Hadoop Distributed File + * System (HDFS) location.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DataSyncClient, DescribeLocationHdfsCommand } from "@aws-sdk/client-datasync"; // ES Modules import + * // const { DataSyncClient, DescribeLocationHdfsCommand } = require("@aws-sdk/client-datasync"); // CommonJS import + * const client = new DataSyncClient(config); + * const command = new DescribeLocationHdfsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeLocationHdfsCommandInput} for command's `input` shape. + * @see {@link DescribeLocationHdfsCommandOutput} for command's `response` shape. + * @see {@link DataSyncClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DescribeLocationHdfsCommand extends $Command< + DescribeLocationHdfsCommandInput, + DescribeLocationHdfsCommandOutput, + DataSyncClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeLocationHdfsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DataSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DataSyncClient"; + const commandName = "DescribeLocationHdfsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeLocationHdfsRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeLocationHdfsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeLocationHdfsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1DescribeLocationHdfsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1DescribeLocationHdfsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-datasync/src/commands/UpdateLocationHdfsCommand.ts b/clients/client-datasync/src/commands/UpdateLocationHdfsCommand.ts new file mode 100644 index 000000000000..cbe1f34bb84b --- /dev/null +++ b/clients/client-datasync/src/commands/UpdateLocationHdfsCommand.ts @@ -0,0 +1,96 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DataSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataSyncClient"; +import { UpdateLocationHdfsRequest, UpdateLocationHdfsResponse } from "../models/models_0"; +import { + deserializeAws_json1_1UpdateLocationHdfsCommand, + serializeAws_json1_1UpdateLocationHdfsCommand, +} from "../protocols/Aws_json1_1"; + +export interface UpdateLocationHdfsCommandInput extends UpdateLocationHdfsRequest {} +export interface UpdateLocationHdfsCommandOutput extends UpdateLocationHdfsResponse, __MetadataBearer {} + +/** + *

    Updates some parameters of a previously created location for a Hadoop Distributed File + * System cluster.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { DataSyncClient, UpdateLocationHdfsCommand } from "@aws-sdk/client-datasync"; // ES Modules import + * // const { DataSyncClient, UpdateLocationHdfsCommand } = require("@aws-sdk/client-datasync"); // CommonJS import + * const client = new DataSyncClient(config); + * const command = new UpdateLocationHdfsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateLocationHdfsCommandInput} for command's `input` shape. + * @see {@link UpdateLocationHdfsCommandOutput} for command's `response` shape. + * @see {@link DataSyncClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateLocationHdfsCommand extends $Command< + UpdateLocationHdfsCommandInput, + UpdateLocationHdfsCommandOutput, + DataSyncClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateLocationHdfsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: DataSyncClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "DataSyncClient"; + const commandName = "UpdateLocationHdfsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateLocationHdfsRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateLocationHdfsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateLocationHdfsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateLocationHdfsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1UpdateLocationHdfsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-datasync/src/commands/index.ts b/clients/client-datasync/src/commands/index.ts index 9dd749584476..175c53b1bfb1 100644 --- a/clients/client-datasync/src/commands/index.ts +++ b/clients/client-datasync/src/commands/index.ts @@ -2,6 +2,7 @@ export * from "./CancelTaskExecutionCommand"; export * from "./CreateAgentCommand"; export * from "./CreateLocationEfsCommand"; export * from "./CreateLocationFsxWindowsCommand"; +export * from "./CreateLocationHdfsCommand"; export * from "./CreateLocationNfsCommand"; export * from "./CreateLocationObjectStorageCommand"; export * from "./CreateLocationS3Command"; @@ -13,6 +14,7 @@ export * from "./DeleteTaskCommand"; export * from "./DescribeAgentCommand"; export * from "./DescribeLocationEfsCommand"; export * from "./DescribeLocationFsxWindowsCommand"; +export * from "./DescribeLocationHdfsCommand"; export * from "./DescribeLocationNfsCommand"; export * from "./DescribeLocationObjectStorageCommand"; export * from "./DescribeLocationS3Command"; @@ -28,6 +30,7 @@ export * from "./StartTaskExecutionCommand"; export * from "./TagResourceCommand"; export * from "./UntagResourceCommand"; export * from "./UpdateAgentCommand"; +export * from "./UpdateLocationHdfsCommand"; export * from "./UpdateLocationNfsCommand"; export * from "./UpdateLocationObjectStorageCommand"; export * from "./UpdateLocationSmbCommand"; diff --git a/clients/client-datasync/src/models/models_0.ts b/clients/client-datasync/src/models/models_0.ts index e17c59f06c64..adb41f32bb12 100644 --- a/clients/client-datasync/src/models/models_0.ts +++ b/clients/client-datasync/src/models/models_0.ts @@ -112,7 +112,7 @@ export namespace InvalidRequestException { } /** - *

    Represents a single entry in a list of AWS resource tags. TagListEntry + *

    Represents a single entry in a list of Amazon Web Services resource tags. TagListEntry * returns an array that contains a list of tasks when the * ListTagsForResource * operation is called.

    @@ -416,6 +416,211 @@ export namespace CreateLocationFsxWindowsResponse { }); } +export enum HdfsAuthenticationType { + KERBEROS = "KERBEROS", + SIMPLE = "SIMPLE", +} + +/** + *

    The NameNode of the Hadoop Distributed File System (HDFS). The NameNode manages the file + * system's namespace. The NameNode performs operations such as opening, closing, and renaming + * files and directories. The NameNode contains the information to map blocks of data to the + * DataNodes.

    + */ +export interface HdfsNameNode { + /** + *

    The hostname of the NameNode in the HDFS cluster. This value is the IP address or Domain + * Name Service (DNS) name of the NameNode. An agent that's installed on-premises uses this + * hostname to communicate with the NameNode in the network.

    + */ + Hostname: string | undefined; + + /** + *

    The port that the NameNode uses to listen to client requests.

    + */ + Port: number | undefined; +} + +export namespace HdfsNameNode { + /** + * @internal + */ + export const filterSensitiveLog = (obj: HdfsNameNode): any => ({ + ...obj, + }); +} + +export enum HdfsDataTransferProtection { + AUTHENTICATION = "AUTHENTICATION", + DISABLED = "DISABLED", + INTEGRITY = "INTEGRITY", + PRIVACY = "PRIVACY", +} + +export enum HdfsRpcProtection { + AUTHENTICATION = "AUTHENTICATION", + DISABLED = "DISABLED", + INTEGRITY = "INTEGRITY", + PRIVACY = "PRIVACY", +} + +/** + *

    The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) + * and data transfer privacy settings configured on the Hadoop Distributed File System (HDFS) + * cluster.

    + */ +export interface QopConfiguration { + /** + *

    The RPC protection setting configured on the HDFS cluster. This setting corresponds to + * your hadoop.rpc.protection setting in your core-site.xml file on + * your Hadoop cluster.

    + */ + RpcProtection?: HdfsRpcProtection | string; + + /** + *

    The data transfer protection setting configured on the HDFS cluster. This setting + * corresponds to your dfs.data.transfer.protection setting in the + * hdfs-site.xml file on your Hadoop cluster.

    + */ + DataTransferProtection?: HdfsDataTransferProtection | string; +} + +export namespace QopConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: QopConfiguration): any => ({ + ...obj, + }); +} + +export interface CreateLocationHdfsRequest { + /** + *

    A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write + * data to the HDFS cluster. If the subdirectory isn't specified, it will default to + * /.

    + */ + Subdirectory?: string; + + /** + *

    The NameNode that manages the HDFS namespace. The NameNode performs operations such as + * opening, closing, and renaming files and directories. The NameNode contains the information to + * map blocks of data to the DataNodes. You can use only one NameNode.

    + */ + NameNodes: HdfsNameNode[] | undefined; + + /** + *

    The size of data blocks to write into the HDFS cluster. The block size must be a multiple + * of 512 bytes. The default block size is 128 mebibytes (MiB).

    + */ + BlockSize?: number; + + /** + *

    The number of DataNodes to replicate the data to when writing to the HDFS cluster. By + * default, data is replicated to three DataNodes.

    + */ + ReplicationFactor?: number; + + /** + *

    The URI of the HDFS cluster's Key Management Server (KMS).

    + */ + KmsKeyProviderUri?: string; + + /** + *

    The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) + * and data transfer protection settings configured on the Hadoop Distributed File System (HDFS) + * cluster. If QopConfiguration isn't specified, RpcProtection and + * DataTransferProtection default to PRIVACY. If you set + * RpcProtection or DataTransferProtection, the other parameter + * assumes the same value.

    + */ + QopConfiguration?: QopConfiguration; + + /** + *

    The type of authentication used to determine the identity of the user.

    + */ + AuthenticationType: HdfsAuthenticationType | string | undefined; + + /** + *

    The user name used to identify the client on the host operating system.

    + * + *

    If SIMPLE is specified for AuthenticationType, this parameter + * is required.

    + *
    + */ + SimpleUser?: string; + + /** + *

    The Kerberos principal with access to the files and folders on the HDFS cluster.

    + * + *

    If KERBEROS is specified for AuthenticationType, this + * parameter is required.

    + *
    + */ + KerberosPrincipal?: string; + + /** + *

    The Kerberos key table (keytab) that contains mappings between the defined Kerberos + * principal and the encrypted keys. You can load the keytab from a file by providing the file's + * address. If you're using the CLI, it performs base64 encoding for you. + * Otherwise, provide the base64-encoded text.

    + * + *

    If KERBEROS is specified for AuthenticationType, this + * parameter is required.

    + *
    + */ + KerberosKeytab?: Uint8Array; + + /** + *

    The krb5.conf file that contains the Kerberos configuration information. You + * can load the krb5.conf file by providing the file's address. If you're using the + * CLI, it performs the base64 encoding for you. Otherwise, provide the + * base64-encoded text.

    + * + *

    If KERBEROS is specified for AuthenticationType, this + * parameter is required.

    + *
    + */ + KerberosKrb5Conf?: Uint8Array; + + /** + *

    The Amazon Resource Names (ARNs) of the agents that are used to connect to the HDFS + * cluster.

    + */ + AgentArns: string[] | undefined; + + /** + *

    The key-value pair that represents the tag that you want to add to the location. The value + * can be an empty string. We recommend using tags to name your resources.

    + */ + Tags?: TagListEntry[]; +} + +export namespace CreateLocationHdfsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateLocationHdfsRequest): any => ({ + ...obj, + }); +} + +export interface CreateLocationHdfsResponse { + /** + *

    The ARN of the source HDFS cluster location that's created.

    + */ + LocationArn?: string; +} + +export namespace CreateLocationHdfsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateLocationHdfsResponse): any => ({ + ...obj, + }); +} + export enum NfsVersion { AUTOMATIC = "AUTOMATIC", NFS3 = "NFS3", @@ -448,7 +653,7 @@ export interface NfsMountOptions { * * NFSv4.0 * - stateful, firewall-friendly protocol version that supports - * delegations and pseudo filesystems.

    + * delegations and pseudo file systems.

    * *
  • *

    @@ -1345,9 +1550,8 @@ export interface CreateTaskRequest { /** *

    A list of filter rules that determines which files to include when running a task. The - * pattern should contain a single filter string that consists of the patterns to include. The - * patterns are delimited by "|" (that is, a pipe). For example: - * "/folder1|/folder2"

    + * pattern contains a single filter string that consists of the patterns to include. The patterns + * are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2".

    */ Includes?: FilterRule[]; } @@ -1708,6 +1912,98 @@ export namespace DescribeLocationFsxWindowsResponse { }); } +export interface DescribeLocationHdfsRequest { + /** + *

    The Amazon Resource Name (ARN) of the HDFS cluster location to describe.

    + */ + LocationArn: string | undefined; +} + +export namespace DescribeLocationHdfsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeLocationHdfsRequest): any => ({ + ...obj, + }); +} + +export interface DescribeLocationHdfsResponse { + /** + *

    The ARN of the HDFS cluster location.

    + */ + LocationArn?: string; + + /** + *

    The URI of the HDFS cluster location.

    + */ + LocationUri?: string; + + /** + *

    The NameNode that manage the HDFS namespace.

    + */ + NameNodes?: HdfsNameNode[]; + + /** + *

    The size of the data blocks to write into the HDFS cluster.

    + */ + BlockSize?: number; + + /** + *

    The number of DataNodes to replicate the data to when writing to the HDFS cluster.

    + */ + ReplicationFactor?: number; + + /** + *

    The URI of the HDFS cluster's Key Management Server (KMS).

    + */ + KmsKeyProviderUri?: string; + + /** + *

    The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) + * and data transfer protection settings configured on the Hadoop Distributed File System (HDFS) + * cluster.

    + */ + QopConfiguration?: QopConfiguration; + + /** + *

    The type of authentication used to determine the identity of the user.

    + */ + AuthenticationType?: HdfsAuthenticationType | string; + + /** + *

    The user name used to identify the client on the host operating system. This parameter is + * used if the AuthenticationType is defined as SIMPLE.

    + */ + SimpleUser?: string; + + /** + *

    The Kerberos principal with access to the files and folders on the HDFS cluster. This + * parameter is used if the AuthenticationType is defined as + * KERBEROS.

    + */ + KerberosPrincipal?: string; + + /** + *

    The ARNs of the agents that are used to connect to the HDFS cluster.

    + */ + AgentArns?: string[]; + + /** + *

    The time that the HDFS location was created.

    + */ + CreationTime?: Date; +} + +export namespace DescribeLocationHdfsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeLocationHdfsResponse): any => ({ + ...obj, + }); +} + /** *

    DescribeLocationNfsRequest

    */ @@ -2059,14 +2355,14 @@ export interface DescribeTaskResponse { CloudWatchLogGroupArn?: string; /** - *

    The Amazon Resource Name (ARN) of the source ENIs (Elastic Network Interface) that was + *

    The Amazon Resource Names (ARNs) of the source elastic network interfaces (ENIs) that were * created for your subnet.

    */ SourceNetworkInterfaceArns?: string[]; /** - *

    The Amazon Resource Name (ARN) of the destination ENIs (Elastic Network Interface) that - * was created for your subnet.

    + *

    The Amazon Resource Names (ARNs) of the destination elastic network interfaces (ENIs) that + * were created for your subnet.

    */ DestinationNetworkInterfaceArns?: string[]; @@ -2083,8 +2379,7 @@ export interface DescribeTaskResponse { /** *

    A list of filter rules that determines which files to exclude from a task. The list should * contain a single filter string that consists of the patterns to exclude. The patterns are - * delimited by "|" (that is, a pipe), for example: "/folder1|/folder2" - *

    + * delimited by "|" (that is, a pipe), for example, "/folder1|/folder2".

    *

    *

    */ @@ -2114,9 +2409,8 @@ export interface DescribeTaskResponse { /** *

    A list of filter rules that determines which files to include when running a task. The - * pattern should contain a single filter string that consists of the patterns to include. The - * patterns are delimited by "|" (that is, a pipe). For example: - * "/folder1|/folder2"

    + * pattern contains a single filter string that consists of the patterns to include. The patterns + * are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2".

    */ Includes?: FilterRule[]; } @@ -2845,8 +3139,8 @@ export interface StartTaskExecutionRequest { /** *

    A list of filter rules that determines which files to include when running a task. The * pattern should contain a single filter string that consists of the patterns to include. The - * patterns are delimited by "|" (that is, a pipe). For example: "/folder1|/folder2" - *

    + * patterns are delimited by "|" (that is, a pipe), for example, + * "/folder1|/folder2".

    * *

    *

    @@ -2855,9 +3149,8 @@ export interface StartTaskExecutionRequest { /** *

    A list of filter rules that determines which files to exclude from a task. The list - * should contain a single filter string that consists of the patterns to exclude. The - * patterns are delimited by "|" (that is, a pipe), for example, - * "/folder1|/folder2".

    + * contains a single filter string that consists of the patterns to exclude. The patterns are + * delimited by "|" (that is, a pipe), for example, "/folder1|/folder2".

    */ Excludes?: FilterRule[]; } @@ -2996,6 +3289,104 @@ export namespace UpdateAgentResponse { }); } +export interface UpdateLocationHdfsRequest { + /** + *

    The Amazon Resource Name (ARN) of the source HDFS cluster location.

    + */ + LocationArn: string | undefined; + + /** + *

    A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write + * data to the HDFS cluster.

    + */ + Subdirectory?: string; + + /** + *

    The NameNode that manages the HDFS namespace. The NameNode performs operations such as + * opening, closing, and renaming files and directories. The NameNode contains the information to + * map blocks of data to the DataNodes. You can use only one NameNode.

    + */ + NameNodes?: HdfsNameNode[]; + + /** + *

    The size of the data blocks to write into the HDFS cluster.

    + */ + BlockSize?: number; + + /** + *

    The number of DataNodes to replicate the data to when writing to the HDFS cluster.

    + */ + ReplicationFactor?: number; + + /** + *

    The URI of the HDFS cluster's Key Management Server (KMS).

    + */ + KmsKeyProviderUri?: string; + + /** + *

    The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) + * and data transfer privacy settings configured on the Hadoop Distributed File System (HDFS) + * cluster.

    + */ + QopConfiguration?: QopConfiguration; + + /** + *

    The type of authentication used to determine the identity of the user.

    + */ + AuthenticationType?: HdfsAuthenticationType | string; + + /** + *

    The user name used to identify the client on the host operating system.

    + */ + SimpleUser?: string; + + /** + *

    The Kerberos principal with access to the files and folders on the HDFS cluster.

    + */ + KerberosPrincipal?: string; + + /** + *

    The Kerberos key table (keytab) that contains mappings between the defined Kerberos + * principal and the encrypted keys. You can load the keytab from a file by providing the file's + * address. If you use the AWS CLI, it performs base64 encoding for you. Otherwise, provide the + * base64-encoded text.

    + */ + KerberosKeytab?: Uint8Array; + + /** + *

    The krb5.conf file that contains the Kerberos configuration information. You + * can load the krb5.conf file by providing the file's address. If you're using the + * AWS CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded + * text.

    + */ + KerberosKrb5Conf?: Uint8Array; + + /** + *

    The ARNs of the agents that are used to connect to the HDFS cluster.

    + */ + AgentArns?: string[]; +} + +export namespace UpdateLocationHdfsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateLocationHdfsRequest): any => ({ + ...obj, + }); +} + +export interface UpdateLocationHdfsResponse {} + +export namespace UpdateLocationHdfsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateLocationHdfsResponse): any => ({ + ...obj, + }); +} + export interface UpdateLocationNfsRequest { /** *

    The Amazon Resource Name (ARN) of the NFS location to update.

    @@ -3239,8 +3630,7 @@ export interface UpdateTaskRequest { /** *

    A list of filter rules that determines which files to exclude from a task. The list should * contain a single filter string that consists of the patterns to exclude. The patterns are - * delimited by "|" (that is, a pipe), for example: "/folder1|/folder2" - *

    + * delimited by "|" (that is, a pipe), for example, "/folder1|/folder2".

    *

    *

    */ @@ -3260,16 +3650,15 @@ export interface UpdateTaskRequest { Name?: string; /** - *

    The Amazon Resource Name (ARN) of the resource name of the CloudWatch - * LogGroup.

    + *

    The Amazon Resource Name (ARN) of the resource name of the Amazon CloudWatch log + * group.

    */ CloudWatchLogGroupArn?: string; /** *

    A list of filter rules that determines which files to include when running a task. The - * pattern should contain a single filter string that consists of the patterns to include. The - * patterns are delimited by "|" (that is, a pipe). For example: - * "/folder1|/folder2"

    + * pattern contains a single filter string that consists of the patterns to include. The patterns + * are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2".

    */ Includes?: FilterRule[]; } diff --git a/clients/client-datasync/src/protocols/Aws_json1_1.ts b/clients/client-datasync/src/protocols/Aws_json1_1.ts index 2cd3cc5c0f61..584cedda33f7 100644 --- a/clients/client-datasync/src/protocols/Aws_json1_1.ts +++ b/clients/client-datasync/src/protocols/Aws_json1_1.ts @@ -26,6 +26,7 @@ import { CreateLocationFsxWindowsCommandInput, CreateLocationFsxWindowsCommandOutput, } from "../commands/CreateLocationFsxWindowsCommand"; +import { CreateLocationHdfsCommandInput, CreateLocationHdfsCommandOutput } from "../commands/CreateLocationHdfsCommand"; import { CreateLocationNfsCommandInput, CreateLocationNfsCommandOutput } from "../commands/CreateLocationNfsCommand"; import { CreateLocationObjectStorageCommandInput, @@ -46,6 +47,10 @@ import { DescribeLocationFsxWindowsCommandInput, DescribeLocationFsxWindowsCommandOutput, } from "../commands/DescribeLocationFsxWindowsCommand"; +import { + DescribeLocationHdfsCommandInput, + DescribeLocationHdfsCommandOutput, +} from "../commands/DescribeLocationHdfsCommand"; import { DescribeLocationNfsCommandInput, DescribeLocationNfsCommandOutput, @@ -76,6 +81,7 @@ import { StartTaskExecutionCommandInput, StartTaskExecutionCommandOutput } from import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { UpdateAgentCommandInput, UpdateAgentCommandOutput } from "../commands/UpdateAgentCommand"; +import { UpdateLocationHdfsCommandInput, UpdateLocationHdfsCommandOutput } from "../commands/UpdateLocationHdfsCommand"; import { UpdateLocationNfsCommandInput, UpdateLocationNfsCommandOutput } from "../commands/UpdateLocationNfsCommand"; import { UpdateLocationObjectStorageCommandInput, @@ -97,6 +103,8 @@ import { CreateLocationEfsResponse, CreateLocationFsxWindowsRequest, CreateLocationFsxWindowsResponse, + CreateLocationHdfsRequest, + CreateLocationHdfsResponse, CreateLocationNfsRequest, CreateLocationNfsResponse, CreateLocationObjectStorageRequest, @@ -119,6 +127,8 @@ import { DescribeLocationEfsResponse, DescribeLocationFsxWindowsRequest, DescribeLocationFsxWindowsResponse, + DescribeLocationHdfsRequest, + DescribeLocationHdfsResponse, DescribeLocationNfsRequest, DescribeLocationNfsResponse, DescribeLocationObjectStorageRequest, @@ -133,6 +143,7 @@ import { DescribeTaskResponse, Ec2Config, FilterRule, + HdfsNameNode, InternalException, InvalidRequestException, ListAgentsRequest, @@ -151,6 +162,7 @@ import { OnPremConfig, Options, PrivateLinkConfig, + QopConfiguration, S3Config, SmbMountOptions, StartTaskExecutionRequest, @@ -167,6 +179,8 @@ import { UntagResourceResponse, UpdateAgentRequest, UpdateAgentResponse, + UpdateLocationHdfsRequest, + UpdateLocationHdfsResponse, UpdateLocationNfsRequest, UpdateLocationNfsResponse, UpdateLocationObjectStorageRequest, @@ -231,6 +245,19 @@ export const serializeAws_json1_1CreateLocationFsxWindowsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1CreateLocationHdfsCommand = async ( + input: CreateLocationHdfsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "FmrsService.CreateLocationHdfs", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1CreateLocationHdfsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1CreateLocationNfsCommand = async ( input: CreateLocationNfsCommandInput, context: __SerdeContext @@ -374,6 +401,19 @@ export const serializeAws_json1_1DescribeLocationFsxWindowsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1DescribeLocationHdfsCommand = async ( + input: DescribeLocationHdfsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "FmrsService.DescribeLocationHdfs", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1DescribeLocationHdfsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1DescribeLocationNfsCommand = async ( input: DescribeLocationNfsCommandInput, context: __SerdeContext @@ -569,6 +609,19 @@ export const serializeAws_json1_1UpdateAgentCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1UpdateLocationHdfsCommand = async ( + input: UpdateLocationHdfsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "FmrsService.UpdateLocationHdfs", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1UpdateLocationHdfsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1UpdateLocationNfsCommand = async ( input: UpdateLocationNfsCommandInput, context: __SerdeContext @@ -882,6 +935,68 @@ const deserializeAws_json1_1CreateLocationFsxWindowsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_json1_1CreateLocationHdfsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateLocationHdfsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateLocationHdfsResponse(data, context); + const response: CreateLocationHdfsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1CreateLocationHdfsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalException": + case "com.amazonaws.datasync#InternalException": + response = { + ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.datasync#InvalidRequestException": + response = { + ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_json1_1CreateLocationNfsCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -1564,6 +1679,68 @@ const deserializeAws_json1_1DescribeLocationFsxWindowsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_json1_1DescribeLocationHdfsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeLocationHdfsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DescribeLocationHdfsResponse(data, context); + const response: DescribeLocationHdfsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1DescribeLocationHdfsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalException": + case "com.amazonaws.datasync#InternalException": + response = { + ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.datasync#InvalidRequestException": + response = { + ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_json1_1DescribeLocationNfsCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -2494,6 +2671,68 @@ const deserializeAws_json1_1UpdateAgentCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_json1_1UpdateLocationHdfsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UpdateLocationHdfsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateLocationHdfsResponse(data, context); + const response: UpdateLocationHdfsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1UpdateLocationHdfsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalException": + case "com.amazonaws.datasync#InternalException": + response = { + ...(await deserializeAws_json1_1InternalExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidRequestException": + case "com.amazonaws.datasync#InvalidRequestException": + response = { + ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_json1_1UpdateLocationNfsCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -2906,6 +3145,39 @@ const serializeAws_json1_1CreateLocationFsxWindowsRequest = ( }; }; +const serializeAws_json1_1CreateLocationHdfsRequest = ( + input: CreateLocationHdfsRequest, + context: __SerdeContext +): any => { + return { + ...(input.AgentArns !== undefined && + input.AgentArns !== null && { AgentArns: serializeAws_json1_1AgentArnList(input.AgentArns, context) }), + ...(input.AuthenticationType !== undefined && + input.AuthenticationType !== null && { AuthenticationType: input.AuthenticationType }), + ...(input.BlockSize !== undefined && input.BlockSize !== null && { BlockSize: input.BlockSize }), + ...(input.KerberosKeytab !== undefined && + input.KerberosKeytab !== null && { KerberosKeytab: context.base64Encoder(input.KerberosKeytab) }), + ...(input.KerberosKrb5Conf !== undefined && + input.KerberosKrb5Conf !== null && { KerberosKrb5Conf: context.base64Encoder(input.KerberosKrb5Conf) }), + ...(input.KerberosPrincipal !== undefined && + input.KerberosPrincipal !== null && { KerberosPrincipal: input.KerberosPrincipal }), + ...(input.KmsKeyProviderUri !== undefined && + input.KmsKeyProviderUri !== null && { KmsKeyProviderUri: input.KmsKeyProviderUri }), + ...(input.NameNodes !== undefined && + input.NameNodes !== null && { NameNodes: serializeAws_json1_1HdfsNameNodeList(input.NameNodes, context) }), + ...(input.QopConfiguration !== undefined && + input.QopConfiguration !== null && { + QopConfiguration: serializeAws_json1_1QopConfiguration(input.QopConfiguration, context), + }), + ...(input.ReplicationFactor !== undefined && + input.ReplicationFactor !== null && { ReplicationFactor: input.ReplicationFactor }), + ...(input.SimpleUser !== undefined && input.SimpleUser !== null && { SimpleUser: input.SimpleUser }), + ...(input.Subdirectory !== undefined && input.Subdirectory !== null && { Subdirectory: input.Subdirectory }), + ...(input.Tags !== undefined && + input.Tags !== null && { Tags: serializeAws_json1_1InputTagList(input.Tags, context) }), + }; +}; + const serializeAws_json1_1CreateLocationNfsRequest = ( input: CreateLocationNfsRequest, context: __SerdeContext @@ -3047,6 +3319,15 @@ const serializeAws_json1_1DescribeLocationFsxWindowsRequest = ( }; }; +const serializeAws_json1_1DescribeLocationHdfsRequest = ( + input: DescribeLocationHdfsRequest, + context: __SerdeContext +): any => { + return { + ...(input.LocationArn !== undefined && input.LocationArn !== null && { LocationArn: input.LocationArn }), + }; +}; + const serializeAws_json1_1DescribeLocationNfsRequest = ( input: DescribeLocationNfsRequest, context: __SerdeContext @@ -3149,6 +3430,24 @@ const serializeAws_json1_1FilterValues = (input: string[], context: __SerdeConte }); }; +const serializeAws_json1_1HdfsNameNode = (input: HdfsNameNode, context: __SerdeContext): any => { + return { + ...(input.Hostname !== undefined && input.Hostname !== null && { Hostname: input.Hostname }), + ...(input.Port !== undefined && input.Port !== null && { Port: input.Port }), + }; +}; + +const serializeAws_json1_1HdfsNameNodeList = (input: HdfsNameNode[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return serializeAws_json1_1HdfsNameNode(entry, context); + }); +}; + const serializeAws_json1_1InputTagList = (input: TagListEntry[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -3286,6 +3585,14 @@ const serializeAws_json1_1PLSubnetArnList = (input: string[], context: __SerdeCo }); }; +const serializeAws_json1_1QopConfiguration = (input: QopConfiguration, context: __SerdeContext): any => { + return { + ...(input.DataTransferProtection !== undefined && + input.DataTransferProtection !== null && { DataTransferProtection: input.DataTransferProtection }), + ...(input.RpcProtection !== undefined && input.RpcProtection !== null && { RpcProtection: input.RpcProtection }), + }; +}; + const serializeAws_json1_1S3Config = (input: S3Config, context: __SerdeContext): any => { return { ...(input.BucketAccessRoleArn !== undefined && @@ -3384,6 +3691,38 @@ const serializeAws_json1_1UpdateAgentRequest = (input: UpdateAgentRequest, conte }; }; +const serializeAws_json1_1UpdateLocationHdfsRequest = ( + input: UpdateLocationHdfsRequest, + context: __SerdeContext +): any => { + return { + ...(input.AgentArns !== undefined && + input.AgentArns !== null && { AgentArns: serializeAws_json1_1AgentArnList(input.AgentArns, context) }), + ...(input.AuthenticationType !== undefined && + input.AuthenticationType !== null && { AuthenticationType: input.AuthenticationType }), + ...(input.BlockSize !== undefined && input.BlockSize !== null && { BlockSize: input.BlockSize }), + ...(input.KerberosKeytab !== undefined && + input.KerberosKeytab !== null && { KerberosKeytab: context.base64Encoder(input.KerberosKeytab) }), + ...(input.KerberosKrb5Conf !== undefined && + input.KerberosKrb5Conf !== null && { KerberosKrb5Conf: context.base64Encoder(input.KerberosKrb5Conf) }), + ...(input.KerberosPrincipal !== undefined && + input.KerberosPrincipal !== null && { KerberosPrincipal: input.KerberosPrincipal }), + ...(input.KmsKeyProviderUri !== undefined && + input.KmsKeyProviderUri !== null && { KmsKeyProviderUri: input.KmsKeyProviderUri }), + ...(input.LocationArn !== undefined && input.LocationArn !== null && { LocationArn: input.LocationArn }), + ...(input.NameNodes !== undefined && + input.NameNodes !== null && { NameNodes: serializeAws_json1_1HdfsNameNodeList(input.NameNodes, context) }), + ...(input.QopConfiguration !== undefined && + input.QopConfiguration !== null && { + QopConfiguration: serializeAws_json1_1QopConfiguration(input.QopConfiguration, context), + }), + ...(input.ReplicationFactor !== undefined && + input.ReplicationFactor !== null && { ReplicationFactor: input.ReplicationFactor }), + ...(input.SimpleUser !== undefined && input.SimpleUser !== null && { SimpleUser: input.SimpleUser }), + ...(input.Subdirectory !== undefined && input.Subdirectory !== null && { Subdirectory: input.Subdirectory }), + }; +}; + const serializeAws_json1_1UpdateLocationNfsRequest = ( input: UpdateLocationNfsRequest, context: __SerdeContext @@ -3526,6 +3865,15 @@ const deserializeAws_json1_1CreateLocationFsxWindowsResponse = ( } as any; }; +const deserializeAws_json1_1CreateLocationHdfsResponse = ( + output: any, + context: __SerdeContext +): CreateLocationHdfsResponse => { + return { + LocationArn: __expectString(output.LocationArn), + } as any; +}; + const deserializeAws_json1_1CreateLocationNfsResponse = ( output: any, context: __SerdeContext @@ -3639,6 +3987,38 @@ const deserializeAws_json1_1DescribeLocationFsxWindowsResponse = ( } as any; }; +const deserializeAws_json1_1DescribeLocationHdfsResponse = ( + output: any, + context: __SerdeContext +): DescribeLocationHdfsResponse => { + return { + AgentArns: + output.AgentArns !== undefined && output.AgentArns !== null + ? deserializeAws_json1_1AgentArnList(output.AgentArns, context) + : undefined, + AuthenticationType: __expectString(output.AuthenticationType), + BlockSize: __expectInt32(output.BlockSize), + CreationTime: + output.CreationTime !== undefined && output.CreationTime !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) + : undefined, + KerberosPrincipal: __expectString(output.KerberosPrincipal), + KmsKeyProviderUri: __expectString(output.KmsKeyProviderUri), + LocationArn: __expectString(output.LocationArn), + LocationUri: __expectString(output.LocationUri), + NameNodes: + output.NameNodes !== undefined && output.NameNodes !== null + ? deserializeAws_json1_1HdfsNameNodeList(output.NameNodes, context) + : undefined, + QopConfiguration: + output.QopConfiguration !== undefined && output.QopConfiguration !== null + ? deserializeAws_json1_1QopConfiguration(output.QopConfiguration, context) + : undefined, + ReplicationFactor: __expectInt32(output.ReplicationFactor), + SimpleUser: __expectString(output.SimpleUser), + } as any; +}; + const deserializeAws_json1_1DescribeLocationNfsResponse = ( output: any, context: __SerdeContext @@ -3856,6 +4236,24 @@ const deserializeAws_json1_1FilterRule = (output: any, context: __SerdeContext): } as any; }; +const deserializeAws_json1_1HdfsNameNode = (output: any, context: __SerdeContext): HdfsNameNode => { + return { + Hostname: __expectString(output.Hostname), + Port: __expectInt32(output.Port), + } as any; +}; + +const deserializeAws_json1_1HdfsNameNodeList = (output: any, context: __SerdeContext): HdfsNameNode[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_json1_1HdfsNameNode(entry, context); + }); +}; + const deserializeAws_json1_1InternalException = (output: any, context: __SerdeContext): InternalException => { return { errorCode: __expectString(output.errorCode), @@ -4029,6 +4427,13 @@ const deserializeAws_json1_1PrivateLinkConfig = (output: any, context: __SerdeCo } as any; }; +const deserializeAws_json1_1QopConfiguration = (output: any, context: __SerdeContext): QopConfiguration => { + return { + DataTransferProtection: __expectString(output.DataTransferProtection), + RpcProtection: __expectString(output.RpcProtection), + } as any; +}; + const deserializeAws_json1_1S3Config = (output: any, context: __SerdeContext): S3Config => { return { BucketAccessRoleArn: __expectString(output.BucketAccessRoleArn), @@ -4140,6 +4545,13 @@ const deserializeAws_json1_1UpdateAgentResponse = (output: any, context: __Serde return {} as any; }; +const deserializeAws_json1_1UpdateLocationHdfsResponse = ( + output: any, + context: __SerdeContext +): UpdateLocationHdfsResponse => { + return {} as any; +}; + const deserializeAws_json1_1UpdateLocationNfsResponse = ( output: any, context: __SerdeContext diff --git a/clients/client-ec2/src/models/models_0.ts b/clients/client-ec2/src/models/models_0.ts index 0ab443a4b83f..f4a12ded15c1 100644 --- a/clients/client-ec2/src/models/models_0.ts +++ b/clients/client-ec2/src/models/models_0.ts @@ -7883,9 +7883,10 @@ export interface InstanceRequirementsRequest { * an asterisk (*), to exclude an instance family, type, size, or generation. The * following are examples: m5.8xlarge, c5*.*, m5a.*, * r*, *3*.

    - *

    For example, if you specify c5*.*, Amazon EC2 will exclude the entire C5 - * instance family (all C5a and C5n instance types). If you specify c5a.*, Amazon EC2 - * excludes all the C5a instance types, but does not exclude the C5n instance types.

    + *

    For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance + * family, which includes all C5a and C5n instance types. If you specify + * m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n + * instance types.

    *

    Default: No excluded instance types

    */ ExcludedInstanceTypes?: string[]; @@ -8403,26 +8404,37 @@ export type SpotInstanceInterruptionBehavior = "hibernate" | "stop" | "terminate export enum FleetReplacementStrategy { LAUNCH = "launch", + LAUNCH_BEFORE_TERMINATE = "launch-before-terminate", } /** - *

    The Spot Instance replacement strategy to use when Amazon EC2 emits a signal that your - * Spot Instance is at an elevated risk of being interrupted. For more information, see - * Capacity rebalancing in the Amazon EC2 User Guide.

    + *

    The Spot Instance replacement strategy to use when Amazon EC2 emits a rebalance + * notification signal that your Spot Instance is at an elevated risk of being interrupted. + * For more information, see Capacity rebalancing in the Amazon EC2 User Guide.

    */ export interface FleetSpotCapacityRebalanceRequest { /** *

    The replacement strategy to use. Only available for fleets of type * maintain.

    - *

    To allow EC2 Fleet to launch a replacement Spot Instance when an instance rebalance - * notification is emitted for an existing Spot Instance in the fleet, specify - * launch. You must specify a value, otherwise you get an error.

    - * - *

    When a replacement instance is launched, the instance marked for rebalance is not - * automatically terminated. You can terminate it, or you can leave it running. You are charged for all instances while they are running.

    - *
    + *

    + * launch - EC2 Fleet launches a replacement Spot Instance when a rebalance + * notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not + * terminate the instances that receive a rebalance notification. You can terminate the old + * instances, or you can leave them running. You are charged for all instances while they are + * running.

    + *

    + * launch-before-terminate - EC2 Fleet launches a replacement Spot Instance + * when a rebalance notification is emitted for an existing Spot Instance in the fleet, and + * then, after a delay that you specify (in TerminationDelay), terminates the + * instances that received a rebalance notification.

    */ ReplacementStrategy?: FleetReplacementStrategy | string; + + /** + *

    The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot + * Instance after launching a new replacement Spot Instance.

    + */ + TerminationDelay?: number; } export namespace FleetSpotCapacityRebalanceRequest { diff --git a/clients/client-ec2/src/models/models_1.ts b/clients/client-ec2/src/models/models_1.ts index a630b5f6938c..0b420ff9acd7 100644 --- a/clients/client-ec2/src/models/models_1.ts +++ b/clients/client-ec2/src/models/models_1.ts @@ -204,9 +204,10 @@ export interface InstanceRequirements { * an asterisk (*), to exclude an instance type, size, or generation. The * following are examples: m5.8xlarge, c5*.*, m5a.*, * r*, *3*.

    - *

    For example, if you specify c5*.*, Amazon EC2 will exclude the entire C5 - * instance family (all C5a and C5n instance types). If you specify c5a.*, Amazon EC2 - * excludes all the C5a instance types, but does not exclude the C5n instance types.

    + *

    For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance + * family, which includes all C5a and C5n instance types. If you specify + * m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n + * instance types.

    *

    Default: No excluded instance types

    */ ExcludedInstanceTypes?: string[]; diff --git a/clients/client-ec2/src/models/models_2.ts b/clients/client-ec2/src/models/models_2.ts index 3ad6b698adc9..667070f34bef 100644 --- a/clients/client-ec2/src/models/models_2.ts +++ b/clients/client-ec2/src/models/models_2.ts @@ -8076,15 +8076,27 @@ export namespace OnDemandOptions { */ export interface FleetSpotCapacityRebalance { /** - *

    To allow EC2 Fleet to launch a replacement Spot Instance when an instance rebalance - * notification is emitted for an existing Spot Instance in the fleet, specify - * launch. Only available for fleets of type maintain.

    - * - *

    When a replacement instance is launched, the instance marked for rebalance is not - * automatically terminated. You can terminate it, or you can leave it running. You are charged for both instances while they are running.

    - *
    + *

    The replacement strategy to use. Only available for fleets of type + * maintain.

    + *

    + * launch - EC2 Fleet launches a new replacement Spot Instance when a + * rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet + * does not terminate the instances that receive a rebalance notification. You can terminate + * the old instances, or you can leave them running. You are charged for all instances while + * they are running.

    + *

    + * launch-before-terminate - EC2 Fleet launches a new replacement Spot + * Instance when a rebalance notification is emitted for an existing Spot Instance in the + * fleet, and then, after a delay that you specify (in TerminationDelay), + * terminates the instances that received a rebalance notification.

    */ ReplacementStrategy?: FleetReplacementStrategy | string; + + /** + *

    The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot + * Instance after launching a new replacement Spot Instance.

    + */ + TerminationDelay?: number; } export namespace FleetSpotCapacityRebalance { diff --git a/clients/client-ec2/src/models/models_3.ts b/clients/client-ec2/src/models/models_3.ts index 42799994a9fe..14939af9f959 100644 --- a/clients/client-ec2/src/models/models_3.ts +++ b/clients/client-ec2/src/models/models_3.ts @@ -515,6 +515,16 @@ export interface LaunchPermission { *

    Constraints: Up to 10 000 account IDs can be specified in a single request.

    */ UserId?: string; + + /** + *

    The Amazon Resource Name (ARN) of an organization.

    + */ + OrganizationArn?: string; + + /** + *

    The Amazon Resource Name (ARN) of an organizational unit (OU).

    + */ + OrganizationalUnitArn?: string; } export namespace LaunchPermission { @@ -590,6 +600,22 @@ export interface DescribeImagesRequest { *

    Scopes the images by users with explicit launch permissions. * Specify an Amazon Web Services account ID, self (the sender of the request), * or all (public AMIs).

    + *
      + *
    • + *

      If you specify an Amazon Web Services account ID that is not your own, only AMIs + * shared with that specific Amazon Web Services account ID are returned. However, AMIs that + * are shared with the account’s organization or organizational unit (OU) are not + * returned.

      + *
    • + *
    • + *

      If you specify self or your own Amazon Web Services account ID, AMIs + * shared with your account are returned. In addition, AMIs that are shared with the + * organization or OU of which you are member are also returned.

      + *
    • + *
    • + *

      If you specify all, all public AMIs are returned.

      + *
    • + *
    */ ExecutableUsers?: string[]; @@ -2800,6 +2826,11 @@ export interface InstanceNetworkInterfaceAssociation { */ CarrierIp?: string; + /** + *

    The customer-owned IP address associated with the network interface.

    + */ + CustomerOwnedIp?: string; + /** *

    The ID of the owner of the Elastic IP address.

    */ @@ -11457,6 +11488,7 @@ export enum OnDemandAllocationStrategy { export enum ReplacementStrategy { LAUNCH = "launch", + LAUNCH_BEFORE_TERMINATE = "launch-before-terminate", } /** @@ -11467,17 +11499,26 @@ export enum ReplacementStrategy { export interface SpotCapacityRebalance { /** *

    The replacement strategy to use. Only available for fleets of type - * maintain. You must specify a value, otherwise you get an error.

    - *

    To allow Spot Fleet to launch a replacement Spot Instance when an instance rebalance - * notification is emitted for a Spot Instance in the fleet, specify - * launch.

    - * - *

    When a replacement instance is launched, the instance marked for rebalance is not - * automatically terminated. You can terminate it, or you can leave it running. You are - * charged for all instances while they are running.

    - *
    + * maintain.

    + *

    + * launch - Spot Fleet launches a new replacement Spot Instance when a + * rebalance notification is emitted for an existing Spot Instance in the fleet. Spot Fleet + * does not terminate the instances that receive a rebalance notification. You can + * terminate the old instances, or you can leave them running. You are charged for all + * instances while they are running.

    + *

    + * launch-before-terminate - Spot Fleet launches a new replacement Spot + * Instance when a rebalance notification is emitted for an existing Spot Instance in the + * fleet, and then, after a delay that you specify (in TerminationDelay), + * terminates the instances that received a rebalance notification.

    */ ReplacementStrategy?: ReplacementStrategy | string; + + /** + *

    The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot + * Instance after launching a new replacement Spot Instance.

    + */ + TerminationDelay?: number; } export namespace SpotCapacityRebalance { diff --git a/clients/client-ec2/src/models/models_4.ts b/clients/client-ec2/src/models/models_4.ts index e874020471ae..e5da052253d5 100644 --- a/clients/client-ec2/src/models/models_4.ts +++ b/clients/client-ec2/src/models/models_4.ts @@ -9623,8 +9623,9 @@ export namespace LaunchPermissionModifications { */ export interface ModifyImageAttributeRequest { /** - *

    The name of the attribute to modify. - * The valid values are description and launchPermission.

    + *

    The name of the attribute to modify.

    + *

    Valid values: description | launchPermission + *

    */ Attribute?: string; @@ -9678,6 +9679,16 @@ export interface ModifyImageAttributeRequest { * Otherwise, it is UnauthorizedOperation.

    */ DryRun?: boolean; + + /** + *

    The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute parameter is launchPermission.

    + */ + OrganizationArns?: string[]; + + /** + *

    The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute parameter is launchPermission.

    + */ + OrganizationalUnitArns?: string[]; } export namespace ModifyImageAttributeRequest { diff --git a/clients/client-ec2/src/protocols/Aws_ec2.ts b/clients/client-ec2/src/protocols/Aws_ec2.ts index 9093ab627297..695a0f4c9359 100644 --- a/clients/client-ec2/src/protocols/Aws_ec2.ts +++ b/clients/client-ec2/src/protocols/Aws_ec2.ts @@ -41991,6 +41991,9 @@ const serializeAws_ec2FleetSpotCapacityRebalanceRequest = ( if (input.ReplacementStrategy !== undefined && input.ReplacementStrategy !== null) { entries["ReplacementStrategy"] = input.ReplacementStrategy; } + if (input.TerminationDelay !== undefined && input.TerminationDelay !== null) { + entries["TerminationDelay"] = input.TerminationDelay; + } return entries; }; @@ -44228,6 +44231,12 @@ const serializeAws_ec2LaunchPermission = (input: LaunchPermission, context: __Se if (input.UserId !== undefined && input.UserId !== null) { entries["UserId"] = input.UserId; } + if (input.OrganizationArn !== undefined && input.OrganizationArn !== null) { + entries["OrganizationArn"] = input.OrganizationArn; + } + if (input.OrganizationalUnitArn !== undefined && input.OrganizationalUnitArn !== null) { + entries["OrganizationalUnitArn"] = input.OrganizationalUnitArn; + } return entries; }; @@ -45471,6 +45480,20 @@ const serializeAws_ec2ModifyImageAttributeRequest = ( if (input.DryRun !== undefined && input.DryRun !== null) { entries["DryRun"] = input.DryRun; } + if (input.OrganizationArns !== undefined && input.OrganizationArns !== null) { + const memberEntries = serializeAws_ec2OrganizationArnStringList(input.OrganizationArns, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `OrganizationArn.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.OrganizationalUnitArns !== undefined && input.OrganizationalUnitArns !== null) { + const memberEntries = serializeAws_ec2OrganizationalUnitArnStringList(input.OrganizationalUnitArns, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `OrganizationalUnitArn.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } return entries; }; @@ -46941,6 +46964,32 @@ const serializeAws_ec2OnDemandOptionsRequest = (input: OnDemandOptionsRequest, c return entries; }; +const serializeAws_ec2OrganizationalUnitArnStringList = (input: string[], context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`OrganizationalUnitArn.${counter}`] = entry; + counter++; + } + return entries; +}; + +const serializeAws_ec2OrganizationArnStringList = (input: string[], context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`OrganizationArn.${counter}`] = entry; + counter++; + } + return entries; +}; + const serializeAws_ec2OwnerStringList = (input: string[], context: __SerdeContext): any => { const entries: any = {}; let counter = 1; @@ -49941,6 +49990,9 @@ const serializeAws_ec2SpotCapacityRebalance = (input: SpotCapacityRebalance, con if (input.ReplacementStrategy !== undefined && input.ReplacementStrategy !== null) { entries["ReplacementStrategy"] = input.ReplacementStrategy; } + if (input.TerminationDelay !== undefined && input.TerminationDelay !== null) { + entries["TerminationDelay"] = input.TerminationDelay; + } return entries; }; @@ -61494,10 +61546,14 @@ const deserializeAws_ec2FleetSpotCapacityRebalance = ( ): FleetSpotCapacityRebalance => { const contents: any = { ReplacementStrategy: undefined, + TerminationDelay: undefined, }; if (output["replacementStrategy"] !== undefined) { contents.ReplacementStrategy = __expectString(output["replacementStrategy"]); } + if (output["terminationDelay"] !== undefined) { + contents.TerminationDelay = __strictParseInt32(output["terminationDelay"]) as number; + } return contents; }; @@ -64669,6 +64725,7 @@ const deserializeAws_ec2InstanceNetworkInterfaceAssociation = ( ): InstanceNetworkInterfaceAssociation => { const contents: any = { CarrierIp: undefined, + CustomerOwnedIp: undefined, IpOwnerId: undefined, PublicDnsName: undefined, PublicIp: undefined, @@ -64676,6 +64733,9 @@ const deserializeAws_ec2InstanceNetworkInterfaceAssociation = ( if (output["carrierIp"] !== undefined) { contents.CarrierIp = __expectString(output["carrierIp"]); } + if (output["customerOwnedIp"] !== undefined) { + contents.CustomerOwnedIp = __expectString(output["customerOwnedIp"]); + } if (output["ipOwnerId"] !== undefined) { contents.IpOwnerId = __expectString(output["ipOwnerId"]); } @@ -66064,6 +66124,8 @@ const deserializeAws_ec2LaunchPermission = (output: any, context: __SerdeContext const contents: any = { Group: undefined, UserId: undefined, + OrganizationArn: undefined, + OrganizationalUnitArn: undefined, }; if (output["group"] !== undefined) { contents.Group = __expectString(output["group"]); @@ -66071,6 +66133,12 @@ const deserializeAws_ec2LaunchPermission = (output: any, context: __SerdeContext if (output["userId"] !== undefined) { contents.UserId = __expectString(output["userId"]); } + if (output["organizationArn"] !== undefined) { + contents.OrganizationArn = __expectString(output["organizationArn"]); + } + if (output["organizationalUnitArn"] !== undefined) { + contents.OrganizationalUnitArn = __expectString(output["organizationalUnitArn"]); + } return contents; }; @@ -72488,10 +72556,14 @@ const deserializeAws_ec2SnapshotTaskDetail = (output: any, context: __SerdeConte const deserializeAws_ec2SpotCapacityRebalance = (output: any, context: __SerdeContext): SpotCapacityRebalance => { const contents: any = { ReplacementStrategy: undefined, + TerminationDelay: undefined, }; if (output["replacementStrategy"] !== undefined) { contents.ReplacementStrategy = __expectString(output["replacementStrategy"]); } + if (output["terminationDelay"] !== undefined) { + contents.TerminationDelay = __strictParseInt32(output["terminationDelay"]) as number; + } return contents; }; diff --git a/clients/client-finspace/README.md b/clients/client-finspace/README.md index d55fa02715c2..dbbf1523300f 100644 --- a/clients/client-finspace/README.md +++ b/clients/client-finspace/README.md @@ -7,8 +7,7 @@ AWS SDK for JavaScript Finspace Client for Node.js, Browser and React Native. -

    The FinSpace management service provides the APIs for managing the FinSpace -environments.

    +

    The FinSpace management service provides the APIs for managing FinSpace environments.

    ## Installing diff --git a/clients/client-finspace/src/Finspace.ts b/clients/client-finspace/src/Finspace.ts index 5cc569c49eed..5fd44e1eea2c 100644 --- a/clients/client-finspace/src/Finspace.ts +++ b/clients/client-finspace/src/Finspace.ts @@ -39,8 +39,7 @@ import { import { FinspaceClient } from "./FinspaceClient"; /** - *

    The FinSpace management service provides the APIs for managing the FinSpace - * environments.

    + *

    The FinSpace management service provides the APIs for managing FinSpace environments.

    */ export class Finspace extends FinspaceClient { /** diff --git a/clients/client-finspace/src/FinspaceClient.ts b/clients/client-finspace/src/FinspaceClient.ts index 96cb8b92ec53..de3990831b49 100644 --- a/clients/client-finspace/src/FinspaceClient.ts +++ b/clients/client-finspace/src/FinspaceClient.ts @@ -231,8 +231,7 @@ type FinspaceClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHand export interface FinspaceClientResolvedConfig extends FinspaceClientResolvedConfigType {} /** - *

    The FinSpace management service provides the APIs for managing the FinSpace - * environments.

    + *

    The FinSpace management service provides the APIs for managing FinSpace environments.

    */ export class FinspaceClient extends __Client< __HttpHandlerOptions, diff --git a/clients/client-finspace/src/models/models_0.ts b/clients/client-finspace/src/models/models_0.ts index 785e400e7ce5..525a81af1d78 100644 --- a/clients/client-finspace/src/models/models_0.ts +++ b/clients/client-finspace/src/models/models_0.ts @@ -1,3 +1,4 @@ +import { SENSITIVE_STRING } from "@aws-sdk/smithy-client"; import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types"; /** @@ -70,6 +71,36 @@ export namespace FederationParameters { }); } +/** + *

    Configuration information for the superuser.

    + */ +export interface SuperuserParameters { + /** + *

    The email address of the superuser.

    + */ + emailAddress: string | undefined; + + /** + *

    The first name of the superuser.

    + */ + firstName: string | undefined; + + /** + *

    The last name of the superuser.

    + */ + lastName: string | undefined; +} + +export namespace SuperuserParameters { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SuperuserParameters): any => ({ + ...obj, + ...(obj.emailAddress && { emailAddress: SENSITIVE_STRING }), + }); +} + export interface CreateEnvironmentRequest { /** *

    The name of the FinSpace environment to be created.

    @@ -110,6 +141,26 @@ export interface CreateEnvironmentRequest { *

    Configuration information when authentication mode is FEDERATED.

    */ federationParameters?: FederationParameters; + + /** + *

    Configuration information for the superuser.

    + */ + superuserParameters?: SuperuserParameters; + + /** + *

    The list of Amazon Resource Names (ARN) of the data bundles to install. Currently supported data bundle ARNs:

    + *
      + *
    • + *

      + * arn:aws:finspace:${Region}::data-bundle/capital-markets-sample - Contains sample Capital Markets datasets, categories and controlled vocabularies.

      + *
    • + *
    • + *

      + * arn:aws:finspace:${Region}::data-bundle/taq (default) - Contains trades and quotes data in addition to sample Capital Markets data.

      + *
    • + *
    + */ + dataBundles?: string[]; } export namespace CreateEnvironmentRequest { @@ -118,6 +169,9 @@ export namespace CreateEnvironmentRequest { */ export const filterSensitiveLog = (obj: CreateEnvironmentRequest): any => ({ ...obj, + ...(obj.superuserParameters && { + superuserParameters: SuperuserParameters.filterSensitiveLog(obj.superuserParameters), + }), }); } diff --git a/clients/client-finspace/src/protocols/Aws_restJson1.ts b/clients/client-finspace/src/protocols/Aws_restJson1.ts index e5153e1783de..50dedb86d2ff 100644 --- a/clients/client-finspace/src/protocols/Aws_restJson1.ts +++ b/clients/client-finspace/src/protocols/Aws_restJson1.ts @@ -33,6 +33,7 @@ import { LimitExceededException, ResourceNotFoundException, ServiceQuotaExceededException, + SuperuserParameters, ThrottlingException, ValidationException, } from "../models/models_0"; @@ -48,6 +49,8 @@ export const serializeAws_restJson1CreateEnvironmentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environment"; let body: any; body = JSON.stringify({ + ...(input.dataBundles !== undefined && + input.dataBundles !== null && { dataBundles: serializeAws_restJson1DataBundleArns(input.dataBundles, context) }), ...(input.description !== undefined && input.description !== null && { description: input.description }), ...(input.federationMode !== undefined && input.federationMode !== null && { federationMode: input.federationMode }), @@ -57,6 +60,10 @@ export const serializeAws_restJson1CreateEnvironmentCommand = async ( }), ...(input.kmsKeyId !== undefined && input.kmsKeyId !== null && { kmsKeyId: input.kmsKeyId }), ...(input.name !== undefined && input.name !== null && { name: input.name }), + ...(input.superuserParameters !== undefined && + input.superuserParameters !== null && { + superuserParameters: serializeAws_restJson1SuperuserParameters(input.superuserParameters, context), + }), ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }), }); return new __HttpRequest({ @@ -1050,6 +1057,17 @@ const serializeAws_restJson1AttributeMap = (input: { [key: string]: string }, co }, {}); }; +const serializeAws_restJson1DataBundleArns = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1FederationParameters = (input: FederationParameters, context: __SerdeContext): any => { return { ...(input.applicationCallBackURL !== undefined && @@ -1066,6 +1084,14 @@ const serializeAws_restJson1FederationParameters = (input: FederationParameters, }; }; +const serializeAws_restJson1SuperuserParameters = (input: SuperuserParameters, context: __SerdeContext): any => { + return { + ...(input.emailAddress !== undefined && input.emailAddress !== null && { emailAddress: input.emailAddress }), + ...(input.firstName !== undefined && input.firstName !== null && { firstName: input.firstName }), + ...(input.lastName !== undefined && input.lastName !== null && { lastName: input.lastName }), + }; +}; + const serializeAws_restJson1TagMap = (input: { [key: string]: string }, context: __SerdeContext): any => { return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => { if (value === null) { diff --git a/clients/client-iot-wireless/src/IoTWireless.ts b/clients/client-iot-wireless/src/IoTWireless.ts index 6a7edee285dc..1387810a7ed8 100644 --- a/clients/client-iot-wireless/src/IoTWireless.ts +++ b/clients/client-iot-wireless/src/IoTWireless.ts @@ -5,6 +5,21 @@ import { AssociateAwsAccountWithPartnerAccountCommandInput, AssociateAwsAccountWithPartnerAccountCommandOutput, } from "./commands/AssociateAwsAccountWithPartnerAccountCommand"; +import { + AssociateMulticastGroupWithFuotaTaskCommand, + AssociateMulticastGroupWithFuotaTaskCommandInput, + AssociateMulticastGroupWithFuotaTaskCommandOutput, +} from "./commands/AssociateMulticastGroupWithFuotaTaskCommand"; +import { + AssociateWirelessDeviceWithFuotaTaskCommand, + AssociateWirelessDeviceWithFuotaTaskCommandInput, + AssociateWirelessDeviceWithFuotaTaskCommandOutput, +} from "./commands/AssociateWirelessDeviceWithFuotaTaskCommand"; +import { + AssociateWirelessDeviceWithMulticastGroupCommand, + AssociateWirelessDeviceWithMulticastGroupCommandInput, + AssociateWirelessDeviceWithMulticastGroupCommandOutput, +} from "./commands/AssociateWirelessDeviceWithMulticastGroupCommand"; import { AssociateWirelessDeviceWithThingCommand, AssociateWirelessDeviceWithThingCommandInput, @@ -20,6 +35,11 @@ import { AssociateWirelessGatewayWithThingCommandInput, AssociateWirelessGatewayWithThingCommandOutput, } from "./commands/AssociateWirelessGatewayWithThingCommand"; +import { + CancelMulticastGroupSessionCommand, + CancelMulticastGroupSessionCommandInput, + CancelMulticastGroupSessionCommandOutput, +} from "./commands/CancelMulticastGroupSessionCommand"; import { CreateDestinationCommand, CreateDestinationCommandInput, @@ -30,6 +50,16 @@ import { CreateDeviceProfileCommandInput, CreateDeviceProfileCommandOutput, } from "./commands/CreateDeviceProfileCommand"; +import { + CreateFuotaTaskCommand, + CreateFuotaTaskCommandInput, + CreateFuotaTaskCommandOutput, +} from "./commands/CreateFuotaTaskCommand"; +import { + CreateMulticastGroupCommand, + CreateMulticastGroupCommandInput, + CreateMulticastGroupCommandOutput, +} from "./commands/CreateMulticastGroupCommand"; import { CreateServiceProfileCommand, CreateServiceProfileCommandInput, @@ -65,6 +95,16 @@ import { DeleteDeviceProfileCommandInput, DeleteDeviceProfileCommandOutput, } from "./commands/DeleteDeviceProfileCommand"; +import { + DeleteFuotaTaskCommand, + DeleteFuotaTaskCommandInput, + DeleteFuotaTaskCommandOutput, +} from "./commands/DeleteFuotaTaskCommand"; +import { + DeleteMulticastGroupCommand, + DeleteMulticastGroupCommandInput, + DeleteMulticastGroupCommandOutput, +} from "./commands/DeleteMulticastGroupCommand"; import { DeleteServiceProfileCommand, DeleteServiceProfileCommandInput, @@ -95,6 +135,21 @@ import { DisassociateAwsAccountFromPartnerAccountCommandInput, DisassociateAwsAccountFromPartnerAccountCommandOutput, } from "./commands/DisassociateAwsAccountFromPartnerAccountCommand"; +import { + DisassociateMulticastGroupFromFuotaTaskCommand, + DisassociateMulticastGroupFromFuotaTaskCommandInput, + DisassociateMulticastGroupFromFuotaTaskCommandOutput, +} from "./commands/DisassociateMulticastGroupFromFuotaTaskCommand"; +import { + DisassociateWirelessDeviceFromFuotaTaskCommand, + DisassociateWirelessDeviceFromFuotaTaskCommandInput, + DisassociateWirelessDeviceFromFuotaTaskCommandOutput, +} from "./commands/DisassociateWirelessDeviceFromFuotaTaskCommand"; +import { + DisassociateWirelessDeviceFromMulticastGroupCommand, + DisassociateWirelessDeviceFromMulticastGroupCommandInput, + DisassociateWirelessDeviceFromMulticastGroupCommandOutput, +} from "./commands/DisassociateWirelessDeviceFromMulticastGroupCommand"; import { DisassociateWirelessDeviceFromThingCommand, DisassociateWirelessDeviceFromThingCommandInput, @@ -120,16 +175,36 @@ import { GetDeviceProfileCommandInput, GetDeviceProfileCommandOutput, } from "./commands/GetDeviceProfileCommand"; +import { + GetFuotaTaskCommand, + GetFuotaTaskCommandInput, + GetFuotaTaskCommandOutput, +} from "./commands/GetFuotaTaskCommand"; import { GetLogLevelsByResourceTypesCommand, GetLogLevelsByResourceTypesCommandInput, GetLogLevelsByResourceTypesCommandOutput, } from "./commands/GetLogLevelsByResourceTypesCommand"; +import { + GetMulticastGroupCommand, + GetMulticastGroupCommandInput, + GetMulticastGroupCommandOutput, +} from "./commands/GetMulticastGroupCommand"; +import { + GetMulticastGroupSessionCommand, + GetMulticastGroupSessionCommandInput, + GetMulticastGroupSessionCommandOutput, +} from "./commands/GetMulticastGroupSessionCommand"; import { GetPartnerAccountCommand, GetPartnerAccountCommandInput, GetPartnerAccountCommandOutput, } from "./commands/GetPartnerAccountCommand"; +import { + GetResourceEventConfigurationCommand, + GetResourceEventConfigurationCommandInput, + GetResourceEventConfigurationCommandOutput, +} from "./commands/GetResourceEventConfigurationCommand"; import { GetResourceLogLevelCommand, GetResourceLogLevelCommandInput, @@ -195,6 +270,21 @@ import { ListDeviceProfilesCommandInput, ListDeviceProfilesCommandOutput, } from "./commands/ListDeviceProfilesCommand"; +import { + ListFuotaTasksCommand, + ListFuotaTasksCommandInput, + ListFuotaTasksCommandOutput, +} from "./commands/ListFuotaTasksCommand"; +import { + ListMulticastGroupsByFuotaTaskCommand, + ListMulticastGroupsByFuotaTaskCommandInput, + ListMulticastGroupsByFuotaTaskCommandOutput, +} from "./commands/ListMulticastGroupsByFuotaTaskCommand"; +import { + ListMulticastGroupsCommand, + ListMulticastGroupsCommandInput, + ListMulticastGroupsCommandOutput, +} from "./commands/ListMulticastGroupsCommand"; import { ListPartnerAccountsCommand, ListPartnerAccountsCommandInput, @@ -240,11 +330,36 @@ import { ResetResourceLogLevelCommandInput, ResetResourceLogLevelCommandOutput, } from "./commands/ResetResourceLogLevelCommand"; +import { + SendDataToMulticastGroupCommand, + SendDataToMulticastGroupCommandInput, + SendDataToMulticastGroupCommandOutput, +} from "./commands/SendDataToMulticastGroupCommand"; import { SendDataToWirelessDeviceCommand, SendDataToWirelessDeviceCommandInput, SendDataToWirelessDeviceCommandOutput, } from "./commands/SendDataToWirelessDeviceCommand"; +import { + StartBulkAssociateWirelessDeviceWithMulticastGroupCommand, + StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput, + StartBulkAssociateWirelessDeviceWithMulticastGroupCommandOutput, +} from "./commands/StartBulkAssociateWirelessDeviceWithMulticastGroupCommand"; +import { + StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand, + StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput, + StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandOutput, +} from "./commands/StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand"; +import { + StartFuotaTaskCommand, + StartFuotaTaskCommandInput, + StartFuotaTaskCommandOutput, +} from "./commands/StartFuotaTaskCommand"; +import { + StartMulticastGroupSessionCommand, + StartMulticastGroupSessionCommandInput, + StartMulticastGroupSessionCommandOutput, +} from "./commands/StartMulticastGroupSessionCommand"; import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { TestWirelessDeviceCommand, @@ -261,16 +376,31 @@ import { UpdateDestinationCommandInput, UpdateDestinationCommandOutput, } from "./commands/UpdateDestinationCommand"; +import { + UpdateFuotaTaskCommand, + UpdateFuotaTaskCommandInput, + UpdateFuotaTaskCommandOutput, +} from "./commands/UpdateFuotaTaskCommand"; import { UpdateLogLevelsByResourceTypesCommand, UpdateLogLevelsByResourceTypesCommandInput, UpdateLogLevelsByResourceTypesCommandOutput, } from "./commands/UpdateLogLevelsByResourceTypesCommand"; +import { + UpdateMulticastGroupCommand, + UpdateMulticastGroupCommandInput, + UpdateMulticastGroupCommandOutput, +} from "./commands/UpdateMulticastGroupCommand"; import { UpdatePartnerAccountCommand, UpdatePartnerAccountCommandInput, UpdatePartnerAccountCommandOutput, } from "./commands/UpdatePartnerAccountCommand"; +import { + UpdateResourceEventConfigurationCommand, + UpdateResourceEventConfigurationCommandInput, + UpdateResourceEventConfigurationCommandOutput, +} from "./commands/UpdateResourceEventConfigurationCommand"; import { UpdateWirelessDeviceCommand, UpdateWirelessDeviceCommandInput, @@ -321,6 +451,104 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Associate a multicast group with a FUOTA task.

    + */ + public associateMulticastGroupWithFuotaTask( + args: AssociateMulticastGroupWithFuotaTaskCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public associateMulticastGroupWithFuotaTask( + args: AssociateMulticastGroupWithFuotaTaskCommandInput, + cb: (err: any, data?: AssociateMulticastGroupWithFuotaTaskCommandOutput) => void + ): void; + public associateMulticastGroupWithFuotaTask( + args: AssociateMulticastGroupWithFuotaTaskCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AssociateMulticastGroupWithFuotaTaskCommandOutput) => void + ): void; + public associateMulticastGroupWithFuotaTask( + args: AssociateMulticastGroupWithFuotaTaskCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: AssociateMulticastGroupWithFuotaTaskCommandOutput) => void), + cb?: (err: any, data?: AssociateMulticastGroupWithFuotaTaskCommandOutput) => void + ): Promise | void { + const command = new AssociateMulticastGroupWithFuotaTaskCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Associate a wireless device with a FUOTA task.

    + */ + public associateWirelessDeviceWithFuotaTask( + args: AssociateWirelessDeviceWithFuotaTaskCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public associateWirelessDeviceWithFuotaTask( + args: AssociateWirelessDeviceWithFuotaTaskCommandInput, + cb: (err: any, data?: AssociateWirelessDeviceWithFuotaTaskCommandOutput) => void + ): void; + public associateWirelessDeviceWithFuotaTask( + args: AssociateWirelessDeviceWithFuotaTaskCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AssociateWirelessDeviceWithFuotaTaskCommandOutput) => void + ): void; + public associateWirelessDeviceWithFuotaTask( + args: AssociateWirelessDeviceWithFuotaTaskCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: AssociateWirelessDeviceWithFuotaTaskCommandOutput) => void), + cb?: (err: any, data?: AssociateWirelessDeviceWithFuotaTaskCommandOutput) => void + ): Promise | void { + const command = new AssociateWirelessDeviceWithFuotaTaskCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Associates a wireless device with a multicast group.

    + */ + public associateWirelessDeviceWithMulticastGroup( + args: AssociateWirelessDeviceWithMulticastGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public associateWirelessDeviceWithMulticastGroup( + args: AssociateWirelessDeviceWithMulticastGroupCommandInput, + cb: (err: any, data?: AssociateWirelessDeviceWithMulticastGroupCommandOutput) => void + ): void; + public associateWirelessDeviceWithMulticastGroup( + args: AssociateWirelessDeviceWithMulticastGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AssociateWirelessDeviceWithMulticastGroupCommandOutput) => void + ): void; + public associateWirelessDeviceWithMulticastGroup( + args: AssociateWirelessDeviceWithMulticastGroupCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: AssociateWirelessDeviceWithMulticastGroupCommandOutput) => void), + cb?: (err: any, data?: AssociateWirelessDeviceWithMulticastGroupCommandOutput) => void + ): Promise | void { + const command = new AssociateWirelessDeviceWithMulticastGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Associates a wireless device with a thing.

    */ @@ -419,6 +647,38 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Cancels an existing multicast group session.

    + */ + public cancelMulticastGroupSession( + args: CancelMulticastGroupSessionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public cancelMulticastGroupSession( + args: CancelMulticastGroupSessionCommandInput, + cb: (err: any, data?: CancelMulticastGroupSessionCommandOutput) => void + ): void; + public cancelMulticastGroupSession( + args: CancelMulticastGroupSessionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CancelMulticastGroupSessionCommandOutput) => void + ): void; + public cancelMulticastGroupSession( + args: CancelMulticastGroupSessionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CancelMulticastGroupSessionCommandOutput) => void), + cb?: (err: any, data?: CancelMulticastGroupSessionCommandOutput) => void + ): Promise | void { + const command = new CancelMulticastGroupSessionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Creates a new destination that maps a device message to an AWS IoT rule.

    */ @@ -483,6 +743,70 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Creates a FUOTA task.

    + */ + public createFuotaTask( + args: CreateFuotaTaskCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createFuotaTask( + args: CreateFuotaTaskCommandInput, + cb: (err: any, data?: CreateFuotaTaskCommandOutput) => void + ): void; + public createFuotaTask( + args: CreateFuotaTaskCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateFuotaTaskCommandOutput) => void + ): void; + public createFuotaTask( + args: CreateFuotaTaskCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateFuotaTaskCommandOutput) => void), + cb?: (err: any, data?: CreateFuotaTaskCommandOutput) => void + ): Promise | void { + const command = new CreateFuotaTaskCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Creates a multicast group.

    + */ + public createMulticastGroup( + args: CreateMulticastGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createMulticastGroup( + args: CreateMulticastGroupCommandInput, + cb: (err: any, data?: CreateMulticastGroupCommandOutput) => void + ): void; + public createMulticastGroup( + args: CreateMulticastGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateMulticastGroupCommandOutput) => void + ): void; + public createMulticastGroup( + args: CreateMulticastGroupCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateMulticastGroupCommandOutput) => void), + cb?: (err: any, data?: CreateMulticastGroupCommandOutput) => void + ): Promise | void { + const command = new CreateMulticastGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Creates a new service profile.

    */ @@ -707,6 +1031,70 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Deletes a FUOTA task.

    + */ + public deleteFuotaTask( + args: DeleteFuotaTaskCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteFuotaTask( + args: DeleteFuotaTaskCommandInput, + cb: (err: any, data?: DeleteFuotaTaskCommandOutput) => void + ): void; + public deleteFuotaTask( + args: DeleteFuotaTaskCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteFuotaTaskCommandOutput) => void + ): void; + public deleteFuotaTask( + args: DeleteFuotaTaskCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteFuotaTaskCommandOutput) => void), + cb?: (err: any, data?: DeleteFuotaTaskCommandOutput) => void + ): Promise | void { + const command = new DeleteFuotaTaskCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Deletes a multicast group if it is not in use by a fuota task.

    + */ + public deleteMulticastGroup( + args: DeleteMulticastGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteMulticastGroup( + args: DeleteMulticastGroupCommandInput, + cb: (err: any, data?: DeleteMulticastGroupCommandOutput) => void + ): void; + public deleteMulticastGroup( + args: DeleteMulticastGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteMulticastGroupCommandOutput) => void + ): void; + public deleteMulticastGroup( + args: DeleteMulticastGroupCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteMulticastGroupCommandOutput) => void), + cb?: (err: any, data?: DeleteMulticastGroupCommandOutput) => void + ): Promise | void { + const command = new DeleteMulticastGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Deletes a service profile.

    */ @@ -901,6 +1289,108 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Disassociates a multicast group from a fuota task.

    + */ + public disassociateMulticastGroupFromFuotaTask( + args: DisassociateMulticastGroupFromFuotaTaskCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public disassociateMulticastGroupFromFuotaTask( + args: DisassociateMulticastGroupFromFuotaTaskCommandInput, + cb: (err: any, data?: DisassociateMulticastGroupFromFuotaTaskCommandOutput) => void + ): void; + public disassociateMulticastGroupFromFuotaTask( + args: DisassociateMulticastGroupFromFuotaTaskCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DisassociateMulticastGroupFromFuotaTaskCommandOutput) => void + ): void; + public disassociateMulticastGroupFromFuotaTask( + args: DisassociateMulticastGroupFromFuotaTaskCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DisassociateMulticastGroupFromFuotaTaskCommandOutput) => void), + cb?: (err: any, data?: DisassociateMulticastGroupFromFuotaTaskCommandOutput) => void + ): Promise | void { + const command = new DisassociateMulticastGroupFromFuotaTaskCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Disassociates a wireless device from a FUOTA task.

    + */ + public disassociateWirelessDeviceFromFuotaTask( + args: DisassociateWirelessDeviceFromFuotaTaskCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public disassociateWirelessDeviceFromFuotaTask( + args: DisassociateWirelessDeviceFromFuotaTaskCommandInput, + cb: (err: any, data?: DisassociateWirelessDeviceFromFuotaTaskCommandOutput) => void + ): void; + public disassociateWirelessDeviceFromFuotaTask( + args: DisassociateWirelessDeviceFromFuotaTaskCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DisassociateWirelessDeviceFromFuotaTaskCommandOutput) => void + ): void; + public disassociateWirelessDeviceFromFuotaTask( + args: DisassociateWirelessDeviceFromFuotaTaskCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DisassociateWirelessDeviceFromFuotaTaskCommandOutput) => void), + cb?: (err: any, data?: DisassociateWirelessDeviceFromFuotaTaskCommandOutput) => void + ): Promise | void { + const command = new DisassociateWirelessDeviceFromFuotaTaskCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Disassociates a wireless device from a multicast group.

    + */ + public disassociateWirelessDeviceFromMulticastGroup( + args: DisassociateWirelessDeviceFromMulticastGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public disassociateWirelessDeviceFromMulticastGroup( + args: DisassociateWirelessDeviceFromMulticastGroupCommandInput, + cb: (err: any, data?: DisassociateWirelessDeviceFromMulticastGroupCommandOutput) => void + ): void; + public disassociateWirelessDeviceFromMulticastGroup( + args: DisassociateWirelessDeviceFromMulticastGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DisassociateWirelessDeviceFromMulticastGroupCommandOutput) => void + ): void; + public disassociateWirelessDeviceFromMulticastGroup( + args: DisassociateWirelessDeviceFromMulticastGroupCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DisassociateWirelessDeviceFromMulticastGroupCommandOutput) => void), + cb?: (err: any, data?: DisassociateWirelessDeviceFromMulticastGroupCommandOutput) => void + ): Promise | void { + const command = new DisassociateWirelessDeviceFromMulticastGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Disassociates a wireless device from its currently associated thing.

    */ @@ -1063,6 +1553,35 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Gets information about a FUOTA task.

    + */ + public getFuotaTask( + args: GetFuotaTaskCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getFuotaTask(args: GetFuotaTaskCommandInput, cb: (err: any, data?: GetFuotaTaskCommandOutput) => void): void; + public getFuotaTask( + args: GetFuotaTaskCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetFuotaTaskCommandOutput) => void + ): void; + public getFuotaTask( + args: GetFuotaTaskCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetFuotaTaskCommandOutput) => void), + cb?: (err: any, data?: GetFuotaTaskCommandOutput) => void + ): Promise | void { + const command = new GetFuotaTaskCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Returns current default log levels or log levels by resource types. Based on resource types, log levels can be * for wireless device log options or wireless gateway log options.

    @@ -1096,6 +1615,70 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Gets information about a multicast group.

    + */ + public getMulticastGroup( + args: GetMulticastGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getMulticastGroup( + args: GetMulticastGroupCommandInput, + cb: (err: any, data?: GetMulticastGroupCommandOutput) => void + ): void; + public getMulticastGroup( + args: GetMulticastGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetMulticastGroupCommandOutput) => void + ): void; + public getMulticastGroup( + args: GetMulticastGroupCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetMulticastGroupCommandOutput) => void), + cb?: (err: any, data?: GetMulticastGroupCommandOutput) => void + ): Promise | void { + const command = new GetMulticastGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Gets information about a multicast group session.

    + */ + public getMulticastGroupSession( + args: GetMulticastGroupSessionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getMulticastGroupSession( + args: GetMulticastGroupSessionCommandInput, + cb: (err: any, data?: GetMulticastGroupSessionCommandOutput) => void + ): void; + public getMulticastGroupSession( + args: GetMulticastGroupSessionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetMulticastGroupSessionCommandOutput) => void + ): void; + public getMulticastGroupSession( + args: GetMulticastGroupSessionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetMulticastGroupSessionCommandOutput) => void), + cb?: (err: any, data?: GetMulticastGroupSessionCommandOutput) => void + ): Promise | void { + const command = new GetMulticastGroupSessionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Gets information about a partner account. If PartnerAccountId and PartnerType are null, returns all partner accounts.

    */ @@ -1128,6 +1711,38 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Get the event configuration for a particular resource identifier.

    + */ + public getResourceEventConfiguration( + args: GetResourceEventConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getResourceEventConfiguration( + args: GetResourceEventConfigurationCommandInput, + cb: (err: any, data?: GetResourceEventConfigurationCommandOutput) => void + ): void; + public getResourceEventConfiguration( + args: GetResourceEventConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetResourceEventConfigurationCommandOutput) => void + ): void; + public getResourceEventConfiguration( + args: GetResourceEventConfigurationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetResourceEventConfigurationCommandOutput) => void), + cb?: (err: any, data?: GetResourceEventConfigurationCommandOutput) => void + ): Promise | void { + const command = new GetResourceEventConfigurationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Fetches the log-level override, if any, for a given resource-ID and resource-type. It can be used for * a wireless device or a wireless gateway.

    @@ -1547,6 +2162,102 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Lists the FUOTA tasks registered to your AWS account.

    + */ + public listFuotaTasks( + args: ListFuotaTasksCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listFuotaTasks( + args: ListFuotaTasksCommandInput, + cb: (err: any, data?: ListFuotaTasksCommandOutput) => void + ): void; + public listFuotaTasks( + args: ListFuotaTasksCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListFuotaTasksCommandOutput) => void + ): void; + public listFuotaTasks( + args: ListFuotaTasksCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListFuotaTasksCommandOutput) => void), + cb?: (err: any, data?: ListFuotaTasksCommandOutput) => void + ): Promise | void { + const command = new ListFuotaTasksCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Lists the multicast groups registered to your AWS account.

    + */ + public listMulticastGroups( + args: ListMulticastGroupsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listMulticastGroups( + args: ListMulticastGroupsCommandInput, + cb: (err: any, data?: ListMulticastGroupsCommandOutput) => void + ): void; + public listMulticastGroups( + args: ListMulticastGroupsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListMulticastGroupsCommandOutput) => void + ): void; + public listMulticastGroups( + args: ListMulticastGroupsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListMulticastGroupsCommandOutput) => void), + cb?: (err: any, data?: ListMulticastGroupsCommandOutput) => void + ): Promise | void { + const command = new ListMulticastGroupsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    List all multicast groups associated with a fuota task.

    + */ + public listMulticastGroupsByFuotaTask( + args: ListMulticastGroupsByFuotaTaskCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listMulticastGroupsByFuotaTask( + args: ListMulticastGroupsByFuotaTaskCommandInput, + cb: (err: any, data?: ListMulticastGroupsByFuotaTaskCommandOutput) => void + ): void; + public listMulticastGroupsByFuotaTask( + args: ListMulticastGroupsByFuotaTaskCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListMulticastGroupsByFuotaTaskCommandOutput) => void + ): void; + public listMulticastGroupsByFuotaTask( + args: ListMulticastGroupsByFuotaTaskCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListMulticastGroupsByFuotaTaskCommandOutput) => void), + cb?: (err: any, data?: ListMulticastGroupsByFuotaTaskCommandOutput) => void + ): Promise | void { + const command = new ListMulticastGroupsByFuotaTaskCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Lists the partner accounts associated with your AWS account.

    */ @@ -1837,6 +2548,38 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Sends the specified data to a multicast group.

    + */ + public sendDataToMulticastGroup( + args: SendDataToMulticastGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public sendDataToMulticastGroup( + args: SendDataToMulticastGroupCommandInput, + cb: (err: any, data?: SendDataToMulticastGroupCommandOutput) => void + ): void; + public sendDataToMulticastGroup( + args: SendDataToMulticastGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: SendDataToMulticastGroupCommandOutput) => void + ): void; + public sendDataToMulticastGroup( + args: SendDataToMulticastGroupCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: SendDataToMulticastGroupCommandOutput) => void), + cb?: (err: any, data?: SendDataToMulticastGroupCommandOutput) => void + ): Promise | void { + const command = new SendDataToMulticastGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Sends a decrypted application data frame to a device.

    */ @@ -1869,6 +2612,138 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Starts a bulk association of all qualifying wireless devices with a multicast group.

    + */ + public startBulkAssociateWirelessDeviceWithMulticastGroup( + args: StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startBulkAssociateWirelessDeviceWithMulticastGroup( + args: StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput, + cb: (err: any, data?: StartBulkAssociateWirelessDeviceWithMulticastGroupCommandOutput) => void + ): void; + public startBulkAssociateWirelessDeviceWithMulticastGroup( + args: StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartBulkAssociateWirelessDeviceWithMulticastGroupCommandOutput) => void + ): void; + public startBulkAssociateWirelessDeviceWithMulticastGroup( + args: StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: StartBulkAssociateWirelessDeviceWithMulticastGroupCommandOutput) => void), + cb?: (err: any, data?: StartBulkAssociateWirelessDeviceWithMulticastGroupCommandOutput) => void + ): Promise | void { + const command = new StartBulkAssociateWirelessDeviceWithMulticastGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Starts a bulk disassociatin of all qualifying wireless devices from a multicast group.

    + */ + public startBulkDisassociateWirelessDeviceFromMulticastGroup( + args: StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startBulkDisassociateWirelessDeviceFromMulticastGroup( + args: StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput, + cb: (err: any, data?: StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandOutput) => void + ): void; + public startBulkDisassociateWirelessDeviceFromMulticastGroup( + args: StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandOutput) => void + ): void; + public startBulkDisassociateWirelessDeviceFromMulticastGroup( + args: StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandOutput) => void), + cb?: (err: any, data?: StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandOutput) => void + ): Promise | void { + const command = new StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Starts a FUOTA task.

    + */ + public startFuotaTask( + args: StartFuotaTaskCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startFuotaTask( + args: StartFuotaTaskCommandInput, + cb: (err: any, data?: StartFuotaTaskCommandOutput) => void + ): void; + public startFuotaTask( + args: StartFuotaTaskCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartFuotaTaskCommandOutput) => void + ): void; + public startFuotaTask( + args: StartFuotaTaskCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartFuotaTaskCommandOutput) => void), + cb?: (err: any, data?: StartFuotaTaskCommandOutput) => void + ): Promise | void { + const command = new StartFuotaTaskCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Starts a multicast group session.

    + */ + public startMulticastGroupSession( + args: StartMulticastGroupSessionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startMulticastGroupSession( + args: StartMulticastGroupSessionCommandInput, + cb: (err: any, data?: StartMulticastGroupSessionCommandOutput) => void + ): void; + public startMulticastGroupSession( + args: StartMulticastGroupSessionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartMulticastGroupSessionCommandOutput) => void + ): void; + public startMulticastGroupSession( + args: StartMulticastGroupSessionCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartMulticastGroupSessionCommandOutput) => void), + cb?: (err: any, data?: StartMulticastGroupSessionCommandOutput) => void + ): Promise | void { + const command = new StartMulticastGroupSessionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Adds a tag to a resource.

    */ @@ -1991,6 +2866,38 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Updates properties of a FUOTA task.

    + */ + public updateFuotaTask( + args: UpdateFuotaTaskCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateFuotaTask( + args: UpdateFuotaTaskCommandInput, + cb: (err: any, data?: UpdateFuotaTaskCommandOutput) => void + ): void; + public updateFuotaTask( + args: UpdateFuotaTaskCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateFuotaTaskCommandOutput) => void + ): void; + public updateFuotaTask( + args: UpdateFuotaTaskCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateFuotaTaskCommandOutput) => void), + cb?: (err: any, data?: UpdateFuotaTaskCommandOutput) => void + ): Promise | void { + const command = new UpdateFuotaTaskCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Set default log level, or log levels by resource types. This can be for wireless device log options or * wireless gateways log options and is used to control the log messages that'll be displayed in CloudWatch.

    @@ -2024,6 +2931,38 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Updates properties of a multicast group session.

    + */ + public updateMulticastGroup( + args: UpdateMulticastGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateMulticastGroup( + args: UpdateMulticastGroupCommandInput, + cb: (err: any, data?: UpdateMulticastGroupCommandOutput) => void + ): void; + public updateMulticastGroup( + args: UpdateMulticastGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateMulticastGroupCommandOutput) => void + ): void; + public updateMulticastGroup( + args: UpdateMulticastGroupCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateMulticastGroupCommandOutput) => void), + cb?: (err: any, data?: UpdateMulticastGroupCommandOutput) => void + ): Promise | void { + const command = new UpdateMulticastGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Updates properties of a partner account.

    */ @@ -2056,6 +2995,38 @@ export class IoTWireless extends IoTWirelessClient { } } + /** + *

    Update the event configuration for a particular resource identifier.

    + */ + public updateResourceEventConfiguration( + args: UpdateResourceEventConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateResourceEventConfiguration( + args: UpdateResourceEventConfigurationCommandInput, + cb: (err: any, data?: UpdateResourceEventConfigurationCommandOutput) => void + ): void; + public updateResourceEventConfiguration( + args: UpdateResourceEventConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateResourceEventConfigurationCommandOutput) => void + ): void; + public updateResourceEventConfiguration( + args: UpdateResourceEventConfigurationCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateResourceEventConfigurationCommandOutput) => void), + cb?: (err: any, data?: UpdateResourceEventConfigurationCommandOutput) => void + ): Promise | void { + const command = new UpdateResourceEventConfigurationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Updates properties of a wireless device.

    */ diff --git a/clients/client-iot-wireless/src/IoTWirelessClient.ts b/clients/client-iot-wireless/src/IoTWirelessClient.ts index 4fd6274f9070..80b1b49e0b8e 100644 --- a/clients/client-iot-wireless/src/IoTWirelessClient.ts +++ b/clients/client-iot-wireless/src/IoTWirelessClient.ts @@ -53,6 +53,18 @@ import { AssociateAwsAccountWithPartnerAccountCommandInput, AssociateAwsAccountWithPartnerAccountCommandOutput, } from "./commands/AssociateAwsAccountWithPartnerAccountCommand"; +import { + AssociateMulticastGroupWithFuotaTaskCommandInput, + AssociateMulticastGroupWithFuotaTaskCommandOutput, +} from "./commands/AssociateMulticastGroupWithFuotaTaskCommand"; +import { + AssociateWirelessDeviceWithFuotaTaskCommandInput, + AssociateWirelessDeviceWithFuotaTaskCommandOutput, +} from "./commands/AssociateWirelessDeviceWithFuotaTaskCommand"; +import { + AssociateWirelessDeviceWithMulticastGroupCommandInput, + AssociateWirelessDeviceWithMulticastGroupCommandOutput, +} from "./commands/AssociateWirelessDeviceWithMulticastGroupCommand"; import { AssociateWirelessDeviceWithThingCommandInput, AssociateWirelessDeviceWithThingCommandOutput, @@ -65,11 +77,20 @@ import { AssociateWirelessGatewayWithThingCommandInput, AssociateWirelessGatewayWithThingCommandOutput, } from "./commands/AssociateWirelessGatewayWithThingCommand"; +import { + CancelMulticastGroupSessionCommandInput, + CancelMulticastGroupSessionCommandOutput, +} from "./commands/CancelMulticastGroupSessionCommand"; import { CreateDestinationCommandInput, CreateDestinationCommandOutput } from "./commands/CreateDestinationCommand"; import { CreateDeviceProfileCommandInput, CreateDeviceProfileCommandOutput, } from "./commands/CreateDeviceProfileCommand"; +import { CreateFuotaTaskCommandInput, CreateFuotaTaskCommandOutput } from "./commands/CreateFuotaTaskCommand"; +import { + CreateMulticastGroupCommandInput, + CreateMulticastGroupCommandOutput, +} from "./commands/CreateMulticastGroupCommand"; import { CreateServiceProfileCommandInput, CreateServiceProfileCommandOutput, @@ -95,6 +116,11 @@ import { DeleteDeviceProfileCommandInput, DeleteDeviceProfileCommandOutput, } from "./commands/DeleteDeviceProfileCommand"; +import { DeleteFuotaTaskCommandInput, DeleteFuotaTaskCommandOutput } from "./commands/DeleteFuotaTaskCommand"; +import { + DeleteMulticastGroupCommandInput, + DeleteMulticastGroupCommandOutput, +} from "./commands/DeleteMulticastGroupCommand"; import { DeleteServiceProfileCommandInput, DeleteServiceProfileCommandOutput, @@ -119,6 +145,18 @@ import { DisassociateAwsAccountFromPartnerAccountCommandInput, DisassociateAwsAccountFromPartnerAccountCommandOutput, } from "./commands/DisassociateAwsAccountFromPartnerAccountCommand"; +import { + DisassociateMulticastGroupFromFuotaTaskCommandInput, + DisassociateMulticastGroupFromFuotaTaskCommandOutput, +} from "./commands/DisassociateMulticastGroupFromFuotaTaskCommand"; +import { + DisassociateWirelessDeviceFromFuotaTaskCommandInput, + DisassociateWirelessDeviceFromFuotaTaskCommandOutput, +} from "./commands/DisassociateWirelessDeviceFromFuotaTaskCommand"; +import { + DisassociateWirelessDeviceFromMulticastGroupCommandInput, + DisassociateWirelessDeviceFromMulticastGroupCommandOutput, +} from "./commands/DisassociateWirelessDeviceFromMulticastGroupCommand"; import { DisassociateWirelessDeviceFromThingCommandInput, DisassociateWirelessDeviceFromThingCommandOutput, @@ -133,11 +171,21 @@ import { } from "./commands/DisassociateWirelessGatewayFromThingCommand"; import { GetDestinationCommandInput, GetDestinationCommandOutput } from "./commands/GetDestinationCommand"; import { GetDeviceProfileCommandInput, GetDeviceProfileCommandOutput } from "./commands/GetDeviceProfileCommand"; +import { GetFuotaTaskCommandInput, GetFuotaTaskCommandOutput } from "./commands/GetFuotaTaskCommand"; import { GetLogLevelsByResourceTypesCommandInput, GetLogLevelsByResourceTypesCommandOutput, } from "./commands/GetLogLevelsByResourceTypesCommand"; +import { GetMulticastGroupCommandInput, GetMulticastGroupCommandOutput } from "./commands/GetMulticastGroupCommand"; +import { + GetMulticastGroupSessionCommandInput, + GetMulticastGroupSessionCommandOutput, +} from "./commands/GetMulticastGroupSessionCommand"; import { GetPartnerAccountCommandInput, GetPartnerAccountCommandOutput } from "./commands/GetPartnerAccountCommand"; +import { + GetResourceEventConfigurationCommandInput, + GetResourceEventConfigurationCommandOutput, +} from "./commands/GetResourceEventConfigurationCommand"; import { GetResourceLogLevelCommandInput, GetResourceLogLevelCommandOutput, @@ -172,6 +220,15 @@ import { } from "./commands/GetWirelessGatewayTaskDefinitionCommand"; import { ListDestinationsCommandInput, ListDestinationsCommandOutput } from "./commands/ListDestinationsCommand"; import { ListDeviceProfilesCommandInput, ListDeviceProfilesCommandOutput } from "./commands/ListDeviceProfilesCommand"; +import { ListFuotaTasksCommandInput, ListFuotaTasksCommandOutput } from "./commands/ListFuotaTasksCommand"; +import { + ListMulticastGroupsByFuotaTaskCommandInput, + ListMulticastGroupsByFuotaTaskCommandOutput, +} from "./commands/ListMulticastGroupsByFuotaTaskCommand"; +import { + ListMulticastGroupsCommandInput, + ListMulticastGroupsCommandOutput, +} from "./commands/ListMulticastGroupsCommand"; import { ListPartnerAccountsCommandInput, ListPartnerAccountsCommandOutput, @@ -208,22 +265,48 @@ import { ResetResourceLogLevelCommandInput, ResetResourceLogLevelCommandOutput, } from "./commands/ResetResourceLogLevelCommand"; +import { + SendDataToMulticastGroupCommandInput, + SendDataToMulticastGroupCommandOutput, +} from "./commands/SendDataToMulticastGroupCommand"; import { SendDataToWirelessDeviceCommandInput, SendDataToWirelessDeviceCommandOutput, } from "./commands/SendDataToWirelessDeviceCommand"; +import { + StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput, + StartBulkAssociateWirelessDeviceWithMulticastGroupCommandOutput, +} from "./commands/StartBulkAssociateWirelessDeviceWithMulticastGroupCommand"; +import { + StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput, + StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandOutput, +} from "./commands/StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand"; +import { StartFuotaTaskCommandInput, StartFuotaTaskCommandOutput } from "./commands/StartFuotaTaskCommand"; +import { + StartMulticastGroupSessionCommandInput, + StartMulticastGroupSessionCommandOutput, +} from "./commands/StartMulticastGroupSessionCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { TestWirelessDeviceCommandInput, TestWirelessDeviceCommandOutput } from "./commands/TestWirelessDeviceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; import { UpdateDestinationCommandInput, UpdateDestinationCommandOutput } from "./commands/UpdateDestinationCommand"; +import { UpdateFuotaTaskCommandInput, UpdateFuotaTaskCommandOutput } from "./commands/UpdateFuotaTaskCommand"; import { UpdateLogLevelsByResourceTypesCommandInput, UpdateLogLevelsByResourceTypesCommandOutput, } from "./commands/UpdateLogLevelsByResourceTypesCommand"; +import { + UpdateMulticastGroupCommandInput, + UpdateMulticastGroupCommandOutput, +} from "./commands/UpdateMulticastGroupCommand"; import { UpdatePartnerAccountCommandInput, UpdatePartnerAccountCommandOutput, } from "./commands/UpdatePartnerAccountCommand"; +import { + UpdateResourceEventConfigurationCommandInput, + UpdateResourceEventConfigurationCommandOutput, +} from "./commands/UpdateResourceEventConfigurationCommand"; import { UpdateWirelessDeviceCommandInput, UpdateWirelessDeviceCommandOutput, @@ -236,11 +319,17 @@ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; export type ServiceInputTypes = | AssociateAwsAccountWithPartnerAccountCommandInput + | AssociateMulticastGroupWithFuotaTaskCommandInput + | AssociateWirelessDeviceWithFuotaTaskCommandInput + | AssociateWirelessDeviceWithMulticastGroupCommandInput | AssociateWirelessDeviceWithThingCommandInput | AssociateWirelessGatewayWithCertificateCommandInput | AssociateWirelessGatewayWithThingCommandInput + | CancelMulticastGroupSessionCommandInput | CreateDestinationCommandInput | CreateDeviceProfileCommandInput + | CreateFuotaTaskCommandInput + | CreateMulticastGroupCommandInput | CreateServiceProfileCommandInput | CreateWirelessDeviceCommandInput | CreateWirelessGatewayCommandInput @@ -248,19 +337,28 @@ export type ServiceInputTypes = | CreateWirelessGatewayTaskDefinitionCommandInput | DeleteDestinationCommandInput | DeleteDeviceProfileCommandInput + | DeleteFuotaTaskCommandInput + | DeleteMulticastGroupCommandInput | DeleteServiceProfileCommandInput | DeleteWirelessDeviceCommandInput | DeleteWirelessGatewayCommandInput | DeleteWirelessGatewayTaskCommandInput | DeleteWirelessGatewayTaskDefinitionCommandInput | DisassociateAwsAccountFromPartnerAccountCommandInput + | DisassociateMulticastGroupFromFuotaTaskCommandInput + | DisassociateWirelessDeviceFromFuotaTaskCommandInput + | DisassociateWirelessDeviceFromMulticastGroupCommandInput | DisassociateWirelessDeviceFromThingCommandInput | DisassociateWirelessGatewayFromCertificateCommandInput | DisassociateWirelessGatewayFromThingCommandInput | GetDestinationCommandInput | GetDeviceProfileCommandInput + | GetFuotaTaskCommandInput | GetLogLevelsByResourceTypesCommandInput + | GetMulticastGroupCommandInput + | GetMulticastGroupSessionCommandInput | GetPartnerAccountCommandInput + | GetResourceEventConfigurationCommandInput | GetResourceLogLevelCommandInput | GetServiceEndpointCommandInput | GetServiceProfileCommandInput @@ -274,6 +372,9 @@ export type ServiceInputTypes = | GetWirelessGatewayTaskDefinitionCommandInput | ListDestinationsCommandInput | ListDeviceProfilesCommandInput + | ListFuotaTasksCommandInput + | ListMulticastGroupsByFuotaTaskCommandInput + | ListMulticastGroupsCommandInput | ListPartnerAccountsCommandInput | ListServiceProfilesCommandInput | ListTagsForResourceCommandInput @@ -283,23 +384,37 @@ export type ServiceInputTypes = | PutResourceLogLevelCommandInput | ResetAllResourceLogLevelsCommandInput | ResetResourceLogLevelCommandInput + | SendDataToMulticastGroupCommandInput | SendDataToWirelessDeviceCommandInput + | StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput + | StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput + | StartFuotaTaskCommandInput + | StartMulticastGroupSessionCommandInput | TagResourceCommandInput | TestWirelessDeviceCommandInput | UntagResourceCommandInput | UpdateDestinationCommandInput + | UpdateFuotaTaskCommandInput | UpdateLogLevelsByResourceTypesCommandInput + | UpdateMulticastGroupCommandInput | UpdatePartnerAccountCommandInput + | UpdateResourceEventConfigurationCommandInput | UpdateWirelessDeviceCommandInput | UpdateWirelessGatewayCommandInput; export type ServiceOutputTypes = | AssociateAwsAccountWithPartnerAccountCommandOutput + | AssociateMulticastGroupWithFuotaTaskCommandOutput + | AssociateWirelessDeviceWithFuotaTaskCommandOutput + | AssociateWirelessDeviceWithMulticastGroupCommandOutput | AssociateWirelessDeviceWithThingCommandOutput | AssociateWirelessGatewayWithCertificateCommandOutput | AssociateWirelessGatewayWithThingCommandOutput + | CancelMulticastGroupSessionCommandOutput | CreateDestinationCommandOutput | CreateDeviceProfileCommandOutput + | CreateFuotaTaskCommandOutput + | CreateMulticastGroupCommandOutput | CreateServiceProfileCommandOutput | CreateWirelessDeviceCommandOutput | CreateWirelessGatewayCommandOutput @@ -307,19 +422,28 @@ export type ServiceOutputTypes = | CreateWirelessGatewayTaskDefinitionCommandOutput | DeleteDestinationCommandOutput | DeleteDeviceProfileCommandOutput + | DeleteFuotaTaskCommandOutput + | DeleteMulticastGroupCommandOutput | DeleteServiceProfileCommandOutput | DeleteWirelessDeviceCommandOutput | DeleteWirelessGatewayCommandOutput | DeleteWirelessGatewayTaskCommandOutput | DeleteWirelessGatewayTaskDefinitionCommandOutput | DisassociateAwsAccountFromPartnerAccountCommandOutput + | DisassociateMulticastGroupFromFuotaTaskCommandOutput + | DisassociateWirelessDeviceFromFuotaTaskCommandOutput + | DisassociateWirelessDeviceFromMulticastGroupCommandOutput | DisassociateWirelessDeviceFromThingCommandOutput | DisassociateWirelessGatewayFromCertificateCommandOutput | DisassociateWirelessGatewayFromThingCommandOutput | GetDestinationCommandOutput | GetDeviceProfileCommandOutput + | GetFuotaTaskCommandOutput | GetLogLevelsByResourceTypesCommandOutput + | GetMulticastGroupCommandOutput + | GetMulticastGroupSessionCommandOutput | GetPartnerAccountCommandOutput + | GetResourceEventConfigurationCommandOutput | GetResourceLogLevelCommandOutput | GetServiceEndpointCommandOutput | GetServiceProfileCommandOutput @@ -333,6 +457,9 @@ export type ServiceOutputTypes = | GetWirelessGatewayTaskDefinitionCommandOutput | ListDestinationsCommandOutput | ListDeviceProfilesCommandOutput + | ListFuotaTasksCommandOutput + | ListMulticastGroupsByFuotaTaskCommandOutput + | ListMulticastGroupsCommandOutput | ListPartnerAccountsCommandOutput | ListServiceProfilesCommandOutput | ListTagsForResourceCommandOutput @@ -342,13 +469,21 @@ export type ServiceOutputTypes = | PutResourceLogLevelCommandOutput | ResetAllResourceLogLevelsCommandOutput | ResetResourceLogLevelCommandOutput + | SendDataToMulticastGroupCommandOutput | SendDataToWirelessDeviceCommandOutput + | StartBulkAssociateWirelessDeviceWithMulticastGroupCommandOutput + | StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandOutput + | StartFuotaTaskCommandOutput + | StartMulticastGroupSessionCommandOutput | TagResourceCommandOutput | TestWirelessDeviceCommandOutput | UntagResourceCommandOutput | UpdateDestinationCommandOutput + | UpdateFuotaTaskCommandOutput | UpdateLogLevelsByResourceTypesCommandOutput + | UpdateMulticastGroupCommandOutput | UpdatePartnerAccountCommandOutput + | UpdateResourceEventConfigurationCommandOutput | UpdateWirelessDeviceCommandOutput | UpdateWirelessGatewayCommandOutput; diff --git a/clients/client-iot-wireless/src/commands/AssociateMulticastGroupWithFuotaTaskCommand.ts b/clients/client-iot-wireless/src/commands/AssociateMulticastGroupWithFuotaTaskCommand.ts new file mode 100644 index 000000000000..81055db4e785 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/AssociateMulticastGroupWithFuotaTaskCommand.ts @@ -0,0 +1,106 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { + AssociateMulticastGroupWithFuotaTaskRequest, + AssociateMulticastGroupWithFuotaTaskResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1AssociateMulticastGroupWithFuotaTaskCommand, + serializeAws_restJson1AssociateMulticastGroupWithFuotaTaskCommand, +} from "../protocols/Aws_restJson1"; + +export interface AssociateMulticastGroupWithFuotaTaskCommandInput extends AssociateMulticastGroupWithFuotaTaskRequest {} +export interface AssociateMulticastGroupWithFuotaTaskCommandOutput + extends AssociateMulticastGroupWithFuotaTaskResponse, + __MetadataBearer {} + +/** + *

    Associate a multicast group with a FUOTA task.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, AssociateMulticastGroupWithFuotaTaskCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, AssociateMulticastGroupWithFuotaTaskCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new AssociateMulticastGroupWithFuotaTaskCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link AssociateMulticastGroupWithFuotaTaskCommandInput} for command's `input` shape. + * @see {@link AssociateMulticastGroupWithFuotaTaskCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class AssociateMulticastGroupWithFuotaTaskCommand extends $Command< + AssociateMulticastGroupWithFuotaTaskCommandInput, + AssociateMulticastGroupWithFuotaTaskCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: AssociateMulticastGroupWithFuotaTaskCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "AssociateMulticastGroupWithFuotaTaskCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: AssociateMulticastGroupWithFuotaTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: AssociateMulticastGroupWithFuotaTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: AssociateMulticastGroupWithFuotaTaskCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1AssociateMulticastGroupWithFuotaTaskCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1AssociateMulticastGroupWithFuotaTaskCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/AssociateWirelessDeviceWithFuotaTaskCommand.ts b/clients/client-iot-wireless/src/commands/AssociateWirelessDeviceWithFuotaTaskCommand.ts new file mode 100644 index 000000000000..db48a523c9d4 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/AssociateWirelessDeviceWithFuotaTaskCommand.ts @@ -0,0 +1,106 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { + AssociateWirelessDeviceWithFuotaTaskRequest, + AssociateWirelessDeviceWithFuotaTaskResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1AssociateWirelessDeviceWithFuotaTaskCommand, + serializeAws_restJson1AssociateWirelessDeviceWithFuotaTaskCommand, +} from "../protocols/Aws_restJson1"; + +export interface AssociateWirelessDeviceWithFuotaTaskCommandInput extends AssociateWirelessDeviceWithFuotaTaskRequest {} +export interface AssociateWirelessDeviceWithFuotaTaskCommandOutput + extends AssociateWirelessDeviceWithFuotaTaskResponse, + __MetadataBearer {} + +/** + *

    Associate a wireless device with a FUOTA task.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, AssociateWirelessDeviceWithFuotaTaskCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, AssociateWirelessDeviceWithFuotaTaskCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new AssociateWirelessDeviceWithFuotaTaskCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link AssociateWirelessDeviceWithFuotaTaskCommandInput} for command's `input` shape. + * @see {@link AssociateWirelessDeviceWithFuotaTaskCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class AssociateWirelessDeviceWithFuotaTaskCommand extends $Command< + AssociateWirelessDeviceWithFuotaTaskCommandInput, + AssociateWirelessDeviceWithFuotaTaskCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: AssociateWirelessDeviceWithFuotaTaskCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "AssociateWirelessDeviceWithFuotaTaskCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: AssociateWirelessDeviceWithFuotaTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: AssociateWirelessDeviceWithFuotaTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: AssociateWirelessDeviceWithFuotaTaskCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1AssociateWirelessDeviceWithFuotaTaskCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1AssociateWirelessDeviceWithFuotaTaskCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/AssociateWirelessDeviceWithMulticastGroupCommand.ts b/clients/client-iot-wireless/src/commands/AssociateWirelessDeviceWithMulticastGroupCommand.ts new file mode 100644 index 000000000000..a5b16f1db960 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/AssociateWirelessDeviceWithMulticastGroupCommand.ts @@ -0,0 +1,110 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { + AssociateWirelessDeviceWithMulticastGroupRequest, + AssociateWirelessDeviceWithMulticastGroupResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1AssociateWirelessDeviceWithMulticastGroupCommand, + serializeAws_restJson1AssociateWirelessDeviceWithMulticastGroupCommand, +} from "../protocols/Aws_restJson1"; + +export interface AssociateWirelessDeviceWithMulticastGroupCommandInput + extends AssociateWirelessDeviceWithMulticastGroupRequest {} +export interface AssociateWirelessDeviceWithMulticastGroupCommandOutput + extends AssociateWirelessDeviceWithMulticastGroupResponse, + __MetadataBearer {} + +/** + *

    Associates a wireless device with a multicast group.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, AssociateWirelessDeviceWithMulticastGroupCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, AssociateWirelessDeviceWithMulticastGroupCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new AssociateWirelessDeviceWithMulticastGroupCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link AssociateWirelessDeviceWithMulticastGroupCommandInput} for command's `input` shape. + * @see {@link AssociateWirelessDeviceWithMulticastGroupCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class AssociateWirelessDeviceWithMulticastGroupCommand extends $Command< + AssociateWirelessDeviceWithMulticastGroupCommandInput, + AssociateWirelessDeviceWithMulticastGroupCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: AssociateWirelessDeviceWithMulticastGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + AssociateWirelessDeviceWithMulticastGroupCommandInput, + AssociateWirelessDeviceWithMulticastGroupCommandOutput + > { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "AssociateWirelessDeviceWithMulticastGroupCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: AssociateWirelessDeviceWithMulticastGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: AssociateWirelessDeviceWithMulticastGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: AssociateWirelessDeviceWithMulticastGroupCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1AssociateWirelessDeviceWithMulticastGroupCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1AssociateWirelessDeviceWithMulticastGroupCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/CancelMulticastGroupSessionCommand.ts b/clients/client-iot-wireless/src/commands/CancelMulticastGroupSessionCommand.ts new file mode 100644 index 000000000000..948fb4b0094d --- /dev/null +++ b/clients/client-iot-wireless/src/commands/CancelMulticastGroupSessionCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { CancelMulticastGroupSessionRequest, CancelMulticastGroupSessionResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CancelMulticastGroupSessionCommand, + serializeAws_restJson1CancelMulticastGroupSessionCommand, +} from "../protocols/Aws_restJson1"; + +export interface CancelMulticastGroupSessionCommandInput extends CancelMulticastGroupSessionRequest {} +export interface CancelMulticastGroupSessionCommandOutput + extends CancelMulticastGroupSessionResponse, + __MetadataBearer {} + +/** + *

    Cancels an existing multicast group session.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, CancelMulticastGroupSessionCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, CancelMulticastGroupSessionCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new CancelMulticastGroupSessionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CancelMulticastGroupSessionCommandInput} for command's `input` shape. + * @see {@link CancelMulticastGroupSessionCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CancelMulticastGroupSessionCommand extends $Command< + CancelMulticastGroupSessionCommandInput, + CancelMulticastGroupSessionCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CancelMulticastGroupSessionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "CancelMulticastGroupSessionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CancelMulticastGroupSessionRequest.filterSensitiveLog, + outputFilterSensitiveLog: CancelMulticastGroupSessionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CancelMulticastGroupSessionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CancelMulticastGroupSessionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1CancelMulticastGroupSessionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/CreateFuotaTaskCommand.ts b/clients/client-iot-wireless/src/commands/CreateFuotaTaskCommand.ts new file mode 100644 index 000000000000..43f9859f95b5 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/CreateFuotaTaskCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { CreateFuotaTaskRequest, CreateFuotaTaskResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateFuotaTaskCommand, + serializeAws_restJson1CreateFuotaTaskCommand, +} from "../protocols/Aws_restJson1"; + +export interface CreateFuotaTaskCommandInput extends CreateFuotaTaskRequest {} +export interface CreateFuotaTaskCommandOutput extends CreateFuotaTaskResponse, __MetadataBearer {} + +/** + *

    Creates a FUOTA task.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, CreateFuotaTaskCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, CreateFuotaTaskCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new CreateFuotaTaskCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateFuotaTaskCommandInput} for command's `input` shape. + * @see {@link CreateFuotaTaskCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateFuotaTaskCommand extends $Command< + CreateFuotaTaskCommandInput, + CreateFuotaTaskCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateFuotaTaskCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "CreateFuotaTaskCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateFuotaTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateFuotaTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateFuotaTaskCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateFuotaTaskCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1CreateFuotaTaskCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/CreateMulticastGroupCommand.ts b/clients/client-iot-wireless/src/commands/CreateMulticastGroupCommand.ts new file mode 100644 index 000000000000..9628c4ce05e9 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/CreateMulticastGroupCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { CreateMulticastGroupRequest, CreateMulticastGroupResponse } from "../models/models_0"; +import { + deserializeAws_restJson1CreateMulticastGroupCommand, + serializeAws_restJson1CreateMulticastGroupCommand, +} from "../protocols/Aws_restJson1"; + +export interface CreateMulticastGroupCommandInput extends CreateMulticastGroupRequest {} +export interface CreateMulticastGroupCommandOutput extends CreateMulticastGroupResponse, __MetadataBearer {} + +/** + *

    Creates a multicast group.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, CreateMulticastGroupCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, CreateMulticastGroupCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new CreateMulticastGroupCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateMulticastGroupCommandInput} for command's `input` shape. + * @see {@link CreateMulticastGroupCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateMulticastGroupCommand extends $Command< + CreateMulticastGroupCommandInput, + CreateMulticastGroupCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateMulticastGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "CreateMulticastGroupCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateMulticastGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateMulticastGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateMulticastGroupCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1CreateMulticastGroupCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1CreateMulticastGroupCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/DeleteFuotaTaskCommand.ts b/clients/client-iot-wireless/src/commands/DeleteFuotaTaskCommand.ts new file mode 100644 index 000000000000..9c774c8b5568 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/DeleteFuotaTaskCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { DeleteFuotaTaskRequest, DeleteFuotaTaskResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteFuotaTaskCommand, + serializeAws_restJson1DeleteFuotaTaskCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteFuotaTaskCommandInput extends DeleteFuotaTaskRequest {} +export interface DeleteFuotaTaskCommandOutput extends DeleteFuotaTaskResponse, __MetadataBearer {} + +/** + *

    Deletes a FUOTA task.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, DeleteFuotaTaskCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, DeleteFuotaTaskCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new DeleteFuotaTaskCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteFuotaTaskCommandInput} for command's `input` shape. + * @see {@link DeleteFuotaTaskCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteFuotaTaskCommand extends $Command< + DeleteFuotaTaskCommandInput, + DeleteFuotaTaskCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteFuotaTaskCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "DeleteFuotaTaskCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteFuotaTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteFuotaTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteFuotaTaskCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteFuotaTaskCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteFuotaTaskCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/DeleteMulticastGroupCommand.ts b/clients/client-iot-wireless/src/commands/DeleteMulticastGroupCommand.ts new file mode 100644 index 000000000000..44c225ee7c8d --- /dev/null +++ b/clients/client-iot-wireless/src/commands/DeleteMulticastGroupCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { DeleteMulticastGroupRequest, DeleteMulticastGroupResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DeleteMulticastGroupCommand, + serializeAws_restJson1DeleteMulticastGroupCommand, +} from "../protocols/Aws_restJson1"; + +export interface DeleteMulticastGroupCommandInput extends DeleteMulticastGroupRequest {} +export interface DeleteMulticastGroupCommandOutput extends DeleteMulticastGroupResponse, __MetadataBearer {} + +/** + *

    Deletes a multicast group if it is not in use by a fuota task.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, DeleteMulticastGroupCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, DeleteMulticastGroupCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new DeleteMulticastGroupCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteMulticastGroupCommandInput} for command's `input` shape. + * @see {@link DeleteMulticastGroupCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteMulticastGroupCommand extends $Command< + DeleteMulticastGroupCommandInput, + DeleteMulticastGroupCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteMulticastGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "DeleteMulticastGroupCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteMulticastGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteMulticastGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteMulticastGroupCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DeleteMulticastGroupCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DeleteMulticastGroupCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/DisassociateMulticastGroupFromFuotaTaskCommand.ts b/clients/client-iot-wireless/src/commands/DisassociateMulticastGroupFromFuotaTaskCommand.ts new file mode 100644 index 000000000000..f85ffb29687b --- /dev/null +++ b/clients/client-iot-wireless/src/commands/DisassociateMulticastGroupFromFuotaTaskCommand.ts @@ -0,0 +1,110 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { + DisassociateMulticastGroupFromFuotaTaskRequest, + DisassociateMulticastGroupFromFuotaTaskResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1DisassociateMulticastGroupFromFuotaTaskCommand, + serializeAws_restJson1DisassociateMulticastGroupFromFuotaTaskCommand, +} from "../protocols/Aws_restJson1"; + +export interface DisassociateMulticastGroupFromFuotaTaskCommandInput + extends DisassociateMulticastGroupFromFuotaTaskRequest {} +export interface DisassociateMulticastGroupFromFuotaTaskCommandOutput + extends DisassociateMulticastGroupFromFuotaTaskResponse, + __MetadataBearer {} + +/** + *

    Disassociates a multicast group from a fuota task.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, DisassociateMulticastGroupFromFuotaTaskCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, DisassociateMulticastGroupFromFuotaTaskCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new DisassociateMulticastGroupFromFuotaTaskCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DisassociateMulticastGroupFromFuotaTaskCommandInput} for command's `input` shape. + * @see {@link DisassociateMulticastGroupFromFuotaTaskCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DisassociateMulticastGroupFromFuotaTaskCommand extends $Command< + DisassociateMulticastGroupFromFuotaTaskCommandInput, + DisassociateMulticastGroupFromFuotaTaskCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DisassociateMulticastGroupFromFuotaTaskCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DisassociateMulticastGroupFromFuotaTaskCommandInput, + DisassociateMulticastGroupFromFuotaTaskCommandOutput + > { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "DisassociateMulticastGroupFromFuotaTaskCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DisassociateMulticastGroupFromFuotaTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: DisassociateMulticastGroupFromFuotaTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DisassociateMulticastGroupFromFuotaTaskCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1DisassociateMulticastGroupFromFuotaTaskCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DisassociateMulticastGroupFromFuotaTaskCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/DisassociateWirelessDeviceFromFuotaTaskCommand.ts b/clients/client-iot-wireless/src/commands/DisassociateWirelessDeviceFromFuotaTaskCommand.ts new file mode 100644 index 000000000000..da5ff935c7de --- /dev/null +++ b/clients/client-iot-wireless/src/commands/DisassociateWirelessDeviceFromFuotaTaskCommand.ts @@ -0,0 +1,110 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { + DisassociateWirelessDeviceFromFuotaTaskRequest, + DisassociateWirelessDeviceFromFuotaTaskResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1DisassociateWirelessDeviceFromFuotaTaskCommand, + serializeAws_restJson1DisassociateWirelessDeviceFromFuotaTaskCommand, +} from "../protocols/Aws_restJson1"; + +export interface DisassociateWirelessDeviceFromFuotaTaskCommandInput + extends DisassociateWirelessDeviceFromFuotaTaskRequest {} +export interface DisassociateWirelessDeviceFromFuotaTaskCommandOutput + extends DisassociateWirelessDeviceFromFuotaTaskResponse, + __MetadataBearer {} + +/** + *

    Disassociates a wireless device from a FUOTA task.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, DisassociateWirelessDeviceFromFuotaTaskCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, DisassociateWirelessDeviceFromFuotaTaskCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new DisassociateWirelessDeviceFromFuotaTaskCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DisassociateWirelessDeviceFromFuotaTaskCommandInput} for command's `input` shape. + * @see {@link DisassociateWirelessDeviceFromFuotaTaskCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DisassociateWirelessDeviceFromFuotaTaskCommand extends $Command< + DisassociateWirelessDeviceFromFuotaTaskCommandInput, + DisassociateWirelessDeviceFromFuotaTaskCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DisassociateWirelessDeviceFromFuotaTaskCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DisassociateWirelessDeviceFromFuotaTaskCommandInput, + DisassociateWirelessDeviceFromFuotaTaskCommandOutput + > { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "DisassociateWirelessDeviceFromFuotaTaskCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DisassociateWirelessDeviceFromFuotaTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: DisassociateWirelessDeviceFromFuotaTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DisassociateWirelessDeviceFromFuotaTaskCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1DisassociateWirelessDeviceFromFuotaTaskCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DisassociateWirelessDeviceFromFuotaTaskCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/DisassociateWirelessDeviceFromMulticastGroupCommand.ts b/clients/client-iot-wireless/src/commands/DisassociateWirelessDeviceFromMulticastGroupCommand.ts new file mode 100644 index 000000000000..62c7c554ae3b --- /dev/null +++ b/clients/client-iot-wireless/src/commands/DisassociateWirelessDeviceFromMulticastGroupCommand.ts @@ -0,0 +1,110 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { + DisassociateWirelessDeviceFromMulticastGroupRequest, + DisassociateWirelessDeviceFromMulticastGroupResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1DisassociateWirelessDeviceFromMulticastGroupCommand, + serializeAws_restJson1DisassociateWirelessDeviceFromMulticastGroupCommand, +} from "../protocols/Aws_restJson1"; + +export interface DisassociateWirelessDeviceFromMulticastGroupCommandInput + extends DisassociateWirelessDeviceFromMulticastGroupRequest {} +export interface DisassociateWirelessDeviceFromMulticastGroupCommandOutput + extends DisassociateWirelessDeviceFromMulticastGroupResponse, + __MetadataBearer {} + +/** + *

    Disassociates a wireless device from a multicast group.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, DisassociateWirelessDeviceFromMulticastGroupCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, DisassociateWirelessDeviceFromMulticastGroupCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new DisassociateWirelessDeviceFromMulticastGroupCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DisassociateWirelessDeviceFromMulticastGroupCommandInput} for command's `input` shape. + * @see {@link DisassociateWirelessDeviceFromMulticastGroupCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DisassociateWirelessDeviceFromMulticastGroupCommand extends $Command< + DisassociateWirelessDeviceFromMulticastGroupCommandInput, + DisassociateWirelessDeviceFromMulticastGroupCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DisassociateWirelessDeviceFromMulticastGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DisassociateWirelessDeviceFromMulticastGroupCommandInput, + DisassociateWirelessDeviceFromMulticastGroupCommandOutput + > { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "DisassociateWirelessDeviceFromMulticastGroupCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DisassociateWirelessDeviceFromMulticastGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: DisassociateWirelessDeviceFromMulticastGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DisassociateWirelessDeviceFromMulticastGroupCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1DisassociateWirelessDeviceFromMulticastGroupCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DisassociateWirelessDeviceFromMulticastGroupCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/GetFuotaTaskCommand.ts b/clients/client-iot-wireless/src/commands/GetFuotaTaskCommand.ts new file mode 100644 index 000000000000..fa36dfd309cd --- /dev/null +++ b/clients/client-iot-wireless/src/commands/GetFuotaTaskCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { GetFuotaTaskRequest, GetFuotaTaskResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetFuotaTaskCommand, + serializeAws_restJson1GetFuotaTaskCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetFuotaTaskCommandInput extends GetFuotaTaskRequest {} +export interface GetFuotaTaskCommandOutput extends GetFuotaTaskResponse, __MetadataBearer {} + +/** + *

    Gets information about a FUOTA task.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, GetFuotaTaskCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, GetFuotaTaskCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new GetFuotaTaskCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetFuotaTaskCommandInput} for command's `input` shape. + * @see {@link GetFuotaTaskCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetFuotaTaskCommand extends $Command< + GetFuotaTaskCommandInput, + GetFuotaTaskCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetFuotaTaskCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "GetFuotaTaskCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetFuotaTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetFuotaTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetFuotaTaskCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetFuotaTaskCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetFuotaTaskCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/GetMulticastGroupCommand.ts b/clients/client-iot-wireless/src/commands/GetMulticastGroupCommand.ts new file mode 100644 index 000000000000..75f2aff88aab --- /dev/null +++ b/clients/client-iot-wireless/src/commands/GetMulticastGroupCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { GetMulticastGroupRequest, GetMulticastGroupResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetMulticastGroupCommand, + serializeAws_restJson1GetMulticastGroupCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetMulticastGroupCommandInput extends GetMulticastGroupRequest {} +export interface GetMulticastGroupCommandOutput extends GetMulticastGroupResponse, __MetadataBearer {} + +/** + *

    Gets information about a multicast group.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, GetMulticastGroupCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, GetMulticastGroupCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new GetMulticastGroupCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetMulticastGroupCommandInput} for command's `input` shape. + * @see {@link GetMulticastGroupCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetMulticastGroupCommand extends $Command< + GetMulticastGroupCommandInput, + GetMulticastGroupCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetMulticastGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "GetMulticastGroupCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetMulticastGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetMulticastGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetMulticastGroupCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetMulticastGroupCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetMulticastGroupCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/GetMulticastGroupSessionCommand.ts b/clients/client-iot-wireless/src/commands/GetMulticastGroupSessionCommand.ts new file mode 100644 index 000000000000..9652ba5eb6c3 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/GetMulticastGroupSessionCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { GetMulticastGroupSessionRequest, GetMulticastGroupSessionResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetMulticastGroupSessionCommand, + serializeAws_restJson1GetMulticastGroupSessionCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetMulticastGroupSessionCommandInput extends GetMulticastGroupSessionRequest {} +export interface GetMulticastGroupSessionCommandOutput extends GetMulticastGroupSessionResponse, __MetadataBearer {} + +/** + *

    Gets information about a multicast group session.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, GetMulticastGroupSessionCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, GetMulticastGroupSessionCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new GetMulticastGroupSessionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetMulticastGroupSessionCommandInput} for command's `input` shape. + * @see {@link GetMulticastGroupSessionCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetMulticastGroupSessionCommand extends $Command< + GetMulticastGroupSessionCommandInput, + GetMulticastGroupSessionCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetMulticastGroupSessionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "GetMulticastGroupSessionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetMulticastGroupSessionRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetMulticastGroupSessionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetMulticastGroupSessionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetMulticastGroupSessionCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetMulticastGroupSessionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/GetResourceEventConfigurationCommand.ts b/clients/client-iot-wireless/src/commands/GetResourceEventConfigurationCommand.ts new file mode 100644 index 000000000000..65059e384c95 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/GetResourceEventConfigurationCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { GetResourceEventConfigurationRequest, GetResourceEventConfigurationResponse } from "../models/models_0"; +import { + deserializeAws_restJson1GetResourceEventConfigurationCommand, + serializeAws_restJson1GetResourceEventConfigurationCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetResourceEventConfigurationCommandInput extends GetResourceEventConfigurationRequest {} +export interface GetResourceEventConfigurationCommandOutput + extends GetResourceEventConfigurationResponse, + __MetadataBearer {} + +/** + *

    Get the event configuration for a particular resource identifier.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, GetResourceEventConfigurationCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, GetResourceEventConfigurationCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new GetResourceEventConfigurationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetResourceEventConfigurationCommandInput} for command's `input` shape. + * @see {@link GetResourceEventConfigurationCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetResourceEventConfigurationCommand extends $Command< + GetResourceEventConfigurationCommandInput, + GetResourceEventConfigurationCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetResourceEventConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "GetResourceEventConfigurationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetResourceEventConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetResourceEventConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetResourceEventConfigurationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetResourceEventConfigurationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1GetResourceEventConfigurationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/ListFuotaTasksCommand.ts b/clients/client-iot-wireless/src/commands/ListFuotaTasksCommand.ts new file mode 100644 index 000000000000..04807c1ce5b6 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/ListFuotaTasksCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { ListFuotaTasksRequest, ListFuotaTasksResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListFuotaTasksCommand, + serializeAws_restJson1ListFuotaTasksCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListFuotaTasksCommandInput extends ListFuotaTasksRequest {} +export interface ListFuotaTasksCommandOutput extends ListFuotaTasksResponse, __MetadataBearer {} + +/** + *

    Lists the FUOTA tasks registered to your AWS account.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, ListFuotaTasksCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, ListFuotaTasksCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new ListFuotaTasksCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListFuotaTasksCommandInput} for command's `input` shape. + * @see {@link ListFuotaTasksCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListFuotaTasksCommand extends $Command< + ListFuotaTasksCommandInput, + ListFuotaTasksCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListFuotaTasksCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "ListFuotaTasksCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListFuotaTasksRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListFuotaTasksResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListFuotaTasksCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListFuotaTasksCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListFuotaTasksCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/ListMulticastGroupsByFuotaTaskCommand.ts b/clients/client-iot-wireless/src/commands/ListMulticastGroupsByFuotaTaskCommand.ts new file mode 100644 index 000000000000..2b60f1f6b116 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/ListMulticastGroupsByFuotaTaskCommand.ts @@ -0,0 +1,103 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { ListMulticastGroupsByFuotaTaskRequest, ListMulticastGroupsByFuotaTaskResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListMulticastGroupsByFuotaTaskCommand, + serializeAws_restJson1ListMulticastGroupsByFuotaTaskCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListMulticastGroupsByFuotaTaskCommandInput extends ListMulticastGroupsByFuotaTaskRequest {} +export interface ListMulticastGroupsByFuotaTaskCommandOutput + extends ListMulticastGroupsByFuotaTaskResponse, + __MetadataBearer {} + +/** + *

    List all multicast groups associated with a fuota task.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, ListMulticastGroupsByFuotaTaskCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, ListMulticastGroupsByFuotaTaskCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new ListMulticastGroupsByFuotaTaskCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListMulticastGroupsByFuotaTaskCommandInput} for command's `input` shape. + * @see {@link ListMulticastGroupsByFuotaTaskCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListMulticastGroupsByFuotaTaskCommand extends $Command< + ListMulticastGroupsByFuotaTaskCommandInput, + ListMulticastGroupsByFuotaTaskCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListMulticastGroupsByFuotaTaskCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "ListMulticastGroupsByFuotaTaskCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListMulticastGroupsByFuotaTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListMulticastGroupsByFuotaTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListMulticastGroupsByFuotaTaskCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1ListMulticastGroupsByFuotaTaskCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1ListMulticastGroupsByFuotaTaskCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/ListMulticastGroupsCommand.ts b/clients/client-iot-wireless/src/commands/ListMulticastGroupsCommand.ts new file mode 100644 index 000000000000..f50b321a6ed6 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/ListMulticastGroupsCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { ListMulticastGroupsRequest, ListMulticastGroupsResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ListMulticastGroupsCommand, + serializeAws_restJson1ListMulticastGroupsCommand, +} from "../protocols/Aws_restJson1"; + +export interface ListMulticastGroupsCommandInput extends ListMulticastGroupsRequest {} +export interface ListMulticastGroupsCommandOutput extends ListMulticastGroupsResponse, __MetadataBearer {} + +/** + *

    Lists the multicast groups registered to your AWS account.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, ListMulticastGroupsCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, ListMulticastGroupsCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new ListMulticastGroupsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListMulticastGroupsCommandInput} for command's `input` shape. + * @see {@link ListMulticastGroupsCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListMulticastGroupsCommand extends $Command< + ListMulticastGroupsCommandInput, + ListMulticastGroupsCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListMulticastGroupsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "ListMulticastGroupsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListMulticastGroupsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListMulticastGroupsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListMulticastGroupsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListMulticastGroupsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListMulticastGroupsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/SendDataToMulticastGroupCommand.ts b/clients/client-iot-wireless/src/commands/SendDataToMulticastGroupCommand.ts new file mode 100644 index 000000000000..99a21adbf7f1 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/SendDataToMulticastGroupCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { SendDataToMulticastGroupRequest, SendDataToMulticastGroupResponse } from "../models/models_0"; +import { + deserializeAws_restJson1SendDataToMulticastGroupCommand, + serializeAws_restJson1SendDataToMulticastGroupCommand, +} from "../protocols/Aws_restJson1"; + +export interface SendDataToMulticastGroupCommandInput extends SendDataToMulticastGroupRequest {} +export interface SendDataToMulticastGroupCommandOutput extends SendDataToMulticastGroupResponse, __MetadataBearer {} + +/** + *

    Sends the specified data to a multicast group.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, SendDataToMulticastGroupCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, SendDataToMulticastGroupCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new SendDataToMulticastGroupCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link SendDataToMulticastGroupCommandInput} for command's `input` shape. + * @see {@link SendDataToMulticastGroupCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class SendDataToMulticastGroupCommand extends $Command< + SendDataToMulticastGroupCommandInput, + SendDataToMulticastGroupCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: SendDataToMulticastGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "SendDataToMulticastGroupCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: SendDataToMulticastGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: SendDataToMulticastGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: SendDataToMulticastGroupCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1SendDataToMulticastGroupCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1SendDataToMulticastGroupCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/StartBulkAssociateWirelessDeviceWithMulticastGroupCommand.ts b/clients/client-iot-wireless/src/commands/StartBulkAssociateWirelessDeviceWithMulticastGroupCommand.ts new file mode 100644 index 000000000000..f12391137e86 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/StartBulkAssociateWirelessDeviceWithMulticastGroupCommand.ts @@ -0,0 +1,110 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { + StartBulkAssociateWirelessDeviceWithMulticastGroupRequest, + StartBulkAssociateWirelessDeviceWithMulticastGroupResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1StartBulkAssociateWirelessDeviceWithMulticastGroupCommand, + serializeAws_restJson1StartBulkAssociateWirelessDeviceWithMulticastGroupCommand, +} from "../protocols/Aws_restJson1"; + +export interface StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput + extends StartBulkAssociateWirelessDeviceWithMulticastGroupRequest {} +export interface StartBulkAssociateWirelessDeviceWithMulticastGroupCommandOutput + extends StartBulkAssociateWirelessDeviceWithMulticastGroupResponse, + __MetadataBearer {} + +/** + *

    Starts a bulk association of all qualifying wireless devices with a multicast group.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, StartBulkAssociateWirelessDeviceWithMulticastGroupCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, StartBulkAssociateWirelessDeviceWithMulticastGroupCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new StartBulkAssociateWirelessDeviceWithMulticastGroupCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput} for command's `input` shape. + * @see {@link StartBulkAssociateWirelessDeviceWithMulticastGroupCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class StartBulkAssociateWirelessDeviceWithMulticastGroupCommand extends $Command< + StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput, + StartBulkAssociateWirelessDeviceWithMulticastGroupCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput, + StartBulkAssociateWirelessDeviceWithMulticastGroupCommandOutput + > { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "StartBulkAssociateWirelessDeviceWithMulticastGroupCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartBulkAssociateWirelessDeviceWithMulticastGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartBulkAssociateWirelessDeviceWithMulticastGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1StartBulkAssociateWirelessDeviceWithMulticastGroupCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1StartBulkAssociateWirelessDeviceWithMulticastGroupCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand.ts b/clients/client-iot-wireless/src/commands/StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand.ts new file mode 100644 index 000000000000..406e15b951b2 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand.ts @@ -0,0 +1,110 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { + StartBulkDisassociateWirelessDeviceFromMulticastGroupRequest, + StartBulkDisassociateWirelessDeviceFromMulticastGroupResponse, +} from "../models/models_0"; +import { + deserializeAws_restJson1StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand, + serializeAws_restJson1StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand, +} from "../protocols/Aws_restJson1"; + +export interface StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput + extends StartBulkDisassociateWirelessDeviceFromMulticastGroupRequest {} +export interface StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandOutput + extends StartBulkDisassociateWirelessDeviceFromMulticastGroupResponse, + __MetadataBearer {} + +/** + *

    Starts a bulk disassociatin of all qualifying wireless devices from a multicast group.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput} for command's `input` shape. + * @see {@link StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand extends $Command< + StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput, + StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput, + StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandOutput + > { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartBulkDisassociateWirelessDeviceFromMulticastGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartBulkDisassociateWirelessDeviceFromMulticastGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/StartFuotaTaskCommand.ts b/clients/client-iot-wireless/src/commands/StartFuotaTaskCommand.ts new file mode 100644 index 000000000000..4fd9cffce929 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/StartFuotaTaskCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { StartFuotaTaskRequest, StartFuotaTaskResponse } from "../models/models_0"; +import { + deserializeAws_restJson1StartFuotaTaskCommand, + serializeAws_restJson1StartFuotaTaskCommand, +} from "../protocols/Aws_restJson1"; + +export interface StartFuotaTaskCommandInput extends StartFuotaTaskRequest {} +export interface StartFuotaTaskCommandOutput extends StartFuotaTaskResponse, __MetadataBearer {} + +/** + *

    Starts a FUOTA task.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, StartFuotaTaskCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, StartFuotaTaskCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new StartFuotaTaskCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartFuotaTaskCommandInput} for command's `input` shape. + * @see {@link StartFuotaTaskCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class StartFuotaTaskCommand extends $Command< + StartFuotaTaskCommandInput, + StartFuotaTaskCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartFuotaTaskCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "StartFuotaTaskCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartFuotaTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartFuotaTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StartFuotaTaskCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StartFuotaTaskCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1StartFuotaTaskCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/StartMulticastGroupSessionCommand.ts b/clients/client-iot-wireless/src/commands/StartMulticastGroupSessionCommand.ts new file mode 100644 index 000000000000..3fb8a2ed45d9 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/StartMulticastGroupSessionCommand.ts @@ -0,0 +1,98 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { StartMulticastGroupSessionRequest, StartMulticastGroupSessionResponse } from "../models/models_0"; +import { + deserializeAws_restJson1StartMulticastGroupSessionCommand, + serializeAws_restJson1StartMulticastGroupSessionCommand, +} from "../protocols/Aws_restJson1"; + +export interface StartMulticastGroupSessionCommandInput extends StartMulticastGroupSessionRequest {} +export interface StartMulticastGroupSessionCommandOutput extends StartMulticastGroupSessionResponse, __MetadataBearer {} + +/** + *

    Starts a multicast group session.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, StartMulticastGroupSessionCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, StartMulticastGroupSessionCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new StartMulticastGroupSessionCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartMulticastGroupSessionCommandInput} for command's `input` shape. + * @see {@link StartMulticastGroupSessionCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class StartMulticastGroupSessionCommand extends $Command< + StartMulticastGroupSessionCommandInput, + StartMulticastGroupSessionCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartMulticastGroupSessionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "StartMulticastGroupSessionCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartMulticastGroupSessionRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartMulticastGroupSessionResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StartMulticastGroupSessionCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StartMulticastGroupSessionCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1StartMulticastGroupSessionCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/UpdateFuotaTaskCommand.ts b/clients/client-iot-wireless/src/commands/UpdateFuotaTaskCommand.ts new file mode 100644 index 000000000000..77babb7790b1 --- /dev/null +++ b/clients/client-iot-wireless/src/commands/UpdateFuotaTaskCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { UpdateFuotaTaskRequest, UpdateFuotaTaskResponse } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateFuotaTaskCommand, + serializeAws_restJson1UpdateFuotaTaskCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateFuotaTaskCommandInput extends UpdateFuotaTaskRequest {} +export interface UpdateFuotaTaskCommandOutput extends UpdateFuotaTaskResponse, __MetadataBearer {} + +/** + *

    Updates properties of a FUOTA task.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, UpdateFuotaTaskCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, UpdateFuotaTaskCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new UpdateFuotaTaskCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateFuotaTaskCommandInput} for command's `input` shape. + * @see {@link UpdateFuotaTaskCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateFuotaTaskCommand extends $Command< + UpdateFuotaTaskCommandInput, + UpdateFuotaTaskCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateFuotaTaskCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "UpdateFuotaTaskCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateFuotaTaskRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateFuotaTaskResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateFuotaTaskCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateFuotaTaskCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UpdateFuotaTaskCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/UpdateMulticastGroupCommand.ts b/clients/client-iot-wireless/src/commands/UpdateMulticastGroupCommand.ts new file mode 100644 index 000000000000..62f28aae409e --- /dev/null +++ b/clients/client-iot-wireless/src/commands/UpdateMulticastGroupCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { UpdateMulticastGroupRequest, UpdateMulticastGroupResponse } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateMulticastGroupCommand, + serializeAws_restJson1UpdateMulticastGroupCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateMulticastGroupCommandInput extends UpdateMulticastGroupRequest {} +export interface UpdateMulticastGroupCommandOutput extends UpdateMulticastGroupResponse, __MetadataBearer {} + +/** + *

    Updates properties of a multicast group session.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, UpdateMulticastGroupCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, UpdateMulticastGroupCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new UpdateMulticastGroupCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateMulticastGroupCommandInput} for command's `input` shape. + * @see {@link UpdateMulticastGroupCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateMulticastGroupCommand extends $Command< + UpdateMulticastGroupCommandInput, + UpdateMulticastGroupCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateMulticastGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "UpdateMulticastGroupCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateMulticastGroupRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateMulticastGroupResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateMulticastGroupCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateMulticastGroupCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UpdateMulticastGroupCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/UpdateResourceEventConfigurationCommand.ts b/clients/client-iot-wireless/src/commands/UpdateResourceEventConfigurationCommand.ts new file mode 100644 index 000000000000..113450c2e01c --- /dev/null +++ b/clients/client-iot-wireless/src/commands/UpdateResourceEventConfigurationCommand.ts @@ -0,0 +1,103 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { IoTWirelessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../IoTWirelessClient"; +import { UpdateResourceEventConfigurationRequest, UpdateResourceEventConfigurationResponse } from "../models/models_0"; +import { + deserializeAws_restJson1UpdateResourceEventConfigurationCommand, + serializeAws_restJson1UpdateResourceEventConfigurationCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateResourceEventConfigurationCommandInput extends UpdateResourceEventConfigurationRequest {} +export interface UpdateResourceEventConfigurationCommandOutput + extends UpdateResourceEventConfigurationResponse, + __MetadataBearer {} + +/** + *

    Update the event configuration for a particular resource identifier.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { IoTWirelessClient, UpdateResourceEventConfigurationCommand } from "@aws-sdk/client-iot-wireless"; // ES Modules import + * // const { IoTWirelessClient, UpdateResourceEventConfigurationCommand } = require("@aws-sdk/client-iot-wireless"); // CommonJS import + * const client = new IoTWirelessClient(config); + * const command = new UpdateResourceEventConfigurationCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateResourceEventConfigurationCommandInput} for command's `input` shape. + * @see {@link UpdateResourceEventConfigurationCommandOutput} for command's `response` shape. + * @see {@link IoTWirelessClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateResourceEventConfigurationCommand extends $Command< + UpdateResourceEventConfigurationCommandInput, + UpdateResourceEventConfigurationCommandOutput, + IoTWirelessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateResourceEventConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: IoTWirelessClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "IoTWirelessClient"; + const commandName = "UpdateResourceEventConfigurationCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateResourceEventConfigurationRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateResourceEventConfigurationResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateResourceEventConfigurationCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateResourceEventConfigurationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1UpdateResourceEventConfigurationCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-iot-wireless/src/commands/index.ts b/clients/client-iot-wireless/src/commands/index.ts index 65b5c37d35bb..03e79760f780 100644 --- a/clients/client-iot-wireless/src/commands/index.ts +++ b/clients/client-iot-wireless/src/commands/index.ts @@ -1,9 +1,15 @@ export * from "./AssociateAwsAccountWithPartnerAccountCommand"; +export * from "./AssociateMulticastGroupWithFuotaTaskCommand"; +export * from "./AssociateWirelessDeviceWithFuotaTaskCommand"; +export * from "./AssociateWirelessDeviceWithMulticastGroupCommand"; export * from "./AssociateWirelessDeviceWithThingCommand"; export * from "./AssociateWirelessGatewayWithCertificateCommand"; export * from "./AssociateWirelessGatewayWithThingCommand"; +export * from "./CancelMulticastGroupSessionCommand"; export * from "./CreateDestinationCommand"; export * from "./CreateDeviceProfileCommand"; +export * from "./CreateFuotaTaskCommand"; +export * from "./CreateMulticastGroupCommand"; export * from "./CreateServiceProfileCommand"; export * from "./CreateWirelessDeviceCommand"; export * from "./CreateWirelessGatewayCommand"; @@ -11,19 +17,28 @@ export * from "./CreateWirelessGatewayTaskCommand"; export * from "./CreateWirelessGatewayTaskDefinitionCommand"; export * from "./DeleteDestinationCommand"; export * from "./DeleteDeviceProfileCommand"; +export * from "./DeleteFuotaTaskCommand"; +export * from "./DeleteMulticastGroupCommand"; export * from "./DeleteServiceProfileCommand"; export * from "./DeleteWirelessDeviceCommand"; export * from "./DeleteWirelessGatewayCommand"; export * from "./DeleteWirelessGatewayTaskCommand"; export * from "./DeleteWirelessGatewayTaskDefinitionCommand"; export * from "./DisassociateAwsAccountFromPartnerAccountCommand"; +export * from "./DisassociateMulticastGroupFromFuotaTaskCommand"; +export * from "./DisassociateWirelessDeviceFromFuotaTaskCommand"; +export * from "./DisassociateWirelessDeviceFromMulticastGroupCommand"; export * from "./DisassociateWirelessDeviceFromThingCommand"; export * from "./DisassociateWirelessGatewayFromCertificateCommand"; export * from "./DisassociateWirelessGatewayFromThingCommand"; export * from "./GetDestinationCommand"; export * from "./GetDeviceProfileCommand"; +export * from "./GetFuotaTaskCommand"; export * from "./GetLogLevelsByResourceTypesCommand"; +export * from "./GetMulticastGroupCommand"; +export * from "./GetMulticastGroupSessionCommand"; export * from "./GetPartnerAccountCommand"; +export * from "./GetResourceEventConfigurationCommand"; export * from "./GetResourceLogLevelCommand"; export * from "./GetServiceEndpointCommand"; export * from "./GetServiceProfileCommand"; @@ -37,6 +52,9 @@ export * from "./GetWirelessGatewayTaskCommand"; export * from "./GetWirelessGatewayTaskDefinitionCommand"; export * from "./ListDestinationsCommand"; export * from "./ListDeviceProfilesCommand"; +export * from "./ListFuotaTasksCommand"; +export * from "./ListMulticastGroupsByFuotaTaskCommand"; +export * from "./ListMulticastGroupsCommand"; export * from "./ListPartnerAccountsCommand"; export * from "./ListServiceProfilesCommand"; export * from "./ListTagsForResourceCommand"; @@ -46,12 +64,20 @@ export * from "./ListWirelessGatewaysCommand"; export * from "./PutResourceLogLevelCommand"; export * from "./ResetAllResourceLogLevelsCommand"; export * from "./ResetResourceLogLevelCommand"; +export * from "./SendDataToMulticastGroupCommand"; export * from "./SendDataToWirelessDeviceCommand"; +export * from "./StartBulkAssociateWirelessDeviceWithMulticastGroupCommand"; +export * from "./StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand"; +export * from "./StartFuotaTaskCommand"; +export * from "./StartMulticastGroupSessionCommand"; export * from "./TagResourceCommand"; export * from "./TestWirelessDeviceCommand"; export * from "./UntagResourceCommand"; export * from "./UpdateDestinationCommand"; +export * from "./UpdateFuotaTaskCommand"; export * from "./UpdateLogLevelsByResourceTypesCommand"; +export * from "./UpdateMulticastGroupCommand"; export * from "./UpdatePartnerAccountCommand"; +export * from "./UpdateResourceEventConfigurationCommand"; export * from "./UpdateWirelessDeviceCommand"; export * from "./UpdateWirelessGatewayCommand"; diff --git a/clients/client-iot-wireless/src/models/models_0.ts b/clients/client-iot-wireless/src/models/models_0.ts index 46412d048cf9..bd6cb7c49b24 100644 --- a/clients/client-iot-wireless/src/models/models_0.ts +++ b/clients/client-iot-wireless/src/models/models_0.ts @@ -331,6 +331,102 @@ export namespace ValidationException { }); } +export interface AssociateMulticastGroupWithFuotaTaskRequest { + /** + *

    The ID of a FUOTA task.

    + */ + Id: string | undefined; + + /** + *

    The ID of the multicast group.

    + */ + MulticastGroupId: string | undefined; +} + +export namespace AssociateMulticastGroupWithFuotaTaskRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssociateMulticastGroupWithFuotaTaskRequest): any => ({ + ...obj, + }); +} + +export interface AssociateMulticastGroupWithFuotaTaskResponse {} + +export namespace AssociateMulticastGroupWithFuotaTaskResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssociateMulticastGroupWithFuotaTaskResponse): any => ({ + ...obj, + }); +} + +export interface AssociateWirelessDeviceWithFuotaTaskRequest { + /** + *

    The ID of a FUOTA task.

    + */ + Id: string | undefined; + + /** + *

    The ID of the wireless device.

    + */ + WirelessDeviceId: string | undefined; +} + +export namespace AssociateWirelessDeviceWithFuotaTaskRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssociateWirelessDeviceWithFuotaTaskRequest): any => ({ + ...obj, + }); +} + +export interface AssociateWirelessDeviceWithFuotaTaskResponse {} + +export namespace AssociateWirelessDeviceWithFuotaTaskResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssociateWirelessDeviceWithFuotaTaskResponse): any => ({ + ...obj, + }); +} + +export interface AssociateWirelessDeviceWithMulticastGroupRequest { + /** + *

    The ID of the multicast group.

    + */ + Id: string | undefined; + + /** + *

    The ID of the wireless device.

    + */ + WirelessDeviceId: string | undefined; +} + +export namespace AssociateWirelessDeviceWithMulticastGroupRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssociateWirelessDeviceWithMulticastGroupRequest): any => ({ + ...obj, + }); +} + +export interface AssociateWirelessDeviceWithMulticastGroupResponse {} + +export namespace AssociateWirelessDeviceWithMulticastGroupResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssociateWirelessDeviceWithMulticastGroupResponse): any => ({ + ...obj, + }); +} + export interface AssociateWirelessDeviceWithThingRequest { /** *

    The ID of the resource to update.

    @@ -438,6 +534,33 @@ export enum BatteryLevel { NORMAL = "normal", } +export interface CancelMulticastGroupSessionRequest { + /** + *

    The ID of the multicast group.

    + */ + Id: string | undefined; +} + +export namespace CancelMulticastGroupSessionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CancelMulticastGroupSessionRequest): any => ({ + ...obj, + }); +} + +export interface CancelMulticastGroupSessionResponse {} + +export namespace CancelMulticastGroupSessionResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CancelMulticastGroupSessionResponse): any => ({ + ...obj, + }); +} + export enum SigningAlg { Ed25519 = "Ed25519", P256r1 = "P256r1", @@ -705,6 +828,187 @@ export namespace CreateDeviceProfileResponse { }); } +export enum SupportedRfRegion { + AS923_1 = "AS923-1", + AU915 = "AU915", + EU868 = "EU868", + US915 = "US915", +} + +/** + *

    The LoRaWAN information used with a FUOTA task.

    + */ +export interface LoRaWANFuotaTask { + /** + *

    Supported RfRegions

    + */ + RfRegion?: SupportedRfRegion | string; +} + +export namespace LoRaWANFuotaTask { + /** + * @internal + */ + export const filterSensitiveLog = (obj: LoRaWANFuotaTask): any => ({ + ...obj, + }); +} + +export interface CreateFuotaTaskRequest { + /** + *

    The name of a FUOTA task.

    + */ + Name?: string; + + /** + *

    The description of the new resource.

    + */ + Description?: string; + + /** + *

    Each resource must have a unique client request token. If you try to create a new resource with the same token as a resource that already exists, an exception occurs. If you omit this value, AWS SDKs will automatically generate a unique client request.

    + */ + ClientRequestToken?: string; + + /** + *

    The LoRaWAN information used with a FUOTA task.

    + */ + LoRaWAN?: LoRaWANFuotaTask; + + /** + *

    The S3 URI points to a firmware update image that is to be used with a FUOTA task.

    + */ + FirmwareUpdateImage: string | undefined; + + /** + *

    The firmware update role that is to be used with a FUOTA task.

    + */ + FirmwareUpdateRole: string | undefined; + + /** + *

    The tag to attach to the specified resource. Tags are metadata that you can use to manage a resource.

    + */ + Tags?: Tag[]; +} + +export namespace CreateFuotaTaskRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateFuotaTaskRequest): any => ({ + ...obj, + }); +} + +export interface CreateFuotaTaskResponse { + /** + *

    The arn of a FUOTA task.

    + */ + Arn?: string; + + /** + *

    The ID of a FUOTA task.

    + */ + Id?: string; +} + +export namespace CreateFuotaTaskResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateFuotaTaskResponse): any => ({ + ...obj, + }); +} + +export enum DlClass { + ClassB = "ClassB", + ClassC = "ClassC", +} + +/** + *

    The LoRaWAN information that is to be used with the multicast group.

    + */ +export interface LoRaWANMulticast { + /** + *

    Supported RfRegions

    + */ + RfRegion?: SupportedRfRegion | string; + + /** + *

    DlClass for LoRaWAM, valid values are ClassB and ClassC.

    + */ + DlClass?: DlClass | string; +} + +export namespace LoRaWANMulticast { + /** + * @internal + */ + export const filterSensitiveLog = (obj: LoRaWANMulticast): any => ({ + ...obj, + }); +} + +export interface CreateMulticastGroupRequest { + /** + *

    The name of the multicast group.

    + */ + Name?: string; + + /** + *

    The description of the multicast group.

    + */ + Description?: string; + + /** + *

    Each resource must have a unique client request token. If you try to create a new resource with the + * same token as a resource that already exists, an exception occurs. If you omit this value, + * AWS SDKs will automatically generate a unique client request.

    + */ + ClientRequestToken?: string; + + /** + *

    The LoRaWAN information that is to be used with the multicast group.

    + */ + LoRaWAN: LoRaWANMulticast | undefined; + + /** + *

    The tag to attach to the specified resource. Tags are metadata that you can use to manage a resource.

    + */ + Tags?: Tag[]; +} + +export namespace CreateMulticastGroupRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateMulticastGroupRequest): any => ({ + ...obj, + }); +} + +export interface CreateMulticastGroupResponse { + /** + *

    The arn of the multicast group.

    + */ + Arn?: string; + + /** + *

    The ID of the multicast group.

    + */ + Id?: string; +} + +export namespace CreateMulticastGroupResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateMulticastGroupResponse): any => ({ + ...obj, + }); +} + /** *

    LoRaWANServiceProfile object.

    */ @@ -776,6 +1080,35 @@ export namespace CreateServiceProfileResponse { }); } +/** + *

    List of FPort assigned for different LoRaWAN application packages to use

    + */ +export interface FPorts { + /** + *

    The Fport value.

    + */ + Fuota?: number; + + /** + *

    The Fport value.

    + */ + Multicast?: number; + + /** + *

    The Fport value.

    + */ + ClockSync?: number; +} + +export namespace FPorts { + /** + * @internal + */ + export const filterSensitiveLog = (obj: FPorts): any => ({ + ...obj, + }); +} + /** *

    OTAA device object for v1.0.x

    */ @@ -789,6 +1122,11 @@ export interface OtaaV1_0_x { *

    The AppEUI value.

    */ AppEui?: string; + + /** + *

    The GenAppKey value.

    + */ + GenAppKey?: string; } export namespace OtaaV1_0_x { @@ -867,6 +1205,11 @@ export interface LoRaWANDevice { *

    LoRaWAN object for create APIs

    */ AbpV1_0_x?: AbpV1_0_x; + + /** + *

    List of FPort assigned for different LoRaWAN application packages to use

    + */ + FPorts?: FPorts; } export namespace LoRaWANDevice { @@ -1300,36 +1643,90 @@ export namespace DeleteDeviceProfileResponse { }); } -export interface DeleteServiceProfileRequest { +export interface DeleteFuotaTaskRequest { /** - *

    The ID of the resource to delete.

    + *

    The ID of a FUOTA task.

    */ Id: string | undefined; } -export namespace DeleteServiceProfileRequest { +export namespace DeleteFuotaTaskRequest { /** * @internal */ - export const filterSensitiveLog = (obj: DeleteServiceProfileRequest): any => ({ + export const filterSensitiveLog = (obj: DeleteFuotaTaskRequest): any => ({ ...obj, }); } -export interface DeleteServiceProfileResponse {} +export interface DeleteFuotaTaskResponse {} -export namespace DeleteServiceProfileResponse { +export namespace DeleteFuotaTaskResponse { /** * @internal */ - export const filterSensitiveLog = (obj: DeleteServiceProfileResponse): any => ({ + export const filterSensitiveLog = (obj: DeleteFuotaTaskResponse): any => ({ ...obj, }); } -export interface DeleteWirelessDeviceRequest { +export interface DeleteMulticastGroupRequest { /** - *

    The ID of the resource to delete.

    + *

    The ID of the multicast group.

    + */ + Id: string | undefined; +} + +export namespace DeleteMulticastGroupRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteMulticastGroupRequest): any => ({ + ...obj, + }); +} + +export interface DeleteMulticastGroupResponse {} + +export namespace DeleteMulticastGroupResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteMulticastGroupResponse): any => ({ + ...obj, + }); +} + +export interface DeleteServiceProfileRequest { + /** + *

    The ID of the resource to delete.

    + */ + Id: string | undefined; +} + +export namespace DeleteServiceProfileRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteServiceProfileRequest): any => ({ + ...obj, + }); +} + +export interface DeleteServiceProfileResponse {} + +export namespace DeleteServiceProfileResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteServiceProfileResponse): any => ({ + ...obj, + }); +} + +export interface DeleteWirelessDeviceRequest { + /** + *

    The ID of the resource to delete.

    */ Id: string | undefined; } @@ -1508,6 +1905,51 @@ export namespace DeviceProfile { }); } +export enum EventNotificationTopicStatus { + Disabled = "Disabled", + Enabled = "Enabled", +} + +/** + *

    SidewalkEventNotificationConfigurations object + * Event configuration object for Sidewalk related event topics.

    + */ +export interface SidewalkEventNotificationConfigurations { + /** + *

    Enum to denote whether amazon id event topic is enabled or disabled.

    + */ + AmazonIdEventTopic?: EventNotificationTopicStatus | string; +} + +export namespace SidewalkEventNotificationConfigurations { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SidewalkEventNotificationConfigurations): any => ({ + ...obj, + }); +} + +/** + *

    Device registration state event configuration object for enabling and disabling relevant topics.

    + */ +export interface DeviceRegistrationStateEventConfiguration { + /** + *

    Device registration state event configuration object for enabling or disabling Sidewalk related event + * topics.

    + */ + Sidewalk?: SidewalkEventNotificationConfigurations; +} + +export namespace DeviceRegistrationStateEventConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeviceRegistrationStateEventConfiguration): any => ({ + ...obj, + }); +} + export enum DeviceState { PROVISIONED = "Provisioned", REGISTEREDNOTSEEN = "RegisteredNotSeen", @@ -1551,6 +1993,102 @@ export namespace DisassociateAwsAccountFromPartnerAccountResponse { }); } +export interface DisassociateMulticastGroupFromFuotaTaskRequest { + /** + *

    The ID of a FUOTA task.

    + */ + Id: string | undefined; + + /** + *

    The ID of the multicast group.

    + */ + MulticastGroupId: string | undefined; +} + +export namespace DisassociateMulticastGroupFromFuotaTaskRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DisassociateMulticastGroupFromFuotaTaskRequest): any => ({ + ...obj, + }); +} + +export interface DisassociateMulticastGroupFromFuotaTaskResponse {} + +export namespace DisassociateMulticastGroupFromFuotaTaskResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DisassociateMulticastGroupFromFuotaTaskResponse): any => ({ + ...obj, + }); +} + +export interface DisassociateWirelessDeviceFromFuotaTaskRequest { + /** + *

    The ID of a FUOTA task.

    + */ + Id: string | undefined; + + /** + *

    The ID of the wireless device.

    + */ + WirelessDeviceId: string | undefined; +} + +export namespace DisassociateWirelessDeviceFromFuotaTaskRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DisassociateWirelessDeviceFromFuotaTaskRequest): any => ({ + ...obj, + }); +} + +export interface DisassociateWirelessDeviceFromFuotaTaskResponse {} + +export namespace DisassociateWirelessDeviceFromFuotaTaskResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DisassociateWirelessDeviceFromFuotaTaskResponse): any => ({ + ...obj, + }); +} + +export interface DisassociateWirelessDeviceFromMulticastGroupRequest { + /** + *

    The ID of the multicast group.

    + */ + Id: string | undefined; + + /** + *

    The ID of the wireless device.

    + */ + WirelessDeviceId: string | undefined; +} + +export namespace DisassociateWirelessDeviceFromMulticastGroupRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DisassociateWirelessDeviceFromMulticastGroupRequest): any => ({ + ...obj, + }); +} + +export interface DisassociateWirelessDeviceFromMulticastGroupResponse {} + +export namespace DisassociateWirelessDeviceFromMulticastGroupResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DisassociateWirelessDeviceFromMulticastGroupResponse): any => ({ + ...obj, + }); +} + export interface DisassociateWirelessDeviceFromThingRequest { /** *

    The ID of the resource to update.

    @@ -1640,6 +2178,61 @@ export enum Event { PASSTHROUGH = "passthrough", } +export enum EventNotificationPartnerType { + Sidewalk = "Sidewalk", +} + +export enum FuotaDeviceStatus { + FragAlgo_unsupported = "FragAlgo_unsupported", + FragIndex_unsupported = "FragIndex_unsupported", + Initial = "Initial", + MICError = "MICError", + MemoryError = "MemoryError", + MissingFrag = "MissingFrag", + Not_enough_memory = "Not_enough_memory", + Package_Not_Supported = "Package_Not_Supported", + SessionCnt_replay = "SessionCnt_replay", + Successful = "Successful", + Wrong_descriptor = "Wrong_descriptor", +} + +/** + *

    A FUOTA task.

    + */ +export interface FuotaTask { + /** + *

    The ID of a FUOTA task.

    + */ + Id?: string; + + /** + *

    The arn of a FUOTA task.

    + */ + Arn?: string; + + /** + *

    The name of a FUOTA task.

    + */ + Name?: string; +} + +export namespace FuotaTask { + /** + * @internal + */ + export const filterSensitiveLog = (obj: FuotaTask): any => ({ + ...obj, + }); +} + +export enum FuotaTaskStatus { + Delete_Waiting = "Delete_Waiting", + FuotaDone = "FuotaDone", + FuotaSession_Waiting = "FuotaSession_Waiting", + In_FuotaSession = "In_FuotaSession", + Pending = "Pending", +} + export interface GetDestinationRequest { /** *

    The name of the resource to get.

    @@ -1744,6 +2337,102 @@ export namespace GetDeviceProfileResponse { }); } +export interface GetFuotaTaskRequest { + /** + *

    The ID of a FUOTA task.

    + */ + Id: string | undefined; +} + +export namespace GetFuotaTaskRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetFuotaTaskRequest): any => ({ + ...obj, + }); +} + +/** + *

    The LoRaWAN information returned from getting a FUOTA task.

    + */ +export interface LoRaWANFuotaTaskGetInfo { + /** + *

    The frequency band (RFRegion) value.

    + */ + RfRegion?: string; + + /** + *

    Start time of a FUOTA task.

    + */ + StartTime?: Date; +} + +export namespace LoRaWANFuotaTaskGetInfo { + /** + * @internal + */ + export const filterSensitiveLog = (obj: LoRaWANFuotaTaskGetInfo): any => ({ + ...obj, + }); +} + +export interface GetFuotaTaskResponse { + /** + *

    The arn of a FUOTA task.

    + */ + Arn?: string; + + /** + *

    The ID of a FUOTA task.

    + */ + Id?: string; + + /** + *

    The status of a FUOTA task.

    + */ + Status?: FuotaTaskStatus | string; + + /** + *

    The name of a FUOTA task.

    + */ + Name?: string; + + /** + *

    The description of the new resource.

    + */ + Description?: string; + + /** + *

    The LoRaWAN information returned from getting a FUOTA task.

    + */ + LoRaWAN?: LoRaWANFuotaTaskGetInfo; + + /** + *

    The S3 URI points to a firmware update image that is to be used with a FUOTA task.

    + */ + FirmwareUpdateImage?: string; + + /** + *

    The firmware update role that is to be used with a FUOTA task.

    + */ + FirmwareUpdateRole?: string; + + /** + *

    Created at timestamp for the resource.

    + */ + CreatedAt?: Date; +} + +export namespace GetFuotaTaskResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetFuotaTaskResponse): any => ({ + ...obj, + }); +} + export interface GetLogLevelsByResourceTypesRequest {} export namespace GetLogLevelsByResourceTypesRequest { @@ -1914,14 +2603,176 @@ export namespace GetLogLevelsByResourceTypesResponse { }); } -export interface GetPartnerAccountRequest { +export interface GetMulticastGroupRequest { /** - *

    The partner account ID to disassociate from the AWS account.

    + *

    The ID of the multicast group.

    */ - PartnerAccountId: string | undefined; + Id: string | undefined; +} +export namespace GetMulticastGroupRequest { /** - *

    The partner type.

    + * @internal + */ + export const filterSensitiveLog = (obj: GetMulticastGroupRequest): any => ({ + ...obj, + }); +} + +/** + *

    The LoRaWAN information that is to be returned from getting multicast group information.

    + */ +export interface LoRaWANMulticastGet { + /** + *

    Supported RfRegions

    + */ + RfRegion?: SupportedRfRegion | string; + + /** + *

    DlClass for LoRaWAM, valid values are ClassB and ClassC.

    + */ + DlClass?: DlClass | string; + + /** + *

    Number of devices that are requested to be associated with the multicast group.

    + */ + NumberOfDevicesRequested?: number; + + /** + *

    Number of devices that are associated to the multicast group.

    + */ + NumberOfDevicesInGroup?: number; +} + +export namespace LoRaWANMulticastGet { + /** + * @internal + */ + export const filterSensitiveLog = (obj: LoRaWANMulticastGet): any => ({ + ...obj, + }); +} + +export interface GetMulticastGroupResponse { + /** + *

    The arn of the multicast group.

    + */ + Arn?: string; + + /** + *

    The ID of the multicast group.

    + */ + Id?: string; + + /** + *

    The name of the multicast group.

    + */ + Name?: string; + + /** + *

    The description of the new resource.

    + */ + Description?: string; + + /** + *

    The status of the multicast group.

    + */ + Status?: string; + + /** + *

    The LoRaWAN information that is to be returned from getting multicast group information.

    + */ + LoRaWAN?: LoRaWANMulticastGet; + + /** + *

    Created at timestamp for the resource.

    + */ + CreatedAt?: Date; +} + +export namespace GetMulticastGroupResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetMulticastGroupResponse): any => ({ + ...obj, + }); +} + +export interface GetMulticastGroupSessionRequest { + /** + *

    The ID of the multicast group.

    + */ + Id: string | undefined; +} + +export namespace GetMulticastGroupSessionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetMulticastGroupSessionRequest): any => ({ + ...obj, + }); +} + +/** + *

    The LoRaWAN information used with the multicast session.

    + */ +export interface LoRaWANMulticastSession { + /** + *

    Downlink data rate.

    + */ + DlDr?: number; + + /** + *

    Downlink frequency.

    + */ + DlFreq?: number; + + /** + *

    Timestamp of when the multicast group session is to start.

    + */ + SessionStartTime?: Date; + + /** + *

    How long before a multicast group session is to timeout.

    + */ + SessionTimeout?: number; +} + +export namespace LoRaWANMulticastSession { + /** + * @internal + */ + export const filterSensitiveLog = (obj: LoRaWANMulticastSession): any => ({ + ...obj, + }); +} + +export interface GetMulticastGroupSessionResponse { + /** + *

    The LoRaWAN information used with the multicast session.

    + */ + LoRaWAN?: LoRaWANMulticastSession; +} + +export namespace GetMulticastGroupSessionResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetMulticastGroupSessionResponse): any => ({ + ...obj, + }); +} + +export interface GetPartnerAccountRequest { + /** + *

    The partner account ID to disassociate from the AWS account.

    + */ + PartnerAccountId: string | undefined; + + /** + *

    The partner type.

    */ PartnerType: PartnerType | string | undefined; } @@ -1987,6 +2838,76 @@ export namespace GetPartnerAccountResponse { }); } +export enum IdentifierType { + PartnerAccountId = "PartnerAccountId", +} + +export interface GetResourceEventConfigurationRequest { + /** + *

    Resource identifier to opt in for event messaging.

    + */ + Identifier: string | undefined; + + /** + *

    Identifier type of the particular resource identifier for event configuration.

    + */ + IdentifierType: IdentifierType | string | undefined; + + /** + *

    Partner type of the resource if the identifier type is PartnerAccountId.

    + */ + PartnerType?: EventNotificationPartnerType | string; +} + +export namespace GetResourceEventConfigurationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetResourceEventConfigurationRequest): any => ({ + ...obj, + }); +} + +/** + *

    Proximity event configuration object for enabling and disabling relevant topics.

    + */ +export interface ProximityEventConfiguration { + /** + *

    Proximity event configuration object for enabling or disabling Sidewalk related event topics.

    + */ + Sidewalk?: SidewalkEventNotificationConfigurations; +} + +export namespace ProximityEventConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ProximityEventConfiguration): any => ({ + ...obj, + }); +} + +export interface GetResourceEventConfigurationResponse { + /** + *

    Event configuration for the device registration state event

    + */ + DeviceRegistrationState?: DeviceRegistrationStateEventConfiguration; + + /** + *

    Event configuration for the Proximity event

    + */ + Proximity?: ProximityEventConfiguration; +} + +export namespace GetResourceEventConfigurationResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetResourceEventConfigurationResponse): any => ({ + ...obj, + }); +} + export interface GetResourceLogLevelRequest { /** *

    The identifier of the resource. For a Wireless Device, it is the wireless device ID. For a wireless gateway, @@ -2891,7 +3812,7 @@ export namespace ListDeviceProfilesResponse { }); } -export interface ListPartnerAccountsRequest { +export interface ListFuotaTasksRequest { /** *

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    */ @@ -2903,40 +3824,37 @@ export interface ListPartnerAccountsRequest { MaxResults?: number; } -export namespace ListPartnerAccountsRequest { +export namespace ListFuotaTasksRequest { /** * @internal */ - export const filterSensitiveLog = (obj: ListPartnerAccountsRequest): any => ({ + export const filterSensitiveLog = (obj: ListFuotaTasksRequest): any => ({ ...obj, }); } -export interface ListPartnerAccountsResponse { +export interface ListFuotaTasksResponse { /** - *

    The token to use to get the next set of results, or null if there are no additional results.

    + *

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    */ NextToken?: string; /** - *

    The Sidewalk account credentials.

    + *

    Lists the FUOTA tasks registered to your AWS account.

    */ - Sidewalk?: SidewalkAccountInfoWithFingerprint[]; + FuotaTaskList?: FuotaTask[]; } -export namespace ListPartnerAccountsResponse { +export namespace ListFuotaTasksResponse { /** * @internal */ - export const filterSensitiveLog = (obj: ListPartnerAccountsResponse): any => ({ + export const filterSensitiveLog = (obj: ListFuotaTasksResponse): any => ({ ...obj, - ...(obj.Sidewalk && { - Sidewalk: obj.Sidewalk.map((item) => SidewalkAccountInfoWithFingerprint.filterSensitiveLog(item)), - }), }); } -export interface ListServiceProfilesRequest { +export interface ListMulticastGroupsRequest { /** *

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    */ @@ -2948,144 +3866,336 @@ export interface ListServiceProfilesRequest { MaxResults?: number; } -export namespace ListServiceProfilesRequest { +export namespace ListMulticastGroupsRequest { /** * @internal */ - export const filterSensitiveLog = (obj: ListServiceProfilesRequest): any => ({ + export const filterSensitiveLog = (obj: ListMulticastGroupsRequest): any => ({ ...obj, }); } /** - *

    Information about a service profile.

    + *

    A multicast group.

    */ -export interface ServiceProfile { +export interface MulticastGroup { /** - *

    The Amazon Resource Name of the resource.

    + *

    The ID of the multicast group.

    */ - Arn?: string; + Id?: string; /** - *

    The name of the resource.

    + *

    The arn of the multicast group.

    */ - Name?: string; + Arn?: string; /** - *

    The ID of the service profile.

    + *

    The name of the multicast group.

    */ - Id?: string; + Name?: string; } -export namespace ServiceProfile { +export namespace MulticastGroup { /** * @internal */ - export const filterSensitiveLog = (obj: ServiceProfile): any => ({ + export const filterSensitiveLog = (obj: MulticastGroup): any => ({ ...obj, }); } -export interface ListServiceProfilesResponse { +export interface ListMulticastGroupsResponse { /** - *

    The token to use to get the next set of results, or null if there are no additional results.

    + *

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    */ NextToken?: string; /** - *

    The list of service profiles.

    + *

    List of multicast groups.

    */ - ServiceProfileList?: ServiceProfile[]; + MulticastGroupList?: MulticastGroup[]; } -export namespace ListServiceProfilesResponse { +export namespace ListMulticastGroupsResponse { /** * @internal */ - export const filterSensitiveLog = (obj: ListServiceProfilesResponse): any => ({ + export const filterSensitiveLog = (obj: ListMulticastGroupsResponse): any => ({ ...obj, }); } -export interface ListTagsForResourceRequest { +export interface ListMulticastGroupsByFuotaTaskRequest { /** - *

    The ARN of the resource for which you want to list tags.

    + *

    The ID of a FUOTA task.

    */ - ResourceArn: string | undefined; + Id: string | undefined; + + /** + *

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    + */ + NextToken?: string; + + /** + *

    The maximum number of results to return in this operation.

    + */ + MaxResults?: number; } -export namespace ListTagsForResourceRequest { +export namespace ListMulticastGroupsByFuotaTaskRequest { /** * @internal */ - export const filterSensitiveLog = (obj: ListTagsForResourceRequest): any => ({ + export const filterSensitiveLog = (obj: ListMulticastGroupsByFuotaTaskRequest): any => ({ ...obj, }); } -export interface ListTagsForResourceResponse { +/** + *

    A multicast group that is associated with a FUOTA task.

    + */ +export interface MulticastGroupByFuotaTask { /** - *

    The tags to attach to the specified resource. Tags are metadata that you can use to manage a resource.

    + *

    The ID of the multicast group.

    */ - Tags?: Tag[]; + Id?: string; } -export namespace ListTagsForResourceResponse { +export namespace MulticastGroupByFuotaTask { /** * @internal */ - export const filterSensitiveLog = (obj: ListTagsForResourceResponse): any => ({ + export const filterSensitiveLog = (obj: MulticastGroupByFuotaTask): any => ({ ...obj, }); } -export interface ListWirelessDevicesRequest { - /** - *

    The maximum number of results to return in this operation.

    - */ - MaxResults?: number; - +export interface ListMulticastGroupsByFuotaTaskResponse { /** *

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    */ NextToken?: string; /** - *

    A filter to list only the wireless devices that use this destination.

    + *

    List of multicast groups associated with a FUOTA task.

    */ - DestinationName?: string; + MulticastGroupList?: MulticastGroupByFuotaTask[]; +} +export namespace ListMulticastGroupsByFuotaTaskResponse { /** - *

    A filter to list only the wireless devices that use this device profile.

    + * @internal */ - DeviceProfileId?: string; + export const filterSensitiveLog = (obj: ListMulticastGroupsByFuotaTaskResponse): any => ({ + ...obj, + }); +} +export interface ListPartnerAccountsRequest { /** - *

    A filter to list only the wireless devices that use this service profile.

    + *

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    */ - ServiceProfileId?: string; + NextToken?: string; /** - *

    A filter to list only the wireless devices that use this wireless device type.

    + *

    The maximum number of results to return in this operation.

    */ - WirelessDeviceType?: WirelessDeviceType | string; + MaxResults?: number; } -export namespace ListWirelessDevicesRequest { +export namespace ListPartnerAccountsRequest { /** * @internal */ - export const filterSensitiveLog = (obj: ListWirelessDevicesRequest): any => ({ + export const filterSensitiveLog = (obj: ListPartnerAccountsRequest): any => ({ ...obj, }); } -/** - *

    LoRaWAN object for list functions.

    - */ -export interface LoRaWANListDevice { +export interface ListPartnerAccountsResponse { /** - *

    The DevEUI value.

    + *

    The token to use to get the next set of results, or null if there are no additional results.

    + */ + NextToken?: string; + + /** + *

    The Sidewalk account credentials.

    + */ + Sidewalk?: SidewalkAccountInfoWithFingerprint[]; +} + +export namespace ListPartnerAccountsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListPartnerAccountsResponse): any => ({ + ...obj, + ...(obj.Sidewalk && { + Sidewalk: obj.Sidewalk.map((item) => SidewalkAccountInfoWithFingerprint.filterSensitiveLog(item)), + }), + }); +} + +export interface ListServiceProfilesRequest { + /** + *

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    + */ + NextToken?: string; + + /** + *

    The maximum number of results to return in this operation.

    + */ + MaxResults?: number; +} + +export namespace ListServiceProfilesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListServiceProfilesRequest): any => ({ + ...obj, + }); +} + +/** + *

    Information about a service profile.

    + */ +export interface ServiceProfile { + /** + *

    The Amazon Resource Name of the resource.

    + */ + Arn?: string; + + /** + *

    The name of the resource.

    + */ + Name?: string; + + /** + *

    The ID of the service profile.

    + */ + Id?: string; +} + +export namespace ServiceProfile { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ServiceProfile): any => ({ + ...obj, + }); +} + +export interface ListServiceProfilesResponse { + /** + *

    The token to use to get the next set of results, or null if there are no additional results.

    + */ + NextToken?: string; + + /** + *

    The list of service profiles.

    + */ + ServiceProfileList?: ServiceProfile[]; +} + +export namespace ListServiceProfilesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListServiceProfilesResponse): any => ({ + ...obj, + }); +} + +export interface ListTagsForResourceRequest { + /** + *

    The ARN of the resource for which you want to list tags.

    + */ + ResourceArn: string | undefined; +} + +export namespace ListTagsForResourceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListTagsForResourceRequest): any => ({ + ...obj, + }); +} + +export interface ListTagsForResourceResponse { + /** + *

    The tags to attach to the specified resource. Tags are metadata that you can use to manage a resource.

    + */ + Tags?: Tag[]; +} + +export namespace ListTagsForResourceResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListTagsForResourceResponse): any => ({ + ...obj, + }); +} + +export interface ListWirelessDevicesRequest { + /** + *

    The maximum number of results to return in this operation.

    + */ + MaxResults?: number; + + /** + *

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    + */ + NextToken?: string; + + /** + *

    A filter to list only the wireless devices that use this destination.

    + */ + DestinationName?: string; + + /** + *

    A filter to list only the wireless devices that use this device profile.

    + */ + DeviceProfileId?: string; + + /** + *

    A filter to list only the wireless devices that use this service profile.

    + */ + ServiceProfileId?: string; + + /** + *

    A filter to list only the wireless devices that use this wireless device type.

    + */ + WirelessDeviceType?: WirelessDeviceType | string; + + /** + *

    The ID of a FUOTA task.

    + */ + FuotaTaskId?: string; + + /** + *

    The ID of the multicast group.

    + */ + MulticastGroupId?: string; +} + +export namespace ListWirelessDevicesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListWirelessDevicesRequest): any => ({ + ...obj, + }); +} + +/** + *

    LoRaWAN object for list functions.

    + */ +export interface LoRaWANListDevice { + /** + *

    The DevEUI value.

    */ DevEui?: string; } @@ -3176,6 +4286,21 @@ export interface WirelessDeviceStatistics { *

    The Sidewalk account credentials.

    */ Sidewalk?: SidewalkListDevice; + + /** + *

    The status of a wireless device in a FUOTA task.

    + */ + FuotaDeviceStatus?: FuotaDeviceStatus | string; + + /** + *

    The status of the wireless device in the multicast group.

    + */ + MulticastDeviceStatus?: string; + + /** + *

    Id of the multicast group.

    + */ + McGroupId?: number; } export namespace WirelessDeviceStatistics { @@ -3491,6 +4616,86 @@ export namespace ResetResourceLogLevelResponse { }); } +/** + *

    The metadata information of the LoRaWAN multicast group.

    + */ +export interface LoRaWANMulticastMetadata { + /** + *

    The Fport value.

    + */ + FPort?: number; +} + +export namespace LoRaWANMulticastMetadata { + /** + * @internal + */ + export const filterSensitiveLog = (obj: LoRaWANMulticastMetadata): any => ({ + ...obj, + }); +} + +/** + *

    Wireless metadata that is to be sent to multicast group.

    + */ +export interface MulticastWirelessMetadata { + /** + *

    The metadata information of the LoRaWAN multicast group.

    + */ + LoRaWAN?: LoRaWANMulticastMetadata; +} + +export namespace MulticastWirelessMetadata { + /** + * @internal + */ + export const filterSensitiveLog = (obj: MulticastWirelessMetadata): any => ({ + ...obj, + }); +} + +export interface SendDataToMulticastGroupRequest { + /** + *

    The ID of the multicast group.

    + */ + Id: string | undefined; + + /** + *

    The binary to be sent to the end device, encoded in base64.

    + */ + PayloadData: string | undefined; + + /** + *

    Wireless metadata that is to be sent to multicast group.

    + */ + WirelessMetadata: MulticastWirelessMetadata | undefined; +} + +export namespace SendDataToMulticastGroupRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SendDataToMulticastGroupRequest): any => ({ + ...obj, + }); +} + +export interface SendDataToMulticastGroupResponse { + /** + *

    ID of a multicast group message.

    + */ + MessageId?: string; +} + +export namespace SendDataToMulticastGroupResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SendDataToMulticastGroupResponse): any => ({ + ...obj, + }); +} + /** *

    LoRaWAN router info.

    */ @@ -3612,6 +4817,163 @@ export namespace SendDataToWirelessDeviceResponse { }); } +export interface StartBulkAssociateWirelessDeviceWithMulticastGroupRequest { + /** + *

    The ID of the multicast group.

    + */ + Id: string | undefined; + + /** + *

    Query string used to search for wireless devices as part of the bulk associate and disassociate process.

    + */ + QueryString?: string; + + /** + *

    The tag to attach to the specified resource. Tags are metadata that you can use to manage a resource.

    + */ + Tags?: Tag[]; +} + +export namespace StartBulkAssociateWirelessDeviceWithMulticastGroupRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartBulkAssociateWirelessDeviceWithMulticastGroupRequest): any => ({ + ...obj, + }); +} + +export interface StartBulkAssociateWirelessDeviceWithMulticastGroupResponse {} + +export namespace StartBulkAssociateWirelessDeviceWithMulticastGroupResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartBulkAssociateWirelessDeviceWithMulticastGroupResponse): any => ({ + ...obj, + }); +} + +export interface StartBulkDisassociateWirelessDeviceFromMulticastGroupRequest { + /** + *

    The ID of the multicast group.

    + */ + Id: string | undefined; + + /** + *

    Query string used to search for wireless devices as part of the bulk associate and disassociate process.

    + */ + QueryString?: string; + + /** + *

    The tag to attach to the specified resource. Tags are metadata that you can use to manage a resource.

    + */ + Tags?: Tag[]; +} + +export namespace StartBulkDisassociateWirelessDeviceFromMulticastGroupRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartBulkDisassociateWirelessDeviceFromMulticastGroupRequest): any => ({ + ...obj, + }); +} + +export interface StartBulkDisassociateWirelessDeviceFromMulticastGroupResponse {} + +export namespace StartBulkDisassociateWirelessDeviceFromMulticastGroupResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartBulkDisassociateWirelessDeviceFromMulticastGroupResponse): any => ({ + ...obj, + }); +} + +/** + *

    The LoRaWAN information used to start a FUOTA task.

    + */ +export interface LoRaWANStartFuotaTask { + /** + *

    Start time of a FUOTA task.

    + */ + StartTime?: Date; +} + +export namespace LoRaWANStartFuotaTask { + /** + * @internal + */ + export const filterSensitiveLog = (obj: LoRaWANStartFuotaTask): any => ({ + ...obj, + }); +} + +export interface StartFuotaTaskRequest { + /** + *

    The ID of a FUOTA task.

    + */ + Id: string | undefined; + + /** + *

    The LoRaWAN information used to start a FUOTA task.

    + */ + LoRaWAN?: LoRaWANStartFuotaTask; +} + +export namespace StartFuotaTaskRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartFuotaTaskRequest): any => ({ + ...obj, + }); +} + +export interface StartFuotaTaskResponse {} + +export namespace StartFuotaTaskResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartFuotaTaskResponse): any => ({ + ...obj, + }); +} + +export interface StartMulticastGroupSessionRequest { + /** + *

    The ID of the multicast group.

    + */ + Id: string | undefined; + + /** + *

    The LoRaWAN information used with the multicast session.

    + */ + LoRaWAN: LoRaWANMulticastSession | undefined; +} + +export namespace StartMulticastGroupSessionRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartMulticastGroupSessionRequest): any => ({ + ...obj, + }); +} + +export interface StartMulticastGroupSessionResponse {} + +export namespace StartMulticastGroupSessionResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartMulticastGroupSessionResponse): any => ({ + ...obj, + }); +} + export interface TagResourceRequest { /** *

    The ARN of the resource to add tags to.

    @@ -3777,6 +5139,58 @@ export namespace UpdateDestinationResponse { }); } +export interface UpdateFuotaTaskRequest { + /** + *

    The ID of a FUOTA task.

    + */ + Id: string | undefined; + + /** + *

    The name of a FUOTA task.

    + */ + Name?: string; + + /** + *

    The description of the new resource.

    + */ + Description?: string; + + /** + *

    The LoRaWAN information used with a FUOTA task.

    + */ + LoRaWAN?: LoRaWANFuotaTask; + + /** + *

    The S3 URI points to a firmware update image that is to be used with a FUOTA task.

    + */ + FirmwareUpdateImage?: string; + + /** + *

    The firmware update role that is to be used with a FUOTA task.

    + */ + FirmwareUpdateRole?: string; +} + +export namespace UpdateFuotaTaskRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateFuotaTaskRequest): any => ({ + ...obj, + }); +} + +export interface UpdateFuotaTaskResponse {} + +export namespace UpdateFuotaTaskResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateFuotaTaskResponse): any => ({ + ...obj, + }); +} + export interface UpdateLogLevelsByResourceTypesRequest { /** *

    The log level for a log message.

    @@ -3814,6 +5228,48 @@ export namespace UpdateLogLevelsByResourceTypesResponse { }); } +export interface UpdateMulticastGroupRequest { + /** + *

    The ID of the multicast group.

    + */ + Id: string | undefined; + + /** + *

    The name of the multicast group.

    + */ + Name?: string; + + /** + *

    The description of the new resource.

    + */ + Description?: string; + + /** + *

    The LoRaWAN information that is to be used with the multicast group.

    + */ + LoRaWAN?: LoRaWANMulticast; +} + +export namespace UpdateMulticastGroupRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateMulticastGroupRequest): any => ({ + ...obj, + }); +} + +export interface UpdateMulticastGroupResponse {} + +export namespace UpdateMulticastGroupResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateMulticastGroupResponse): any => ({ + ...obj, + }); +} + /** *

    Sidewalk update.

    */ @@ -3872,6 +5328,53 @@ export namespace UpdatePartnerAccountResponse { }); } +export interface UpdateResourceEventConfigurationRequest { + /** + *

    Resource identifier to opt in for event messaging.

    + */ + Identifier: string | undefined; + + /** + *

    Identifier type of the particular resource identifier for event configuration.

    + */ + IdentifierType: IdentifierType | string | undefined; + + /** + *

    Partner type of the resource if the identifier type is PartnerAccountId

    + */ + PartnerType?: EventNotificationPartnerType | string; + + /** + *

    Event configuration for the device registration state event

    + */ + DeviceRegistrationState?: DeviceRegistrationStateEventConfiguration; + + /** + *

    Event configuration for the Proximity event

    + */ + Proximity?: ProximityEventConfiguration; +} + +export namespace UpdateResourceEventConfigurationRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateResourceEventConfigurationRequest): any => ({ + ...obj, + }); +} + +export interface UpdateResourceEventConfigurationResponse {} + +export namespace UpdateResourceEventConfigurationResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateResourceEventConfigurationResponse): any => ({ + ...obj, + }); +} + /** *

    LoRaWAN object for update functions.

    */ diff --git a/clients/client-iot-wireless/src/pagination/ListFuotaTasksPaginator.ts b/clients/client-iot-wireless/src/pagination/ListFuotaTasksPaginator.ts new file mode 100644 index 000000000000..bc0e74ea3ff2 --- /dev/null +++ b/clients/client-iot-wireless/src/pagination/ListFuotaTasksPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListFuotaTasksCommand, + ListFuotaTasksCommandInput, + ListFuotaTasksCommandOutput, +} from "../commands/ListFuotaTasksCommand"; +import { IoTWireless } from "../IoTWireless"; +import { IoTWirelessClient } from "../IoTWirelessClient"; +import { IoTWirelessPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: IoTWirelessClient, + input: ListFuotaTasksCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListFuotaTasksCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: IoTWireless, + input: ListFuotaTasksCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listFuotaTasks(input, ...args); +}; +export async function* paginateListFuotaTasks( + config: IoTWirelessPaginationConfiguration, + input: ListFuotaTasksCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListFuotaTasksCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof IoTWireless) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof IoTWirelessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected IoTWireless | IoTWirelessClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-iot-wireless/src/pagination/ListMulticastGroupsByFuotaTaskPaginator.ts b/clients/client-iot-wireless/src/pagination/ListMulticastGroupsByFuotaTaskPaginator.ts new file mode 100644 index 000000000000..d36d89677000 --- /dev/null +++ b/clients/client-iot-wireless/src/pagination/ListMulticastGroupsByFuotaTaskPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListMulticastGroupsByFuotaTaskCommand, + ListMulticastGroupsByFuotaTaskCommandInput, + ListMulticastGroupsByFuotaTaskCommandOutput, +} from "../commands/ListMulticastGroupsByFuotaTaskCommand"; +import { IoTWireless } from "../IoTWireless"; +import { IoTWirelessClient } from "../IoTWirelessClient"; +import { IoTWirelessPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: IoTWirelessClient, + input: ListMulticastGroupsByFuotaTaskCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListMulticastGroupsByFuotaTaskCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: IoTWireless, + input: ListMulticastGroupsByFuotaTaskCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listMulticastGroupsByFuotaTask(input, ...args); +}; +export async function* paginateListMulticastGroupsByFuotaTask( + config: IoTWirelessPaginationConfiguration, + input: ListMulticastGroupsByFuotaTaskCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListMulticastGroupsByFuotaTaskCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof IoTWireless) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof IoTWirelessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected IoTWireless | IoTWirelessClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-iot-wireless/src/pagination/ListMulticastGroupsPaginator.ts b/clients/client-iot-wireless/src/pagination/ListMulticastGroupsPaginator.ts new file mode 100644 index 000000000000..4dabeb77a7d2 --- /dev/null +++ b/clients/client-iot-wireless/src/pagination/ListMulticastGroupsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListMulticastGroupsCommand, + ListMulticastGroupsCommandInput, + ListMulticastGroupsCommandOutput, +} from "../commands/ListMulticastGroupsCommand"; +import { IoTWireless } from "../IoTWireless"; +import { IoTWirelessClient } from "../IoTWirelessClient"; +import { IoTWirelessPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: IoTWirelessClient, + input: ListMulticastGroupsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListMulticastGroupsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: IoTWireless, + input: ListMulticastGroupsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listMulticastGroups(input, ...args); +}; +export async function* paginateListMulticastGroups( + config: IoTWirelessPaginationConfiguration, + input: ListMulticastGroupsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListMulticastGroupsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof IoTWireless) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof IoTWirelessClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected IoTWireless | IoTWirelessClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-iot-wireless/src/pagination/index.ts b/clients/client-iot-wireless/src/pagination/index.ts index 19a607d2f64b..b17bc8aec266 100644 --- a/clients/client-iot-wireless/src/pagination/index.ts +++ b/clients/client-iot-wireless/src/pagination/index.ts @@ -1,6 +1,9 @@ export * from "./Interfaces"; export * from "./ListDestinationsPaginator"; export * from "./ListDeviceProfilesPaginator"; +export * from "./ListFuotaTasksPaginator"; +export * from "./ListMulticastGroupsByFuotaTaskPaginator"; +export * from "./ListMulticastGroupsPaginator"; export * from "./ListServiceProfilesPaginator"; export * from "./ListWirelessDevicesPaginator"; export * from "./ListWirelessGatewaysPaginator"; diff --git a/clients/client-iot-wireless/src/protocols/Aws_restJson1.ts b/clients/client-iot-wireless/src/protocols/Aws_restJson1.ts index 9598896225f7..75aa11a6f0fa 100644 --- a/clients/client-iot-wireless/src/protocols/Aws_restJson1.ts +++ b/clients/client-iot-wireless/src/protocols/Aws_restJson1.ts @@ -4,10 +4,13 @@ import { expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, + expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, + parseEpochTimestamp as __parseEpochTimestamp, + parseRfc3339DateTime as __parseRfc3339DateTime, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -22,6 +25,18 @@ import { AssociateAwsAccountWithPartnerAccountCommandInput, AssociateAwsAccountWithPartnerAccountCommandOutput, } from "../commands/AssociateAwsAccountWithPartnerAccountCommand"; +import { + AssociateMulticastGroupWithFuotaTaskCommandInput, + AssociateMulticastGroupWithFuotaTaskCommandOutput, +} from "../commands/AssociateMulticastGroupWithFuotaTaskCommand"; +import { + AssociateWirelessDeviceWithFuotaTaskCommandInput, + AssociateWirelessDeviceWithFuotaTaskCommandOutput, +} from "../commands/AssociateWirelessDeviceWithFuotaTaskCommand"; +import { + AssociateWirelessDeviceWithMulticastGroupCommandInput, + AssociateWirelessDeviceWithMulticastGroupCommandOutput, +} from "../commands/AssociateWirelessDeviceWithMulticastGroupCommand"; import { AssociateWirelessDeviceWithThingCommandInput, AssociateWirelessDeviceWithThingCommandOutput, @@ -34,11 +49,20 @@ import { AssociateWirelessGatewayWithThingCommandInput, AssociateWirelessGatewayWithThingCommandOutput, } from "../commands/AssociateWirelessGatewayWithThingCommand"; +import { + CancelMulticastGroupSessionCommandInput, + CancelMulticastGroupSessionCommandOutput, +} from "../commands/CancelMulticastGroupSessionCommand"; import { CreateDestinationCommandInput, CreateDestinationCommandOutput } from "../commands/CreateDestinationCommand"; import { CreateDeviceProfileCommandInput, CreateDeviceProfileCommandOutput, } from "../commands/CreateDeviceProfileCommand"; +import { CreateFuotaTaskCommandInput, CreateFuotaTaskCommandOutput } from "../commands/CreateFuotaTaskCommand"; +import { + CreateMulticastGroupCommandInput, + CreateMulticastGroupCommandOutput, +} from "../commands/CreateMulticastGroupCommand"; import { CreateServiceProfileCommandInput, CreateServiceProfileCommandOutput, @@ -64,6 +88,11 @@ import { DeleteDeviceProfileCommandInput, DeleteDeviceProfileCommandOutput, } from "../commands/DeleteDeviceProfileCommand"; +import { DeleteFuotaTaskCommandInput, DeleteFuotaTaskCommandOutput } from "../commands/DeleteFuotaTaskCommand"; +import { + DeleteMulticastGroupCommandInput, + DeleteMulticastGroupCommandOutput, +} from "../commands/DeleteMulticastGroupCommand"; import { DeleteServiceProfileCommandInput, DeleteServiceProfileCommandOutput, @@ -88,6 +117,18 @@ import { DisassociateAwsAccountFromPartnerAccountCommandInput, DisassociateAwsAccountFromPartnerAccountCommandOutput, } from "../commands/DisassociateAwsAccountFromPartnerAccountCommand"; +import { + DisassociateMulticastGroupFromFuotaTaskCommandInput, + DisassociateMulticastGroupFromFuotaTaskCommandOutput, +} from "../commands/DisassociateMulticastGroupFromFuotaTaskCommand"; +import { + DisassociateWirelessDeviceFromFuotaTaskCommandInput, + DisassociateWirelessDeviceFromFuotaTaskCommandOutput, +} from "../commands/DisassociateWirelessDeviceFromFuotaTaskCommand"; +import { + DisassociateWirelessDeviceFromMulticastGroupCommandInput, + DisassociateWirelessDeviceFromMulticastGroupCommandOutput, +} from "../commands/DisassociateWirelessDeviceFromMulticastGroupCommand"; import { DisassociateWirelessDeviceFromThingCommandInput, DisassociateWirelessDeviceFromThingCommandOutput, @@ -102,11 +143,21 @@ import { } from "../commands/DisassociateWirelessGatewayFromThingCommand"; import { GetDestinationCommandInput, GetDestinationCommandOutput } from "../commands/GetDestinationCommand"; import { GetDeviceProfileCommandInput, GetDeviceProfileCommandOutput } from "../commands/GetDeviceProfileCommand"; +import { GetFuotaTaskCommandInput, GetFuotaTaskCommandOutput } from "../commands/GetFuotaTaskCommand"; import { GetLogLevelsByResourceTypesCommandInput, GetLogLevelsByResourceTypesCommandOutput, } from "../commands/GetLogLevelsByResourceTypesCommand"; +import { GetMulticastGroupCommandInput, GetMulticastGroupCommandOutput } from "../commands/GetMulticastGroupCommand"; +import { + GetMulticastGroupSessionCommandInput, + GetMulticastGroupSessionCommandOutput, +} from "../commands/GetMulticastGroupSessionCommand"; import { GetPartnerAccountCommandInput, GetPartnerAccountCommandOutput } from "../commands/GetPartnerAccountCommand"; +import { + GetResourceEventConfigurationCommandInput, + GetResourceEventConfigurationCommandOutput, +} from "../commands/GetResourceEventConfigurationCommand"; import { GetResourceLogLevelCommandInput, GetResourceLogLevelCommandOutput, @@ -141,6 +192,15 @@ import { } from "../commands/GetWirelessGatewayTaskDefinitionCommand"; import { ListDestinationsCommandInput, ListDestinationsCommandOutput } from "../commands/ListDestinationsCommand"; import { ListDeviceProfilesCommandInput, ListDeviceProfilesCommandOutput } from "../commands/ListDeviceProfilesCommand"; +import { ListFuotaTasksCommandInput, ListFuotaTasksCommandOutput } from "../commands/ListFuotaTasksCommand"; +import { + ListMulticastGroupsByFuotaTaskCommandInput, + ListMulticastGroupsByFuotaTaskCommandOutput, +} from "../commands/ListMulticastGroupsByFuotaTaskCommand"; +import { + ListMulticastGroupsCommandInput, + ListMulticastGroupsCommandOutput, +} from "../commands/ListMulticastGroupsCommand"; import { ListPartnerAccountsCommandInput, ListPartnerAccountsCommandOutput, @@ -177,22 +237,48 @@ import { ResetResourceLogLevelCommandInput, ResetResourceLogLevelCommandOutput, } from "../commands/ResetResourceLogLevelCommand"; +import { + SendDataToMulticastGroupCommandInput, + SendDataToMulticastGroupCommandOutput, +} from "../commands/SendDataToMulticastGroupCommand"; import { SendDataToWirelessDeviceCommandInput, SendDataToWirelessDeviceCommandOutput, } from "../commands/SendDataToWirelessDeviceCommand"; +import { + StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput, + StartBulkAssociateWirelessDeviceWithMulticastGroupCommandOutput, +} from "../commands/StartBulkAssociateWirelessDeviceWithMulticastGroupCommand"; +import { + StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput, + StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandOutput, +} from "../commands/StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand"; +import { StartFuotaTaskCommandInput, StartFuotaTaskCommandOutput } from "../commands/StartFuotaTaskCommand"; +import { + StartMulticastGroupSessionCommandInput, + StartMulticastGroupSessionCommandOutput, +} from "../commands/StartMulticastGroupSessionCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; import { TestWirelessDeviceCommandInput, TestWirelessDeviceCommandOutput } from "../commands/TestWirelessDeviceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { UpdateDestinationCommandInput, UpdateDestinationCommandOutput } from "../commands/UpdateDestinationCommand"; +import { UpdateFuotaTaskCommandInput, UpdateFuotaTaskCommandOutput } from "../commands/UpdateFuotaTaskCommand"; import { UpdateLogLevelsByResourceTypesCommandInput, UpdateLogLevelsByResourceTypesCommandOutput, } from "../commands/UpdateLogLevelsByResourceTypesCommand"; +import { + UpdateMulticastGroupCommandInput, + UpdateMulticastGroupCommandOutput, +} from "../commands/UpdateMulticastGroupCommand"; import { UpdatePartnerAccountCommandInput, UpdatePartnerAccountCommandOutput, } from "../commands/UpdatePartnerAccountCommand"; +import { + UpdateResourceEventConfigurationCommandInput, + UpdateResourceEventConfigurationCommandOutput, +} from "../commands/UpdateResourceEventConfigurationCommand"; import { UpdateWirelessDeviceCommandInput, UpdateWirelessDeviceCommandOutput, @@ -209,23 +295,37 @@ import { ConflictException, Destinations, DeviceProfile, + DeviceRegistrationStateEventConfiguration, + FPorts, + FuotaTask, InternalServerException, LoRaWANDevice, LoRaWANDeviceMetadata, LoRaWANDeviceProfile, + LoRaWANFuotaTask, + LoRaWANFuotaTaskGetInfo, LoRaWANGateway, LoRaWANGatewayCurrentVersion, LoRaWANGatewayMetadata, LoRaWANGatewayVersion, LoRaWANGetServiceProfileInfo, LoRaWANListDevice, + LoRaWANMulticast, + LoRaWANMulticastGet, + LoRaWANMulticastMetadata, + LoRaWANMulticastSession, LoRaWANSendDataToDevice, LoRaWANServiceProfile, + LoRaWANStartFuotaTask, LoRaWANUpdateDevice, LoRaWANUpdateGatewayTaskCreate, LoRaWANUpdateGatewayTaskEntry, + MulticastGroup, + MulticastGroupByFuotaTask, + MulticastWirelessMetadata, OtaaV1_0_x, OtaaV1_1, + ProximityEventConfiguration, ResourceNotFoundException, ServiceProfile, SessionKeysAbpV1_0_x, @@ -234,6 +334,7 @@ import { SidewalkAccountInfoWithFingerprint, SidewalkDevice, SidewalkDeviceMetadata, + SidewalkEventNotificationConfigurations, SidewalkListDevice, SidewalkSendDataToDevice, SidewalkUpdateAccount, @@ -280,6 +381,111 @@ export const serializeAws_restJson1AssociateAwsAccountWithPartnerAccountCommand }); }; +export const serializeAws_restJson1AssociateMulticastGroupWithFuotaTaskCommand = async ( + input: AssociateMulticastGroupWithFuotaTaskCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks/{Id}/multicast-group"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + body = JSON.stringify({ + ...(input.MulticastGroupId !== undefined && + input.MulticastGroupId !== null && { MulticastGroupId: input.MulticastGroupId }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1AssociateWirelessDeviceWithFuotaTaskCommand = async ( + input: AssociateWirelessDeviceWithFuotaTaskCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks/{Id}/wireless-device"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + body = JSON.stringify({ + ...(input.WirelessDeviceId !== undefined && + input.WirelessDeviceId !== null && { WirelessDeviceId: input.WirelessDeviceId }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1AssociateWirelessDeviceWithMulticastGroupCommand = async ( + input: AssociateWirelessDeviceWithMulticastGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}/wireless-device"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + body = JSON.stringify({ + ...(input.WirelessDeviceId !== undefined && + input.WirelessDeviceId !== null && { WirelessDeviceId: input.WirelessDeviceId }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1AssociateWirelessDeviceWithThingCommand = async ( input: AssociateWirelessDeviceWithThingCommandInput, context: __SerdeContext @@ -383,6 +589,35 @@ export const serializeAws_restJson1AssociateWirelessGatewayWithThingCommand = as }); }; +export const serializeAws_restJson1CancelMulticastGroupSessionCommand = async ( + input: CancelMulticastGroupSessionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}/session"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1CreateDestinationCommand = async ( input: CreateDestinationCommandInput, context: __SerdeContext @@ -444,6 +679,70 @@ export const serializeAws_restJson1CreateDeviceProfileCommand = async ( }); }; +export const serializeAws_restJson1CreateFuotaTaskCommand = async ( + input: CreateFuotaTaskCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks"; + let body: any; + body = JSON.stringify({ + ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.FirmwareUpdateImage !== undefined && + input.FirmwareUpdateImage !== null && { FirmwareUpdateImage: input.FirmwareUpdateImage }), + ...(input.FirmwareUpdateRole !== undefined && + input.FirmwareUpdateRole !== null && { FirmwareUpdateRole: input.FirmwareUpdateRole }), + ...(input.LoRaWAN !== undefined && + input.LoRaWAN !== null && { LoRaWAN: serializeAws_restJson1LoRaWANFuotaTask(input.LoRaWAN, context) }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.Tags !== undefined && + input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1CreateMulticastGroupCommand = async ( + input: CreateMulticastGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups"; + let body: any; + body = JSON.stringify({ + ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.LoRaWAN !== undefined && + input.LoRaWAN !== null && { LoRaWAN: serializeAws_restJson1LoRaWANMulticast(input.LoRaWAN, context) }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.Tags !== undefined && + input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1CreateServiceProfileCommand = async ( input: CreateServiceProfileCommandInput, context: __SerdeContext @@ -663,6 +962,62 @@ export const serializeAws_restJson1DeleteDeviceProfileCommand = async ( }); }; +export const serializeAws_restJson1DeleteFuotaTaskCommand = async ( + input: DeleteFuotaTaskCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks/{Id}"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DeleteMulticastGroupCommand = async ( + input: DeleteMulticastGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1DeleteServiceProfileCommand = async ( input: DeleteServiceProfileCommandInput, context: __SerdeContext @@ -838,14 +1193,15 @@ export const serializeAws_restJson1DisassociateAwsAccountFromPartnerAccountComma }); }; -export const serializeAws_restJson1DisassociateWirelessDeviceFromThingCommand = async ( - input: DisassociateWirelessDeviceFromThingCommandInput, +export const serializeAws_restJson1DisassociateMulticastGroupFromFuotaTaskCommand = async ( + input: DisassociateMulticastGroupFromFuotaTaskCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; let resolvedPath = - `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices/{Id}/thing"; + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/fuota-tasks/{Id}/multicast-groups/{MulticastGroupId}"; if (input.Id !== undefined) { const labelValue: string = input.Id; if (labelValue.length <= 0) { @@ -855,6 +1211,15 @@ export const serializeAws_restJson1DisassociateWirelessDeviceFromThingCommand = } else { throw new Error("No value provided for input HTTP label: Id."); } + if (input.MulticastGroupId !== undefined) { + const labelValue: string = input.MulticastGroupId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: MulticastGroupId."); + } + resolvedPath = resolvedPath.replace("{MulticastGroupId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: MulticastGroupId."); + } let body: any; return new __HttpRequest({ protocol, @@ -867,14 +1232,15 @@ export const serializeAws_restJson1DisassociateWirelessDeviceFromThingCommand = }); }; -export const serializeAws_restJson1DisassociateWirelessGatewayFromCertificateCommand = async ( - input: DisassociateWirelessGatewayFromCertificateCommandInput, +export const serializeAws_restJson1DisassociateWirelessDeviceFromFuotaTaskCommand = async ( + input: DisassociateWirelessDeviceFromFuotaTaskCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; let resolvedPath = - `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-gateways/{Id}/certificate"; + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/fuota-tasks/{Id}/wireless-devices/{WirelessDeviceId}"; if (input.Id !== undefined) { const labelValue: string = input.Id; if (labelValue.length <= 0) { @@ -884,13 +1250,119 @@ export const serializeAws_restJson1DisassociateWirelessGatewayFromCertificateCom } else { throw new Error("No value provided for input HTTP label: Id."); } - let body: any; - return new __HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, + if (input.WirelessDeviceId !== undefined) { + const labelValue: string = input.WirelessDeviceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: WirelessDeviceId."); + } + resolvedPath = resolvedPath.replace("{WirelessDeviceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: WirelessDeviceId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DisassociateWirelessDeviceFromMulticastGroupCommand = async ( + input: DisassociateWirelessDeviceFromMulticastGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/multicast-groups/{Id}/wireless-devices/{WirelessDeviceId}"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + if (input.WirelessDeviceId !== undefined) { + const labelValue: string = input.WirelessDeviceId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: WirelessDeviceId."); + } + resolvedPath = resolvedPath.replace("{WirelessDeviceId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: WirelessDeviceId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DisassociateWirelessDeviceFromThingCommand = async ( + input: DisassociateWirelessDeviceFromThingCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices/{Id}/thing"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1DisassociateWirelessGatewayFromCertificateCommand = async ( + input: DisassociateWirelessGatewayFromCertificateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-gateways/{Id}/certificate"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, path: resolvedPath, body, }); @@ -981,6 +1453,34 @@ export const serializeAws_restJson1GetDeviceProfileCommand = async ( }); }; +export const serializeAws_restJson1GetFuotaTaskCommand = async ( + input: GetFuotaTaskCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks/{Id}"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1GetLogLevelsByResourceTypesCommand = async ( input: GetLogLevelsByResourceTypesCommandInput, context: __SerdeContext @@ -1003,6 +1503,63 @@ export const serializeAws_restJson1GetLogLevelsByResourceTypesCommand = async ( }); }; +export const serializeAws_restJson1GetMulticastGroupCommand = async ( + input: GetMulticastGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetMulticastGroupSessionCommand = async ( + input: GetMulticastGroupSessionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}/session"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1GetPartnerAccountCommand = async ( input: GetPartnerAccountCommandInput, context: __SerdeContext @@ -1036,6 +1593,40 @@ export const serializeAws_restJson1GetPartnerAccountCommand = async ( }); }; +export const serializeAws_restJson1GetResourceEventConfigurationCommand = async ( + input: GetResourceEventConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/event-configurations/{Identifier}"; + if (input.Identifier !== undefined) { + const labelValue: string = input.Identifier; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Identifier."); + } + resolvedPath = resolvedPath.replace("{Identifier}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Identifier."); + } + const query: any = { + ...(input.IdentifierType !== undefined && { identifierType: input.IdentifierType }), + ...(input.PartnerType !== undefined && { partnerType: input.PartnerType }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + export const serializeAws_restJson1GetResourceLogLevelCommand = async ( input: GetResourceLogLevelCommandInput, context: __SerdeContext @@ -1411,13 +2002,13 @@ export const serializeAws_restJson1ListDeviceProfilesCommand = async ( }); }; -export const serializeAws_restJson1ListPartnerAccountsCommand = async ( - input: ListPartnerAccountsCommandInput, +export const serializeAws_restJson1ListFuotaTasksCommand = async ( + input: ListFuotaTasksCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/partner-accounts"; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks"; const query: any = { ...(input.NextToken !== undefined && { nextToken: input.NextToken }), ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), @@ -1435,13 +2026,13 @@ export const serializeAws_restJson1ListPartnerAccountsCommand = async ( }); }; -export const serializeAws_restJson1ListServiceProfilesCommand = async ( - input: ListServiceProfilesCommandInput, +export const serializeAws_restJson1ListMulticastGroupsCommand = async ( + input: ListMulticastGroupsCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/service-profiles"; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups"; const query: any = { ...(input.NextToken !== undefined && { nextToken: input.NextToken }), ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), @@ -1459,15 +2050,26 @@ export const serializeAws_restJson1ListServiceProfilesCommand = async ( }); }; -export const serializeAws_restJson1ListTagsForResourceCommand = async ( - input: ListTagsForResourceCommandInput, +export const serializeAws_restJson1ListMulticastGroupsByFuotaTaskCommand = async ( + input: ListMulticastGroupsByFuotaTaskCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags"; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks/{Id}/multicast-groups"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } const query: any = { - ...(input.ResourceArn !== undefined && { resourceArn: input.ResourceArn }), + ...(input.NextToken !== undefined && { nextToken: input.NextToken }), + ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), }; let body: any; return new __HttpRequest({ @@ -1482,20 +2084,16 @@ export const serializeAws_restJson1ListTagsForResourceCommand = async ( }); }; -export const serializeAws_restJson1ListWirelessDevicesCommand = async ( - input: ListWirelessDevicesCommandInput, +export const serializeAws_restJson1ListPartnerAccountsCommand = async ( + input: ListPartnerAccountsCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices"; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/partner-accounts"; const query: any = { - ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), ...(input.NextToken !== undefined && { nextToken: input.NextToken }), - ...(input.DestinationName !== undefined && { destinationName: input.DestinationName }), - ...(input.DeviceProfileId !== undefined && { deviceProfileId: input.DeviceProfileId }), - ...(input.ServiceProfileId !== undefined && { serviceProfileId: input.ServiceProfileId }), - ...(input.WirelessDeviceType !== undefined && { wirelessDeviceType: input.WirelessDeviceType }), + ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), }; let body: any; return new __HttpRequest({ @@ -1510,13 +2108,90 @@ export const serializeAws_restJson1ListWirelessDevicesCommand = async ( }); }; -export const serializeAws_restJson1ListWirelessGatewaysCommand = async ( - input: ListWirelessGatewaysCommandInput, +export const serializeAws_restJson1ListServiceProfilesCommand = async ( + input: ListServiceProfilesCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = {}; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-gateways"; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/service-profiles"; + const query: any = { + ...(input.NextToken !== undefined && { nextToken: input.NextToken }), + ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags"; + const query: any = { + ...(input.ResourceArn !== undefined && { resourceArn: input.ResourceArn }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1ListWirelessDevicesCommand = async ( + input: ListWirelessDevicesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices"; + const query: any = { + ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), + ...(input.NextToken !== undefined && { nextToken: input.NextToken }), + ...(input.DestinationName !== undefined && { destinationName: input.DestinationName }), + ...(input.DeviceProfileId !== undefined && { deviceProfileId: input.DeviceProfileId }), + ...(input.ServiceProfileId !== undefined && { serviceProfileId: input.ServiceProfileId }), + ...(input.WirelessDeviceType !== undefined && { wirelessDeviceType: input.WirelessDeviceType }), + ...(input.FuotaTaskId !== undefined && { fuotaTaskId: input.FuotaTaskId }), + ...(input.MulticastGroupId !== undefined && { multicastGroupId: input.MulticastGroupId }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1ListWirelessGatewaysCommand = async ( + input: ListWirelessGatewaysCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-gateways"; const query: any = { ...(input.NextToken !== undefined && { nextToken: input.NextToken }), ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), @@ -1653,8 +2328,8 @@ export const serializeAws_restJson1ResetResourceLogLevelCommand = async ( }); }; -export const serializeAws_restJson1SendDataToWirelessDeviceCommand = async ( - input: SendDataToWirelessDeviceCommandInput, +export const serializeAws_restJson1SendDataToMulticastGroupCommand = async ( + input: SendDataToMulticastGroupCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); @@ -1662,7 +2337,7 @@ export const serializeAws_restJson1SendDataToWirelessDeviceCommand = async ( "content-type": "application/json", }; let resolvedPath = - `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices/{Id}/data"; + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}/data"; if (input.Id !== undefined) { const labelValue: string = input.Id; if (labelValue.length <= 0) { @@ -1675,10 +2350,9 @@ export const serializeAws_restJson1SendDataToWirelessDeviceCommand = async ( let body: any; body = JSON.stringify({ ...(input.PayloadData !== undefined && input.PayloadData !== null && { PayloadData: input.PayloadData }), - ...(input.TransmitMode !== undefined && input.TransmitMode !== null && { TransmitMode: input.TransmitMode }), ...(input.WirelessMetadata !== undefined && input.WirelessMetadata !== null && { - WirelessMetadata: serializeAws_restJson1WirelessMetadata(input.WirelessMetadata, context), + WirelessMetadata: serializeAws_restJson1MulticastWirelessMetadata(input.WirelessMetadata, context), }), }); return new __HttpRequest({ @@ -1692,22 +2366,33 @@ export const serializeAws_restJson1SendDataToWirelessDeviceCommand = async ( }); }; -export const serializeAws_restJson1TagResourceCommand = async ( - input: TagResourceCommandInput, +export const serializeAws_restJson1SendDataToWirelessDeviceCommand = async ( + input: SendDataToWirelessDeviceCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = { "content-type": "application/json", }; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags"; - const query: any = { - ...(input.ResourceArn !== undefined && { resourceArn: input.ResourceArn }), - }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices/{Id}/data"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } let body: any; body = JSON.stringify({ - ...(input.Tags !== undefined && - input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }), + ...(input.PayloadData !== undefined && input.PayloadData !== null && { PayloadData: input.PayloadData }), + ...(input.TransmitMode !== undefined && input.TransmitMode !== null && { TransmitMode: input.TransmitMode }), + ...(input.WirelessMetadata !== undefined && + input.WirelessMetadata !== null && { + WirelessMetadata: serializeAws_restJson1WirelessMetadata(input.WirelessMetadata, context), + }), }); return new __HttpRequest({ protocol, @@ -1716,19 +2401,20 @@ export const serializeAws_restJson1TagResourceCommand = async ( method: "POST", headers, path: resolvedPath, - query, body, }); }; -export const serializeAws_restJson1TestWirelessDeviceCommand = async ( - input: TestWirelessDeviceCommandInput, +export const serializeAws_restJson1StartBulkAssociateWirelessDeviceWithMulticastGroupCommand = async ( + input: StartBulkAssociateWirelessDeviceWithMulticastGroupCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers: any = {}; + const headers: any = { + "content-type": "application/json", + }; let resolvedPath = - `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices/{Id}/test"; + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}/bulk"; if (input.Id !== undefined) { const labelValue: string = input.Id; if (labelValue.length <= 0) { @@ -1739,149 +2425,149 @@ export const serializeAws_restJson1TestWirelessDeviceCommand = async ( throw new Error("No value provided for input HTTP label: Id."); } let body: any; + body = JSON.stringify({ + ...(input.QueryString !== undefined && input.QueryString !== null && { QueryString: input.QueryString }), + ...(input.Tags !== undefined && + input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }), + }); return new __HttpRequest({ protocol, hostname, port, - method: "POST", + method: "PATCH", headers, path: resolvedPath, body, }); }; -export const serializeAws_restJson1UntagResourceCommand = async ( - input: UntagResourceCommandInput, +export const serializeAws_restJson1StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand = async ( + input: StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers: any = {}; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags"; - const query: any = { - ...(input.ResourceArn !== undefined && { resourceArn: input.ResourceArn }), - ...(input.TagKeys !== undefined && { tagKeys: (input.TagKeys || []).map((_entry) => _entry as any) }), + const headers: any = { + "content-type": "application/json", }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}/bulk"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } let body: any; + body = JSON.stringify({ + ...(input.QueryString !== undefined && input.QueryString !== null && { QueryString: input.QueryString }), + ...(input.Tags !== undefined && + input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }), + }); return new __HttpRequest({ protocol, hostname, port, - method: "DELETE", + method: "POST", headers, path: resolvedPath, - query, body, }); }; -export const serializeAws_restJson1UpdateDestinationCommand = async ( - input: UpdateDestinationCommandInput, +export const serializeAws_restJson1StartFuotaTaskCommand = async ( + input: StartFuotaTaskCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = { "content-type": "application/json", }; - let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/destinations/{Name}"; - if (input.Name !== undefined) { - const labelValue: string = input.Name; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks/{Id}"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; if (labelValue.length <= 0) { - throw new Error("Empty value provided for input HTTP label: Name."); + throw new Error("Empty value provided for input HTTP label: Id."); } - resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue)); + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); } else { - throw new Error("No value provided for input HTTP label: Name."); + throw new Error("No value provided for input HTTP label: Id."); } let body: any; body = JSON.stringify({ - ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), - ...(input.Expression !== undefined && input.Expression !== null && { Expression: input.Expression }), - ...(input.ExpressionType !== undefined && - input.ExpressionType !== null && { ExpressionType: input.ExpressionType }), - ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }), + ...(input.LoRaWAN !== undefined && + input.LoRaWAN !== null && { LoRaWAN: serializeAws_restJson1LoRaWANStartFuotaTask(input.LoRaWAN, context) }), }); return new __HttpRequest({ protocol, hostname, port, - method: "PATCH", + method: "PUT", headers, path: resolvedPath, body, }); }; -export const serializeAws_restJson1UpdateLogLevelsByResourceTypesCommand = async ( - input: UpdateLogLevelsByResourceTypesCommandInput, +export const serializeAws_restJson1StartMulticastGroupSessionCommand = async ( + input: StartMulticastGroupSessionCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = { "content-type": "application/json", }; - const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/log-levels"; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}/session"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } let body: any; body = JSON.stringify({ - ...(input.DefaultLogLevel !== undefined && - input.DefaultLogLevel !== null && { DefaultLogLevel: input.DefaultLogLevel }), - ...(input.WirelessDeviceLogOptions !== undefined && - input.WirelessDeviceLogOptions !== null && { - WirelessDeviceLogOptions: serializeAws_restJson1WirelessDeviceLogOptionList( - input.WirelessDeviceLogOptions, - context - ), - }), - ...(input.WirelessGatewayLogOptions !== undefined && - input.WirelessGatewayLogOptions !== null && { - WirelessGatewayLogOptions: serializeAws_restJson1WirelessGatewayLogOptionList( - input.WirelessGatewayLogOptions, - context - ), - }), + ...(input.LoRaWAN !== undefined && + input.LoRaWAN !== null && { LoRaWAN: serializeAws_restJson1LoRaWANMulticastSession(input.LoRaWAN, context) }), }); return new __HttpRequest({ protocol, hostname, port, - method: "POST", + method: "PUT", headers, path: resolvedPath, body, }); }; -export const serializeAws_restJson1UpdatePartnerAccountCommand = async ( - input: UpdatePartnerAccountCommandInput, +export const serializeAws_restJson1TagResourceCommand = async ( + input: TagResourceCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers: any = { "content-type": "application/json", }; - let resolvedPath = - `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/partner-accounts/{PartnerAccountId}"; - if (input.PartnerAccountId !== undefined) { - const labelValue: string = input.PartnerAccountId; - if (labelValue.length <= 0) { - throw new Error("Empty value provided for input HTTP label: PartnerAccountId."); - } - resolvedPath = resolvedPath.replace("{PartnerAccountId}", __extendedEncodeURIComponent(labelValue)); - } else { - throw new Error("No value provided for input HTTP label: PartnerAccountId."); - } + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags"; const query: any = { - ...(input.PartnerType !== undefined && { partnerType: input.PartnerType }), + ...(input.ResourceArn !== undefined && { resourceArn: input.ResourceArn }), }; let body: any; body = JSON.stringify({ - ...(input.Sidewalk !== undefined && - input.Sidewalk !== null && { Sidewalk: serializeAws_restJson1SidewalkUpdateAccount(input.Sidewalk, context) }), + ...(input.Tags !== undefined && + input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }), }); return new __HttpRequest({ protocol, hostname, port, - method: "PATCH", + method: "POST", headers, path: resolvedPath, query, @@ -1889,15 +2575,14 @@ export const serializeAws_restJson1UpdatePartnerAccountCommand = async ( }); }; -export const serializeAws_restJson1UpdateWirelessDeviceCommand = async ( - input: UpdateWirelessDeviceCommandInput, +export const serializeAws_restJson1TestWirelessDeviceCommand = async ( + input: TestWirelessDeviceCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers: any = { - "content-type": "application/json", - }; - let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices/{Id}"; + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices/{Id}/test"; if (input.Id !== undefined) { const labelValue: string = input.Id; if (labelValue.length <= 0) { @@ -1908,36 +2593,292 @@ export const serializeAws_restJson1UpdateWirelessDeviceCommand = async ( throw new Error("No value provided for input HTTP label: Id."); } let body: any; - body = JSON.stringify({ - ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), - ...(input.DestinationName !== undefined && - input.DestinationName !== null && { DestinationName: input.DestinationName }), - ...(input.LoRaWAN !== undefined && - input.LoRaWAN !== null && { LoRaWAN: serializeAws_restJson1LoRaWANUpdateDevice(input.LoRaWAN, context) }), - ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), - }); return new __HttpRequest({ protocol, hostname, port, - method: "PATCH", + method: "POST", headers, path: resolvedPath, body, }); }; -export const serializeAws_restJson1UpdateWirelessGatewayCommand = async ( - input: UpdateWirelessGatewayCommandInput, +export const serializeAws_restJson1UntagResourceCommand = async ( + input: UntagResourceCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers: any = { - "content-type": "application/json", - }; - let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-gateways/{Id}"; - if (input.Id !== undefined) { - const labelValue: string = input.Id; + const headers: any = {}; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags"; + const query: any = { + ...(input.ResourceArn !== undefined && { resourceArn: input.ResourceArn }), + ...(input.TagKeys !== undefined && { tagKeys: (input.TagKeys || []).map((_entry) => _entry as any) }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1UpdateDestinationCommand = async ( + input: UpdateDestinationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/destinations/{Name}"; + if (input.Name !== undefined) { + const labelValue: string = input.Name; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Name."); + } + resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Name."); + } + let body: any; + body = JSON.stringify({ + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.Expression !== undefined && input.Expression !== null && { Expression: input.Expression }), + ...(input.ExpressionType !== undefined && + input.ExpressionType !== null && { ExpressionType: input.ExpressionType }), + ...(input.RoleArn !== undefined && input.RoleArn !== null && { RoleArn: input.RoleArn }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateFuotaTaskCommand = async ( + input: UpdateFuotaTaskCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks/{Id}"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + body = JSON.stringify({ + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.FirmwareUpdateImage !== undefined && + input.FirmwareUpdateImage !== null && { FirmwareUpdateImage: input.FirmwareUpdateImage }), + ...(input.FirmwareUpdateRole !== undefined && + input.FirmwareUpdateRole !== null && { FirmwareUpdateRole: input.FirmwareUpdateRole }), + ...(input.LoRaWAN !== undefined && + input.LoRaWAN !== null && { LoRaWAN: serializeAws_restJson1LoRaWANFuotaTask(input.LoRaWAN, context) }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateLogLevelsByResourceTypesCommand = async ( + input: UpdateLogLevelsByResourceTypesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/log-levels"; + let body: any; + body = JSON.stringify({ + ...(input.DefaultLogLevel !== undefined && + input.DefaultLogLevel !== null && { DefaultLogLevel: input.DefaultLogLevel }), + ...(input.WirelessDeviceLogOptions !== undefined && + input.WirelessDeviceLogOptions !== null && { + WirelessDeviceLogOptions: serializeAws_restJson1WirelessDeviceLogOptionList( + input.WirelessDeviceLogOptions, + context + ), + }), + ...(input.WirelessGatewayLogOptions !== undefined && + input.WirelessGatewayLogOptions !== null && { + WirelessGatewayLogOptions: serializeAws_restJson1WirelessGatewayLogOptionList( + input.WirelessGatewayLogOptions, + context + ), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateMulticastGroupCommand = async ( + input: UpdateMulticastGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + body = JSON.stringify({ + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.LoRaWAN !== undefined && + input.LoRaWAN !== null && { LoRaWAN: serializeAws_restJson1LoRaWANMulticast(input.LoRaWAN, context) }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdatePartnerAccountCommand = async ( + input: UpdatePartnerAccountCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/partner-accounts/{PartnerAccountId}"; + if (input.PartnerAccountId !== undefined) { + const labelValue: string = input.PartnerAccountId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: PartnerAccountId."); + } + resolvedPath = resolvedPath.replace("{PartnerAccountId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: PartnerAccountId."); + } + const query: any = { + ...(input.PartnerType !== undefined && { partnerType: input.PartnerType }), + }; + let body: any; + body = JSON.stringify({ + ...(input.Sidewalk !== undefined && + input.Sidewalk !== null && { Sidewalk: serializeAws_restJson1SidewalkUpdateAccount(input.Sidewalk, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1UpdateResourceEventConfigurationCommand = async ( + input: UpdateResourceEventConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/event-configurations/{Identifier}"; + if (input.Identifier !== undefined) { + const labelValue: string = input.Identifier; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Identifier."); + } + resolvedPath = resolvedPath.replace("{Identifier}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Identifier."); + } + const query: any = { + ...(input.IdentifierType !== undefined && { identifierType: input.IdentifierType }), + ...(input.PartnerType !== undefined && { partnerType: input.PartnerType }), + }; + let body: any; + body = JSON.stringify({ + ...(input.DeviceRegistrationState !== undefined && + input.DeviceRegistrationState !== null && { + DeviceRegistrationState: serializeAws_restJson1DeviceRegistrationStateEventConfiguration( + input.DeviceRegistrationState, + context + ), + }), + ...(input.Proximity !== undefined && + input.Proximity !== null && { + Proximity: serializeAws_restJson1ProximityEventConfiguration(input.Proximity, context), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1UpdateWirelessDeviceCommand = async ( + input: UpdateWirelessDeviceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices/{Id}"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; if (labelValue.length <= 0) { throw new Error("Empty value provided for input HTTP label: Id."); } @@ -1945,54 +2886,2387 @@ export const serializeAws_restJson1UpdateWirelessGatewayCommand = async ( } else { throw new Error("No value provided for input HTTP label: Id."); } - let body: any; - body = JSON.stringify({ - ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), - ...(input.JoinEuiFilters !== undefined && - input.JoinEuiFilters !== null && { - JoinEuiFilters: serializeAws_restJson1JoinEuiFilters(input.JoinEuiFilters, context), - }), - ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), - ...(input.NetIdFilters !== undefined && - input.NetIdFilters !== null && { NetIdFilters: serializeAws_restJson1NetIdFilters(input.NetIdFilters, context) }), - }); - return new __HttpRequest({ - protocol, - hostname, - port, - method: "PATCH", - headers, - path: resolvedPath, - body, - }); + let body: any; + body = JSON.stringify({ + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.DestinationName !== undefined && + input.DestinationName !== null && { DestinationName: input.DestinationName }), + ...(input.LoRaWAN !== undefined && + input.LoRaWAN !== null && { LoRaWAN: serializeAws_restJson1LoRaWANUpdateDevice(input.LoRaWAN, context) }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1UpdateWirelessGatewayCommand = async ( + input: UpdateWirelessGatewayCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-gateways/{Id}"; + if (input.Id !== undefined) { + const labelValue: string = input.Id; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Id."); + } + resolvedPath = resolvedPath.replace("{Id}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: Id."); + } + let body: any; + body = JSON.stringify({ + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.JoinEuiFilters !== undefined && + input.JoinEuiFilters !== null && { + JoinEuiFilters: serializeAws_restJson1JoinEuiFilters(input.JoinEuiFilters, context), + }), + ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }), + ...(input.NetIdFilters !== undefined && + input.NetIdFilters !== null && { NetIdFilters: serializeAws_restJson1NetIdFilters(input.NetIdFilters, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + +export const deserializeAws_restJson1AssociateAwsAccountWithPartnerAccountCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1AssociateAwsAccountWithPartnerAccountCommandError(output, context); + } + const contents: AssociateAwsAccountWithPartnerAccountCommandOutput = { + $metadata: deserializeMetadata(output), + Arn: undefined, + Sidewalk: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.Sidewalk !== undefined && data.Sidewalk !== null) { + contents.Sidewalk = deserializeAws_restJson1SidewalkAccountInfo(data.Sidewalk, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1AssociateAwsAccountWithPartnerAccountCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1AssociateMulticastGroupWithFuotaTaskCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1AssociateMulticastGroupWithFuotaTaskCommandError(output, context); + } + const contents: AssociateMulticastGroupWithFuotaTaskCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1AssociateMulticastGroupWithFuotaTaskCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1AssociateWirelessDeviceWithFuotaTaskCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1AssociateWirelessDeviceWithFuotaTaskCommandError(output, context); + } + const contents: AssociateWirelessDeviceWithFuotaTaskCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1AssociateWirelessDeviceWithFuotaTaskCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1AssociateWirelessDeviceWithMulticastGroupCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1AssociateWirelessDeviceWithMulticastGroupCommandError(output, context); + } + const contents: AssociateWirelessDeviceWithMulticastGroupCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1AssociateWirelessDeviceWithMulticastGroupCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1AssociateWirelessDeviceWithThingCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1AssociateWirelessDeviceWithThingCommandError(output, context); + } + const contents: AssociateWirelessDeviceWithThingCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1AssociateWirelessDeviceWithThingCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1AssociateWirelessGatewayWithCertificateCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1AssociateWirelessGatewayWithCertificateCommandError(output, context); + } + const contents: AssociateWirelessGatewayWithCertificateCommandOutput = { + $metadata: deserializeMetadata(output), + IotCertificateId: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.IotCertificateId !== undefined && data.IotCertificateId !== null) { + contents.IotCertificateId = __expectString(data.IotCertificateId); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1AssociateWirelessGatewayWithCertificateCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1AssociateWirelessGatewayWithThingCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1AssociateWirelessGatewayWithThingCommandError(output, context); + } + const contents: AssociateWirelessGatewayWithThingCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1AssociateWirelessGatewayWithThingCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CancelMulticastGroupSessionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1CancelMulticastGroupSessionCommandError(output, context); + } + const contents: CancelMulticastGroupSessionCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CancelMulticastGroupSessionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateDestinationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateDestinationCommandError(output, context); + } + const contents: CreateDestinationCommandOutput = { + $metadata: deserializeMetadata(output), + Arn: undefined, + Name: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.Name !== undefined && data.Name !== null) { + contents.Name = __expectString(data.Name); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateDestinationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateDeviceProfileCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateDeviceProfileCommandError(output, context); + } + const contents: CreateDeviceProfileCommandOutput = { + $metadata: deserializeMetadata(output), + Arn: undefined, + Id: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateDeviceProfileCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateFuotaTaskCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateFuotaTaskCommandError(output, context); + } + const contents: CreateFuotaTaskCommandOutput = { + $metadata: deserializeMetadata(output), + Arn: undefined, + Id: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateFuotaTaskCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateMulticastGroupCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateMulticastGroupCommandError(output, context); + } + const contents: CreateMulticastGroupCommandOutput = { + $metadata: deserializeMetadata(output), + Arn: undefined, + Id: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateMulticastGroupCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateServiceProfileCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateServiceProfileCommandError(output, context); + } + const contents: CreateServiceProfileCommandOutput = { + $metadata: deserializeMetadata(output), + Arn: undefined, + Id: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateServiceProfileCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateWirelessDeviceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateWirelessDeviceCommandError(output, context); + } + const contents: CreateWirelessDeviceCommandOutput = { + $metadata: deserializeMetadata(output), + Arn: undefined, + Id: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateWirelessDeviceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateWirelessGatewayCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateWirelessGatewayCommandError(output, context); + } + const contents: CreateWirelessGatewayCommandOutput = { + $metadata: deserializeMetadata(output), + Arn: undefined, + Id: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateWirelessGatewayCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateWirelessGatewayTaskCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateWirelessGatewayTaskCommandError(output, context); + } + const contents: CreateWirelessGatewayTaskCommandOutput = { + $metadata: deserializeMetadata(output), + Status: undefined, + WirelessGatewayTaskDefinitionId: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Status !== undefined && data.Status !== null) { + contents.Status = __expectString(data.Status); + } + if (data.WirelessGatewayTaskDefinitionId !== undefined && data.WirelessGatewayTaskDefinitionId !== null) { + contents.WirelessGatewayTaskDefinitionId = __expectString(data.WirelessGatewayTaskDefinitionId); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateWirelessGatewayTaskCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1CreateWirelessGatewayTaskDefinitionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restJson1CreateWirelessGatewayTaskDefinitionCommandError(output, context); + } + const contents: CreateWirelessGatewayTaskDefinitionCommandOutput = { + $metadata: deserializeMetadata(output), + Arn: undefined, + Id: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1CreateWirelessGatewayTaskDefinitionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteDestinationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteDestinationCommandError(output, context); + } + const contents: DeleteDestinationCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteDestinationCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteDeviceProfileCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteDeviceProfileCommandError(output, context); + } + const contents: DeleteDeviceProfileCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteDeviceProfileCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteFuotaTaskCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteFuotaTaskCommandError(output, context); + } + const contents: DeleteFuotaTaskCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteFuotaTaskCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteMulticastGroupCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteMulticastGroupCommandError(output, context); + } + const contents: DeleteMulticastGroupCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteMulticastGroupCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteServiceProfileCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteServiceProfileCommandError(output, context); + } + const contents: DeleteServiceProfileCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteServiceProfileCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteWirelessDeviceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteWirelessDeviceCommandError(output, context); + } + const contents: DeleteWirelessDeviceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteWirelessDeviceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteWirelessGatewayCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteWirelessGatewayCommandError(output, context); + } + const contents: DeleteWirelessGatewayCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteWirelessGatewayCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DeleteWirelessGatewayTaskCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteWirelessGatewayTaskCommandError(output, context); + } + const contents: DeleteWirelessGatewayTaskCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DeleteWirelessGatewayTaskCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1AssociateAwsAccountWithPartnerAccountCommand = async ( +export const deserializeAws_restJson1DeleteWirelessGatewayTaskDefinitionCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1AssociateAwsAccountWithPartnerAccountCommandError(output, context); +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DeleteWirelessGatewayTaskDefinitionCommandError(output, context); } - const contents: AssociateAwsAccountWithPartnerAccountCommandOutput = { + const contents: DeleteWirelessGatewayTaskDefinitionCommandOutput = { $metadata: deserializeMetadata(output), - Arn: undefined, - Sidewalk: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn !== undefined && data.Arn !== null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Sidewalk !== undefined && data.Sidewalk !== null) { - contents.Sidewalk = deserializeAws_restJson1SidewalkAccountInfo(data.Sidewalk, context); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1AssociateAwsAccountWithPartnerAccountCommandError = async ( +const deserializeAws_restJson1DeleteWirelessGatewayTaskDefinitionCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2009,14 +5283,81 @@ const deserializeAws_restJson1AssociateAwsAccountWithPartnerAccountCommandError $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.iotwireless#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.iotwireless#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1DisassociateAwsAccountFromPartnerAccountCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DisassociateAwsAccountFromPartnerAccountCommandError(output, context); + } + const contents: DisassociateAwsAccountFromPartnerAccountCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DisassociateAwsAccountFromPartnerAccountCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -2066,24 +5407,24 @@ const deserializeAws_restJson1AssociateAwsAccountWithPartnerAccountCommandError return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1AssociateWirelessDeviceWithThingCommand = async ( +export const deserializeAws_restJson1DisassociateMulticastGroupFromFuotaTaskCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1AssociateWirelessDeviceWithThingCommandError(output, context); + return deserializeAws_restJson1DisassociateMulticastGroupFromFuotaTaskCommandError(output, context); } - const contents: AssociateWirelessDeviceWithThingCommandOutput = { + const contents: DisassociateMulticastGroupFromFuotaTaskCommandOutput = { $metadata: deserializeMetadata(output), }; await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1AssociateWirelessDeviceWithThingCommandError = async ( +const deserializeAws_restJson1DisassociateMulticastGroupFromFuotaTaskCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2124,14 +5465,6 @@ const deserializeAws_restJson1AssociateWirelessDeviceWithThingCommandError = asy $metadata: deserializeMetadata(output), }; break; - case "ThrottlingException": - case "com.amazonaws.iotwireless#ThrottlingException": - response = { - ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ValidationException": case "com.amazonaws.iotwireless#ValidationException": response = { @@ -2157,28 +5490,24 @@ const deserializeAws_restJson1AssociateWirelessDeviceWithThingCommandError = asy return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1AssociateWirelessGatewayWithCertificateCommand = async ( +export const deserializeAws_restJson1DisassociateWirelessDeviceFromFuotaTaskCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1AssociateWirelessGatewayWithCertificateCommandError(output, context); +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DisassociateWirelessDeviceFromFuotaTaskCommandError(output, context); } - const contents: AssociateWirelessGatewayWithCertificateCommandOutput = { + const contents: DisassociateWirelessDeviceFromFuotaTaskCommandOutput = { $metadata: deserializeMetadata(output), - IotCertificateId: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IotCertificateId !== undefined && data.IotCertificateId !== null) { - contents.IotCertificateId = __expectString(data.IotCertificateId); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1AssociateWirelessGatewayWithCertificateCommandError = async ( +const deserializeAws_restJson1DisassociateWirelessDeviceFromFuotaTaskCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2252,24 +5581,24 @@ const deserializeAws_restJson1AssociateWirelessGatewayWithCertificateCommandErro return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1AssociateWirelessGatewayWithThingCommand = async ( +export const deserializeAws_restJson1DisassociateWirelessDeviceFromMulticastGroupCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1AssociateWirelessGatewayWithThingCommandError(output, context); + return deserializeAws_restJson1DisassociateWirelessDeviceFromMulticastGroupCommandError(output, context); } - const contents: AssociateWirelessGatewayWithThingCommandOutput = { + const contents: DisassociateWirelessDeviceFromMulticastGroupCommandOutput = { $metadata: deserializeMetadata(output), }; await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1AssociateWirelessGatewayWithThingCommandError = async ( +const deserializeAws_restJson1DisassociateWirelessDeviceFromMulticastGroupCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2286,14 +5615,6 @@ const deserializeAws_restJson1AssociateWirelessGatewayWithThingCommandError = as $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -2343,32 +5664,24 @@ const deserializeAws_restJson1AssociateWirelessGatewayWithThingCommandError = as return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1CreateDestinationCommand = async ( +export const deserializeAws_restJson1DisassociateWirelessDeviceFromThingCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 201 && output.statusCode >= 300) { - return deserializeAws_restJson1CreateDestinationCommandError(output, context); +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DisassociateWirelessDeviceFromThingCommandError(output, context); } - const contents: CreateDestinationCommandOutput = { + const contents: DisassociateWirelessDeviceFromThingCommandOutput = { $metadata: deserializeMetadata(output), - Arn: undefined, - Name: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn !== undefined && data.Arn !== null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Name !== undefined && data.Name !== null) { - contents.Name = __expectString(data.Name); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1CreateDestinationCommandError = async ( +const deserializeAws_restJson1DisassociateWirelessDeviceFromThingCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2442,32 +5755,24 @@ const deserializeAws_restJson1CreateDestinationCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1CreateDeviceProfileCommand = async ( +export const deserializeAws_restJson1DisassociateWirelessGatewayFromCertificateCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 201 && output.statusCode >= 300) { - return deserializeAws_restJson1CreateDeviceProfileCommandError(output, context); +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DisassociateWirelessGatewayFromCertificateCommandError(output, context); } - const contents: CreateDeviceProfileCommandOutput = { + const contents: DisassociateWirelessGatewayFromCertificateCommandOutput = { $metadata: deserializeMetadata(output), - Arn: undefined, - Id: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn !== undefined && data.Arn !== null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id !== undefined && data.Id !== null) { - contents.Id = __expectString(data.Id); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1CreateDeviceProfileCommandError = async ( +const deserializeAws_restJson1DisassociateWirelessGatewayFromCertificateCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2484,18 +5789,18 @@ const deserializeAws_restJson1CreateDeviceProfileCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; break; - case "InternalServerException": - case "com.amazonaws.iotwireless#InternalServerException": + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": response = { - ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -2533,32 +5838,24 @@ const deserializeAws_restJson1CreateDeviceProfileCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1CreateServiceProfileCommand = async ( +export const deserializeAws_restJson1DisassociateWirelessGatewayFromThingCommand = async ( output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode !== 201 && output.statusCode >= 300) { - return deserializeAws_restJson1CreateServiceProfileCommandError(output, context); + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1DisassociateWirelessGatewayFromThingCommandError(output, context); } - const contents: CreateServiceProfileCommandOutput = { + const contents: DisassociateWirelessGatewayFromThingCommandOutput = { $metadata: deserializeMetadata(output), - Arn: undefined, - Id: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn !== undefined && data.Arn !== null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id !== undefined && data.Id !== null) { - contents.Id = __expectString(data.Id); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1CreateServiceProfileCommandError = async ( +const deserializeAws_restJson1DisassociateWirelessGatewayFromThingCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2591,6 +5888,14 @@ const deserializeAws_restJson1CreateServiceProfileCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -2624,32 +5929,48 @@ const deserializeAws_restJson1CreateServiceProfileCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1CreateWirelessDeviceCommand = async ( +export const deserializeAws_restJson1GetDestinationCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 201 && output.statusCode >= 300) { - return deserializeAws_restJson1CreateWirelessDeviceCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetDestinationCommandError(output, context); } - const contents: CreateWirelessDeviceCommandOutput = { + const contents: GetDestinationCommandOutput = { $metadata: deserializeMetadata(output), Arn: undefined, - Id: undefined, + Description: undefined, + Expression: undefined, + ExpressionType: undefined, + Name: undefined, + RoleArn: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data.Arn !== undefined && data.Arn !== null) { contents.Arn = __expectString(data.Arn); } - if (data.Id !== undefined && data.Id !== null) { - contents.Id = __expectString(data.Id); + if (data.Description !== undefined && data.Description !== null) { + contents.Description = __expectString(data.Description); + } + if (data.Expression !== undefined && data.Expression !== null) { + contents.Expression = __expectString(data.Expression); + } + if (data.ExpressionType !== undefined && data.ExpressionType !== null) { + contents.ExpressionType = __expectString(data.ExpressionType); + } + if (data.Name !== undefined && data.Name !== null) { + contents.Name = __expectString(data.Name); + } + if (data.RoleArn !== undefined && data.RoleArn !== null) { + contents.RoleArn = __expectString(data.RoleArn); } return Promise.resolve(contents); }; -const deserializeAws_restJson1CreateWirelessDeviceCommandError = async ( +const deserializeAws_restJson1GetDestinationCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2666,14 +5987,6 @@ const deserializeAws_restJson1CreateWirelessDeviceCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -2723,17 +6036,19 @@ const deserializeAws_restJson1CreateWirelessDeviceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1CreateWirelessGatewayCommand = async ( +export const deserializeAws_restJson1GetDeviceProfileCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 201 && output.statusCode >= 300) { - return deserializeAws_restJson1CreateWirelessGatewayCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetDeviceProfileCommandError(output, context); } - const contents: CreateWirelessGatewayCommandOutput = { + const contents: GetDeviceProfileCommandOutput = { $metadata: deserializeMetadata(output), Arn: undefined, Id: undefined, + LoRaWAN: undefined, + Name: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data.Arn !== undefined && data.Arn !== null) { @@ -2742,13 +6057,19 @@ export const deserializeAws_restJson1CreateWirelessGatewayCommand = async ( if (data.Id !== undefined && data.Id !== null) { contents.Id = __expectString(data.Id); } + if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { + contents.LoRaWAN = deserializeAws_restJson1LoRaWANDeviceProfile(data.LoRaWAN, context); + } + if (data.Name !== undefined && data.Name !== null) { + contents.Name = __expectString(data.Name); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1CreateWirelessGatewayCommandError = async ( +const deserializeAws_restJson1GetDeviceProfileCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2765,18 +6086,18 @@ const deserializeAws_restJson1CreateWirelessGatewayCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": + case "InternalServerException": + case "com.amazonaws.iotwireless#InternalServerException": response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; break; - case "InternalServerException": - case "com.amazonaws.iotwireless#InternalServerException": + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": response = { - ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -2814,32 +6135,60 @@ const deserializeAws_restJson1CreateWirelessGatewayCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1CreateWirelessGatewayTaskCommand = async ( +export const deserializeAws_restJson1GetFuotaTaskCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 201 && output.statusCode >= 300) { - return deserializeAws_restJson1CreateWirelessGatewayTaskCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetFuotaTaskCommandError(output, context); } - const contents: CreateWirelessGatewayTaskCommandOutput = { + const contents: GetFuotaTaskCommandOutput = { $metadata: deserializeMetadata(output), + Arn: undefined, + CreatedAt: undefined, + Description: undefined, + FirmwareUpdateImage: undefined, + FirmwareUpdateRole: undefined, + Id: undefined, + LoRaWAN: undefined, + Name: undefined, Status: undefined, - WirelessGatewayTaskDefinitionId: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.CreatedAt !== undefined && data.CreatedAt !== null) { + contents.CreatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedAt))); + } + if (data.Description !== undefined && data.Description !== null) { + contents.Description = __expectString(data.Description); + } + if (data.FirmwareUpdateImage !== undefined && data.FirmwareUpdateImage !== null) { + contents.FirmwareUpdateImage = __expectString(data.FirmwareUpdateImage); + } + if (data.FirmwareUpdateRole !== undefined && data.FirmwareUpdateRole !== null) { + contents.FirmwareUpdateRole = __expectString(data.FirmwareUpdateRole); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { + contents.LoRaWAN = deserializeAws_restJson1LoRaWANFuotaTaskGetInfo(data.LoRaWAN, context); + } + if (data.Name !== undefined && data.Name !== null) { + contents.Name = __expectString(data.Name); + } if (data.Status !== undefined && data.Status !== null) { contents.Status = __expectString(data.Status); } - if (data.WirelessGatewayTaskDefinitionId !== undefined && data.WirelessGatewayTaskDefinitionId !== null) { - contents.WirelessGatewayTaskDefinitionId = __expectString(data.WirelessGatewayTaskDefinitionId); - } return Promise.resolve(contents); }; -const deserializeAws_restJson1CreateWirelessGatewayTaskCommandError = async ( +const deserializeAws_restJson1GetFuotaTaskCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2856,14 +6205,6 @@ const deserializeAws_restJson1CreateWirelessGatewayTaskCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -2913,32 +6254,42 @@ const deserializeAws_restJson1CreateWirelessGatewayTaskCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1CreateWirelessGatewayTaskDefinitionCommand = async ( +export const deserializeAws_restJson1GetLogLevelsByResourceTypesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 201 && output.statusCode >= 300) { - return deserializeAws_restJson1CreateWirelessGatewayTaskDefinitionCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetLogLevelsByResourceTypesCommandError(output, context); } - const contents: CreateWirelessGatewayTaskDefinitionCommandOutput = { + const contents: GetLogLevelsByResourceTypesCommandOutput = { $metadata: deserializeMetadata(output), - Arn: undefined, - Id: undefined, + DefaultLogLevel: undefined, + WirelessDeviceLogOptions: undefined, + WirelessGatewayLogOptions: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn !== undefined && data.Arn !== null) { - contents.Arn = __expectString(data.Arn); + if (data.DefaultLogLevel !== undefined && data.DefaultLogLevel !== null) { + contents.DefaultLogLevel = __expectString(data.DefaultLogLevel); } - if (data.Id !== undefined && data.Id !== null) { - contents.Id = __expectString(data.Id); + if (data.WirelessDeviceLogOptions !== undefined && data.WirelessDeviceLogOptions !== null) { + contents.WirelessDeviceLogOptions = deserializeAws_restJson1WirelessDeviceLogOptionList( + data.WirelessDeviceLogOptions, + context + ); + } + if (data.WirelessGatewayLogOptions !== undefined && data.WirelessGatewayLogOptions !== null) { + contents.WirelessGatewayLogOptions = deserializeAws_restJson1WirelessGatewayLogOptionList( + data.WirelessGatewayLogOptions, + context + ); } return Promise.resolve(contents); }; -const deserializeAws_restJson1CreateWirelessGatewayTaskDefinitionCommandError = async ( +const deserializeAws_restJson1GetLogLevelsByResourceTypesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2955,14 +6306,6 @@ const deserializeAws_restJson1CreateWirelessGatewayTaskDefinitionCommandError = $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -3012,24 +6355,52 @@ const deserializeAws_restJson1CreateWirelessGatewayTaskDefinitionCommandError = return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DeleteDestinationCommand = async ( +export const deserializeAws_restJson1GetMulticastGroupCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1DeleteDestinationCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetMulticastGroupCommandError(output, context); } - const contents: DeleteDestinationCommandOutput = { + const contents: GetMulticastGroupCommandOutput = { $metadata: deserializeMetadata(output), + Arn: undefined, + CreatedAt: undefined, + Description: undefined, + Id: undefined, + LoRaWAN: undefined, + Name: undefined, + Status: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.CreatedAt !== undefined && data.CreatedAt !== null) { + contents.CreatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedAt))); + } + if (data.Description !== undefined && data.Description !== null) { + contents.Description = __expectString(data.Description); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { + contents.LoRaWAN = deserializeAws_restJson1LoRaWANMulticastGet(data.LoRaWAN, context); + } + if (data.Name !== undefined && data.Name !== null) { + contents.Name = __expectString(data.Name); + } + if (data.Status !== undefined && data.Status !== null) { + contents.Status = __expectString(data.Status); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1DeleteDestinationCommandError = async ( +const deserializeAws_restJson1GetMulticastGroupCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3046,14 +6417,6 @@ const deserializeAws_restJson1DeleteDestinationCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -3103,24 +6466,28 @@ const deserializeAws_restJson1DeleteDestinationCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DeleteDeviceProfileCommand = async ( +export const deserializeAws_restJson1GetMulticastGroupSessionCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1DeleteDeviceProfileCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetMulticastGroupSessionCommandError(output, context); } - const contents: DeleteDeviceProfileCommandOutput = { + const contents: GetMulticastGroupSessionCommandOutput = { $metadata: deserializeMetadata(output), + LoRaWAN: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { + contents.LoRaWAN = deserializeAws_restJson1LoRaWANMulticastSession(data.LoRaWAN, context); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1DeleteDeviceProfileCommandError = async ( +const deserializeAws_restJson1GetMulticastGroupSessionCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3130,17 +6497,9 @@ const deserializeAws_restJson1DeleteDeviceProfileCommandError = async ( errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { case "AccessDeniedException": - case "com.amazonaws.iotwireless#AccessDeniedException": - response = { - ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": + case "com.amazonaws.iotwireless#AccessDeniedException": response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -3194,24 +6553,32 @@ const deserializeAws_restJson1DeleteDeviceProfileCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DeleteServiceProfileCommand = async ( +export const deserializeAws_restJson1GetPartnerAccountCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1DeleteServiceProfileCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetPartnerAccountCommandError(output, context); } - const contents: DeleteServiceProfileCommandOutput = { + const contents: GetPartnerAccountCommandOutput = { $metadata: deserializeMetadata(output), + AccountLinked: undefined, + Sidewalk: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.AccountLinked !== undefined && data.AccountLinked !== null) { + contents.AccountLinked = __expectBoolean(data.AccountLinked); + } + if (data.Sidewalk !== undefined && data.Sidewalk !== null) { + contents.Sidewalk = deserializeAws_restJson1SidewalkAccountInfoWithFingerprint(data.Sidewalk, context); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1DeleteServiceProfileCommandError = async ( +const deserializeAws_restJson1GetPartnerAccountCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3220,22 +6587,6 @@ const deserializeAws_restJson1DeleteServiceProfileCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { - case "AccessDeniedException": - case "com.amazonaws.iotwireless#AccessDeniedException": - response = { - ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -3285,24 +6636,35 @@ const deserializeAws_restJson1DeleteServiceProfileCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DeleteWirelessDeviceCommand = async ( +export const deserializeAws_restJson1GetResourceEventConfigurationCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1DeleteWirelessDeviceCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetResourceEventConfigurationCommandError(output, context); } - const contents: DeleteWirelessDeviceCommandOutput = { + const contents: GetResourceEventConfigurationCommandOutput = { $metadata: deserializeMetadata(output), + DeviceRegistrationState: undefined, + Proximity: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.DeviceRegistrationState !== undefined && data.DeviceRegistrationState !== null) { + contents.DeviceRegistrationState = deserializeAws_restJson1DeviceRegistrationStateEventConfiguration( + data.DeviceRegistrationState, + context + ); + } + if (data.Proximity !== undefined && data.Proximity !== null) { + contents.Proximity = deserializeAws_restJson1ProximityEventConfiguration(data.Proximity, context); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1DeleteWirelessDeviceCommandError = async ( +const deserializeAws_restJson1GetResourceEventConfigurationCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3368,24 +6730,28 @@ const deserializeAws_restJson1DeleteWirelessDeviceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DeleteWirelessGatewayCommand = async ( +export const deserializeAws_restJson1GetResourceLogLevelCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1DeleteWirelessGatewayCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetResourceLogLevelCommandError(output, context); } - const contents: DeleteWirelessGatewayCommandOutput = { + const contents: GetResourceLogLevelCommandOutput = { $metadata: deserializeMetadata(output), + LogLevel: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.LogLevel !== undefined && data.LogLevel !== null) { + contents.LogLevel = __expectString(data.LogLevel); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1DeleteWirelessGatewayCommandError = async ( +const deserializeAws_restJson1GetResourceLogLevelCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3451,24 +6817,36 @@ const deserializeAws_restJson1DeleteWirelessGatewayCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DeleteWirelessGatewayTaskCommand = async ( +export const deserializeAws_restJson1GetServiceEndpointCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1DeleteWirelessGatewayTaskCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetServiceEndpointCommandError(output, context); } - const contents: DeleteWirelessGatewayTaskCommandOutput = { + const contents: GetServiceEndpointCommandOutput = { $metadata: deserializeMetadata(output), + ServerTrust: undefined, + ServiceEndpoint: undefined, + ServiceType: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.ServerTrust !== undefined && data.ServerTrust !== null) { + contents.ServerTrust = __expectString(data.ServerTrust); + } + if (data.ServiceEndpoint !== undefined && data.ServiceEndpoint !== null) { + contents.ServiceEndpoint = __expectString(data.ServiceEndpoint); + } + if (data.ServiceType !== undefined && data.ServiceType !== null) { + contents.ServiceType = __expectString(data.ServiceType); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1DeleteWirelessGatewayTaskCommandError = async ( +const deserializeAws_restJson1GetServiceEndpointCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3493,14 +6871,6 @@ const deserializeAws_restJson1DeleteWirelessGatewayTaskCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.iotwireless#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -3534,24 +6904,40 @@ const deserializeAws_restJson1DeleteWirelessGatewayTaskCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DeleteWirelessGatewayTaskDefinitionCommand = async ( +export const deserializeAws_restJson1GetServiceProfileCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1DeleteWirelessGatewayTaskDefinitionCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetServiceProfileCommandError(output, context); } - const contents: DeleteWirelessGatewayTaskDefinitionCommandOutput = { + const contents: GetServiceProfileCommandOutput = { $metadata: deserializeMetadata(output), + Arn: undefined, + Id: undefined, + LoRaWAN: undefined, + Name: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { + contents.LoRaWAN = deserializeAws_restJson1LoRaWANGetServiceProfileInfo(data.LoRaWAN, context); + } + if (data.Name !== undefined && data.Name !== null) { + contents.Name = __expectString(data.Name); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1DeleteWirelessGatewayTaskDefinitionCommandError = async ( +const deserializeAws_restJson1GetServiceProfileCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3617,24 +7003,64 @@ const deserializeAws_restJson1DeleteWirelessGatewayTaskDefinitionCommandError = return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DisassociateAwsAccountFromPartnerAccountCommand = async ( +export const deserializeAws_restJson1GetWirelessDeviceCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1DisassociateAwsAccountFromPartnerAccountCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetWirelessDeviceCommandError(output, context); } - const contents: DisassociateAwsAccountFromPartnerAccountCommandOutput = { + const contents: GetWirelessDeviceCommandOutput = { $metadata: deserializeMetadata(output), + Arn: undefined, + Description: undefined, + DestinationName: undefined, + Id: undefined, + LoRaWAN: undefined, + Name: undefined, + Sidewalk: undefined, + ThingArn: undefined, + ThingName: undefined, + Type: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.Description !== undefined && data.Description !== null) { + contents.Description = __expectString(data.Description); + } + if (data.DestinationName !== undefined && data.DestinationName !== null) { + contents.DestinationName = __expectString(data.DestinationName); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { + contents.LoRaWAN = deserializeAws_restJson1LoRaWANDevice(data.LoRaWAN, context); + } + if (data.Name !== undefined && data.Name !== null) { + contents.Name = __expectString(data.Name); + } + if (data.Sidewalk !== undefined && data.Sidewalk !== null) { + contents.Sidewalk = deserializeAws_restJson1SidewalkDevice(data.Sidewalk, context); + } + if (data.ThingArn !== undefined && data.ThingArn !== null) { + contents.ThingArn = __expectString(data.ThingArn); + } + if (data.ThingName !== undefined && data.ThingName !== null) { + contents.ThingName = __expectString(data.ThingName); + } + if (data.Type !== undefined && data.Type !== null) { + contents.Type = __expectString(data.Type); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1DisassociateAwsAccountFromPartnerAccountCommandError = async ( +const deserializeAws_restJson1GetWirelessDeviceCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3643,6 +7069,14 @@ const deserializeAws_restJson1DisassociateAwsAccountFromPartnerAccountCommandErr let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -3692,24 +7126,40 @@ const deserializeAws_restJson1DisassociateAwsAccountFromPartnerAccountCommandErr return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DisassociateWirelessDeviceFromThingCommand = async ( +export const deserializeAws_restJson1GetWirelessDeviceStatisticsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1DisassociateWirelessDeviceFromThingCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetWirelessDeviceStatisticsCommandError(output, context); } - const contents: DisassociateWirelessDeviceFromThingCommandOutput = { + const contents: GetWirelessDeviceStatisticsCommandOutput = { $metadata: deserializeMetadata(output), + LastUplinkReceivedAt: undefined, + LoRaWAN: undefined, + Sidewalk: undefined, + WirelessDeviceId: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.LastUplinkReceivedAt !== undefined && data.LastUplinkReceivedAt !== null) { + contents.LastUplinkReceivedAt = __expectString(data.LastUplinkReceivedAt); + } + if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { + contents.LoRaWAN = deserializeAws_restJson1LoRaWANDeviceMetadata(data.LoRaWAN, context); + } + if (data.Sidewalk !== undefined && data.Sidewalk !== null) { + contents.Sidewalk = deserializeAws_restJson1SidewalkDeviceMetadata(data.Sidewalk, context); + } + if (data.WirelessDeviceId !== undefined && data.WirelessDeviceId !== null) { + contents.WirelessDeviceId = __expectString(data.WirelessDeviceId); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1DisassociateWirelessDeviceFromThingCommandError = async ( +const deserializeAws_restJson1GetWirelessDeviceStatisticsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3726,14 +7176,6 @@ const deserializeAws_restJson1DisassociateWirelessDeviceFromThingCommandError = $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -3783,24 +7225,52 @@ const deserializeAws_restJson1DisassociateWirelessDeviceFromThingCommandError = return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DisassociateWirelessGatewayFromCertificateCommand = async ( +export const deserializeAws_restJson1GetWirelessGatewayCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1DisassociateWirelessGatewayFromCertificateCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetWirelessGatewayCommandError(output, context); } - const contents: DisassociateWirelessGatewayFromCertificateCommandOutput = { + const contents: GetWirelessGatewayCommandOutput = { $metadata: deserializeMetadata(output), + Arn: undefined, + Description: undefined, + Id: undefined, + LoRaWAN: undefined, + Name: undefined, + ThingArn: undefined, + ThingName: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); + } + if (data.Description !== undefined && data.Description !== null) { + contents.Description = __expectString(data.Description); + } + if (data.Id !== undefined && data.Id !== null) { + contents.Id = __expectString(data.Id); + } + if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { + contents.LoRaWAN = deserializeAws_restJson1LoRaWANGateway(data.LoRaWAN, context); + } + if (data.Name !== undefined && data.Name !== null) { + contents.Name = __expectString(data.Name); + } + if (data.ThingArn !== undefined && data.ThingArn !== null) { + contents.ThingArn = __expectString(data.ThingArn); + } + if (data.ThingName !== undefined && data.ThingName !== null) { + contents.ThingName = __expectString(data.ThingName); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1DisassociateWirelessGatewayFromCertificateCommandError = async ( +const deserializeAws_restJson1GetWirelessGatewayCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3866,24 +7336,32 @@ const deserializeAws_restJson1DisassociateWirelessGatewayFromCertificateCommandE return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1DisassociateWirelessGatewayFromThingCommand = async ( +export const deserializeAws_restJson1GetWirelessGatewayCertificateCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1DisassociateWirelessGatewayFromThingCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1GetWirelessGatewayCertificateCommandError(output, context); } - const contents: DisassociateWirelessGatewayFromThingCommandOutput = { + const contents: GetWirelessGatewayCertificateCommandOutput = { $metadata: deserializeMetadata(output), + IotCertificateId: undefined, + LoRaWANNetworkServerCertificateId: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.IotCertificateId !== undefined && data.IotCertificateId !== null) { + contents.IotCertificateId = __expectString(data.IotCertificateId); + } + if (data.LoRaWANNetworkServerCertificateId !== undefined && data.LoRaWANNetworkServerCertificateId !== null) { + contents.LoRaWANNetworkServerCertificateId = __expectString(data.LoRaWANNetworkServerCertificateId); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1DisassociateWirelessGatewayFromThingCommandError = async ( +const deserializeAws_restJson1GetWirelessGatewayCertificateCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3900,14 +7378,6 @@ const deserializeAws_restJson1DisassociateWirelessGatewayFromThingCommandError = $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -3957,48 +7427,28 @@ const deserializeAws_restJson1DisassociateWirelessGatewayFromThingCommandError = return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetDestinationCommand = async ( +export const deserializeAws_restJson1GetWirelessGatewayFirmwareInformationCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetDestinationCommandError(output, context); + return deserializeAws_restJson1GetWirelessGatewayFirmwareInformationCommandError(output, context); } - const contents: GetDestinationCommandOutput = { + const contents: GetWirelessGatewayFirmwareInformationCommandOutput = { $metadata: deserializeMetadata(output), - Arn: undefined, - Description: undefined, - Expression: undefined, - ExpressionType: undefined, - Name: undefined, - RoleArn: undefined, + LoRaWAN: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn !== undefined && data.Arn !== null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description !== undefined && data.Description !== null) { - contents.Description = __expectString(data.Description); - } - if (data.Expression !== undefined && data.Expression !== null) { - contents.Expression = __expectString(data.Expression); - } - if (data.ExpressionType !== undefined && data.ExpressionType !== null) { - contents.ExpressionType = __expectString(data.ExpressionType); - } - if (data.Name !== undefined && data.Name !== null) { - contents.Name = __expectString(data.Name); - } - if (data.RoleArn !== undefined && data.RoleArn !== null) { - contents.RoleArn = __expectString(data.RoleArn); + if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { + contents.LoRaWAN = deserializeAws_restJson1LoRaWANGatewayCurrentVersion(data.LoRaWAN, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetDestinationCommandError = async ( +const deserializeAws_restJson1GetWirelessGatewayFirmwareInformationCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4064,40 +7514,36 @@ const deserializeAws_restJson1GetDestinationCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetDeviceProfileCommand = async ( +export const deserializeAws_restJson1GetWirelessGatewayStatisticsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetDeviceProfileCommandError(output, context); + return deserializeAws_restJson1GetWirelessGatewayStatisticsCommandError(output, context); } - const contents: GetDeviceProfileCommandOutput = { + const contents: GetWirelessGatewayStatisticsCommandOutput = { $metadata: deserializeMetadata(output), - Arn: undefined, - Id: undefined, - LoRaWAN: undefined, - Name: undefined, + ConnectionStatus: undefined, + LastUplinkReceivedAt: undefined, + WirelessGatewayId: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn !== undefined && data.Arn !== null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id !== undefined && data.Id !== null) { - contents.Id = __expectString(data.Id); + if (data.ConnectionStatus !== undefined && data.ConnectionStatus !== null) { + contents.ConnectionStatus = __expectString(data.ConnectionStatus); } - if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { - contents.LoRaWAN = deserializeAws_restJson1LoRaWANDeviceProfile(data.LoRaWAN, context); + if (data.LastUplinkReceivedAt !== undefined && data.LastUplinkReceivedAt !== null) { + contents.LastUplinkReceivedAt = __expectString(data.LastUplinkReceivedAt); } - if (data.Name !== undefined && data.Name !== null) { - contents.Name = __expectString(data.Name); + if (data.WirelessGatewayId !== undefined && data.WirelessGatewayId !== null) { + contents.WirelessGatewayId = __expectString(data.WirelessGatewayId); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetDeviceProfileCommandError = async ( +const deserializeAws_restJson1GetWirelessGatewayStatisticsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4163,42 +7609,44 @@ const deserializeAws_restJson1GetDeviceProfileCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetLogLevelsByResourceTypesCommand = async ( +export const deserializeAws_restJson1GetWirelessGatewayTaskCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetLogLevelsByResourceTypesCommandError(output, context); + return deserializeAws_restJson1GetWirelessGatewayTaskCommandError(output, context); } - const contents: GetLogLevelsByResourceTypesCommandOutput = { + const contents: GetWirelessGatewayTaskCommandOutput = { $metadata: deserializeMetadata(output), - DefaultLogLevel: undefined, - WirelessDeviceLogOptions: undefined, - WirelessGatewayLogOptions: undefined, + LastUplinkReceivedAt: undefined, + Status: undefined, + TaskCreatedAt: undefined, + WirelessGatewayId: undefined, + WirelessGatewayTaskDefinitionId: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DefaultLogLevel !== undefined && data.DefaultLogLevel !== null) { - contents.DefaultLogLevel = __expectString(data.DefaultLogLevel); + if (data.LastUplinkReceivedAt !== undefined && data.LastUplinkReceivedAt !== null) { + contents.LastUplinkReceivedAt = __expectString(data.LastUplinkReceivedAt); } - if (data.WirelessDeviceLogOptions !== undefined && data.WirelessDeviceLogOptions !== null) { - contents.WirelessDeviceLogOptions = deserializeAws_restJson1WirelessDeviceLogOptionList( - data.WirelessDeviceLogOptions, - context - ); + if (data.Status !== undefined && data.Status !== null) { + contents.Status = __expectString(data.Status); } - if (data.WirelessGatewayLogOptions !== undefined && data.WirelessGatewayLogOptions !== null) { - contents.WirelessGatewayLogOptions = deserializeAws_restJson1WirelessGatewayLogOptionList( - data.WirelessGatewayLogOptions, - context - ); + if (data.TaskCreatedAt !== undefined && data.TaskCreatedAt !== null) { + contents.TaskCreatedAt = __expectString(data.TaskCreatedAt); + } + if (data.WirelessGatewayId !== undefined && data.WirelessGatewayId !== null) { + contents.WirelessGatewayId = __expectString(data.WirelessGatewayId); + } + if (data.WirelessGatewayTaskDefinitionId !== undefined && data.WirelessGatewayTaskDefinitionId !== null) { + contents.WirelessGatewayTaskDefinitionId = __expectString(data.WirelessGatewayTaskDefinitionId); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetLogLevelsByResourceTypesCommandError = async ( +const deserializeAws_restJson1GetWirelessGatewayTaskCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4264,32 +7712,40 @@ const deserializeAws_restJson1GetLogLevelsByResourceTypesCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetPartnerAccountCommand = async ( +export const deserializeAws_restJson1GetWirelessGatewayTaskDefinitionCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetPartnerAccountCommandError(output, context); + return deserializeAws_restJson1GetWirelessGatewayTaskDefinitionCommandError(output, context); } - const contents: GetPartnerAccountCommandOutput = { + const contents: GetWirelessGatewayTaskDefinitionCommandOutput = { $metadata: deserializeMetadata(output), - AccountLinked: undefined, - Sidewalk: undefined, + Arn: undefined, + AutoCreateTasks: undefined, + Name: undefined, + Update: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountLinked !== undefined && data.AccountLinked !== null) { - contents.AccountLinked = __expectBoolean(data.AccountLinked); + if (data.Arn !== undefined && data.Arn !== null) { + contents.Arn = __expectString(data.Arn); } - if (data.Sidewalk !== undefined && data.Sidewalk !== null) { - contents.Sidewalk = deserializeAws_restJson1SidewalkAccountInfoWithFingerprint(data.Sidewalk, context); + if (data.AutoCreateTasks !== undefined && data.AutoCreateTasks !== null) { + contents.AutoCreateTasks = __expectBoolean(data.AutoCreateTasks); + } + if (data.Name !== undefined && data.Name !== null) { + contents.Name = __expectString(data.Name); + } + if (data.Update !== undefined && data.Update !== null) { + contents.Update = deserializeAws_restJson1UpdateWirelessGatewayTaskCreate(data.Update, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetPartnerAccountCommandError = async ( +const deserializeAws_restJson1GetWirelessGatewayTaskDefinitionCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4298,6 +7754,14 @@ const deserializeAws_restJson1GetPartnerAccountCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -4347,28 +7811,32 @@ const deserializeAws_restJson1GetPartnerAccountCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetResourceLogLevelCommand = async ( +export const deserializeAws_restJson1ListDestinationsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetResourceLogLevelCommandError(output, context); + return deserializeAws_restJson1ListDestinationsCommandError(output, context); } - const contents: GetResourceLogLevelCommandOutput = { + const contents: ListDestinationsCommandOutput = { $metadata: deserializeMetadata(output), - LogLevel: undefined, + DestinationList: undefined, + NextToken: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LogLevel !== undefined && data.LogLevel !== null) { - contents.LogLevel = __expectString(data.LogLevel); + if (data.DestinationList !== undefined && data.DestinationList !== null) { + contents.DestinationList = deserializeAws_restJson1DestinationList(data.DestinationList, context); + } + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetResourceLogLevelCommandError = async ( +const deserializeAws_restJson1ListDestinationsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4388,15 +7856,7 @@ const deserializeAws_restJson1GetResourceLogLevelCommandError = async ( case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { - ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; - case "ResourceNotFoundException": - case "com.amazonaws.iotwireless#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -4434,36 +7894,32 @@ const deserializeAws_restJson1GetResourceLogLevelCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetServiceEndpointCommand = async ( +export const deserializeAws_restJson1ListDeviceProfilesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetServiceEndpointCommandError(output, context); + return deserializeAws_restJson1ListDeviceProfilesCommandError(output, context); } - const contents: GetServiceEndpointCommandOutput = { + const contents: ListDeviceProfilesCommandOutput = { $metadata: deserializeMetadata(output), - ServerTrust: undefined, - ServiceEndpoint: undefined, - ServiceType: undefined, + DeviceProfileList: undefined, + NextToken: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ServerTrust !== undefined && data.ServerTrust !== null) { - contents.ServerTrust = __expectString(data.ServerTrust); - } - if (data.ServiceEndpoint !== undefined && data.ServiceEndpoint !== null) { - contents.ServiceEndpoint = __expectString(data.ServiceEndpoint); + if (data.DeviceProfileList !== undefined && data.DeviceProfileList !== null) { + contents.DeviceProfileList = deserializeAws_restJson1DeviceProfileList(data.DeviceProfileList, context); } - if (data.ServiceType !== undefined && data.ServiceType !== null) { - contents.ServiceType = __expectString(data.ServiceType); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetServiceEndpointCommandError = async ( +const deserializeAws_restJson1ListDeviceProfilesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4521,40 +7977,32 @@ const deserializeAws_restJson1GetServiceEndpointCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetServiceProfileCommand = async ( +export const deserializeAws_restJson1ListFuotaTasksCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetServiceProfileCommandError(output, context); + return deserializeAws_restJson1ListFuotaTasksCommandError(output, context); } - const contents: GetServiceProfileCommandOutput = { + const contents: ListFuotaTasksCommandOutput = { $metadata: deserializeMetadata(output), - Arn: undefined, - Id: undefined, - LoRaWAN: undefined, - Name: undefined, + FuotaTaskList: undefined, + NextToken: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn !== undefined && data.Arn !== null) { - contents.Arn = __expectString(data.Arn); + if (data.FuotaTaskList !== undefined && data.FuotaTaskList !== null) { + contents.FuotaTaskList = deserializeAws_restJson1FuotaTaskList(data.FuotaTaskList, context); } - if (data.Id !== undefined && data.Id !== null) { - contents.Id = __expectString(data.Id); - } - if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { - contents.LoRaWAN = deserializeAws_restJson1LoRaWANGetServiceProfileInfo(data.LoRaWAN, context); - } - if (data.Name !== undefined && data.Name !== null) { - contents.Name = __expectString(data.Name); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetServiceProfileCommandError = async ( +const deserializeAws_restJson1ListFuotaTasksCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4579,14 +8027,6 @@ const deserializeAws_restJson1GetServiceProfileCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.iotwireless#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -4620,64 +8060,32 @@ const deserializeAws_restJson1GetServiceProfileCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetWirelessDeviceCommand = async ( +export const deserializeAws_restJson1ListMulticastGroupsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetWirelessDeviceCommandError(output, context); + return deserializeAws_restJson1ListMulticastGroupsCommandError(output, context); } - const contents: GetWirelessDeviceCommandOutput = { + const contents: ListMulticastGroupsCommandOutput = { $metadata: deserializeMetadata(output), - Arn: undefined, - Description: undefined, - DestinationName: undefined, - Id: undefined, - LoRaWAN: undefined, - Name: undefined, - Sidewalk: undefined, - ThingArn: undefined, - ThingName: undefined, - Type: undefined, + MulticastGroupList: undefined, + NextToken: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn !== undefined && data.Arn !== null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description !== undefined && data.Description !== null) { - contents.Description = __expectString(data.Description); - } - if (data.DestinationName !== undefined && data.DestinationName !== null) { - contents.DestinationName = __expectString(data.DestinationName); - } - if (data.Id !== undefined && data.Id !== null) { - contents.Id = __expectString(data.Id); - } - if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { - contents.LoRaWAN = deserializeAws_restJson1LoRaWANDevice(data.LoRaWAN, context); - } - if (data.Name !== undefined && data.Name !== null) { - contents.Name = __expectString(data.Name); - } - if (data.Sidewalk !== undefined && data.Sidewalk !== null) { - contents.Sidewalk = deserializeAws_restJson1SidewalkDevice(data.Sidewalk, context); - } - if (data.ThingArn !== undefined && data.ThingArn !== null) { - contents.ThingArn = __expectString(data.ThingArn); - } - if (data.ThingName !== undefined && data.ThingName !== null) { - contents.ThingName = __expectString(data.ThingName); + if (data.MulticastGroupList !== undefined && data.MulticastGroupList !== null) { + contents.MulticastGroupList = deserializeAws_restJson1MulticastGroupList(data.MulticastGroupList, context); } - if (data.Type !== undefined && data.Type !== null) { - contents.Type = __expectString(data.Type); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetWirelessDeviceCommandError = async ( +const deserializeAws_restJson1ListMulticastGroupsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4702,14 +8110,6 @@ const deserializeAws_restJson1GetWirelessDeviceCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.iotwireless#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -4743,40 +8143,35 @@ const deserializeAws_restJson1GetWirelessDeviceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetWirelessDeviceStatisticsCommand = async ( +export const deserializeAws_restJson1ListMulticastGroupsByFuotaTaskCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetWirelessDeviceStatisticsCommandError(output, context); + return deserializeAws_restJson1ListMulticastGroupsByFuotaTaskCommandError(output, context); } - const contents: GetWirelessDeviceStatisticsCommandOutput = { + const contents: ListMulticastGroupsByFuotaTaskCommandOutput = { $metadata: deserializeMetadata(output), - LastUplinkReceivedAt: undefined, - LoRaWAN: undefined, - Sidewalk: undefined, - WirelessDeviceId: undefined, + MulticastGroupList: undefined, + NextToken: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LastUplinkReceivedAt !== undefined && data.LastUplinkReceivedAt !== null) { - contents.LastUplinkReceivedAt = __expectString(data.LastUplinkReceivedAt); - } - if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { - contents.LoRaWAN = deserializeAws_restJson1LoRaWANDeviceMetadata(data.LoRaWAN, context); - } - if (data.Sidewalk !== undefined && data.Sidewalk !== null) { - contents.Sidewalk = deserializeAws_restJson1SidewalkDeviceMetadata(data.Sidewalk, context); + if (data.MulticastGroupList !== undefined && data.MulticastGroupList !== null) { + contents.MulticastGroupList = deserializeAws_restJson1MulticastGroupListByFuotaTask( + data.MulticastGroupList, + context + ); } - if (data.WirelessDeviceId !== undefined && data.WirelessDeviceId !== null) { - contents.WirelessDeviceId = __expectString(data.WirelessDeviceId); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetWirelessDeviceStatisticsCommandError = async ( +const deserializeAws_restJson1ListMulticastGroupsByFuotaTaskCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4842,52 +8237,32 @@ const deserializeAws_restJson1GetWirelessDeviceStatisticsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetWirelessGatewayCommand = async ( +export const deserializeAws_restJson1ListPartnerAccountsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetWirelessGatewayCommandError(output, context); + return deserializeAws_restJson1ListPartnerAccountsCommandError(output, context); } - const contents: GetWirelessGatewayCommandOutput = { + const contents: ListPartnerAccountsCommandOutput = { $metadata: deserializeMetadata(output), - Arn: undefined, - Description: undefined, - Id: undefined, - LoRaWAN: undefined, - Name: undefined, - ThingArn: undefined, - ThingName: undefined, + NextToken: undefined, + Sidewalk: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn !== undefined && data.Arn !== null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description !== undefined && data.Description !== null) { - contents.Description = __expectString(data.Description); - } - if (data.Id !== undefined && data.Id !== null) { - contents.Id = __expectString(data.Id); - } - if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { - contents.LoRaWAN = deserializeAws_restJson1LoRaWANGateway(data.LoRaWAN, context); - } - if (data.Name !== undefined && data.Name !== null) { - contents.Name = __expectString(data.Name); - } - if (data.ThingArn !== undefined && data.ThingArn !== null) { - contents.ThingArn = __expectString(data.ThingArn); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); } - if (data.ThingName !== undefined && data.ThingName !== null) { - contents.ThingName = __expectString(data.ThingName); + if (data.Sidewalk !== undefined && data.Sidewalk !== null) { + contents.Sidewalk = deserializeAws_restJson1SidewalkAccountList(data.Sidewalk, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetWirelessGatewayCommandError = async ( +const deserializeAws_restJson1ListPartnerAccountsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4896,14 +8271,6 @@ const deserializeAws_restJson1GetWirelessGatewayCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { - case "AccessDeniedException": - case "com.amazonaws.iotwireless#AccessDeniedException": - response = { - ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -4953,32 +8320,32 @@ const deserializeAws_restJson1GetWirelessGatewayCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetWirelessGatewayCertificateCommand = async ( +export const deserializeAws_restJson1ListServiceProfilesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetWirelessGatewayCertificateCommandError(output, context); + return deserializeAws_restJson1ListServiceProfilesCommandError(output, context); } - const contents: GetWirelessGatewayCertificateCommandOutput = { + const contents: ListServiceProfilesCommandOutput = { $metadata: deserializeMetadata(output), - IotCertificateId: undefined, - LoRaWANNetworkServerCertificateId: undefined, + NextToken: undefined, + ServiceProfileList: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IotCertificateId !== undefined && data.IotCertificateId !== null) { - contents.IotCertificateId = __expectString(data.IotCertificateId); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); } - if (data.LoRaWANNetworkServerCertificateId !== undefined && data.LoRaWANNetworkServerCertificateId !== null) { - contents.LoRaWANNetworkServerCertificateId = __expectString(data.LoRaWANNetworkServerCertificateId); + if (data.ServiceProfileList !== undefined && data.ServiceProfileList !== null) { + contents.ServiceProfileList = deserializeAws_restJson1ServiceProfileList(data.ServiceProfileList, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetWirelessGatewayCertificateCommandError = async ( +const deserializeAws_restJson1ListServiceProfilesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -5003,14 +8370,6 @@ const deserializeAws_restJson1GetWirelessGatewayCertificateCommandError = async $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.iotwireless#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -5044,28 +8403,28 @@ const deserializeAws_restJson1GetWirelessGatewayCertificateCommandError = async return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetWirelessGatewayFirmwareInformationCommand = async ( +export const deserializeAws_restJson1ListTagsForResourceCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetWirelessGatewayFirmwareInformationCommandError(output, context); + return deserializeAws_restJson1ListTagsForResourceCommandError(output, context); } - const contents: GetWirelessGatewayFirmwareInformationCommandOutput = { + const contents: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), - LoRaWAN: undefined, + Tags: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LoRaWAN !== undefined && data.LoRaWAN !== null) { - contents.LoRaWAN = deserializeAws_restJson1LoRaWANGatewayCurrentVersion(data.LoRaWAN, context); + if (data.Tags !== undefined && data.Tags !== null) { + contents.Tags = deserializeAws_restJson1TagList(data.Tags, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetWirelessGatewayFirmwareInformationCommandError = async ( +const deserializeAws_restJson1ListTagsForResourceCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -5074,10 +8433,10 @@ const deserializeAws_restJson1GetWirelessGatewayFirmwareInformationCommandError let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { - case "AccessDeniedException": - case "com.amazonaws.iotwireless#AccessDeniedException": + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": response = { - ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -5131,36 +8490,35 @@ const deserializeAws_restJson1GetWirelessGatewayFirmwareInformationCommandError return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetWirelessGatewayStatisticsCommand = async ( +export const deserializeAws_restJson1ListWirelessDevicesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetWirelessGatewayStatisticsCommandError(output, context); + return deserializeAws_restJson1ListWirelessDevicesCommandError(output, context); } - const contents: GetWirelessGatewayStatisticsCommandOutput = { + const contents: ListWirelessDevicesCommandOutput = { $metadata: deserializeMetadata(output), - ConnectionStatus: undefined, - LastUplinkReceivedAt: undefined, - WirelessGatewayId: undefined, + NextToken: undefined, + WirelessDeviceList: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectionStatus !== undefined && data.ConnectionStatus !== null) { - contents.ConnectionStatus = __expectString(data.ConnectionStatus); - } - if (data.LastUplinkReceivedAt !== undefined && data.LastUplinkReceivedAt !== null) { - contents.LastUplinkReceivedAt = __expectString(data.LastUplinkReceivedAt); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); } - if (data.WirelessGatewayId !== undefined && data.WirelessGatewayId !== null) { - contents.WirelessGatewayId = __expectString(data.WirelessGatewayId); + if (data.WirelessDeviceList !== undefined && data.WirelessDeviceList !== null) { + contents.WirelessDeviceList = deserializeAws_restJson1WirelessDeviceStatisticsList( + data.WirelessDeviceList, + context + ); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetWirelessGatewayStatisticsCommandError = async ( +const deserializeAws_restJson1ListWirelessDevicesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -5185,14 +8543,6 @@ const deserializeAws_restJson1GetWirelessGatewayStatisticsCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.iotwireless#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -5226,44 +8576,35 @@ const deserializeAws_restJson1GetWirelessGatewayStatisticsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetWirelessGatewayTaskCommand = async ( +export const deserializeAws_restJson1ListWirelessGatewaysCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetWirelessGatewayTaskCommandError(output, context); + return deserializeAws_restJson1ListWirelessGatewaysCommandError(output, context); } - const contents: GetWirelessGatewayTaskCommandOutput = { + const contents: ListWirelessGatewaysCommandOutput = { $metadata: deserializeMetadata(output), - LastUplinkReceivedAt: undefined, - Status: undefined, - TaskCreatedAt: undefined, - WirelessGatewayId: undefined, - WirelessGatewayTaskDefinitionId: undefined, + NextToken: undefined, + WirelessGatewayList: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LastUplinkReceivedAt !== undefined && data.LastUplinkReceivedAt !== null) { - contents.LastUplinkReceivedAt = __expectString(data.LastUplinkReceivedAt); - } - if (data.Status !== undefined && data.Status !== null) { - contents.Status = __expectString(data.Status); - } - if (data.TaskCreatedAt !== undefined && data.TaskCreatedAt !== null) { - contents.TaskCreatedAt = __expectString(data.TaskCreatedAt); - } - if (data.WirelessGatewayId !== undefined && data.WirelessGatewayId !== null) { - contents.WirelessGatewayId = __expectString(data.WirelessGatewayId); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); } - if (data.WirelessGatewayTaskDefinitionId !== undefined && data.WirelessGatewayTaskDefinitionId !== null) { - contents.WirelessGatewayTaskDefinitionId = __expectString(data.WirelessGatewayTaskDefinitionId); + if (data.WirelessGatewayList !== undefined && data.WirelessGatewayList !== null) { + contents.WirelessGatewayList = deserializeAws_restJson1WirelessGatewayStatisticsList( + data.WirelessGatewayList, + context + ); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetWirelessGatewayTaskCommandError = async ( +const deserializeAws_restJson1ListWirelessGatewaysCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -5288,14 +8629,6 @@ const deserializeAws_restJson1GetWirelessGatewayTaskCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.iotwireless#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -5329,40 +8662,32 @@ const deserializeAws_restJson1GetWirelessGatewayTaskCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetWirelessGatewayTaskDefinitionCommand = async ( +export const deserializeAws_restJson1ListWirelessGatewayTaskDefinitionsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetWirelessGatewayTaskDefinitionCommandError(output, context); + return deserializeAws_restJson1ListWirelessGatewayTaskDefinitionsCommandError(output, context); } - const contents: GetWirelessGatewayTaskDefinitionCommandOutput = { + const contents: ListWirelessGatewayTaskDefinitionsCommandOutput = { $metadata: deserializeMetadata(output), - Arn: undefined, - AutoCreateTasks: undefined, - Name: undefined, - Update: undefined, + NextToken: undefined, + TaskDefinitions: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn !== undefined && data.Arn !== null) { - contents.Arn = __expectString(data.Arn); - } - if (data.AutoCreateTasks !== undefined && data.AutoCreateTasks !== null) { - contents.AutoCreateTasks = __expectBoolean(data.AutoCreateTasks); - } - if (data.Name !== undefined && data.Name !== null) { - contents.Name = __expectString(data.Name); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); } - if (data.Update !== undefined && data.Update !== null) { - contents.Update = deserializeAws_restJson1UpdateWirelessGatewayTaskCreate(data.Update, context); + if (data.TaskDefinitions !== undefined && data.TaskDefinitions !== null) { + contents.TaskDefinitions = deserializeAws_restJson1WirelessGatewayTaskDefinitionList(data.TaskDefinitions, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetWirelessGatewayTaskDefinitionCommandError = async ( +const deserializeAws_restJson1ListWirelessGatewayTaskDefinitionsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -5387,14 +8712,6 @@ const deserializeAws_restJson1GetWirelessGatewayTaskDefinitionCommandError = asy $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.iotwireless#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -5428,32 +8745,24 @@ const deserializeAws_restJson1GetWirelessGatewayTaskDefinitionCommandError = asy return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListDestinationsCommand = async ( +export const deserializeAws_restJson1PutResourceLogLevelCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListDestinationsCommandError(output, context); + return deserializeAws_restJson1PutResourceLogLevelCommandError(output, context); } - const contents: ListDestinationsCommandOutput = { + const contents: PutResourceLogLevelCommandOutput = { $metadata: deserializeMetadata(output), - DestinationList: undefined, - NextToken: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DestinationList !== undefined && data.DestinationList !== null) { - contents.DestinationList = deserializeAws_restJson1DestinationList(data.DestinationList, context); - } - if (data.NextToken !== undefined && data.NextToken !== null) { - contents.NextToken = __expectString(data.NextToken); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1ListDestinationsCommandError = async ( +const deserializeAws_restJson1PutResourceLogLevelCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -5478,6 +8787,14 @@ const deserializeAws_restJson1ListDestinationsCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -5511,32 +8828,24 @@ const deserializeAws_restJson1ListDestinationsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListDeviceProfilesCommand = async ( +export const deserializeAws_restJson1ResetAllResourceLogLevelsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListDeviceProfilesCommandError(output, context); +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1ResetAllResourceLogLevelsCommandError(output, context); } - const contents: ListDeviceProfilesCommandOutput = { + const contents: ResetAllResourceLogLevelsCommandOutput = { $metadata: deserializeMetadata(output), - DeviceProfileList: undefined, - NextToken: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeviceProfileList !== undefined && data.DeviceProfileList !== null) { - contents.DeviceProfileList = deserializeAws_restJson1DeviceProfileList(data.DeviceProfileList, context); - } - if (data.NextToken !== undefined && data.NextToken !== null) { - contents.NextToken = __expectString(data.NextToken); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1ListDeviceProfilesCommandError = async ( +const deserializeAws_restJson1ResetAllResourceLogLevelsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -5561,6 +8870,14 @@ const deserializeAws_restJson1ListDeviceProfilesCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -5594,32 +8911,24 @@ const deserializeAws_restJson1ListDeviceProfilesCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListPartnerAccountsCommand = async ( +export const deserializeAws_restJson1ResetResourceLogLevelCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListPartnerAccountsCommandError(output, context); +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1ResetResourceLogLevelCommandError(output, context); } - const contents: ListPartnerAccountsCommandOutput = { + const contents: ResetResourceLogLevelCommandOutput = { $metadata: deserializeMetadata(output), - NextToken: undefined, - Sidewalk: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken !== undefined && data.NextToken !== null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Sidewalk !== undefined && data.Sidewalk !== null) { - contents.Sidewalk = deserializeAws_restJson1SidewalkAccountList(data.Sidewalk, context); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1ListPartnerAccountsCommandError = async ( +const deserializeAws_restJson1ResetResourceLogLevelCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -5628,6 +8937,14 @@ const deserializeAws_restJson1ListPartnerAccountsCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -5677,32 +8994,28 @@ const deserializeAws_restJson1ListPartnerAccountsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListServiceProfilesCommand = async ( +export const deserializeAws_restJson1SendDataToMulticastGroupCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListServiceProfilesCommandError(output, context); +): Promise => { + if (output.statusCode !== 201 && output.statusCode >= 300) { + return deserializeAws_restJson1SendDataToMulticastGroupCommandError(output, context); } - const contents: ListServiceProfilesCommandOutput = { + const contents: SendDataToMulticastGroupCommandOutput = { $metadata: deserializeMetadata(output), - NextToken: undefined, - ServiceProfileList: undefined, + MessageId: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken !== undefined && data.NextToken !== null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ServiceProfileList !== undefined && data.ServiceProfileList !== null) { - contents.ServiceProfileList = deserializeAws_restJson1ServiceProfileList(data.ServiceProfileList, context); + if (data.MessageId !== undefined && data.MessageId !== null) { + contents.MessageId = __expectString(data.MessageId); } return Promise.resolve(contents); }; -const deserializeAws_restJson1ListServiceProfilesCommandError = async ( +const deserializeAws_restJson1SendDataToMulticastGroupCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -5719,6 +9032,14 @@ const deserializeAws_restJson1ListServiceProfilesCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -5727,6 +9048,14 @@ const deserializeAws_restJson1ListServiceProfilesCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -5760,28 +9089,28 @@ const deserializeAws_restJson1ListServiceProfilesCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListTagsForResourceCommand = async ( +export const deserializeAws_restJson1SendDataToWirelessDeviceCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListTagsForResourceCommandError(output, context); +): Promise => { + if (output.statusCode !== 202 && output.statusCode >= 300) { + return deserializeAws_restJson1SendDataToWirelessDeviceCommandError(output, context); } - const contents: ListTagsForResourceCommandOutput = { + const contents: SendDataToWirelessDeviceCommandOutput = { $metadata: deserializeMetadata(output), - Tags: undefined, + MessageId: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags !== undefined && data.Tags !== null) { - contents.Tags = deserializeAws_restJson1TagList(data.Tags, context); + if (data.MessageId !== undefined && data.MessageId !== null) { + contents.MessageId = __expectString(data.MessageId); } return Promise.resolve(contents); }; -const deserializeAws_restJson1ListTagsForResourceCommandError = async ( +const deserializeAws_restJson1SendDataToWirelessDeviceCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -5790,14 +9119,6 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -5847,35 +9168,24 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListWirelessDevicesCommand = async ( +export const deserializeAws_restJson1StartBulkAssociateWirelessDeviceWithMulticastGroupCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListWirelessDevicesCommandError(output, context); +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1StartBulkAssociateWirelessDeviceWithMulticastGroupCommandError(output, context); } - const contents: ListWirelessDevicesCommandOutput = { + const contents: StartBulkAssociateWirelessDeviceWithMulticastGroupCommandOutput = { $metadata: deserializeMetadata(output), - NextToken: undefined, - WirelessDeviceList: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken !== undefined && data.NextToken !== null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WirelessDeviceList !== undefined && data.WirelessDeviceList !== null) { - contents.WirelessDeviceList = deserializeAws_restJson1WirelessDeviceStatisticsList( - data.WirelessDeviceList, - context - ); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1ListWirelessDevicesCommandError = async ( +const deserializeAws_restJson1StartBulkAssociateWirelessDeviceWithMulticastGroupCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -5900,6 +9210,14 @@ const deserializeAws_restJson1ListWirelessDevicesCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -5933,35 +9251,24 @@ const deserializeAws_restJson1ListWirelessDevicesCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListWirelessGatewaysCommand = async ( +export const deserializeAws_restJson1StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListWirelessGatewaysCommandError(output, context); +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandError(output, context); } - const contents: ListWirelessGatewaysCommandOutput = { + const contents: StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandOutput = { $metadata: deserializeMetadata(output), - NextToken: undefined, - WirelessGatewayList: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken !== undefined && data.NextToken !== null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WirelessGatewayList !== undefined && data.WirelessGatewayList !== null) { - contents.WirelessGatewayList = deserializeAws_restJson1WirelessGatewayStatisticsList( - data.WirelessGatewayList, - context - ); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1ListWirelessGatewaysCommandError = async ( +const deserializeAws_restJson1StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -5986,6 +9293,14 @@ const deserializeAws_restJson1ListWirelessGatewaysCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -6019,32 +9334,24 @@ const deserializeAws_restJson1ListWirelessGatewaysCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListWirelessGatewayTaskDefinitionsCommand = async ( +export const deserializeAws_restJson1StartFuotaTaskCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListWirelessGatewayTaskDefinitionsCommandError(output, context); +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1StartFuotaTaskCommandError(output, context); } - const contents: ListWirelessGatewayTaskDefinitionsCommandOutput = { + const contents: StartFuotaTaskCommandOutput = { $metadata: deserializeMetadata(output), - NextToken: undefined, - TaskDefinitions: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken !== undefined && data.NextToken !== null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.TaskDefinitions !== undefined && data.TaskDefinitions !== null) { - contents.TaskDefinitions = deserializeAws_restJson1WirelessGatewayTaskDefinitionList(data.TaskDefinitions, context); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1ListWirelessGatewayTaskDefinitionsCommandError = async ( +const deserializeAws_restJson1StartFuotaTaskCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6061,6 +9368,14 @@ const deserializeAws_restJson1ListWirelessGatewayTaskDefinitionsCommandError = a $metadata: deserializeMetadata(output), }; break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -6069,6 +9384,14 @@ const deserializeAws_restJson1ListWirelessGatewayTaskDefinitionsCommandError = a $metadata: deserializeMetadata(output), }; break; + case "ResourceNotFoundException": + case "com.amazonaws.iotwireless#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ThrottlingException": case "com.amazonaws.iotwireless#ThrottlingException": response = { @@ -6102,24 +9425,24 @@ const deserializeAws_restJson1ListWirelessGatewayTaskDefinitionsCommandError = a return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1PutResourceLogLevelCommand = async ( +export const deserializeAws_restJson1StartMulticastGroupSessionCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1PutResourceLogLevelCommandError(output, context); +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1StartMulticastGroupSessionCommandError(output, context); } - const contents: PutResourceLogLevelCommandOutput = { + const contents: StartMulticastGroupSessionCommandOutput = { $metadata: deserializeMetadata(output), }; await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1PutResourceLogLevelCommandError = async ( +const deserializeAws_restJson1StartMulticastGroupSessionCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6136,6 +9459,14 @@ const deserializeAws_restJson1PutResourceLogLevelCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -6185,24 +9516,24 @@ const deserializeAws_restJson1PutResourceLogLevelCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ResetAllResourceLogLevelsCommand = async ( +export const deserializeAws_restJson1TagResourceCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1ResetAllResourceLogLevelsCommandError(output, context); + return deserializeAws_restJson1TagResourceCommandError(output, context); } - const contents: ResetAllResourceLogLevelsCommandOutput = { + const contents: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1ResetAllResourceLogLevelsCommandError = async ( +const deserializeAws_restJson1TagResourceCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6211,10 +9542,10 @@ const deserializeAws_restJson1ResetAllResourceLogLevelsCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { - case "AccessDeniedException": - case "com.amazonaws.iotwireless#AccessDeniedException": + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": response = { - ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -6243,6 +9574,14 @@ const deserializeAws_restJson1ResetAllResourceLogLevelsCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "TooManyTagsException": + case "com.amazonaws.iotwireless#TooManyTagsException": + response = { + ...(await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ValidationException": case "com.amazonaws.iotwireless#ValidationException": response = { @@ -6268,24 +9607,28 @@ const deserializeAws_restJson1ResetAllResourceLogLevelsCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ResetResourceLogLevelCommand = async ( +export const deserializeAws_restJson1TestWirelessDeviceCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1ResetResourceLogLevelCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1TestWirelessDeviceCommandError(output, context); } - const contents: ResetResourceLogLevelCommandOutput = { + const contents: TestWirelessDeviceCommandOutput = { $metadata: deserializeMetadata(output), + Result: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Result !== undefined && data.Result !== null) { + contents.Result = __expectString(data.Result); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1ResetResourceLogLevelCommandError = async ( +const deserializeAws_restJson1TestWirelessDeviceCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6294,14 +9637,6 @@ const deserializeAws_restJson1ResetResourceLogLevelCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { - case "AccessDeniedException": - case "com.amazonaws.iotwireless#AccessDeniedException": - response = { - ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -6351,28 +9686,24 @@ const deserializeAws_restJson1ResetResourceLogLevelCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1SendDataToWirelessDeviceCommand = async ( +export const deserializeAws_restJson1UntagResourceCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 202 && output.statusCode >= 300) { - return deserializeAws_restJson1SendDataToWirelessDeviceCommandError(output, context); +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1UntagResourceCommandError(output, context); } - const contents: SendDataToWirelessDeviceCommandOutput = { + const contents: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), - MessageId: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MessageId !== undefined && data.MessageId !== null) { - contents.MessageId = __expectString(data.MessageId); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1SendDataToWirelessDeviceCommandError = async ( +const deserializeAws_restJson1UntagResourceCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6381,6 +9712,14 @@ const deserializeAws_restJson1SendDataToWirelessDeviceCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -6430,24 +9769,24 @@ const deserializeAws_restJson1SendDataToWirelessDeviceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1TagResourceCommand = async ( +export const deserializeAws_restJson1UpdateDestinationCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1TagResourceCommandError(output, context); + return deserializeAws_restJson1UpdateDestinationCommandError(output, context); } - const contents: TagResourceCommandOutput = { + const contents: UpdateDestinationCommandOutput = { $metadata: deserializeMetadata(output), }; await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1TagResourceCommandError = async ( +const deserializeAws_restJson1UpdateDestinationCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6456,10 +9795,10 @@ const deserializeAws_restJson1TagResourceCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -6488,14 +9827,6 @@ const deserializeAws_restJson1TagResourceCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "TooManyTagsException": - case "com.amazonaws.iotwireless#TooManyTagsException": - response = { - ...(await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ValidationException": case "com.amazonaws.iotwireless#ValidationException": response = { @@ -6521,28 +9852,24 @@ const deserializeAws_restJson1TagResourceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1TestWirelessDeviceCommand = async ( +export const deserializeAws_restJson1UpdateFuotaTaskCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1TestWirelessDeviceCommandError(output, context); +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateFuotaTaskCommandError(output, context); } - const contents: TestWirelessDeviceCommandOutput = { + const contents: UpdateFuotaTaskCommandOutput = { $metadata: deserializeMetadata(output), - Result: undefined, }; - const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Result !== undefined && data.Result !== null) { - contents.Result = __expectString(data.Result); - } + await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1TestWirelessDeviceCommandError = async ( +const deserializeAws_restJson1UpdateFuotaTaskCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6551,6 +9878,22 @@ const deserializeAws_restJson1TestWirelessDeviceCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -6600,24 +9943,24 @@ const deserializeAws_restJson1TestWirelessDeviceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1UntagResourceCommand = async ( +export const deserializeAws_restJson1UpdateLogLevelsByResourceTypesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1UntagResourceCommandError(output, context); +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateLogLevelsByResourceTypesCommandError(output, context); } - const contents: UntagResourceCommandOutput = { + const contents: UpdateLogLevelsByResourceTypesCommandOutput = { $metadata: deserializeMetadata(output), }; await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1UntagResourceCommandError = async ( +const deserializeAws_restJson1UpdateLogLevelsByResourceTypesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6626,6 +9969,14 @@ const deserializeAws_restJson1UntagResourceCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ConflictException": case "com.amazonaws.iotwireless#ConflictException": response = { @@ -6683,24 +10034,24 @@ const deserializeAws_restJson1UntagResourceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1UpdateDestinationCommand = async ( +export const deserializeAws_restJson1UpdateMulticastGroupCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1UpdateDestinationCommandError(output, context); + return deserializeAws_restJson1UpdateMulticastGroupCommandError(output, context); } - const contents: UpdateDestinationCommandOutput = { + const contents: UpdateMulticastGroupCommandOutput = { $metadata: deserializeMetadata(output), }; await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1UpdateDestinationCommandError = async ( +const deserializeAws_restJson1UpdateMulticastGroupCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6717,6 +10068,14 @@ const deserializeAws_restJson1UpdateDestinationCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -6766,24 +10125,24 @@ const deserializeAws_restJson1UpdateDestinationCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1UpdateLogLevelsByResourceTypesCommand = async ( +export const deserializeAws_restJson1UpdatePartnerAccountCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { - if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1UpdateLogLevelsByResourceTypesCommandError(output, context); +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdatePartnerAccountCommandError(output, context); } - const contents: UpdateLogLevelsByResourceTypesCommandOutput = { + const contents: UpdatePartnerAccountCommandOutput = { $metadata: deserializeMetadata(output), }; await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1UpdateLogLevelsByResourceTypesCommandError = async ( +const deserializeAws_restJson1UpdatePartnerAccountCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6792,22 +10151,6 @@ const deserializeAws_restJson1UpdateLogLevelsByResourceTypesCommandError = async let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { - case "AccessDeniedException": - case "com.amazonaws.iotwireless#AccessDeniedException": - response = { - ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; - case "ConflictException": - case "com.amazonaws.iotwireless#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -6857,24 +10200,24 @@ const deserializeAws_restJson1UpdateLogLevelsByResourceTypesCommandError = async return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1UpdatePartnerAccountCommand = async ( +export const deserializeAws_restJson1UpdateResourceEventConfigurationCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restJson1UpdatePartnerAccountCommandError(output, context); + return deserializeAws_restJson1UpdateResourceEventConfigurationCommandError(output, context); } - const contents: UpdatePartnerAccountCommandOutput = { + const contents: UpdateResourceEventConfigurationCommandOutput = { $metadata: deserializeMetadata(output), }; await collectBody(output.body, context); return Promise.resolve(contents); }; -const deserializeAws_restJson1UpdatePartnerAccountCommandError = async ( +const deserializeAws_restJson1UpdateResourceEventConfigurationCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6883,6 +10226,22 @@ const deserializeAws_restJson1UpdatePartnerAccountCommandError = async ( let errorCode = "UnknownError"; errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.iotwireless#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.iotwireless#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerException": case "com.amazonaws.iotwireless#InternalServerException": response = { @@ -7257,6 +10616,18 @@ const serializeAws_restJson1AbpV1_1 = (input: AbpV1_1, context: __SerdeContext): }; }; +const serializeAws_restJson1DeviceRegistrationStateEventConfiguration = ( + input: DeviceRegistrationStateEventConfiguration, + context: __SerdeContext +): any => { + return { + ...(input.Sidewalk !== undefined && + input.Sidewalk !== null && { + Sidewalk: serializeAws_restJson1SidewalkEventNotificationConfigurations(input.Sidewalk, context), + }), + }; +}; + const serializeAws_restJson1FactoryPresetFreqsList = (input: number[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -7268,6 +10639,14 @@ const serializeAws_restJson1FactoryPresetFreqsList = (input: number[], context: }); }; +const serializeAws_restJson1FPorts = (input: FPorts, context: __SerdeContext): any => { + return { + ...(input.ClockSync !== undefined && input.ClockSync !== null && { ClockSync: input.ClockSync }), + ...(input.Fuota !== undefined && input.Fuota !== null && { Fuota: input.Fuota }), + ...(input.Multicast !== undefined && input.Multicast !== null && { Multicast: input.Multicast }), + }; +}; + const serializeAws_restJson1JoinEuiFilters = (input: string[][], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -7299,6 +10678,8 @@ const serializeAws_restJson1LoRaWANDevice = (input: LoRaWANDevice, context: __Se ...(input.DevEui !== undefined && input.DevEui !== null && { DevEui: input.DevEui }), ...(input.DeviceProfileId !== undefined && input.DeviceProfileId !== null && { DeviceProfileId: input.DeviceProfileId }), + ...(input.FPorts !== undefined && + input.FPorts !== null && { FPorts: serializeAws_restJson1FPorts(input.FPorts, context) }), ...(input.OtaaV1_0_x !== undefined && input.OtaaV1_0_x !== null && { OtaaV1_0_x: serializeAws_restJson1OtaaV1_0_x(input.OtaaV1_0_x, context) }), ...(input.OtaaV1_1 !== undefined && @@ -7340,6 +10721,12 @@ const serializeAws_restJson1LoRaWANDeviceProfile = (input: LoRaWANDeviceProfile, }; }; +const serializeAws_restJson1LoRaWANFuotaTask = (input: LoRaWANFuotaTask, context: __SerdeContext): any => { + return { + ...(input.RfRegion !== undefined && input.RfRegion !== null && { RfRegion: input.RfRegion }), + }; +}; + const serializeAws_restJson1LoRaWANGateway = (input: LoRaWANGateway, context: __SerdeContext): any => { return { ...(input.GatewayEui !== undefined && input.GatewayEui !== null && { GatewayEui: input.GatewayEui }), @@ -7364,6 +10751,38 @@ const serializeAws_restJson1LoRaWANGatewayVersion = (input: LoRaWANGatewayVersio }; }; +const serializeAws_restJson1LoRaWANMulticast = (input: LoRaWANMulticast, context: __SerdeContext): any => { + return { + ...(input.DlClass !== undefined && input.DlClass !== null && { DlClass: input.DlClass }), + ...(input.RfRegion !== undefined && input.RfRegion !== null && { RfRegion: input.RfRegion }), + }; +}; + +const serializeAws_restJson1LoRaWANMulticastMetadata = ( + input: LoRaWANMulticastMetadata, + context: __SerdeContext +): any => { + return { + ...(input.FPort !== undefined && input.FPort !== null && { FPort: input.FPort }), + }; +}; + +const serializeAws_restJson1LoRaWANMulticastSession = ( + input: LoRaWANMulticastSession, + context: __SerdeContext +): any => { + return { + ...(input.DlDr !== undefined && input.DlDr !== null && { DlDr: input.DlDr }), + ...(input.DlFreq !== undefined && input.DlFreq !== null && { DlFreq: input.DlFreq }), + ...(input.SessionStartTime !== undefined && + input.SessionStartTime !== null && { + SessionStartTime: input.SessionStartTime.toISOString().split(".")[0] + "Z", + }), + ...(input.SessionTimeout !== undefined && + input.SessionTimeout !== null && { SessionTimeout: input.SessionTimeout }), + }; +}; + const serializeAws_restJson1LoRaWANSendDataToDevice = ( input: LoRaWANSendDataToDevice, context: __SerdeContext @@ -7379,6 +10798,13 @@ const serializeAws_restJson1LoRaWANServiceProfile = (input: LoRaWANServiceProfil }; }; +const serializeAws_restJson1LoRaWANStartFuotaTask = (input: LoRaWANStartFuotaTask, context: __SerdeContext): any => { + return { + ...(input.StartTime !== undefined && + input.StartTime !== null && { StartTime: input.StartTime.toISOString().split(".")[0] + "Z" }), + }; +}; + const serializeAws_restJson1LoRaWANUpdateDevice = (input: LoRaWANUpdateDevice, context: __SerdeContext): any => { return { ...(input.DeviceProfileId !== undefined && @@ -7407,6 +10833,16 @@ const serializeAws_restJson1LoRaWANUpdateGatewayTaskCreate = ( }; }; +const serializeAws_restJson1MulticastWirelessMetadata = ( + input: MulticastWirelessMetadata, + context: __SerdeContext +): any => { + return { + ...(input.LoRaWAN !== undefined && + input.LoRaWAN !== null && { LoRaWAN: serializeAws_restJson1LoRaWANMulticastMetadata(input.LoRaWAN, context) }), + }; +}; + const serializeAws_restJson1NetIdFilters = (input: string[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -7422,6 +10858,7 @@ const serializeAws_restJson1OtaaV1_0_x = (input: OtaaV1_0_x, context: __SerdeCon return { ...(input.AppEui !== undefined && input.AppEui !== null && { AppEui: input.AppEui }), ...(input.AppKey !== undefined && input.AppKey !== null && { AppKey: input.AppKey }), + ...(input.GenAppKey !== undefined && input.GenAppKey !== null && { GenAppKey: input.GenAppKey }), }; }; @@ -7433,6 +10870,18 @@ const serializeAws_restJson1OtaaV1_1 = (input: OtaaV1_1, context: __SerdeContext }; }; +const serializeAws_restJson1ProximityEventConfiguration = ( + input: ProximityEventConfiguration, + context: __SerdeContext +): any => { + return { + ...(input.Sidewalk !== undefined && + input.Sidewalk !== null && { + Sidewalk: serializeAws_restJson1SidewalkEventNotificationConfigurations(input.Sidewalk, context), + }), + }; +}; + const serializeAws_restJson1SessionKeysAbpV1_0_x = (input: SessionKeysAbpV1_0_x, context: __SerdeContext): any => { return { ...(input.AppSKey !== undefined && input.AppSKey !== null && { AppSKey: input.AppSKey }), @@ -7457,6 +10906,16 @@ const serializeAws_restJson1SidewalkAccountInfo = (input: SidewalkAccountInfo, c }; }; +const serializeAws_restJson1SidewalkEventNotificationConfigurations = ( + input: SidewalkEventNotificationConfigurations, + context: __SerdeContext +): any => { + return { + ...(input.AmazonIdEventTopic !== undefined && + input.AmazonIdEventTopic !== null && { AmazonIdEventTopic: input.AmazonIdEventTopic }), + }; +}; + const serializeAws_restJson1SidewalkSendDataToDevice = ( input: SidewalkSendDataToDevice, context: __SerdeContext @@ -7711,6 +11170,18 @@ const deserializeAws_restJson1DeviceProfileList = (output: any, context: __Serde }); }; +const deserializeAws_restJson1DeviceRegistrationStateEventConfiguration = ( + output: any, + context: __SerdeContext +): DeviceRegistrationStateEventConfiguration => { + return { + Sidewalk: + output.Sidewalk !== undefined && output.Sidewalk !== null + ? deserializeAws_restJson1SidewalkEventNotificationConfigurations(output.Sidewalk, context) + : undefined, + } as any; +}; + const deserializeAws_restJson1FactoryPresetFreqsList = (output: any, context: __SerdeContext): number[] => { return (output || []) .filter((e: any) => e != null) @@ -7722,6 +11193,33 @@ const deserializeAws_restJson1FactoryPresetFreqsList = (output: any, context: __ }); }; +const deserializeAws_restJson1FPorts = (output: any, context: __SerdeContext): FPorts => { + return { + ClockSync: __expectInt32(output.ClockSync), + Fuota: __expectInt32(output.Fuota), + Multicast: __expectInt32(output.Multicast), + } as any; +}; + +const deserializeAws_restJson1FuotaTask = (output: any, context: __SerdeContext): FuotaTask => { + return { + Arn: __expectString(output.Arn), + Id: __expectString(output.Id), + Name: __expectString(output.Name), + } as any; +}; + +const deserializeAws_restJson1FuotaTaskList = (output: any, context: __SerdeContext): FuotaTask[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1FuotaTask(entry, context); + }); +}; + const deserializeAws_restJson1JoinEuiFilters = (output: any, context: __SerdeContext): string[][] => { return (output || []) .filter((e: any) => e != null) @@ -7756,6 +11254,10 @@ const deserializeAws_restJson1LoRaWANDevice = (output: any, context: __SerdeCont : undefined, DevEui: __expectString(output.DevEui), DeviceProfileId: __expectString(output.DeviceProfileId), + FPorts: + output.FPorts !== undefined && output.FPorts !== null + ? deserializeAws_restJson1FPorts(output.FPorts, context) + : undefined, OtaaV1_0_x: output.OtaaV1_0_x !== undefined && output.OtaaV1_0_x !== null ? deserializeAws_restJson1OtaaV1_0_x(output.OtaaV1_0_x, context) @@ -7809,6 +11311,19 @@ const deserializeAws_restJson1LoRaWANDeviceProfile = (output: any, context: __Se } as any; }; +const deserializeAws_restJson1LoRaWANFuotaTaskGetInfo = ( + output: any, + context: __SerdeContext +): LoRaWANFuotaTaskGetInfo => { + return { + RfRegion: __expectString(output.RfRegion), + StartTime: + output.StartTime !== undefined && output.StartTime !== null + ? __expectNonNull(__parseRfc3339DateTime(output.StartTime)) + : undefined, + } as any; +}; + const deserializeAws_restJson1LoRaWANGateway = (output: any, context: __SerdeContext): LoRaWANGateway => { return { GatewayEui: __expectString(output.GatewayEui), @@ -7906,6 +11421,30 @@ const deserializeAws_restJson1LoRaWANListDevice = (output: any, context: __Serde } as any; }; +const deserializeAws_restJson1LoRaWANMulticastGet = (output: any, context: __SerdeContext): LoRaWANMulticastGet => { + return { + DlClass: __expectString(output.DlClass), + NumberOfDevicesInGroup: __expectInt32(output.NumberOfDevicesInGroup), + NumberOfDevicesRequested: __expectInt32(output.NumberOfDevicesRequested), + RfRegion: __expectString(output.RfRegion), + } as any; +}; + +const deserializeAws_restJson1LoRaWANMulticastSession = ( + output: any, + context: __SerdeContext +): LoRaWANMulticastSession => { + return { + DlDr: __expectInt32(output.DlDr), + DlFreq: __expectInt32(output.DlFreq), + SessionStartTime: + output.SessionStartTime !== undefined && output.SessionStartTime !== null + ? __expectNonNull(__parseRfc3339DateTime(output.SessionStartTime)) + : undefined, + SessionTimeout: __expectInt32(output.SessionTimeout), + } as any; +}; + const deserializeAws_restJson1LoRaWANUpdateGatewayTaskCreate = ( output: any, context: __SerdeContext @@ -7940,6 +11479,48 @@ const deserializeAws_restJson1LoRaWANUpdateGatewayTaskEntry = ( } as any; }; +const deserializeAws_restJson1MulticastGroup = (output: any, context: __SerdeContext): MulticastGroup => { + return { + Arn: __expectString(output.Arn), + Id: __expectString(output.Id), + Name: __expectString(output.Name), + } as any; +}; + +const deserializeAws_restJson1MulticastGroupByFuotaTask = ( + output: any, + context: __SerdeContext +): MulticastGroupByFuotaTask => { + return { + Id: __expectString(output.Id), + } as any; +}; + +const deserializeAws_restJson1MulticastGroupList = (output: any, context: __SerdeContext): MulticastGroup[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1MulticastGroup(entry, context); + }); +}; + +const deserializeAws_restJson1MulticastGroupListByFuotaTask = ( + output: any, + context: __SerdeContext +): MulticastGroupByFuotaTask[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1MulticastGroupByFuotaTask(entry, context); + }); +}; + const deserializeAws_restJson1NetIdFilters = (output: any, context: __SerdeContext): string[] => { return (output || []) .filter((e: any) => e != null) @@ -7955,6 +11536,7 @@ const deserializeAws_restJson1OtaaV1_0_x = (output: any, context: __SerdeContext return { AppEui: __expectString(output.AppEui), AppKey: __expectString(output.AppKey), + GenAppKey: __expectString(output.GenAppKey), } as any; }; @@ -7966,6 +11548,18 @@ const deserializeAws_restJson1OtaaV1_1 = (output: any, context: __SerdeContext): } as any; }; +const deserializeAws_restJson1ProximityEventConfiguration = ( + output: any, + context: __SerdeContext +): ProximityEventConfiguration => { + return { + Sidewalk: + output.Sidewalk !== undefined && output.Sidewalk !== null + ? deserializeAws_restJson1SidewalkEventNotificationConfigurations(output.Sidewalk, context) + : undefined, + } as any; +}; + const deserializeAws_restJson1ServiceProfile = (output: any, context: __SerdeContext): ServiceProfile => { return { Arn: __expectString(output.Arn), @@ -8057,6 +11651,15 @@ const deserializeAws_restJson1SidewalkDeviceMetadata = ( } as any; }; +const deserializeAws_restJson1SidewalkEventNotificationConfigurations = ( + output: any, + context: __SerdeContext +): SidewalkEventNotificationConfigurations => { + return { + AmazonIdEventTopic: __expectString(output.AmazonIdEventTopic), + } as any; +}; + const deserializeAws_restJson1SidewalkListDevice = (output: any, context: __SerdeContext): SidewalkListDevice => { return { AmazonId: __expectString(output.AmazonId), @@ -8185,12 +11788,15 @@ const deserializeAws_restJson1WirelessDeviceStatistics = ( return { Arn: __expectString(output.Arn), DestinationName: __expectString(output.DestinationName), + FuotaDeviceStatus: __expectString(output.FuotaDeviceStatus), Id: __expectString(output.Id), LastUplinkReceivedAt: __expectString(output.LastUplinkReceivedAt), LoRaWAN: output.LoRaWAN !== undefined && output.LoRaWAN !== null ? deserializeAws_restJson1LoRaWANListDevice(output.LoRaWAN, context) : undefined, + McGroupId: __expectInt32(output.McGroupId), + MulticastDeviceStatus: __expectString(output.MulticastDeviceStatus), Name: __expectString(output.Name), Sidewalk: output.Sidewalk !== undefined && output.Sidewalk !== null diff --git a/clients/client-lightsail/src/Lightsail.ts b/clients/client-lightsail/src/Lightsail.ts index 1cc2d9dc423c..1e2f6f750655 100644 --- a/clients/client-lightsail/src/Lightsail.ts +++ b/clients/client-lightsail/src/Lightsail.ts @@ -2365,6 +2365,8 @@ export class Lightsail extends LightsailClient { /** *

    Deletes a specific SSH key pair.

    + * + * *

    The delete key pair operation supports tag-based access control via resource * tags applied to the resource identified by key pair name. For more information, * see the Amazon Lightsail Developer Guide.

    diff --git a/clients/client-lightsail/src/commands/DeleteKeyPairCommand.ts b/clients/client-lightsail/src/commands/DeleteKeyPairCommand.ts index bea0aa62c3ce..3c2ced70273f 100644 --- a/clients/client-lightsail/src/commands/DeleteKeyPairCommand.ts +++ b/clients/client-lightsail/src/commands/DeleteKeyPairCommand.ts @@ -23,6 +23,8 @@ export interface DeleteKeyPairCommandOutput extends DeleteKeyPairResult, __Metad /** *

    Deletes a specific SSH key pair.

    + * + * *

    The delete key pair operation supports tag-based access control via resource * tags applied to the resource identified by key pair name. For more information, * see the Amazon Lightsail Developer Guide.

    diff --git a/clients/client-lightsail/src/models/models_0.ts b/clients/client-lightsail/src/models/models_0.ts index d05a9345fd57..c820a70104fc 100644 --- a/clients/client-lightsail/src/models/models_0.ts +++ b/clients/client-lightsail/src/models/models_0.ts @@ -1507,6 +1507,52 @@ export namespace Blueprint { }); } +/** + *

    Describes the access log configuration for a bucket in the Amazon Lightsail object storage + * service.

    + *

    For more information about bucket access logs, see Logging bucket requests using access logging in Amazon Lightsail in the + * Amazon Lightsail Developer Guide.

    + */ +export interface BucketAccessLogConfig { + /** + *

    A Boolean value that indicates whether bucket access logging is enabled for the + * bucket.

    + */ + enabled: boolean | undefined; + + /** + *

    The name of the bucket where the access is saved. The destination can be a Lightsail + * bucket in the same account, and in the same AWS Region as the source bucket.

    + * + *

    This parameter is required when enabling the access log for a bucket, and should be + * omitted when disabling the access log.

    + *
    + */ + destination?: string; + + /** + *

    The optional object prefix for the bucket access log.

    + *

    The prefix is an optional addition to the object key that organizes your access log files + * in the destination bucket. For example, if you specify a logs/ prefix, then each + * log object will begin with the logs/ prefix in its key (for example, + * logs/2021-11-01-21-32-16-E568B2907131C0C0).

    + * + *

    This parameter can be optionally specified when enabling the access log for a bucket, + * and should be omitted when disabling the access log.

    + *
    + */ + prefix?: string; +} + +export namespace BucketAccessLogConfig { + /** + * @internal + */ + export const filterSensitiveLog = (obj: BucketAccessLogConfig): any => ({ + ...obj, + }); +} + /** *

    Describes the state of an Amazon Lightsail bucket.

    */ @@ -1689,6 +1735,11 @@ export interface Bucket { *

    An object that describes the state of the bucket.

    */ state?: BucketState; + + /** + *

    An object that describes the access log configuration for the bucket.

    + */ + accessLogConfig?: BucketAccessLogConfig; } export namespace Bucket { @@ -3020,10 +3071,17 @@ export interface Container { *

    The name of the image used for the container.

    * *

    Container images sourced from your Lightsail container service, that are registered and - * stored on your service, start with a colon (:). For example, - * :container-service-1.mystaticwebsite.1. Container images sourced from a public - * registry like Docker Hub don't start with a colon. For example, nginx:latest or - * nginx.

    + * stored on your service, start with a colon (:). For example, if your container + * service name is container-service-1, the container image label is + * mystaticsite, and you want to use the third (3) version of the + * registered container image, then you should specify + * :container-service-1.mystaticsite.3. To use the latest version of a container + * image, specify latest instead of a version number (for example, + * :container-service-1.mystaticsite.latest). Lightsail will automatically use + * the highest numbered version of the registered container image.

    + * + *

    Container images sourced from a public registry like Docker Hub don't start with a colon. + * For example, nginx:latest or nginx.

    */ image?: string; @@ -4261,7 +4319,7 @@ export interface CreateContainerServiceRequest { scale: number | undefined; /** - *

    The tag keys and optional values to add to the certificate during create.

    + *

    The tag keys and optional values to add to the container service during create.

    *

    Use the TagResource action to tag a resource after it's created.

    *

    For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.

    */ @@ -9646,27 +9704,3 @@ export namespace InstancePortInfo { ...obj, }); } - -/** - *

    Describes monthly data transfer rates and port information for an instance.

    - */ -export interface InstanceNetworking { - /** - *

    The amount of data in GB allocated for monthly data transfers.

    - */ - monthlyTransfer?: MonthlyTransfer; - - /** - *

    An array of key-value pairs containing information about the ports on the instance.

    - */ - ports?: InstancePortInfo[]; -} - -export namespace InstanceNetworking { - /** - * @internal - */ - export const filterSensitiveLog = (obj: InstanceNetworking): any => ({ - ...obj, - }); -} diff --git a/clients/client-lightsail/src/models/models_1.ts b/clients/client-lightsail/src/models/models_1.ts index c54507358f11..84c4b4639bf1 100644 --- a/clients/client-lightsail/src/models/models_1.ts +++ b/clients/client-lightsail/src/models/models_1.ts @@ -6,6 +6,7 @@ import { AlarmState, AvailabilityZone, Bucket, + BucketAccessLogConfig, CacheBehavior, CacheBehaviorPerPath, CacheSettings, @@ -19,13 +20,14 @@ import { DomainEntry, InputOrigin, InstanceHardware, - InstanceNetworking, + InstancePortInfo, IpAddressType, KeyPair, MetricDatapoint, MetricName, MetricStatistic, MetricUnit, + MonthlyTransfer, NetworkProtocol, Operation, PortInfo, @@ -36,6 +38,30 @@ import { TreatMissingData, } from "./models_0"; +/** + *

    Describes monthly data transfer rates and port information for an instance.

    + */ +export interface InstanceNetworking { + /** + *

    The amount of data in GB allocated for monthly data transfers.

    + */ + monthlyTransfer?: MonthlyTransfer; + + /** + *

    An array of key-value pairs containing information about the ports on the instance.

    + */ + ports?: InstancePortInfo[]; +} + +export namespace InstanceNetworking { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InstanceNetworking): any => ({ + ...obj, + }); +} + /** *

    Describes the virtual private server (or instance) status.

    */ @@ -5202,6 +5228,11 @@ export interface UpdateBucketRequest { *

    You can give a maximum of 10 AWS accounts access to a bucket.

    */ readonlyAccessAccounts?: string[]; + + /** + *

    An object that describes the access log configuration for the bucket.

    + */ + accessLogConfig?: BucketAccessLogConfig; } export namespace UpdateBucketRequest { diff --git a/clients/client-lightsail/src/protocols/Aws_json1_1.ts b/clients/client-lightsail/src/protocols/Aws_json1_1.ts index 52fada2ac867..4c35dc4fca40 100644 --- a/clients/client-lightsail/src/protocols/Aws_json1_1.ts +++ b/clients/client-lightsail/src/protocols/Aws_json1_1.ts @@ -426,6 +426,7 @@ import { AvailabilityZone, Blueprint, Bucket, + BucketAccessLogConfig, BucketBundle, BucketState, Bundle, @@ -639,7 +640,6 @@ import { InputOrigin, InstanceEntry, InstanceHardware, - InstanceNetworking, InstancePlatform, InstancePortInfo, InstanceSnapshotInfo, @@ -734,6 +734,7 @@ import { Instance, InstanceAccessDetails, InstanceHealthSummary, + InstanceNetworking, InstancePortState, InstanceSnapshot, InstanceState, @@ -17966,6 +17967,14 @@ const serializeAws_json1_1AutoSnapshotAddOnRequest = ( }; }; +const serializeAws_json1_1BucketAccessLogConfig = (input: BucketAccessLogConfig, context: __SerdeContext): any => { + return { + ...(input.destination !== undefined && input.destination !== null && { destination: input.destination }), + ...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }), + ...(input.prefix !== undefined && input.prefix !== null && { prefix: input.prefix }), + }; +}; + const serializeAws_json1_1CacheBehavior = (input: CacheBehavior, context: __SerdeContext): any => { return { ...(input.behavior !== undefined && input.behavior !== null && { behavior: input.behavior }), @@ -19914,6 +19923,10 @@ const serializeAws_json1_1UpdateBucketBundleRequest = ( const serializeAws_json1_1UpdateBucketRequest = (input: UpdateBucketRequest, context: __SerdeContext): any => { return { + ...(input.accessLogConfig !== undefined && + input.accessLogConfig !== null && { + accessLogConfig: serializeAws_json1_1BucketAccessLogConfig(input.accessLogConfig, context), + }), ...(input.accessRules !== undefined && input.accessRules !== null && { accessRules: serializeAws_json1_1AccessRules(input.accessRules, context) }), ...(input.bucketName !== undefined && input.bucketName !== null && { bucketName: input.bucketName }), @@ -20347,6 +20360,10 @@ const deserializeAws_json1_1BlueprintList = (output: any, context: __SerdeContex const deserializeAws_json1_1Bucket = (output: any, context: __SerdeContext): Bucket => { return { ableToUpdateBundle: __expectBoolean(output.ableToUpdateBundle), + accessLogConfig: + output.accessLogConfig !== undefined && output.accessLogConfig !== null + ? deserializeAws_json1_1BucketAccessLogConfig(output.accessLogConfig, context) + : undefined, accessRules: output.accessRules !== undefined && output.accessRules !== null ? deserializeAws_json1_1AccessRules(output.accessRules, context) @@ -20385,6 +20402,14 @@ const deserializeAws_json1_1Bucket = (output: any, context: __SerdeContext): Buc } as any; }; +const deserializeAws_json1_1BucketAccessLogConfig = (output: any, context: __SerdeContext): BucketAccessLogConfig => { + return { + destination: __expectString(output.destination), + enabled: __expectBoolean(output.enabled), + prefix: __expectString(output.prefix), + } as any; +}; + const deserializeAws_json1_1BucketBundle = (output: any, context: __SerdeContext): BucketBundle => { return { bundleId: __expectString(output.bundleId), diff --git a/clients/client-macie2/src/Macie2.ts b/clients/client-macie2/src/Macie2.ts index c33e08e267d9..895f5f4c5b53 100644 --- a/clients/client-macie2/src/Macie2.ts +++ b/clients/client-macie2/src/Macie2.ts @@ -1990,7 +1990,7 @@ export class Macie2 extends Macie2Client { } /** - *

    Enables an Amazon Macie administrator to suspend or re-enable a member account.

    + *

    Enables an Amazon Macie administrator to suspend or re-enable Macie for a member account.

    */ public updateMemberSession( args: UpdateMemberSessionCommandInput, diff --git a/clients/client-macie2/src/commands/UpdateMemberSessionCommand.ts b/clients/client-macie2/src/commands/UpdateMemberSessionCommand.ts index e270497597d7..7eb014495ffe 100644 --- a/clients/client-macie2/src/commands/UpdateMemberSessionCommand.ts +++ b/clients/client-macie2/src/commands/UpdateMemberSessionCommand.ts @@ -22,7 +22,7 @@ export interface UpdateMemberSessionCommandInput extends UpdateMemberSessionRequ export interface UpdateMemberSessionCommandOutput extends UpdateMemberSessionResponse, __MetadataBearer {} /** - *

    Enables an Amazon Macie administrator to suspend or re-enable a member account.

    + *

    Enables an Amazon Macie administrator to suspend or re-enable Macie for a member account.

    * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-macie2/src/models/models_0.ts b/clients/client-macie2/src/models/models_0.ts index c65b40d51ffd..486cb249266e 100644 --- a/clients/client-macie2/src/models/models_0.ts +++ b/clients/client-macie2/src/models/models_0.ts @@ -472,7 +472,7 @@ export namespace ObjectLevelStatistics { } /** - *

    Provides statistical data and other information about an S3 bucket that Amazon Macie monitors and analyzes for your account. If an error occurs when Macie attempts to retrieve and process information about the bucket or the bucket's objects, the value for most of these properties is null. Exceptions are accountId, bucketArn, bucketCreatedAt, bucketName, lastUpdated, and region. To identify the cause of the error, refer to the errorCode and errorMessage values.

    + *

    Provides statistical data and other information about an S3 bucket that Amazon Macie monitors and analyzes for your account. If an error occurs when Macie attempts to retrieve and process information about the bucket or the bucket's objects, the value for the versioning property is false and the value for most other properties is null. Exceptions are accountId, bucketArn, bucketCreatedAt, bucketName, lastUpdated, and region. To identify the cause of the error, refer to the errorCode and errorMessage values.

    */ export interface BucketMetadata { /** @@ -1022,7 +1022,7 @@ export namespace DefaultDetection { */ export interface SensitiveDataItem { /** - *

    The category of sensitive data that was detected. For example: CREDENTIALS, for credentials data such as private keys or Amazon Web Services secret keys; FINANCIAL_INFORMATION, for financial data such as credit card numbers; or, PERSONAL_INFORMATION, for personal health information, such as health insurance identification numbers, or personally identifiable information, such as passport numbers.

    + *

    The category of sensitive data that was detected. For example: CREDENTIALS, for credentials data such as private keys or Amazon Web Services secret access keys; FINANCIAL_INFORMATION, for financial data such as credit card numbers; or, PERSONAL_INFORMATION, for personal health information, such as health insurance identification numbers, or personally identifiable information, such as passport numbers.

    */ category?: SensitiveDataItemCategory | string; @@ -1051,12 +1051,12 @@ export namespace SensitiveDataItem { */ export interface ClassificationResultStatus { /** - *

    The status of the finding. Possible values are:

    • COMPLETE - Amazon Macie successfully completed its analysis of the S3 object that the finding applies to.

    • PARTIAL - Macie analyzed only a subset of the data in the S3 object that the finding applies to. For example, the object is an archive file that contains files in an unsupported format.

    • SKIPPED - Macie wasn't able to analyze the S3 object that the finding applies to. For example, the object is a file in an unsupported format.

    + *

    The status of the finding. Possible values are:

    • COMPLETE - Amazon Macie successfully completed its analysis of the S3 object that the finding applies to.

    • PARTIAL - Macie analyzed only a subset of the data in the S3 object that the finding applies to. For example, the object is an archive file that contains files in an unsupported format.

    • SKIPPED - Macie wasn't able to analyze the S3 object that the finding applies to. For example, the object is a file that uses an unsupported format.

    */ code?: string; /** - *

    A brief description of the status of the finding. Amazon Macie uses this value to notify you of any errors, warnings, or considerations that might impact your analysis of the finding.

    + *

    A brief description of the status of the finding. This value is null if the status (code) of the finding is COMPLETE.

    Amazon Macie uses this value to notify you of any errors, warnings, or considerations that might impact your analysis of the finding and the affected S3 object. Possible values are:

    • ARCHIVE_CONTAINS_UNPROCESSED_FILES - The object is an archive file and Macie extracted and analyzed only some or none of the files in the archive. To determine which files Macie analyzed, if any, you can refer to the corresponding sensitive data discovery result for the finding (ClassificationDetails.detailedResultsLocation).

    • ARCHIVE_EXCEEDS_SIZE_LIMIT - The object is an archive file whose total storage size exceeds the size quota for this type of archive.

    • ARCHIVE_NESTING_LEVEL_OVER_LIMIT - The object is an archive file whose nested depth exceeds the quota for the maximum number of nested levels that Macie analyzes for this type of archive.

    • ARCHIVE_TOTAL_BYTES_EXTRACTED_OVER_LIMIT - The object is an archive file that exceeds the quota for the maximum amount of data that Macie extracts and analyzes for this type of archive.

    • ARCHIVE_TOTAL_DOCUMENTS_PROCESSED_OVER_LIMIT - The object is an archive file that contains more than the maximum number of files that Macie extracts and analyzes for this type of archive.

    • FILE_EXCEEDS_SIZE_LIMIT - The storage size of the object exceeds the size quota for this type of file.

    • INVALID_ENCRYPTION - The object is encrypted using server-side encryption but Macie isn’t allowed to use the key. Macie can’t decrypt and analyze the object.

    • INVALID_KMS_KEY - The object is encrypted with an KMS key that was disabled or is being deleted. Macie can’t decrypt and analyze the object.

    • INVALID_OBJECT_STATE - The object doesn’t use a supported Amazon S3 storage class. For more information, see Discovering sensitive data in the Amazon Macie User Guide.

    • JSON_NESTING_LEVEL_OVER_LIMIT - The object contains JSON data and the nested depth of the data exceeds the quota for the number of nested levels that Macie analyzes for this type of file.

    • MALFORMED_FILE - The object is a malformed or corrupted file. An error occurred when Macie attempted to detect the file’s type or extract data from the file.

    • OBJECT_VERSION_MISMATCH - The object was changed while Macie was analyzing it.

    • NO_SUCH_BUCKET_AVAILABLE - The object was in a bucket that was deleted shortly before or when Macie attempted to analyze the object.

    • MALFORMED_OR_FILE_SIZE_EXCEEDS_LIMIT - The object is a Microsoft Office file that is malformed or exceeds the size quota for this type of file. If the file is malformed, an error occurred when Macie attempted to extract data from the file.

    • OOXML_UNCOMPRESSED_SIZE_EXCEEDS_LIMIT - The object is an Office Open XML file that exceeds the size quota for this type of file.

    • OOXML_UNCOMPRESSED_RATIO_EXCEEDS_LIMIT - The object is an Office Open XML file whose compression ratio exceeds the compression quota for this type of file.

    • PERMISSION_DENIED - Macie isn’t allowed to access the object. The object’s permissions settings prevent Macie from analyzing the object.

    • SOURCE_OBJECT_NO_LONGER_AVAILABLE - The object was deleted shortly before or when Macie attempted to analyze it.

    • UNABLE_TO_PARSE_FILE - The object is a file that contains structured data and an error occurred when Macie attempted to parse the data.

    • UNSUPPORTED_FILE_TYPE_EXCEPTION - The object is a file that uses an unsupported file or storage format. For more information, see Supported file and storage formats in the Amazon Macie User Guide.

    For information about sensitive data discovery quotas for files, see Amazon Macie quotas in the Amazon Macie User Guide.

    */ reason?: string; } @@ -2586,7 +2586,7 @@ export namespace ListJobsFilterTerm { */ export interface ManagedDataIdentifierSummary { /** - *

    The category of sensitive data that the managed data identifier detects: CREDENTIALS, for credentials data such as private keys or Amazon Web Services secret keys; FINANCIAL_INFORMATION, for financial data such as credit card numbers; or, PERSONAL_INFORMATION, for personal health information, such as health insurance identification numbers, or personally identifiable information, such as passport numbers.

    + *

    The category of sensitive data that the managed data identifier detects: CREDENTIALS, for credentials data such as private keys or Amazon Web Services secret access keys; FINANCIAL_INFORMATION, for financial data such as credit card numbers; or, PERSONAL_INFORMATION, for personal health information, such as health insurance identification numbers, or personally identifiable information, such as passport numbers.

    */ category?: SensitiveDataItemCategory | string; @@ -3853,6 +3853,36 @@ export namespace CreateClassificationJobResponse { }); } +export enum DataIdentifierSeverity { + HIGH = "HIGH", + LOW = "LOW", + MEDIUM = "MEDIUM", +} + +/** + *

    Specifies a severity level for findings that a custom data identifier produces. A severity level determines which severity is assigned to the findings, based on the number of occurrences of text that matches the custom data identifier's detection criteria.

    + */ +export interface SeverityLevel { + /** + *

    The minimum number of occurrences of text that must match the custom data identifier's detection criteria in order to produce a finding with the specified severity (severity).

    + */ + occurrencesThreshold: number | undefined; + + /** + *

    The severity to assign to a finding if the number of occurrences is greater than or equal to the specified threshold (occurrencesThreshold) and, if applicable, is less than the threshold for the next consecutive severity level for the custom data identifier.

    + */ + severity: DataIdentifierSeverity | string | undefined; +} + +export namespace SeverityLevel { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SeverityLevel): any => ({ + ...obj, + }); +} + export interface CreateCustomDataIdentifierRequest { /** *

    A unique, case-sensitive token that you provide to ensure the idempotency of the request.

    @@ -3865,17 +3895,17 @@ export interface CreateCustomDataIdentifierRequest { description?: string; /** - *

    An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression is the same as any string in this array, Amazon Macie ignores it. The array can contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case sensitive.

    + *

    An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression contains any string in this array, Amazon Macie ignores it. The array can contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case sensitive.

    */ ignoreWords?: string[]; /** - *

    An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive.

    + *

    An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive.

    */ keywords?: string[]; /** - *

    The maximum number of characters that can exist between text that matches the regex pattern and the character sequences specified by the keywords array. Amazon Macie includes or excludes a result based on the proximity of a keyword to text that matches the regex pattern. The distance can be 1-300 characters. The default value is 50.

    + *

    The maximum number of characters that can exist between text that matches the regular expression and the character sequences specified by the keywords array. Amazon Macie includes or excludes a result based on the proximity of a keyword to text that matches the regular expression. The distance can be 1-300 characters. The default value is 50.

    */ maximumMatchDistance?: number; @@ -3889,6 +3919,11 @@ export interface CreateCustomDataIdentifierRequest { */ regex?: string; + /** + *

    The severity to assign to findings that the custom data identifier produces, based on the number of occurrences of text that matches the custom data identifier's detection criteria. You can specify as many as three SeverityLevel objects in this array, one for each severity: LOW, MEDIUM, or HIGH. If you specify more than one, the occurrences thresholds must be in ascending order by severity, moving from LOW to HIGH. For example, 1 for LOW, 50 for MEDIUM, and 100 for HIGH. If an S3 object contains fewer occurrences than the lowest specified threshold, Amazon Macie doesn't create a finding.

    If you don't specify any values for this array, Macie creates findings for S3 objects that contain at least one occurrence of text that matches the detection criteria, and Macie assigns the MEDIUM severity to those findings.

    + */ + severityLevels?: SeverityLevel[]; + /** *

    A map of key-value pairs that specifies the tags to associate with the custom data identifier.

    A custom data identifier can have a maximum of 50 tags. Each tag consists of a tag key and an associated tag value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.

    */ @@ -4136,7 +4171,7 @@ export namespace CreateMemberResponse { export interface CreateSampleFindingsRequest { /** - *

    An array that lists one or more types of findings to include in the set of sample findings. Currently, the only supported value is Policy:IAMUser/S3BucketEncryptionDisabled.

    + *

    An array of finding types, one for each type of sample finding to create. To create a sample of every type of finding that Amazon Macie supports, don't include this array in your request.

    */ findingTypes?: (FindingType | string)[]; } @@ -4959,17 +4994,17 @@ export interface GetCustomDataIdentifierResponse { id?: string; /** - *

    An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression is the same as any string in this array, Amazon Macie ignores it. Ignore words are case sensitive.

    + *

    An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression contains any string in this array, Amazon Macie ignores it. Ignore words are case sensitive.

    */ ignoreWords?: string[]; /** - *

    An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) of the regular expression to match. Keywords aren't case sensitive.

    + *

    An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) of the regular expression to match. Keywords aren't case sensitive.

    */ keywords?: string[]; /** - *

    The maximum number of characters that can exist between text that matches the regex pattern and the character sequences specified by the keywords array. Amazon Macie includes or excludes a result based on the proximity of a keyword to text that matches the regex pattern.

    + *

    The maximum number of characters that can exist between text that matches the regular expression and the character sequences specified by the keywords array. Amazon Macie includes or excludes a result based on the proximity of a keyword to text that matches the regular expression.

    */ maximumMatchDistance?: number; @@ -4983,6 +5018,11 @@ export interface GetCustomDataIdentifierResponse { */ regex?: string; + /** + *

    Specifies the severity that's assigned to findings that the custom data identifier produces, based on the number of occurrences of text that matches the custom data identifier's detection criteria. By default, Amazon Macie creates findings for S3 objects that contain at least one occurrence of text that matches the detection criteria, and Macie assigns the MEDIUM severity to those findings.

    + */ + severityLevels?: SeverityLevel[]; + /** *

    A map of key-value pairs that identifies the tags (keys and values) that are associated with the custom data identifier.

    */ @@ -6206,17 +6246,17 @@ export namespace TagResourceResponse { export interface TestCustomDataIdentifierRequest { /** - *

    An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression is the same as any string in this array, Amazon Macie ignores it. The array can contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case sensitive.

    + *

    An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression contains any string in this array, Amazon Macie ignores it. The array can contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case sensitive.

    */ ignoreWords?: string[]; /** - *

    An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive.

    + *

    An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive.

    */ keywords?: string[]; /** - *

    The maximum number of characters that can exist between text that matches the regex pattern and the character sequences specified by the keywords array. Amazon Macie includes or excludes a result based on the proximity of a keyword to text that matches the regex pattern. The distance can be 1-300 characters. The default value is 50.

    + *

    The maximum number of characters that can exist between text that matches the regular expression and the character sequences specified by the keywords array. Amazon Macie includes or excludes a result based on the proximity of a keyword to text that matches the regular expression. The distance can be 1-300 characters. The default value is 50.

    */ maximumMatchDistance?: number; @@ -6242,7 +6282,7 @@ export namespace TestCustomDataIdentifierRequest { export interface TestCustomDataIdentifierResponse { /** - *

    The number of instances of sample text that matched the detection criteria specified in the custom data identifier.

    + *

    The number of occurrences of sample text that matched the criteria specified by the custom data identifier.

    */ matchCount?: number; } diff --git a/clients/client-macie2/src/protocols/Aws_restJson1.ts b/clients/client-macie2/src/protocols/Aws_restJson1.ts index 344be14e35b5..c3f19afbdd34 100644 --- a/clients/client-macie2/src/protocols/Aws_restJson1.ts +++ b/clients/client-macie2/src/protocols/Aws_restJson1.ts @@ -280,6 +280,7 @@ import { SessionContextAttributes, SessionIssuer, Severity, + SeverityLevel, SimpleCriterionForJob, SimpleScopeTerm, SortCriteria, @@ -430,6 +431,10 @@ export const serializeAws_restJson1CreateCustomDataIdentifierCommand = async ( input.maximumMatchDistance !== null && { maximumMatchDistance: input.maximumMatchDistance }), ...(input.name !== undefined && input.name !== null && { name: input.name }), ...(input.regex !== undefined && input.regex !== null && { regex: input.regex }), + ...(input.severityLevels !== undefined && + input.severityLevels !== null && { + severityLevels: serializeAws_restJson1SeverityLevelList(input.severityLevels, context), + }), ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }), }); return new __HttpRequest({ @@ -4724,6 +4729,7 @@ export const deserializeAws_restJson1GetCustomDataIdentifierCommand = async ( maximumMatchDistance: undefined, name: undefined, regex: undefined, + severityLevels: undefined, tags: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); @@ -4757,6 +4763,9 @@ export const deserializeAws_restJson1GetCustomDataIdentifierCommand = async ( if (data.regex !== undefined && data.regex !== null) { contents.regex = __expectString(data.regex); } + if (data.severityLevels !== undefined && data.severityLevels !== null) { + contents.severityLevels = deserializeAws_restJson1SeverityLevelList(data.severityLevels, context); + } if (data.tags !== undefined && data.tags !== null) { contents.tags = deserializeAws_restJson1TagMap(data.tags, context); } @@ -8435,6 +8444,25 @@ const serializeAws_restJson1SecurityHubConfiguration = ( }; }; +const serializeAws_restJson1SeverityLevel = (input: SeverityLevel, context: __SerdeContext): any => { + return { + ...(input.occurrencesThreshold !== undefined && + input.occurrencesThreshold !== null && { occurrencesThreshold: input.occurrencesThreshold }), + ...(input.severity !== undefined && input.severity !== null && { severity: input.severity }), + }; +}; + +const serializeAws_restJson1SeverityLevelList = (input: SeverityLevel[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return serializeAws_restJson1SeverityLevel(entry, context); + }); +}; + const serializeAws_restJson1SimpleCriterionForJob = (input: SimpleCriterionForJob, context: __SerdeContext): any => { return { ...(input.comparator !== undefined && input.comparator !== null && { comparator: input.comparator }), @@ -10013,6 +10041,24 @@ const deserializeAws_restJson1Severity = (output: any, context: __SerdeContext): } as any; }; +const deserializeAws_restJson1SeverityLevel = (output: any, context: __SerdeContext): SeverityLevel => { + return { + occurrencesThreshold: __expectLong(output.occurrencesThreshold), + severity: __expectString(output.severity), + } as any; +}; + +const deserializeAws_restJson1SeverityLevelList = (output: any, context: __SerdeContext): SeverityLevel[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1SeverityLevel(entry, context); + }); +}; + const deserializeAws_restJson1SimpleCriterionForJob = (output: any, context: __SerdeContext): SimpleCriterionForJob => { return { comparator: __expectString(output.comparator), diff --git a/clients/client-neptune/src/Neptune.ts b/clients/client-neptune/src/Neptune.ts index f96ed13f8ade..869dec5b7ed3 100644 --- a/clients/client-neptune/src/Neptune.ts +++ b/clients/client-neptune/src/Neptune.ts @@ -339,7 +339,7 @@ import { NeptuneClient } from "./NeptuneClient"; */ export class Neptune extends NeptuneClient { /** - *

    Associates an Identity and Access Management (IAM) role from an + *

    Associates an Identity and Access Management (IAM) role with an * Neptune DB cluster.

    */ public addRoleToDBCluster( @@ -2540,7 +2540,7 @@ export class Neptune extends NeptuneClient { } /** - *

    Starts an Amazon Neptune DB cluster that was stopped using the AWS + *

    Starts an Amazon Neptune DB cluster that was stopped using the Amazon * console, the Amazon CLI stop-db-cluster command, or the StopDBCluster API.

    */ public startDBCluster( diff --git a/clients/client-neptune/src/commands/AddRoleToDBClusterCommand.ts b/clients/client-neptune/src/commands/AddRoleToDBClusterCommand.ts index 36c29ef30c1a..d7b5cae660eb 100644 --- a/clients/client-neptune/src/commands/AddRoleToDBClusterCommand.ts +++ b/clients/client-neptune/src/commands/AddRoleToDBClusterCommand.ts @@ -22,7 +22,7 @@ export interface AddRoleToDBClusterCommandInput extends AddRoleToDBClusterMessag export interface AddRoleToDBClusterCommandOutput extends __MetadataBearer {} /** - *

    Associates an Identity and Access Management (IAM) role from an + *

    Associates an Identity and Access Management (IAM) role with an * Neptune DB cluster.

    * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-neptune/src/commands/StartDBClusterCommand.ts b/clients/client-neptune/src/commands/StartDBClusterCommand.ts index 0cd4d1fdd489..29f177ed049f 100644 --- a/clients/client-neptune/src/commands/StartDBClusterCommand.ts +++ b/clients/client-neptune/src/commands/StartDBClusterCommand.ts @@ -22,7 +22,7 @@ export interface StartDBClusterCommandInput extends StartDBClusterMessage {} export interface StartDBClusterCommandOutput extends StartDBClusterResult, __MetadataBearer {} /** - *

    Starts an Amazon Neptune DB cluster that was stopped using the AWS + *

    Starts an Amazon Neptune DB cluster that was stopped using the Amazon * console, the Amazon CLI stop-db-cluster command, or the StopDBCluster API.

    * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-neptune/src/models/models_0.ts b/clients/client-neptune/src/models/models_0.ts index 4d053e73551c..6b5bed04f816 100644 --- a/clients/client-neptune/src/models/models_0.ts +++ b/clients/client-neptune/src/models/models_0.ts @@ -14,7 +14,7 @@ export interface AddRoleToDBClusterMessage { /** *

    The name of the feature for the Neptune DB cluster that the IAM role is to be associated with. - * For the list of supported feature names, see DBEngineVersion.

    + * For the list of supported feature names, see DBEngineVersion.

    */ FeatureName?: string; } @@ -289,17 +289,17 @@ export namespace SubscriptionNotFoundFault { export interface Tag { /** *

    A key is the required name of the tag. The string value can be from 1 to 128 Unicode - * characters in length and can't be prefixed with "aws:" or "rds:". The string can only contain - * only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java - * regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").

    + * characters in length and can't be prefixed with aws: or rds:. + * The string can only contain the set of Unicode letters, digits, white-space, + * '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").

    */ Key?: string; /** *

    A value is the optional value of the tag. The string value can be from 1 to 256 Unicode - * characters in length and can't be prefixed with "aws:" or "rds:". The string can only contain - * only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java - * regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").

    + * characters in length and can't be prefixed with aws: or rds:. + * The string can only contain the set of Unicode letters, digits, white-space, + * '_', '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").

    */ Value?: string; } @@ -1463,7 +1463,7 @@ export interface DBClusterRole { /** *

    The name of the feature associated with the Amazon Identity and Access Management (IAM) role. - * For the list of supported feature names, see DBEngineVersion. + * For the list of supported feature names, see DescribeDBEngineVersions. *

    */ FeatureName?: string; @@ -5254,7 +5254,7 @@ export interface DescribeDBClusterSnapshotsMessage { *
  • *
  • *

    - * manual - Return all DB cluster snapshots that have been taken by my AWS + * manual - Return all DB cluster snapshots that have been taken by my Amazon * account.

    *
  • *
  • @@ -5304,7 +5304,7 @@ export interface DescribeDBClusterSnapshotsMessage { Marker?: string; /** - *

    True to include shared manual DB cluster snapshots from other Amazon accounts that this AWS + *

    True to include shared manual DB cluster snapshots from other Amazon accounts that this Amazon * account has been given permission to copy or restore, and otherwise false. The default is * false.

    *

    You can give an Amazon account permission to restore a manual DB cluster snapshot from @@ -7030,6 +7030,36 @@ export interface ModifyDBClusterMessage { */ EngineVersion?: string; + /** + *

    A value that indicates whether upgrades between different major versions are allowed.

    + *

    Constraints: You must set the allow-major-version-upgrade flag when providing an + * EngineVersion parameter that uses a different major version than the DB cluster's current + * version.

    + */ + AllowMajorVersionUpgrade?: boolean; + + /** + *

    The name of the DB parameter group to apply to all instances of the DB cluster.

    + * + *

    When you apply a parameter group using DBInstanceParameterGroupName, + * parameter changes aren't applied during the next maintenance window but instead are + * applied immediately.

    + *
    + *

    Default: The existing name setting

    + *

    Constraints:

    + *
      + *
    • + *

      The DB parameter group must be in the same DB parameter group family as + * the target DB cluster version.

      + *
    • + *
    • + *

      The DBInstanceParameterGroupName parameter is only valid in combination with + * the AllowMajorVersionUpgrade parameter.

      + *
    • + *
    + */ + DBInstanceParameterGroupName?: string; + /** *

    A value that indicates whether the DB cluster has deletion protection enabled. * The database can't be deleted when deletion protection is enabled. By default, @@ -7270,7 +7300,7 @@ export interface ModifyDBClusterSnapshotAttributeMessage { *

    To authorize other Amazon accounts to copy or restore a manual DB cluster snapshot, set this * list to include one or more Amazon account IDs, or all to make the manual DB cluster * snapshot restorable by any Amazon account. Do not add the all value for any manual - * DB cluster snapshots that contain private information that you don't want available to all AWS + * DB cluster snapshots that contain private information that you don't want available to all Amazon * accounts.

    */ ValuesToAdd?: string[]; @@ -7397,7 +7427,7 @@ export interface ModifyDBInstanceMessage { /** *

    The new compute and memory capacity of the DB instance, for example, - * db.m4.large. Not all DB instance classes are available in all AWS + * db.m4.large. Not all DB instance classes are available in all Amazon * Regions.

    *

    If you modify the DB instance class, an outage occurs during the change. The change is * applied during the next maintenance window, unless ApplyImmediately is specified @@ -8034,7 +8064,7 @@ export interface RemoveRoleFromDBClusterMessage { /** *

    The name of the feature for the DB cluster that the IAM role is to be disassociated from. - * For the list of supported feature names, see DBEngineVersion.

    + * For the list of supported feature names, see DescribeDBEngineVersions.

    */ FeatureName?: string; } diff --git a/clients/client-neptune/src/protocols/Aws_query.ts b/clients/client-neptune/src/protocols/Aws_query.ts index e56c1e597f08..410d798adee9 100644 --- a/clients/client-neptune/src/protocols/Aws_query.ts +++ b/clients/client-neptune/src/protocols/Aws_query.ts @@ -8571,6 +8571,12 @@ const serializeAws_queryModifyDBClusterMessage = (input: ModifyDBClusterMessage, if (input.EngineVersion !== undefined && input.EngineVersion !== null) { entries["EngineVersion"] = input.EngineVersion; } + if (input.AllowMajorVersionUpgrade !== undefined && input.AllowMajorVersionUpgrade !== null) { + entries["AllowMajorVersionUpgrade"] = input.AllowMajorVersionUpgrade; + } + if (input.DBInstanceParameterGroupName !== undefined && input.DBInstanceParameterGroupName !== null) { + entries["DBInstanceParameterGroupName"] = input.DBInstanceParameterGroupName; + } if (input.DeletionProtection !== undefined && input.DeletionProtection !== null) { entries["DeletionProtection"] = input.DeletionProtection; } diff --git a/clients/client-neptune/src/waiters/index.ts b/clients/client-neptune/src/waiters/index.ts index 766fa2406455..3daccc0130f5 100644 --- a/clients/client-neptune/src/waiters/index.ts +++ b/clients/client-neptune/src/waiters/index.ts @@ -1 +1,2 @@ export * from "./waitForDBInstanceAvailable"; +export * from "./waitForDBInstanceDeleted"; diff --git a/clients/client-neptune/src/waiters/waitForDBInstanceDeleted.ts b/clients/client-neptune/src/waiters/waitForDBInstanceDeleted.ts new file mode 100644 index 000000000000..8debeee8812f --- /dev/null +++ b/clients/client-neptune/src/waiters/waitForDBInstanceDeleted.ts @@ -0,0 +1,114 @@ +import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@aws-sdk/util-waiter"; + +import { DescribeDBInstancesCommand, DescribeDBInstancesCommandInput } from "../commands/DescribeDBInstancesCommand"; +import { NeptuneClient } from "../NeptuneClient"; + +const checkState = async (client: NeptuneClient, input: DescribeDBInstancesCommandInput): Promise => { + let reason; + try { + const result: any = await client.send(new DescribeDBInstancesCommand(input)); + reason = result; + try { + const returnComparator = () => { + const flat_1: any[] = [].concat(...result.DBInstances); + const projection_3 = flat_1.map((element_2: any) => { + return element_2.DBInstanceStatus; + }); + return projection_3; + }; + let allStringEq_5 = returnComparator().length > 0; + for (const element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && element_4 == "deleted"; + } + if (allStringEq_5) { + return { state: WaiterState.SUCCESS, reason }; + } + } catch (e) {} + try { + const returnComparator = () => { + const flat_1: any[] = [].concat(...result.DBInstances); + const projection_3 = flat_1.map((element_2: any) => { + return element_2.DBInstanceStatus; + }); + return projection_3; + }; + for (const anyStringEq_4 of returnComparator()) { + if (anyStringEq_4 == "creating") { + return { state: WaiterState.FAILURE, reason }; + } + } + } catch (e) {} + try { + const returnComparator = () => { + const flat_1: any[] = [].concat(...result.DBInstances); + const projection_3 = flat_1.map((element_2: any) => { + return element_2.DBInstanceStatus; + }); + return projection_3; + }; + for (const anyStringEq_4 of returnComparator()) { + if (anyStringEq_4 == "modifying") { + return { state: WaiterState.FAILURE, reason }; + } + } + } catch (e) {} + try { + const returnComparator = () => { + const flat_1: any[] = [].concat(...result.DBInstances); + const projection_3 = flat_1.map((element_2: any) => { + return element_2.DBInstanceStatus; + }); + return projection_3; + }; + for (const anyStringEq_4 of returnComparator()) { + if (anyStringEq_4 == "rebooting") { + return { state: WaiterState.FAILURE, reason }; + } + } + } catch (e) {} + try { + const returnComparator = () => { + const flat_1: any[] = [].concat(...result.DBInstances); + const projection_3 = flat_1.map((element_2: any) => { + return element_2.DBInstanceStatus; + }); + return projection_3; + }; + for (const anyStringEq_4 of returnComparator()) { + if (anyStringEq_4 == "resetting-master-credentials") { + return { state: WaiterState.FAILURE, reason }; + } + } + } catch (e) {} + } catch (exception) { + reason = exception; + if (exception.name && exception.name == "DBInstanceNotFound") { + return { state: WaiterState.SUCCESS, reason }; + } + } + return { state: WaiterState.RETRY, reason }; +}; +/** + * + * @deprecated Use waitUntilDBInstanceDeleted instead. waitForDBInstanceDeleted does not throw error in non-success cases. + */ +export const waitForDBInstanceDeleted = async ( + params: WaiterConfiguration, + input: DescribeDBInstancesCommandInput +): Promise => { + const serviceDefaults = { minDelay: 30, maxDelay: 120 }; + return createWaiter({ ...serviceDefaults, ...params }, input, checkState); +}; +/** + * + * @param params - Waiter configuration options. + * @param input - The input to DescribeDBInstancesCommand for polling. + */ +export const waitUntilDBInstanceDeleted = async ( + params: WaiterConfiguration, + input: DescribeDBInstancesCommandInput +): Promise => { + const serviceDefaults = { minDelay: 30, maxDelay: 120 }; + const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return checkExceptions(result); +}; diff --git a/clients/client-networkmanager/README.md b/clients/client-networkmanager/README.md index e8713cf02789..cd1443b9b9ee 100644 --- a/clients/client-networkmanager/README.md +++ b/clients/client-networkmanager/README.md @@ -8,8 +8,7 @@ AWS SDK for JavaScript NetworkManager Client for Node.js, Browser and React Native.

    Transit Gateway Network Manager (Network Manager) enables you to create a global network, in which you can monitor your -AWS and on-premises networks that are built around transit gateways.

    -

    The Network Manager APIs are supported in the US West (Oregon) Region only. You must specify the us-west-2 Region in all requests made to Network Manager.

    +Amazon Web Services and on-premises networks that are built around transit gateways.

    ## Installing diff --git a/clients/client-networkmanager/src/NetworkManager.ts b/clients/client-networkmanager/src/NetworkManager.ts index b625e6f15b45..0c962df22424 100644 --- a/clients/client-networkmanager/src/NetworkManager.ts +++ b/clients/client-networkmanager/src/NetworkManager.ts @@ -91,6 +91,36 @@ import { GetLinkAssociationsCommandOutput, } from "./commands/GetLinkAssociationsCommand"; import { GetLinksCommand, GetLinksCommandInput, GetLinksCommandOutput } from "./commands/GetLinksCommand"; +import { + GetNetworkResourceCountsCommand, + GetNetworkResourceCountsCommandInput, + GetNetworkResourceCountsCommandOutput, +} from "./commands/GetNetworkResourceCountsCommand"; +import { + GetNetworkResourceRelationshipsCommand, + GetNetworkResourceRelationshipsCommandInput, + GetNetworkResourceRelationshipsCommandOutput, +} from "./commands/GetNetworkResourceRelationshipsCommand"; +import { + GetNetworkResourcesCommand, + GetNetworkResourcesCommandInput, + GetNetworkResourcesCommandOutput, +} from "./commands/GetNetworkResourcesCommand"; +import { + GetNetworkRoutesCommand, + GetNetworkRoutesCommandInput, + GetNetworkRoutesCommandOutput, +} from "./commands/GetNetworkRoutesCommand"; +import { + GetNetworkTelemetryCommand, + GetNetworkTelemetryCommandInput, + GetNetworkTelemetryCommandOutput, +} from "./commands/GetNetworkTelemetryCommand"; +import { + GetRouteAnalysisCommand, + GetRouteAnalysisCommandInput, + GetRouteAnalysisCommandOutput, +} from "./commands/GetRouteAnalysisCommand"; import { GetSitesCommand, GetSitesCommandInput, GetSitesCommandOutput } from "./commands/GetSitesCommand"; import { GetTransitGatewayConnectPeerAssociationsCommand, @@ -112,6 +142,11 @@ import { RegisterTransitGatewayCommandInput, RegisterTransitGatewayCommandOutput, } from "./commands/RegisterTransitGatewayCommand"; +import { + StartRouteAnalysisCommand, + StartRouteAnalysisCommandInput, + StartRouteAnalysisCommandOutput, +} from "./commands/StartRouteAnalysisCommand"; import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommand, @@ -134,13 +169,17 @@ import { UpdateGlobalNetworkCommandOutput, } from "./commands/UpdateGlobalNetworkCommand"; import { UpdateLinkCommand, UpdateLinkCommandInput, UpdateLinkCommandOutput } from "./commands/UpdateLinkCommand"; +import { + UpdateNetworkResourceMetadataCommand, + UpdateNetworkResourceMetadataCommandInput, + UpdateNetworkResourceMetadataCommandOutput, +} from "./commands/UpdateNetworkResourceMetadataCommand"; import { UpdateSiteCommand, UpdateSiteCommandInput, UpdateSiteCommandOutput } from "./commands/UpdateSiteCommand"; import { NetworkManagerClient } from "./NetworkManagerClient"; /** *

    Transit Gateway Network Manager (Network Manager) enables you to create a global network, in which you can monitor your - * AWS and on-premises networks that are built around transit gateways.

    - *

    The Network Manager APIs are supported in the US West (Oregon) Region only. You must specify the us-west-2 Region in all requests made to Network Manager.

    + * Amazon Web Services and on-premises networks that are built around transit gateways.

    */ export class NetworkManager extends NetworkManagerClient { /** @@ -863,6 +902,199 @@ export class NetworkManager extends NetworkManagerClient { } } + /** + *

    Gets the count of network resources, by resource type, for the specified global network.

    + */ + public getNetworkResourceCounts( + args: GetNetworkResourceCountsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getNetworkResourceCounts( + args: GetNetworkResourceCountsCommandInput, + cb: (err: any, data?: GetNetworkResourceCountsCommandOutput) => void + ): void; + public getNetworkResourceCounts( + args: GetNetworkResourceCountsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetNetworkResourceCountsCommandOutput) => void + ): void; + public getNetworkResourceCounts( + args: GetNetworkResourceCountsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetNetworkResourceCountsCommandOutput) => void), + cb?: (err: any, data?: GetNetworkResourceCountsCommandOutput) => void + ): Promise | void { + const command = new GetNetworkResourceCountsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Gets the network resource relationships for the specified global network.

    + */ + public getNetworkResourceRelationships( + args: GetNetworkResourceRelationshipsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getNetworkResourceRelationships( + args: GetNetworkResourceRelationshipsCommandInput, + cb: (err: any, data?: GetNetworkResourceRelationshipsCommandOutput) => void + ): void; + public getNetworkResourceRelationships( + args: GetNetworkResourceRelationshipsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetNetworkResourceRelationshipsCommandOutput) => void + ): void; + public getNetworkResourceRelationships( + args: GetNetworkResourceRelationshipsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetNetworkResourceRelationshipsCommandOutput) => void), + cb?: (err: any, data?: GetNetworkResourceRelationshipsCommandOutput) => void + ): Promise | void { + const command = new GetNetworkResourceRelationshipsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Describes the network resources for the specified global network.

    + *

    The results include information from the corresponding Describe call for the resource, minus any sensitive information such as pre-shared keys.

    + */ + public getNetworkResources( + args: GetNetworkResourcesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getNetworkResources( + args: GetNetworkResourcesCommandInput, + cb: (err: any, data?: GetNetworkResourcesCommandOutput) => void + ): void; + public getNetworkResources( + args: GetNetworkResourcesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetNetworkResourcesCommandOutput) => void + ): void; + public getNetworkResources( + args: GetNetworkResourcesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetNetworkResourcesCommandOutput) => void), + cb?: (err: any, data?: GetNetworkResourcesCommandOutput) => void + ): Promise | void { + const command = new GetNetworkResourcesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Gets the network routes of the specified global network.

    + */ + public getNetworkRoutes( + args: GetNetworkRoutesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getNetworkRoutes( + args: GetNetworkRoutesCommandInput, + cb: (err: any, data?: GetNetworkRoutesCommandOutput) => void + ): void; + public getNetworkRoutes( + args: GetNetworkRoutesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetNetworkRoutesCommandOutput) => void + ): void; + public getNetworkRoutes( + args: GetNetworkRoutesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetNetworkRoutesCommandOutput) => void), + cb?: (err: any, data?: GetNetworkRoutesCommandOutput) => void + ): Promise | void { + const command = new GetNetworkRoutesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Gets the network telemetry of the specified global network.

    + */ + public getNetworkTelemetry( + args: GetNetworkTelemetryCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getNetworkTelemetry( + args: GetNetworkTelemetryCommandInput, + cb: (err: any, data?: GetNetworkTelemetryCommandOutput) => void + ): void; + public getNetworkTelemetry( + args: GetNetworkTelemetryCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetNetworkTelemetryCommandOutput) => void + ): void; + public getNetworkTelemetry( + args: GetNetworkTelemetryCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetNetworkTelemetryCommandOutput) => void), + cb?: (err: any, data?: GetNetworkTelemetryCommandOutput) => void + ): Promise | void { + const command = new GetNetworkTelemetryCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Gets information about the specified route analysis.

    + */ + public getRouteAnalysis( + args: GetRouteAnalysisCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getRouteAnalysis( + args: GetRouteAnalysisCommandInput, + cb: (err: any, data?: GetRouteAnalysisCommandOutput) => void + ): void; + public getRouteAnalysis( + args: GetRouteAnalysisCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRouteAnalysisCommandOutput) => void + ): void; + public getRouteAnalysis( + args: GetRouteAnalysisCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetRouteAnalysisCommandOutput) => void), + cb?: (err: any, data?: GetRouteAnalysisCommandOutput) => void + ): Promise | void { + const command = new GetRouteAnalysisCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Gets information about one or more of your sites in a global network.

    */ @@ -990,8 +1222,8 @@ export class NetworkManager extends NetworkManagerClient { /** *

    Registers a transit gateway in your global network. The transit gateway can be in any - * AWS Region, but it must be owned by the same AWS account that owns the global network. - * You cannot register a transit gateway in more than one global network.

    + * Amazon Web Services Region, but it must be owned by the same Amazon Web Services account that owns + * the global network. You cannot register a transit gateway in more than one global network.

    */ public registerTransitGateway( args: RegisterTransitGatewayCommandInput, @@ -1022,6 +1254,39 @@ export class NetworkManager extends NetworkManagerClient { } } + /** + *

    Starts analyzing the routing path between the specified source and destination. For more information, + * see Route Analyzer.

    + */ + public startRouteAnalysis( + args: StartRouteAnalysisCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public startRouteAnalysis( + args: StartRouteAnalysisCommandInput, + cb: (err: any, data?: StartRouteAnalysisCommandOutput) => void + ): void; + public startRouteAnalysis( + args: StartRouteAnalysisCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartRouteAnalysisCommandOutput) => void + ): void; + public startRouteAnalysis( + args: StartRouteAnalysisCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartRouteAnalysisCommandOutput) => void), + cb?: (err: any, data?: StartRouteAnalysisCommandOutput) => void + ): Promise | void { + const command = new StartRouteAnalysisCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Tags a specified resource.

    */ @@ -1203,6 +1468,38 @@ export class NetworkManager extends NetworkManagerClient { } } + /** + *

    Updates the resource metadata for the specified global network.

    + */ + public updateNetworkResourceMetadata( + args: UpdateNetworkResourceMetadataCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateNetworkResourceMetadata( + args: UpdateNetworkResourceMetadataCommandInput, + cb: (err: any, data?: UpdateNetworkResourceMetadataCommandOutput) => void + ): void; + public updateNetworkResourceMetadata( + args: UpdateNetworkResourceMetadataCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateNetworkResourceMetadataCommandOutput) => void + ): void; + public updateNetworkResourceMetadata( + args: UpdateNetworkResourceMetadataCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateNetworkResourceMetadataCommandOutput) => void), + cb?: (err: any, data?: UpdateNetworkResourceMetadataCommandOutput) => void + ): Promise | void { + const command = new UpdateNetworkResourceMetadataCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Updates the information for an existing site. To remove information for any of the * parameters, specify an empty string.

    diff --git a/clients/client-networkmanager/src/NetworkManagerClient.ts b/clients/client-networkmanager/src/NetworkManagerClient.ts index 00780743497f..ee59d3978948 100644 --- a/clients/client-networkmanager/src/NetworkManagerClient.ts +++ b/clients/client-networkmanager/src/NetworkManagerClient.ts @@ -102,6 +102,24 @@ import { GetLinkAssociationsCommandOutput, } from "./commands/GetLinkAssociationsCommand"; import { GetLinksCommandInput, GetLinksCommandOutput } from "./commands/GetLinksCommand"; +import { + GetNetworkResourceCountsCommandInput, + GetNetworkResourceCountsCommandOutput, +} from "./commands/GetNetworkResourceCountsCommand"; +import { + GetNetworkResourceRelationshipsCommandInput, + GetNetworkResourceRelationshipsCommandOutput, +} from "./commands/GetNetworkResourceRelationshipsCommand"; +import { + GetNetworkResourcesCommandInput, + GetNetworkResourcesCommandOutput, +} from "./commands/GetNetworkResourcesCommand"; +import { GetNetworkRoutesCommandInput, GetNetworkRoutesCommandOutput } from "./commands/GetNetworkRoutesCommand"; +import { + GetNetworkTelemetryCommandInput, + GetNetworkTelemetryCommandOutput, +} from "./commands/GetNetworkTelemetryCommand"; +import { GetRouteAnalysisCommandInput, GetRouteAnalysisCommandOutput } from "./commands/GetRouteAnalysisCommand"; import { GetSitesCommandInput, GetSitesCommandOutput } from "./commands/GetSitesCommand"; import { GetTransitGatewayConnectPeerAssociationsCommandInput, @@ -119,6 +137,7 @@ import { RegisterTransitGatewayCommandInput, RegisterTransitGatewayCommandOutput, } from "./commands/RegisterTransitGatewayCommand"; +import { StartRouteAnalysisCommandInput, StartRouteAnalysisCommandOutput } from "./commands/StartRouteAnalysisCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; import { UpdateConnectionCommandInput, UpdateConnectionCommandOutput } from "./commands/UpdateConnectionCommand"; @@ -128,6 +147,10 @@ import { UpdateGlobalNetworkCommandOutput, } from "./commands/UpdateGlobalNetworkCommand"; import { UpdateLinkCommandInput, UpdateLinkCommandOutput } from "./commands/UpdateLinkCommand"; +import { + UpdateNetworkResourceMetadataCommandInput, + UpdateNetworkResourceMetadataCommandOutput, +} from "./commands/UpdateNetworkResourceMetadataCommand"; import { UpdateSiteCommandInput, UpdateSiteCommandOutput } from "./commands/UpdateSiteCommand"; import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; @@ -155,17 +178,25 @@ export type ServiceInputTypes = | GetDevicesCommandInput | GetLinkAssociationsCommandInput | GetLinksCommandInput + | GetNetworkResourceCountsCommandInput + | GetNetworkResourceRelationshipsCommandInput + | GetNetworkResourcesCommandInput + | GetNetworkRoutesCommandInput + | GetNetworkTelemetryCommandInput + | GetRouteAnalysisCommandInput | GetSitesCommandInput | GetTransitGatewayConnectPeerAssociationsCommandInput | GetTransitGatewayRegistrationsCommandInput | ListTagsForResourceCommandInput | RegisterTransitGatewayCommandInput + | StartRouteAnalysisCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateConnectionCommandInput | UpdateDeviceCommandInput | UpdateGlobalNetworkCommandInput | UpdateLinkCommandInput + | UpdateNetworkResourceMetadataCommandInput | UpdateSiteCommandInput; export type ServiceOutputTypes = @@ -192,17 +223,25 @@ export type ServiceOutputTypes = | GetDevicesCommandOutput | GetLinkAssociationsCommandOutput | GetLinksCommandOutput + | GetNetworkResourceCountsCommandOutput + | GetNetworkResourceRelationshipsCommandOutput + | GetNetworkResourcesCommandOutput + | GetNetworkRoutesCommandOutput + | GetNetworkTelemetryCommandOutput + | GetRouteAnalysisCommandOutput | GetSitesCommandOutput | GetTransitGatewayConnectPeerAssociationsCommandOutput | GetTransitGatewayRegistrationsCommandOutput | ListTagsForResourceCommandOutput | RegisterTransitGatewayCommandOutput + | StartRouteAnalysisCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateConnectionCommandOutput | UpdateDeviceCommandOutput | UpdateGlobalNetworkCommandOutput | UpdateLinkCommandOutput + | UpdateNetworkResourceMetadataCommandOutput | UpdateSiteCommandOutput; export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { @@ -355,8 +394,7 @@ export interface NetworkManagerClientResolvedConfig extends NetworkManagerClient /** *

    Transit Gateway Network Manager (Network Manager) enables you to create a global network, in which you can monitor your - * AWS and on-premises networks that are built around transit gateways.

    - *

    The Network Manager APIs are supported in the US West (Oregon) Region only. You must specify the us-west-2 Region in all requests made to Network Manager.

    + * Amazon Web Services and on-premises networks that are built around transit gateways.

    */ export class NetworkManagerClient extends __Client< __HttpHandlerOptions, diff --git a/clients/client-networkmanager/src/commands/GetNetworkResourceCountsCommand.ts b/clients/client-networkmanager/src/commands/GetNetworkResourceCountsCommand.ts new file mode 100644 index 000000000000..eff0bc8d036a --- /dev/null +++ b/clients/client-networkmanager/src/commands/GetNetworkResourceCountsCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetNetworkResourceCountsRequest, GetNetworkResourceCountsResponse } from "../models/models_0"; +import { NetworkManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../NetworkManagerClient"; +import { + deserializeAws_restJson1GetNetworkResourceCountsCommand, + serializeAws_restJson1GetNetworkResourceCountsCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetNetworkResourceCountsCommandInput extends GetNetworkResourceCountsRequest {} +export interface GetNetworkResourceCountsCommandOutput extends GetNetworkResourceCountsResponse, __MetadataBearer {} + +/** + *

    Gets the count of network resources, by resource type, for the specified global network.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NetworkManagerClient, GetNetworkResourceCountsCommand } from "@aws-sdk/client-networkmanager"; // ES Modules import + * // const { NetworkManagerClient, GetNetworkResourceCountsCommand } = require("@aws-sdk/client-networkmanager"); // CommonJS import + * const client = new NetworkManagerClient(config); + * const command = new GetNetworkResourceCountsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetNetworkResourceCountsCommandInput} for command's `input` shape. + * @see {@link GetNetworkResourceCountsCommandOutput} for command's `response` shape. + * @see {@link NetworkManagerClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetNetworkResourceCountsCommand extends $Command< + GetNetworkResourceCountsCommandInput, + GetNetworkResourceCountsCommandOutput, + NetworkManagerClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetNetworkResourceCountsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: NetworkManagerClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "NetworkManagerClient"; + const commandName = "GetNetworkResourceCountsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetNetworkResourceCountsRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetNetworkResourceCountsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetNetworkResourceCountsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetNetworkResourceCountsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetNetworkResourceCountsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-networkmanager/src/commands/GetNetworkResourceRelationshipsCommand.ts b/clients/client-networkmanager/src/commands/GetNetworkResourceRelationshipsCommand.ts new file mode 100644 index 000000000000..28ad6088b698 --- /dev/null +++ b/clients/client-networkmanager/src/commands/GetNetworkResourceRelationshipsCommand.ts @@ -0,0 +1,103 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetNetworkResourceRelationshipsRequest, GetNetworkResourceRelationshipsResponse } from "../models/models_0"; +import { NetworkManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../NetworkManagerClient"; +import { + deserializeAws_restJson1GetNetworkResourceRelationshipsCommand, + serializeAws_restJson1GetNetworkResourceRelationshipsCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetNetworkResourceRelationshipsCommandInput extends GetNetworkResourceRelationshipsRequest {} +export interface GetNetworkResourceRelationshipsCommandOutput + extends GetNetworkResourceRelationshipsResponse, + __MetadataBearer {} + +/** + *

    Gets the network resource relationships for the specified global network.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NetworkManagerClient, GetNetworkResourceRelationshipsCommand } from "@aws-sdk/client-networkmanager"; // ES Modules import + * // const { NetworkManagerClient, GetNetworkResourceRelationshipsCommand } = require("@aws-sdk/client-networkmanager"); // CommonJS import + * const client = new NetworkManagerClient(config); + * const command = new GetNetworkResourceRelationshipsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetNetworkResourceRelationshipsCommandInput} for command's `input` shape. + * @see {@link GetNetworkResourceRelationshipsCommandOutput} for command's `response` shape. + * @see {@link NetworkManagerClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetNetworkResourceRelationshipsCommand extends $Command< + GetNetworkResourceRelationshipsCommandInput, + GetNetworkResourceRelationshipsCommandOutput, + NetworkManagerClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetNetworkResourceRelationshipsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: NetworkManagerClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "NetworkManagerClient"; + const commandName = "GetNetworkResourceRelationshipsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetNetworkResourceRelationshipsRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetNetworkResourceRelationshipsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetNetworkResourceRelationshipsCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1GetNetworkResourceRelationshipsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1GetNetworkResourceRelationshipsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-networkmanager/src/commands/GetNetworkResourcesCommand.ts b/clients/client-networkmanager/src/commands/GetNetworkResourcesCommand.ts new file mode 100644 index 000000000000..8eba03486ffc --- /dev/null +++ b/clients/client-networkmanager/src/commands/GetNetworkResourcesCommand.ts @@ -0,0 +1,96 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetNetworkResourcesRequest, GetNetworkResourcesResponse } from "../models/models_0"; +import { NetworkManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../NetworkManagerClient"; +import { + deserializeAws_restJson1GetNetworkResourcesCommand, + serializeAws_restJson1GetNetworkResourcesCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetNetworkResourcesCommandInput extends GetNetworkResourcesRequest {} +export interface GetNetworkResourcesCommandOutput extends GetNetworkResourcesResponse, __MetadataBearer {} + +/** + *

    Describes the network resources for the specified global network.

    + *

    The results include information from the corresponding Describe call for the resource, minus any sensitive information such as pre-shared keys.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NetworkManagerClient, GetNetworkResourcesCommand } from "@aws-sdk/client-networkmanager"; // ES Modules import + * // const { NetworkManagerClient, GetNetworkResourcesCommand } = require("@aws-sdk/client-networkmanager"); // CommonJS import + * const client = new NetworkManagerClient(config); + * const command = new GetNetworkResourcesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetNetworkResourcesCommandInput} for command's `input` shape. + * @see {@link GetNetworkResourcesCommandOutput} for command's `response` shape. + * @see {@link NetworkManagerClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetNetworkResourcesCommand extends $Command< + GetNetworkResourcesCommandInput, + GetNetworkResourcesCommandOutput, + NetworkManagerClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetNetworkResourcesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: NetworkManagerClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "NetworkManagerClient"; + const commandName = "GetNetworkResourcesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetNetworkResourcesRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetNetworkResourcesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetNetworkResourcesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetNetworkResourcesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetNetworkResourcesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-networkmanager/src/commands/GetNetworkRoutesCommand.ts b/clients/client-networkmanager/src/commands/GetNetworkRoutesCommand.ts new file mode 100644 index 000000000000..d72dea58c44d --- /dev/null +++ b/clients/client-networkmanager/src/commands/GetNetworkRoutesCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetNetworkRoutesRequest, GetNetworkRoutesResponse } from "../models/models_0"; +import { NetworkManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../NetworkManagerClient"; +import { + deserializeAws_restJson1GetNetworkRoutesCommand, + serializeAws_restJson1GetNetworkRoutesCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetNetworkRoutesCommandInput extends GetNetworkRoutesRequest {} +export interface GetNetworkRoutesCommandOutput extends GetNetworkRoutesResponse, __MetadataBearer {} + +/** + *

    Gets the network routes of the specified global network.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NetworkManagerClient, GetNetworkRoutesCommand } from "@aws-sdk/client-networkmanager"; // ES Modules import + * // const { NetworkManagerClient, GetNetworkRoutesCommand } = require("@aws-sdk/client-networkmanager"); // CommonJS import + * const client = new NetworkManagerClient(config); + * const command = new GetNetworkRoutesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetNetworkRoutesCommandInput} for command's `input` shape. + * @see {@link GetNetworkRoutesCommandOutput} for command's `response` shape. + * @see {@link NetworkManagerClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetNetworkRoutesCommand extends $Command< + GetNetworkRoutesCommandInput, + GetNetworkRoutesCommandOutput, + NetworkManagerClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetNetworkRoutesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: NetworkManagerClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "NetworkManagerClient"; + const commandName = "GetNetworkRoutesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetNetworkRoutesRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetNetworkRoutesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetNetworkRoutesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetNetworkRoutesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetNetworkRoutesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-networkmanager/src/commands/GetNetworkTelemetryCommand.ts b/clients/client-networkmanager/src/commands/GetNetworkTelemetryCommand.ts new file mode 100644 index 000000000000..7686279b7a72 --- /dev/null +++ b/clients/client-networkmanager/src/commands/GetNetworkTelemetryCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetNetworkTelemetryRequest, GetNetworkTelemetryResponse } from "../models/models_0"; +import { NetworkManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../NetworkManagerClient"; +import { + deserializeAws_restJson1GetNetworkTelemetryCommand, + serializeAws_restJson1GetNetworkTelemetryCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetNetworkTelemetryCommandInput extends GetNetworkTelemetryRequest {} +export interface GetNetworkTelemetryCommandOutput extends GetNetworkTelemetryResponse, __MetadataBearer {} + +/** + *

    Gets the network telemetry of the specified global network.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NetworkManagerClient, GetNetworkTelemetryCommand } from "@aws-sdk/client-networkmanager"; // ES Modules import + * // const { NetworkManagerClient, GetNetworkTelemetryCommand } = require("@aws-sdk/client-networkmanager"); // CommonJS import + * const client = new NetworkManagerClient(config); + * const command = new GetNetworkTelemetryCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetNetworkTelemetryCommandInput} for command's `input` shape. + * @see {@link GetNetworkTelemetryCommandOutput} for command's `response` shape. + * @see {@link NetworkManagerClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetNetworkTelemetryCommand extends $Command< + GetNetworkTelemetryCommandInput, + GetNetworkTelemetryCommandOutput, + NetworkManagerClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetNetworkTelemetryCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: NetworkManagerClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "NetworkManagerClient"; + const commandName = "GetNetworkTelemetryCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetNetworkTelemetryRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetNetworkTelemetryResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetNetworkTelemetryCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetNetworkTelemetryCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetNetworkTelemetryCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-networkmanager/src/commands/GetRouteAnalysisCommand.ts b/clients/client-networkmanager/src/commands/GetRouteAnalysisCommand.ts new file mode 100644 index 000000000000..9cd518ed6bc5 --- /dev/null +++ b/clients/client-networkmanager/src/commands/GetRouteAnalysisCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { GetRouteAnalysisRequest, GetRouteAnalysisResponse } from "../models/models_0"; +import { NetworkManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../NetworkManagerClient"; +import { + deserializeAws_restJson1GetRouteAnalysisCommand, + serializeAws_restJson1GetRouteAnalysisCommand, +} from "../protocols/Aws_restJson1"; + +export interface GetRouteAnalysisCommandInput extends GetRouteAnalysisRequest {} +export interface GetRouteAnalysisCommandOutput extends GetRouteAnalysisResponse, __MetadataBearer {} + +/** + *

    Gets information about the specified route analysis.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NetworkManagerClient, GetRouteAnalysisCommand } from "@aws-sdk/client-networkmanager"; // ES Modules import + * // const { NetworkManagerClient, GetRouteAnalysisCommand } = require("@aws-sdk/client-networkmanager"); // CommonJS import + * const client = new NetworkManagerClient(config); + * const command = new GetRouteAnalysisCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetRouteAnalysisCommandInput} for command's `input` shape. + * @see {@link GetRouteAnalysisCommandOutput} for command's `response` shape. + * @see {@link NetworkManagerClientResolvedConfig | config} for command's `input` shape. + * + */ +export class GetRouteAnalysisCommand extends $Command< + GetRouteAnalysisCommandInput, + GetRouteAnalysisCommandOutput, + NetworkManagerClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetRouteAnalysisCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: NetworkManagerClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "NetworkManagerClient"; + const commandName = "GetRouteAnalysisCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: GetRouteAnalysisRequest.filterSensitiveLog, + outputFilterSensitiveLog: GetRouteAnalysisResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: GetRouteAnalysisCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1GetRouteAnalysisCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1GetRouteAnalysisCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-networkmanager/src/commands/RegisterTransitGatewayCommand.ts b/clients/client-networkmanager/src/commands/RegisterTransitGatewayCommand.ts index 5caad3aa2228..d83ec38e73eb 100644 --- a/clients/client-networkmanager/src/commands/RegisterTransitGatewayCommand.ts +++ b/clients/client-networkmanager/src/commands/RegisterTransitGatewayCommand.ts @@ -23,8 +23,8 @@ export interface RegisterTransitGatewayCommandOutput extends RegisterTransitGate /** *

    Registers a transit gateway in your global network. The transit gateway can be in any - * AWS Region, but it must be owned by the same AWS account that owns the global network. - * You cannot register a transit gateway in more than one global network.

    + * Amazon Web Services Region, but it must be owned by the same Amazon Web Services account that owns + * the global network. You cannot register a transit gateway in more than one global network.

    * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-networkmanager/src/commands/StartRouteAnalysisCommand.ts b/clients/client-networkmanager/src/commands/StartRouteAnalysisCommand.ts new file mode 100644 index 000000000000..19bd592c3490 --- /dev/null +++ b/clients/client-networkmanager/src/commands/StartRouteAnalysisCommand.ts @@ -0,0 +1,96 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { StartRouteAnalysisRequest, StartRouteAnalysisResponse } from "../models/models_0"; +import { NetworkManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../NetworkManagerClient"; +import { + deserializeAws_restJson1StartRouteAnalysisCommand, + serializeAws_restJson1StartRouteAnalysisCommand, +} from "../protocols/Aws_restJson1"; + +export interface StartRouteAnalysisCommandInput extends StartRouteAnalysisRequest {} +export interface StartRouteAnalysisCommandOutput extends StartRouteAnalysisResponse, __MetadataBearer {} + +/** + *

    Starts analyzing the routing path between the specified source and destination. For more information, + * see Route Analyzer.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NetworkManagerClient, StartRouteAnalysisCommand } from "@aws-sdk/client-networkmanager"; // ES Modules import + * // const { NetworkManagerClient, StartRouteAnalysisCommand } = require("@aws-sdk/client-networkmanager"); // CommonJS import + * const client = new NetworkManagerClient(config); + * const command = new StartRouteAnalysisCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link StartRouteAnalysisCommandInput} for command's `input` shape. + * @see {@link StartRouteAnalysisCommandOutput} for command's `response` shape. + * @see {@link NetworkManagerClientResolvedConfig | config} for command's `input` shape. + * + */ +export class StartRouteAnalysisCommand extends $Command< + StartRouteAnalysisCommandInput, + StartRouteAnalysisCommandOutput, + NetworkManagerClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: StartRouteAnalysisCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: NetworkManagerClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "NetworkManagerClient"; + const commandName = "StartRouteAnalysisCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: StartRouteAnalysisRequest.filterSensitiveLog, + outputFilterSensitiveLog: StartRouteAnalysisResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: StartRouteAnalysisCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1StartRouteAnalysisCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1StartRouteAnalysisCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-networkmanager/src/commands/UpdateNetworkResourceMetadataCommand.ts b/clients/client-networkmanager/src/commands/UpdateNetworkResourceMetadataCommand.ts new file mode 100644 index 000000000000..da82a6e4bd05 --- /dev/null +++ b/clients/client-networkmanager/src/commands/UpdateNetworkResourceMetadataCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { UpdateNetworkResourceMetadataRequest, UpdateNetworkResourceMetadataResponse } from "../models/models_0"; +import { NetworkManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../NetworkManagerClient"; +import { + deserializeAws_restJson1UpdateNetworkResourceMetadataCommand, + serializeAws_restJson1UpdateNetworkResourceMetadataCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdateNetworkResourceMetadataCommandInput extends UpdateNetworkResourceMetadataRequest {} +export interface UpdateNetworkResourceMetadataCommandOutput + extends UpdateNetworkResourceMetadataResponse, + __MetadataBearer {} + +/** + *

    Updates the resource metadata for the specified global network.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { NetworkManagerClient, UpdateNetworkResourceMetadataCommand } from "@aws-sdk/client-networkmanager"; // ES Modules import + * // const { NetworkManagerClient, UpdateNetworkResourceMetadataCommand } = require("@aws-sdk/client-networkmanager"); // CommonJS import + * const client = new NetworkManagerClient(config); + * const command = new UpdateNetworkResourceMetadataCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateNetworkResourceMetadataCommandInput} for command's `input` shape. + * @see {@link UpdateNetworkResourceMetadataCommandOutput} for command's `response` shape. + * @see {@link NetworkManagerClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateNetworkResourceMetadataCommand extends $Command< + UpdateNetworkResourceMetadataCommandInput, + UpdateNetworkResourceMetadataCommandOutput, + NetworkManagerClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateNetworkResourceMetadataCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: NetworkManagerClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "NetworkManagerClient"; + const commandName = "UpdateNetworkResourceMetadataCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateNetworkResourceMetadataRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateNetworkResourceMetadataResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateNetworkResourceMetadataCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UpdateNetworkResourceMetadataCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1UpdateNetworkResourceMetadataCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-networkmanager/src/commands/index.ts b/clients/client-networkmanager/src/commands/index.ts index 263ccb717ae4..db988704036d 100644 --- a/clients/client-networkmanager/src/commands/index.ts +++ b/clients/client-networkmanager/src/commands/index.ts @@ -21,15 +21,23 @@ export * from "./GetCustomerGatewayAssociationsCommand"; export * from "./GetDevicesCommand"; export * from "./GetLinkAssociationsCommand"; export * from "./GetLinksCommand"; +export * from "./GetNetworkResourceCountsCommand"; +export * from "./GetNetworkResourceRelationshipsCommand"; +export * from "./GetNetworkResourcesCommand"; +export * from "./GetNetworkRoutesCommand"; +export * from "./GetNetworkTelemetryCommand"; +export * from "./GetRouteAnalysisCommand"; export * from "./GetSitesCommand"; export * from "./GetTransitGatewayConnectPeerAssociationsCommand"; export * from "./GetTransitGatewayRegistrationsCommand"; export * from "./ListTagsForResourceCommand"; export * from "./RegisterTransitGatewayCommand"; +export * from "./StartRouteAnalysisCommand"; export * from "./TagResourceCommand"; export * from "./UntagResourceCommand"; export * from "./UpdateConnectionCommand"; export * from "./UpdateDeviceCommand"; export * from "./UpdateGlobalNetworkCommand"; export * from "./UpdateLinkCommand"; +export * from "./UpdateNetworkResourceMetadataCommand"; export * from "./UpdateSiteCommand"; diff --git a/clients/client-networkmanager/src/models/models_0.ts b/clients/client-networkmanager/src/models/models_0.ts index 82169c7d5343..ad32528a46d4 100644 --- a/clients/client-networkmanager/src/models/models_0.ts +++ b/clients/client-networkmanager/src/models/models_0.ts @@ -21,8 +21,7 @@ export namespace AccessDeniedException { export interface AssociateCustomerGatewayRequest { /** - *

    The Amazon Resource Name (ARN) of the customer gateway. For more information, see - * Resources Defined by Amazon EC2.

    + *

    The Amazon Resource Name (ARN) of the customer gateway.

    */ CustomerGatewayArn: string | undefined; @@ -179,6 +178,8 @@ export interface ResourceNotFoundException extends __SmithyException, $MetadataB *

    The resource type.

    */ ResourceType: string | undefined; + + Context?: { [key: string]: string }; } export namespace ResourceNotFoundException { @@ -488,16 +489,17 @@ export namespace AssociateTransitGatewayConnectPeerResponse { } /** - *

    Specifies a location in AWS.

    + *

    Specifies a location in Amazon Web Services.

    */ export interface AWSLocation { /** - *

    The Zone the device is located in. This can be the ID of an Availability Zone, Local Zone, Wavelength Zone, or an Outpost.

    + *

    The Zone that the device is located in. Specify the ID of an Availability Zone, Local + * Zone, Wavelength Zone, or an Outpost.

    */ Zone?: string; /** - *

    The Amazon Resource Name (ARN) of the subnet the device is located in.

    + *

    The Amazon Resource Name (ARN) of the subnet that the device is located in.

    */ SubnetArn?: string; } @@ -548,13 +550,13 @@ export enum ConnectionState { export interface Tag { /** *

    The tag key.

    - *

    Length Constraints: Maximum length of 128 characters.

    + *

    Constraints: Maximum length of 128 characters.

    */ Key?: string; /** *

    The tag value.

    - *

    Length Constraints: Maximum length of 256 characters.

    + *

    Constraints: Maximum length of 256 characters.

    */ Value?: string; } @@ -637,6 +639,45 @@ export namespace Connection { }); } +export enum ConnectionStatus { + DOWN = "DOWN", + UP = "UP", +} + +export enum ConnectionType { + BGP = "BGP", + IPSEC = "IPSEC", +} + +/** + *

    Describes connection health.

    + */ +export interface ConnectionHealth { + /** + *

    The connection type.

    + */ + Type?: ConnectionType | string; + + /** + *

    The connection status.

    + */ + Status?: ConnectionStatus | string; + + /** + *

    The time the status was last updated.

    + */ + Timestamp?: Date; +} + +export namespace ConnectionHealth { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ConnectionHealth): any => ({ + ...obj, + }); +} + export interface CreateConnectionRequest { /** *

    The ID of the global network.

    @@ -736,13 +777,13 @@ export interface CreateDeviceRequest { GlobalNetworkId: string | undefined; /** - *

    The AWS location of the device.

    + *

    The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.

    */ AWSLocation?: AWSLocation; /** *

    A description of the device.

    - *

    Length Constraints: Maximum length of 256 characters.

    + *

    Constraints: Maximum length of 256 characters.

    */ Description?: string; @@ -753,19 +794,19 @@ export interface CreateDeviceRequest { /** *

    The vendor of the device.

    - *

    Length Constraints: Maximum length of 128 characters.

    + *

    Constraints: Maximum length of 128 characters.

    */ Vendor?: string; /** *

    The model of the device.

    - *

    Length Constraints: Maximum length of 128 characters.

    + *

    Constraints: Maximum length of 128 characters.

    */ Model?: string; /** *

    The serial number of the device.

    - *

    Length Constraints: Maximum length of 128 characters.

    + *

    Constraints: Maximum length of 128 characters.

    */ SerialNumber?: string; @@ -822,7 +863,7 @@ export interface Device { GlobalNetworkId?: string; /** - *

    The AWS location of the device.

    + *

    The Amazon Web Services location of the device.

    */ AWSLocation?: AWSLocation; @@ -907,7 +948,7 @@ export namespace CreateDeviceResponse { export interface CreateGlobalNetworkRequest { /** *

    A description of the global network.

    - *

    Length Constraints: Maximum length of 256 characters.

    + *

    Constraints: Maximum length of 256 characters.

    */ Description?: string; @@ -1001,14 +1042,13 @@ export interface CreateLinkRequest { /** *

    A description of the link.

    - *

    Length Constraints: Maximum length of 256 characters.

    + *

    Constraints: Maximum length of 256 characters.

    */ Description?: string; /** *

    The type of the link.

    - *

    Constraints: Cannot include the following characters: | \ ^

    - *

    Length Constraints: Maximum length of 128 characters.

    + *

    Constraints: Maximum length of 128 characters. Cannot include the following characters: | \ ^

    */ Type?: string; @@ -1019,8 +1059,7 @@ export interface CreateLinkRequest { /** *

    The provider of the link.

    - *

    Constraints: Cannot include the following characters: | \ ^

    - *

    Length Constraints: Maximum length of 128 characters.

    + *

    Constraints: Maximum length of 128 characters. Cannot include the following characters: | \ ^

    */ Provider?: string; @@ -1144,7 +1183,7 @@ export interface CreateSiteRequest { /** *

    A description of your site.

    - *

    Length Constraints: Maximum length of 256 characters.

    + *

    Constraints: Maximum length of 256 characters.

    */ Description?: string; @@ -1596,8 +1635,7 @@ export interface DisassociateCustomerGatewayRequest { GlobalNetworkId: string | undefined; /** - *

    The Amazon Resource Name (ARN) of the customer gateway. For more information, see - * Resources Defined by Amazon EC2.

    + *

    The Amazon Resource Name (ARN) of the customer gateway.

    */ CustomerGatewayArn: string | undefined; } @@ -1770,8 +1808,7 @@ export interface GetCustomerGatewayAssociationsRequest { GlobalNetworkId: string | undefined; /** - *

    One or more customer gateway Amazon Resource Names (ARNs). For more information, see - * Resources Defined by Amazon EC2. The maximum is 10.

    + *

    One or more customer gateway Amazon Resource Names (ARNs). The maximum is 10.

    */ CustomerGatewayArns?: string[]; @@ -1998,16 +2035,92 @@ export namespace GetLinksResponse { }); } -export interface GetSitesRequest { +export interface GetNetworkResourceCountsRequest { /** *

    The ID of the global network.

    */ GlobalNetworkId: string | undefined; /** - *

    One or more site IDs. The maximum is 10.

    + *

    The resource type.

    + *

    The following are the supported resource types for Direct Connect:

    + *
      + *
    • + *

      + * dxcon + *

      + *
    • + *
    • + *

      + * dx-gateway + *

      + *
    • + *
    • + *

      + * dx-vif + *

      + *
    • + *
    + * + *

    The following are the supported resource types for Network Manager:

    + *
      + *
    • + *

      + * connection + *

      + *
    • + *
    • + *

      + * device + *

      + *
    • + *
    • + *

      + * link + *

      + *
    • + *
    • + *

      + * site + *

      + *
    • + *
    + * + *

    The following are the supported resource types for Amazon VPC:

    + *
      + *
    • + *

      + * customer-gateway + *

      + *
    • + *
    • + *

      + * transit-gateway + *

      + *
    • + *
    • + *

      + * transit-gateway-attachment + *

      + *
    • + *
    • + *

      + * transit-gateway-connect-peer + *

      + *
    • + *
    • + *

      + * transit-gateway-route-table + *

      + *
    • + *
    • + *

      + * vpn-connection + *

      + *
    • + *
    */ - SiteIds?: string[]; + ResourceType?: string; /** *

    The maximum number of results to return.

    @@ -2020,52 +2133,44 @@ export interface GetSitesRequest { NextToken?: string; } -export namespace GetSitesRequest { +export namespace GetNetworkResourceCountsRequest { /** * @internal */ - export const filterSensitiveLog = (obj: GetSitesRequest): any => ({ + export const filterSensitiveLog = (obj: GetNetworkResourceCountsRequest): any => ({ ...obj, }); } -export interface GetSitesResponse { +/** + *

    Describes a resource count.

    + */ +export interface NetworkResourceCount { /** - *

    The sites.

    + *

    The resource type.

    */ - Sites?: Site[]; + ResourceType?: string; /** - *

    The token for the next page of results.

    + *

    The resource count.

    */ - NextToken?: string; + Count?: number; } -export namespace GetSitesResponse { +export namespace NetworkResourceCount { /** * @internal */ - export const filterSensitiveLog = (obj: GetSitesResponse): any => ({ + export const filterSensitiveLog = (obj: NetworkResourceCount): any => ({ ...obj, - ...(obj.Sites && { Sites: obj.Sites.map((item) => Site.filterSensitiveLog(item)) }), }); } -export interface GetTransitGatewayConnectPeerAssociationsRequest { - /** - *

    The ID of the global network.

    - */ - GlobalNetworkId: string | undefined; - +export interface GetNetworkResourceCountsResponse { /** - *

    One or more transit gateway Connect peer Amazon Resource Names (ARNs).

    - */ - TransitGatewayConnectPeerArns?: string[]; - - /** - *

    The maximum number of results to return.

    + *

    The count of resources.

    */ - MaxResults?: number; + NetworkResourceCounts?: NetworkResourceCount[]; /** *

    The token for the next page of results.

    @@ -2073,47 +2178,121 @@ export interface GetTransitGatewayConnectPeerAssociationsRequest { NextToken?: string; } -export namespace GetTransitGatewayConnectPeerAssociationsRequest { +export namespace GetNetworkResourceCountsResponse { /** * @internal */ - export const filterSensitiveLog = (obj: GetTransitGatewayConnectPeerAssociationsRequest): any => ({ + export const filterSensitiveLog = (obj: GetNetworkResourceCountsResponse): any => ({ ...obj, }); } -export interface GetTransitGatewayConnectPeerAssociationsResponse { +export interface GetNetworkResourceRelationshipsRequest { /** - *

    Information about the transit gateway Connect peer associations.

    + *

    The ID of the global network.

    */ - TransitGatewayConnectPeerAssociations?: TransitGatewayConnectPeerAssociation[]; + GlobalNetworkId: string | undefined; /** - *

    The token to use for the next page of results.

    + *

    The ARN of the registered gateway.

    */ - NextToken?: string; -} + RegisteredGatewayArn?: string; -export namespace GetTransitGatewayConnectPeerAssociationsResponse { /** - * @internal + *

    The Amazon Web Services Region.

    */ - export const filterSensitiveLog = (obj: GetTransitGatewayConnectPeerAssociationsResponse): any => ({ - ...obj, - }); -} + AwsRegion?: string; -export interface GetTransitGatewayRegistrationsRequest { /** - *

    The ID of the global network.

    + *

    The Amazon Web Services account ID.

    */ - GlobalNetworkId: string | undefined; + AccountId?: string; /** - *

    The Amazon Resource Names (ARNs) of one or more transit gateways. The maximum is - * 10.

    + *

    The resource type.

    + *

    The following are the supported resource types for Direct Connect:

    + *
      + *
    • + *

      + * dxcon + *

      + *
    • + *
    • + *

      + * dx-gateway + *

      + *
    • + *
    • + *

      + * dx-vif + *

      + *
    • + *
    + * + *

    The following are the supported resource types for Network Manager:

    + *
      + *
    • + *

      + * connection + *

      + *
    • + *
    • + *

      + * device + *

      + *
    • + *
    • + *

      + * link + *

      + *
    • + *
    • + *

      + * site + *

      + *
    • + *
    + * + *

    The following are the supported resource types for Amazon VPC:

    + *
      + *
    • + *

      + * customer-gateway + *

      + *
    • + *
    • + *

      + * transit-gateway + *

      + *
    • + *
    • + *

      + * transit-gateway-attachment + *

      + *
    • + *
    • + *

      + * transit-gateway-connect-peer + *

      + *
    • + *
    • + *

      + * transit-gateway-route-table + *

      + *
    • + *
    • + *

      + * vpn-connection + *

      + *
    • + *
    */ - TransitGatewayArns?: string[]; + ResourceType?: string; + + /** + *

    The ARN of the gateway.

    + */ + ResourceArn?: string; /** *

    The maximum number of results to return.

    @@ -2126,114 +2305,1381 @@ export interface GetTransitGatewayRegistrationsRequest { NextToken?: string; } -export namespace GetTransitGatewayRegistrationsRequest { +export namespace GetNetworkResourceRelationshipsRequest { /** * @internal */ - export const filterSensitiveLog = (obj: GetTransitGatewayRegistrationsRequest): any => ({ + export const filterSensitiveLog = (obj: GetNetworkResourceRelationshipsRequest): any => ({ ...obj, }); } -export interface GetTransitGatewayRegistrationsResponse { +/** + *

    Describes a resource relationship.

    + */ +export interface Relationship { /** - *

    The transit gateway registrations.

    + *

    The ARN of the resource.

    */ - TransitGatewayRegistrations?: TransitGatewayRegistration[]; + From?: string; /** - *

    The token for the next page of results.

    + *

    The ARN of the resource.

    */ - NextToken?: string; + To?: string; } -export namespace GetTransitGatewayRegistrationsResponse { +export namespace Relationship { /** * @internal */ - export const filterSensitiveLog = (obj: GetTransitGatewayRegistrationsResponse): any => ({ + export const filterSensitiveLog = (obj: Relationship): any => ({ ...obj, }); } -export interface ListTagsForResourceRequest { - /** - *

    The Amazon Resource Name (ARN) of the resource.

    - */ - ResourceArn: string | undefined; -} - -export namespace ListTagsForResourceRequest { +export interface GetNetworkResourceRelationshipsResponse { /** - * @internal + *

    The resource relationships.

    */ - export const filterSensitiveLog = (obj: ListTagsForResourceRequest): any => ({ - ...obj, - }); -} + Relationships?: Relationship[]; -export interface ListTagsForResourceResponse { /** - *

    The list of tags.

    + *

    The token for the next page of results.

    */ - TagList?: Tag[]; + NextToken?: string; } -export namespace ListTagsForResourceResponse { +export namespace GetNetworkResourceRelationshipsResponse { /** * @internal */ - export const filterSensitiveLog = (obj: ListTagsForResourceResponse): any => ({ + export const filterSensitiveLog = (obj: GetNetworkResourceRelationshipsResponse): any => ({ ...obj, }); } -export interface RegisterTransitGatewayRequest { +export interface GetNetworkResourcesRequest { /** *

    The ID of the global network.

    */ GlobalNetworkId: string | undefined; /** - *

    The Amazon Resource Name (ARN) of the transit gateway. For more information, see - * Resources Defined by Amazon EC2.

    + *

    The ARN of the gateway.

    */ - TransitGatewayArn: string | undefined; -} + RegisteredGatewayArn?: string; -export namespace RegisterTransitGatewayRequest { /** - * @internal + *

    The Amazon Web Services Region.

    */ - export const filterSensitiveLog = (obj: RegisterTransitGatewayRequest): any => ({ - ...obj, - }); -} + AwsRegion?: string; -export interface RegisterTransitGatewayResponse { /** - *

    Information about the transit gateway registration.

    + *

    The Amazon Web Services account ID.

    */ - TransitGatewayRegistration?: TransitGatewayRegistration; -} + AccountId?: string; -export namespace RegisterTransitGatewayResponse { /** - * @internal + *

    The resource type.

    + *

    The following are the supported resource types for Direct Connect:

    + * + * + *

    The following are the supported resource types for Network Manager:

    + *
      + *
    • + *

      + * connection - The definition model is + * Connection.

      + *
    • + *
    • + *

      + * device - The definition model is + * Device.

      + *
    • + *
    • + *

      + * link - The definition model is + * Link.

      + *
    • + *
    • + *

      + * site - The definition model is + * Site.

      + *
    • + *
    + * + *

    The following are the supported resource types for Amazon VPC:

    + * */ - export const filterSensitiveLog = (obj: RegisterTransitGatewayResponse): any => ({ - ...obj, - }); -} + ResourceType?: string; -export interface TagResourceRequest { /** - *

    The Amazon Resource Name (ARN) of the resource.

    + *

    The ARN of the resource.

    */ - ResourceArn: string | undefined; + ResourceArn?: string; /** - *

    The tags to apply to the specified resource.

    + *

    The maximum number of results to return.

    + */ + MaxResults?: number; + + /** + *

    The token for the next page of results.

    + */ + NextToken?: string; +} + +export namespace GetNetworkResourcesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetNetworkResourcesRequest): any => ({ + ...obj, + }); +} + +/** + *

    Describes a network resource.

    + */ +export interface NetworkResource { + /** + *

    The ARN of the gateway.

    + */ + RegisteredGatewayArn?: string; + + /** + *

    The Amazon Web Services Region.

    + */ + AwsRegion?: string; + + /** + *

    The Amazon Web Services account ID.

    + */ + AccountId?: string; + + /** + *

    The resource type.

    + *

    The following are the supported resource types for Direct Connect:

    + *
      + *
    • + *

      + * dxcon + *

      + *
    • + *
    • + *

      + * dx-gateway + *

      + *
    • + *
    • + *

      + * dx-vif + *

      + *
    • + *
    + * + *

    The following are the supported resource types for Network Manager:

    + *
      + *
    • + *

      + * connection + *

      + *
    • + *
    • + *

      + * device + *

      + *
    • + *
    • + *

      + * link + *

      + *
    • + *
    • + *

      + * site + *

      + *
    • + *
    + * + *

    The following are the supported resource types for Amazon VPC:

    + *
      + *
    • + *

      + * customer-gateway + *

      + *
    • + *
    • + *

      + * transit-gateway + *

      + *
    • + *
    • + *

      + * transit-gateway-attachment + *

      + *
    • + *
    • + *

      + * transit-gateway-connect-peer + *

      + *
    • + *
    • + *

      + * transit-gateway-route-table + *

      + *
    • + *
    • + *

      + * vpn-connection + *

      + *
    • + *
    + */ + ResourceType?: string; + + /** + *

    The ID of the resource.

    + */ + ResourceId?: string; + + /** + *

    The ARN of the resource.

    + */ + ResourceArn?: string; + + /** + *

    Information about the resource, in JSON format. Network Manager gets this information by describing the resource using its Describe API call.

    + */ + Definition?: string; + + /** + *

    The time that the resource definition was retrieved.

    + */ + DefinitionTimestamp?: Date; + + /** + *

    The tags.

    + */ + Tags?: Tag[]; + + /** + *

    The resource metadata.

    + */ + Metadata?: { [key: string]: string }; +} + +export namespace NetworkResource { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NetworkResource): any => ({ + ...obj, + }); +} + +export interface GetNetworkResourcesResponse { + /** + *

    The network resources.

    + */ + NetworkResources?: NetworkResource[]; + + /** + *

    The token for the next page of results.

    + */ + NextToken?: string; +} + +export namespace GetNetworkResourcesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetNetworkResourcesResponse): any => ({ + ...obj, + }); +} + +/** + *

    Describes a route table.

    + */ +export interface RouteTableIdentifier { + /** + *

    The ARN of the transit gateway route table.

    + */ + TransitGatewayRouteTableArn?: string; +} + +export namespace RouteTableIdentifier { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RouteTableIdentifier): any => ({ + ...obj, + }); +} + +export enum RouteState { + ACTIVE = "ACTIVE", + BLACKHOLE = "BLACKHOLE", +} + +export enum RouteType { + PROPAGATED = "PROPAGATED", + STATIC = "STATIC", +} + +export interface GetNetworkRoutesRequest { + /** + *

    The ID of the global network.

    + */ + GlobalNetworkId: string | undefined; + + /** + *

    The ID of the route table.

    + */ + RouteTableIdentifier: RouteTableIdentifier | undefined; + + /** + *

    An exact CIDR block.

    + */ + ExactCidrMatches?: string[]; + + /** + *

    The most specific route that matches the traffic (longest prefix match).

    + */ + LongestPrefixMatches?: string[]; + + /** + *

    The routes with a subnet that match the specified CIDR filter.

    + */ + SubnetOfMatches?: string[]; + + /** + *

    The routes with a CIDR that encompasses the CIDR filter. Example: If you specify 10.0.1.0/30, then the result returns 10.0.1.0/29.

    + */ + SupernetOfMatches?: string[]; + + /** + *

    The IDs of the prefix lists.

    + */ + PrefixListIds?: string[]; + + /** + *

    The route states.

    + */ + States?: (RouteState | string)[]; + + /** + *

    The route types.

    + */ + Types?: (RouteType | string)[]; + + /** + *

    Filter by route table destination. Possible Values: TRANSIT_GATEWAY_ATTACHMENT_ID, RESOURCE_ID, or RESOURCE_TYPE.

    + */ + DestinationFilters?: { [key: string]: string[] }; +} + +export namespace GetNetworkRoutesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetNetworkRoutesRequest): any => ({ + ...obj, + }); +} + +/** + *

    Describes the destination of a network route.

    + */ +export interface NetworkRouteDestination { + /** + *

    The ID of the transit gateway attachment.

    + */ + TransitGatewayAttachmentId?: string; + + /** + *

    The resource type.

    + */ + ResourceType?: string; + + /** + *

    The ID of the resource.

    + */ + ResourceId?: string; +} + +export namespace NetworkRouteDestination { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NetworkRouteDestination): any => ({ + ...obj, + }); +} + +/** + *

    Describes a network route.

    + */ +export interface NetworkRoute { + /** + *

    A unique identifier for the route, such as a CIDR block.

    + */ + DestinationCidrBlock?: string; + + /** + *

    The destinations.

    + */ + Destinations?: NetworkRouteDestination[]; + + /** + *

    The ID of the prefix list.

    + */ + PrefixListId?: string; + + /** + *

    The route state. The possible values are active and blackhole.

    + */ + State?: RouteState | string; + + /** + *

    The route type. The possible values are propagated and static.

    + */ + Type?: RouteType | string; +} + +export namespace NetworkRoute { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NetworkRoute): any => ({ + ...obj, + }); +} + +export enum RouteTableType { + TRANSIT_GATEWAY_ROUTE_TABLE = "TRANSIT_GATEWAY_ROUTE_TABLE", +} + +export interface GetNetworkRoutesResponse { + /** + *

    The ARN of the route table.

    + */ + RouteTableArn?: string; + + /** + *

    The route table type.

    + */ + RouteTableType?: RouteTableType | string; + + /** + *

    The route table creation time.

    + */ + RouteTableTimestamp?: Date; + + /** + *

    The network routes.

    + */ + NetworkRoutes?: NetworkRoute[]; +} + +export namespace GetNetworkRoutesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetNetworkRoutesResponse): any => ({ + ...obj, + }); +} + +export interface GetNetworkTelemetryRequest { + /** + *

    The ID of the global network.

    + */ + GlobalNetworkId: string | undefined; + + /** + *

    The ARN of the gateway.

    + */ + RegisteredGatewayArn?: string; + + /** + *

    The Amazon Web Services Region.

    + */ + AwsRegion?: string; + + /** + *

    The Amazon Web Services account ID.

    + */ + AccountId?: string; + + /** + *

    The resource type.

    + *

    The following are the supported resource types for Direct Connect:

    + *
      + *
    • + *

      + * dxcon + *

      + *
    • + *
    • + *

      + * dx-gateway + *

      + *
    • + *
    • + *

      + * dx-vif + *

      + *
    • + *
    + * + *

    The following are the supported resource types for Network Manager:

    + *
      + *
    • + *

      + * connection + *

      + *
    • + *
    • + *

      + * device + *

      + *
    • + *
    • + *

      + * link + *

      + *
    • + *
    • + *

      + * site + *

      + *
    • + *
    + * + *

    The following are the supported resource types for Amazon VPC:

    + *
      + *
    • + *

      + * customer-gateway + *

      + *
    • + *
    • + *

      + * transit-gateway + *

      + *
    • + *
    • + *

      + * transit-gateway-attachment + *

      + *
    • + *
    • + *

      + * transit-gateway-connect-peer + *

      + *
    • + *
    • + *

      + * transit-gateway-route-table + *

      + *
    • + *
    • + *

      + * vpn-connection + *

      + *
    • + *
    + */ + ResourceType?: string; + + /** + *

    The ARN of the resource.

    + */ + ResourceArn?: string; + + /** + *

    The maximum number of results to return.

    + */ + MaxResults?: number; + + /** + *

    The token for the next page of results.

    + */ + NextToken?: string; +} + +export namespace GetNetworkTelemetryRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetNetworkTelemetryRequest): any => ({ + ...obj, + }); +} + +/** + *

    Describes the telemetry information for a resource.

    + */ +export interface NetworkTelemetry { + /** + *

    The ARN of the gateway.

    + */ + RegisteredGatewayArn?: string; + + /** + *

    The Amazon Web Services Region.

    + */ + AwsRegion?: string; + + /** + *

    The Amazon Web Services account ID.

    + */ + AccountId?: string; + + /** + *

    The resource type.

    + */ + ResourceType?: string; + + /** + *

    The ID of the resource.

    + */ + ResourceId?: string; + + /** + *

    The ARN of the resource.

    + */ + ResourceArn?: string; + + /** + *

    The address.

    + */ + Address?: string; + + /** + *

    The connection health.

    + */ + Health?: ConnectionHealth; +} + +export namespace NetworkTelemetry { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NetworkTelemetry): any => ({ + ...obj, + }); +} + +export interface GetNetworkTelemetryResponse { + /** + *

    The network telemetry.

    + */ + NetworkTelemetry?: NetworkTelemetry[]; + + /** + *

    The token for the next page of results.

    + */ + NextToken?: string; +} + +export namespace GetNetworkTelemetryResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetNetworkTelemetryResponse): any => ({ + ...obj, + }); +} + +export interface GetRouteAnalysisRequest { + /** + *

    The ID of the global network.

    + */ + GlobalNetworkId: string | undefined; + + /** + *

    The ID of the route analysis.

    + */ + RouteAnalysisId: string | undefined; +} + +export namespace GetRouteAnalysisRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetRouteAnalysisRequest): any => ({ + ...obj, + }); +} + +/** + *

    Describes a source or a destination.

    + */ +export interface RouteAnalysisEndpointOptions { + /** + *

    The ARN of the transit gateway attachment.

    + */ + TransitGatewayAttachmentArn?: string; + + /** + *

    The ARN of the transit gateway.

    + */ + TransitGatewayArn?: string; + + /** + *

    The IP address.

    + */ + IpAddress?: string; +} + +export namespace RouteAnalysisEndpointOptions { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RouteAnalysisEndpointOptions): any => ({ + ...obj, + }); +} + +export enum RouteAnalysisCompletionReasonCode { + BLACKHOLE_ROUTE_FOR_DESTINATION_FOUND = "BLACKHOLE_ROUTE_FOR_DESTINATION_FOUND", + CYCLIC_PATH_DETECTED = "CYCLIC_PATH_DETECTED", + INACTIVE_ROUTE_FOR_DESTINATION_FOUND = "INACTIVE_ROUTE_FOR_DESTINATION_FOUND", + MAX_HOPS_EXCEEDED = "MAX_HOPS_EXCEEDED", + NO_DESTINATION_ARN_PROVIDED = "NO_DESTINATION_ARN_PROVIDED", + POSSIBLE_MIDDLEBOX = "POSSIBLE_MIDDLEBOX", + ROUTE_NOT_FOUND = "ROUTE_NOT_FOUND", + TRANSIT_GATEWAY_ATTACHMENT = "TRANSIT_GATEWAY_ATTACHMENT_ATTACH_ARN_NO_MATCH", + TRANSIT_GATEWAY_ATTACHMENT_NOT_FOUND = "TRANSIT_GATEWAY_ATTACHMENT_NOT_FOUND", + TRANSIT_GATEWAY_ATTACHMENT_NOT_IN_TRANSIT_GATEWAY = "TRANSIT_GATEWAY_ATTACHMENT_NOT_IN_TRANSIT_GATEWAY", + TRANSIT_GATEWAY_ATTACHMENT_STABLE_ROUTE_TABLE_NOT_FOUND = "TRANSIT_GATEWAY_ATTACHMENT_STABLE_ROUTE_TABLE_NOT_FOUND", +} + +export enum RouteAnalysisCompletionResultCode { + CONNECTED = "CONNECTED", + NOT_CONNECTED = "NOT_CONNECTED", +} + +/** + *

    Describes the status of an analysis at completion.

    + */ +export interface RouteAnalysisCompletion { + /** + *

    The result of the analysis. If the status is NOT_CONNECTED, check the + * reason code.

    + */ + ResultCode?: RouteAnalysisCompletionResultCode | string; + + /** + *

    The reason code. Available only if a connection is not found.

    + *
      + *
    • + *

      + * BLACKHOLE_ROUTE_FOR_DESTINATION_FOUND - Found a black hole route with the destination CIDR block.

      + *
    • + *
    • + *

      + * CYCLIC_PATH_DETECTED - Found the same resource multiple times while traversing the path.

      + *
    • + *
    • + *

      + * INACTIVE_ROUTE_FOR_DESTINATION_FOUND - Found an inactive route with the destination CIDR block.

      + *
    • + *
    • + *

      + * MAX_HOPS_EXCEEDED - Analysis exceeded 64 hops without finding the destination.

      + *
    • + *
    • + *

      + * ROUTE_NOT_FOUND - Cannot find a route table with the destination CIDR block.

      + *
    • + *
    • + *

      + * TGW_ATTACH_ARN_NO_MATCH - Found an attachment, but not with the correct destination ARN.

      + *
    • + *
    • + *

      + * TGW_ATTACH_NOT_FOUND - Cannot find an attachment.

      + *
    • + *
    • + *

      + * TGW_ATTACH_NOT_IN_TGW - Found an attachment, but not to the correct transit gateway.

      + *
    • + *
    • + *

      + * TGW_ATTACH_STABLE_ROUTE_TABLE_NOT_FOUND - The state of the route table association is not associated.

      + *
    • + *
    + */ + ReasonCode?: RouteAnalysisCompletionReasonCode | string; + + /** + *

    Additional information about the path. Available only if a connection is not found.

    + */ + ReasonContext?: { [key: string]: string }; +} + +export namespace RouteAnalysisCompletion { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RouteAnalysisCompletion): any => ({ + ...obj, + }); +} + +/** + *

    Describes a network resource.

    + */ +export interface NetworkResourceSummary { + /** + *

    The ARN of the gateway.

    + */ + RegisteredGatewayArn?: string; + + /** + *

    The ARN of the resource.

    + */ + ResourceArn?: string; + + /** + *

    The resource type.

    + */ + ResourceType?: string; + + /** + *

    Information about the resource, in JSON format. Network Manager gets this information by describing the resource using its Describe API call.

    + */ + Definition?: string; + + /** + *

    The value for the Name tag.

    + */ + NameTag?: string; + + /** + *

    Indicates whether this is a middlebox appliance.

    + */ + IsMiddlebox?: boolean; +} + +export namespace NetworkResourceSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: NetworkResourceSummary): any => ({ + ...obj, + }); +} + +/** + *

    Describes a path component.

    + */ +export interface PathComponent { + /** + *

    The sequence number in the path. The destination is 0.

    + */ + Sequence?: number; + + /** + *

    The resource.

    + */ + Resource?: NetworkResourceSummary; + + /** + *

    The destination CIDR block in the route table.

    + */ + DestinationCidrBlock?: string; +} + +export namespace PathComponent { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PathComponent): any => ({ + ...obj, + }); +} + +/** + *

    Describes a route analysis path.

    + */ +export interface RouteAnalysisPath { + /** + *

    The status of the analysis at completion.

    + */ + CompletionStatus?: RouteAnalysisCompletion; + + /** + *

    The route analysis path.

    + */ + Path?: PathComponent[]; +} + +export namespace RouteAnalysisPath { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RouteAnalysisPath): any => ({ + ...obj, + }); +} + +export enum RouteAnalysisStatus { + completed = "COMPLETED", + failed = "FAILED", + running = "RUNNING", +} + +/** + *

    Describes a route analysis.

    + */ +export interface RouteAnalysis { + /** + *

    The ID of the global network.

    + */ + GlobalNetworkId?: string; + + /** + *

    The ID of the AWS account that created the route analysis.

    + */ + OwnerAccountId?: string; + + /** + *

    The ID of the route analysis.

    + */ + RouteAnalysisId?: string; + + /** + *

    The time that the analysis started.

    + */ + StartTimestamp?: Date; + + /** + *

    The status of the route analysis.

    + */ + Status?: RouteAnalysisStatus | string; + + /** + *

    The source.

    + */ + Source?: RouteAnalysisEndpointOptions; + + /** + *

    The destination.

    + */ + Destination?: RouteAnalysisEndpointOptions; + + /** + *

    Indicates whether to analyze the return path. The return path is not analyzed if the forward path + * analysis does not succeed.

    + */ + IncludeReturnPath?: boolean; + + /** + *

    Indicates whether to include the location of middlebox appliances in the route analysis.

    + */ + UseMiddleboxes?: boolean; + + /** + *

    The forward path.

    + */ + ForwardPath?: RouteAnalysisPath; + + /** + *

    The return path.

    + */ + ReturnPath?: RouteAnalysisPath; +} + +export namespace RouteAnalysis { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RouteAnalysis): any => ({ + ...obj, + }); +} + +export interface GetRouteAnalysisResponse { + /** + *

    The route analysis.

    + */ + RouteAnalysis?: RouteAnalysis; +} + +export namespace GetRouteAnalysisResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetRouteAnalysisResponse): any => ({ + ...obj, + }); +} + +export interface GetSitesRequest { + /** + *

    The ID of the global network.

    + */ + GlobalNetworkId: string | undefined; + + /** + *

    One or more site IDs. The maximum is 10.

    + */ + SiteIds?: string[]; + + /** + *

    The maximum number of results to return.

    + */ + MaxResults?: number; + + /** + *

    The token for the next page of results.

    + */ + NextToken?: string; +} + +export namespace GetSitesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetSitesRequest): any => ({ + ...obj, + }); +} + +export interface GetSitesResponse { + /** + *

    The sites.

    + */ + Sites?: Site[]; + + /** + *

    The token for the next page of results.

    + */ + NextToken?: string; +} + +export namespace GetSitesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetSitesResponse): any => ({ + ...obj, + ...(obj.Sites && { Sites: obj.Sites.map((item) => Site.filterSensitiveLog(item)) }), + }); +} + +export interface GetTransitGatewayConnectPeerAssociationsRequest { + /** + *

    The ID of the global network.

    + */ + GlobalNetworkId: string | undefined; + + /** + *

    One or more transit gateway Connect peer Amazon Resource Names (ARNs).

    + */ + TransitGatewayConnectPeerArns?: string[]; + + /** + *

    The maximum number of results to return.

    + */ + MaxResults?: number; + + /** + *

    The token for the next page of results.

    + */ + NextToken?: string; +} + +export namespace GetTransitGatewayConnectPeerAssociationsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetTransitGatewayConnectPeerAssociationsRequest): any => ({ + ...obj, + }); +} + +export interface GetTransitGatewayConnectPeerAssociationsResponse { + /** + *

    Information about the transit gateway Connect peer associations.

    + */ + TransitGatewayConnectPeerAssociations?: TransitGatewayConnectPeerAssociation[]; + + /** + *

    The token to use for the next page of results.

    + */ + NextToken?: string; +} + +export namespace GetTransitGatewayConnectPeerAssociationsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetTransitGatewayConnectPeerAssociationsResponse): any => ({ + ...obj, + }); +} + +export interface GetTransitGatewayRegistrationsRequest { + /** + *

    The ID of the global network.

    + */ + GlobalNetworkId: string | undefined; + + /** + *

    The Amazon Resource Names (ARNs) of one or more transit gateways. The maximum is + * 10.

    + */ + TransitGatewayArns?: string[]; + + /** + *

    The maximum number of results to return.

    + */ + MaxResults?: number; + + /** + *

    The token for the next page of results.

    + */ + NextToken?: string; +} + +export namespace GetTransitGatewayRegistrationsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetTransitGatewayRegistrationsRequest): any => ({ + ...obj, + }); +} + +export interface GetTransitGatewayRegistrationsResponse { + /** + *

    The transit gateway registrations.

    + */ + TransitGatewayRegistrations?: TransitGatewayRegistration[]; + + /** + *

    The token for the next page of results.

    + */ + NextToken?: string; +} + +export namespace GetTransitGatewayRegistrationsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetTransitGatewayRegistrationsResponse): any => ({ + ...obj, + }); +} + +export interface ListTagsForResourceRequest { + /** + *

    The Amazon Resource Name (ARN) of the resource.

    + */ + ResourceArn: string | undefined; +} + +export namespace ListTagsForResourceRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListTagsForResourceRequest): any => ({ + ...obj, + }); +} + +export interface ListTagsForResourceResponse { + /** + *

    The list of tags.

    + */ + TagList?: Tag[]; +} + +export namespace ListTagsForResourceResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListTagsForResourceResponse): any => ({ + ...obj, + }); +} + +export interface RegisterTransitGatewayRequest { + /** + *

    The ID of the global network.

    + */ + GlobalNetworkId: string | undefined; + + /** + *

    The Amazon Resource Name (ARN) of the transit gateway.

    + */ + TransitGatewayArn: string | undefined; +} + +export namespace RegisterTransitGatewayRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RegisterTransitGatewayRequest): any => ({ + ...obj, + }); +} + +export interface RegisterTransitGatewayResponse { + /** + *

    Information about the transit gateway registration.

    + */ + TransitGatewayRegistration?: TransitGatewayRegistration; +} + +export namespace RegisterTransitGatewayResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RegisterTransitGatewayResponse): any => ({ + ...obj, + }); +} + +/** + *

    Describes a source or a destination.

    + */ +export interface RouteAnalysisEndpointOptionsSpecification { + /** + *

    The ARN of the transit gateway attachment.

    + */ + TransitGatewayAttachmentArn?: string; + + /** + *

    The IP address.

    + */ + IpAddress?: string; +} + +export namespace RouteAnalysisEndpointOptionsSpecification { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RouteAnalysisEndpointOptionsSpecification): any => ({ + ...obj, + }); +} + +export interface StartRouteAnalysisRequest { + /** + *

    The ID of the global network.

    + */ + GlobalNetworkId: string | undefined; + + /** + *

    The source from which traffic originates.

    + */ + Source: RouteAnalysisEndpointOptionsSpecification | undefined; + + /** + *

    The destination.

    + */ + Destination: RouteAnalysisEndpointOptionsSpecification | undefined; + + /** + *

    Indicates whether to analyze the return path. The default is false.

    + */ + IncludeReturnPath?: boolean; + + /** + *

    Indicates whether to include the location of middlebox appliances in the route analysis. + * The default is false.

    + */ + UseMiddleboxes?: boolean; +} + +export namespace StartRouteAnalysisRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartRouteAnalysisRequest): any => ({ + ...obj, + }); +} + +export interface StartRouteAnalysisResponse { + /** + *

    The route analysis.

    + */ + RouteAnalysis?: RouteAnalysis; +} + +export namespace StartRouteAnalysisResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartRouteAnalysisResponse): any => ({ + ...obj, + }); +} + +export interface TagResourceRequest { + /** + *

    The Amazon Resource Name (ARN) of the resource.

    + */ + ResourceArn: string | undefined; + + /** + *

    The tags to apply to the specified resource.

    */ Tags: Tag[] | undefined; } @@ -2355,13 +3801,13 @@ export interface UpdateDeviceRequest { DeviceId: string | undefined; /** - *

    The AWS location of the device.

    + *

    The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.

    */ AWSLocation?: AWSLocation; /** *

    A description of the device.

    - *

    Length Constraints: Maximum length of 256 characters.

    + *

    Constraints: Maximum length of 256 characters.

    */ Description?: string; @@ -2372,19 +3818,19 @@ export interface UpdateDeviceRequest { /** *

    The vendor of the device.

    - *

    Length Constraints: Maximum length of 128 characters.

    + *

    Constraints: Maximum length of 128 characters.

    */ Vendor?: string; /** *

    The model of the device.

    - *

    Length Constraints: Maximum length of 128 characters.

    + *

    Constraints: Maximum length of 128 characters.

    */ Model?: string; /** *

    The serial number of the device.

    - *

    Length Constraints: Maximum length of 128 characters.

    + *

    Constraints: Maximum length of 128 characters.

    */ SerialNumber?: string; @@ -2434,7 +3880,7 @@ export interface UpdateGlobalNetworkRequest { /** *

    A description of the global network.

    - *

    Length Constraints: Maximum length of 256 characters.

    + *

    Constraints: Maximum length of 256 characters.

    */ Description?: string; } @@ -2477,13 +3923,13 @@ export interface UpdateLinkRequest { /** *

    A description of the link.

    - *

    Length Constraints: Maximum length of 256 characters.

    + *

    Constraints: Maximum length of 256 characters.

    */ Description?: string; /** *

    The type of the link.

    - *

    Length Constraints: Maximum length of 128 characters.

    + *

    Constraints: Maximum length of 128 characters.

    */ Type?: string; @@ -2494,7 +3940,7 @@ export interface UpdateLinkRequest { /** *

    The provider of the link.

    - *

    Length Constraints: Maximum length of 128 characters.

    + *

    Constraints: Maximum length of 128 characters.

    */ Provider?: string; } @@ -2524,6 +3970,53 @@ export namespace UpdateLinkResponse { }); } +export interface UpdateNetworkResourceMetadataRequest { + /** + *

    The ID of the global network.

    + */ + GlobalNetworkId: string | undefined; + + /** + *

    The ARN of the resource.

    + */ + ResourceArn: string | undefined; + + /** + *

    The resource metadata.

    + */ + Metadata: { [key: string]: string } | undefined; +} + +export namespace UpdateNetworkResourceMetadataRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateNetworkResourceMetadataRequest): any => ({ + ...obj, + }); +} + +export interface UpdateNetworkResourceMetadataResponse { + /** + *

    The ARN of the resource.

    + */ + ResourceArn?: string; + + /** + *

    The updated resource metadata.

    + */ + Metadata?: { [key: string]: string }; +} + +export namespace UpdateNetworkResourceMetadataResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateNetworkResourceMetadataResponse): any => ({ + ...obj, + }); +} + export interface UpdateSiteRequest { /** *

    The ID of the global network.

    @@ -2537,7 +4030,7 @@ export interface UpdateSiteRequest { /** *

    A description of your site.

    - *

    Length Constraints: Maximum length of 256 characters.

    + *

    Constraints: Maximum length of 256 characters.

    */ Description?: string; diff --git a/clients/client-networkmanager/src/pagination/GetNetworkResourceCountsPaginator.ts b/clients/client-networkmanager/src/pagination/GetNetworkResourceCountsPaginator.ts new file mode 100644 index 000000000000..0b032cf042c3 --- /dev/null +++ b/clients/client-networkmanager/src/pagination/GetNetworkResourceCountsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + GetNetworkResourceCountsCommand, + GetNetworkResourceCountsCommandInput, + GetNetworkResourceCountsCommandOutput, +} from "../commands/GetNetworkResourceCountsCommand"; +import { NetworkManager } from "../NetworkManager"; +import { NetworkManagerClient } from "../NetworkManagerClient"; +import { NetworkManagerPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: NetworkManagerClient, + input: GetNetworkResourceCountsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new GetNetworkResourceCountsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: NetworkManager, + input: GetNetworkResourceCountsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.getNetworkResourceCounts(input, ...args); +}; +export async function* paginateGetNetworkResourceCounts( + config: NetworkManagerPaginationConfiguration, + input: GetNetworkResourceCountsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: GetNetworkResourceCountsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof NetworkManager) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof NetworkManagerClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected NetworkManager | NetworkManagerClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-networkmanager/src/pagination/GetNetworkResourceRelationshipsPaginator.ts b/clients/client-networkmanager/src/pagination/GetNetworkResourceRelationshipsPaginator.ts new file mode 100644 index 000000000000..7927686ed07a --- /dev/null +++ b/clients/client-networkmanager/src/pagination/GetNetworkResourceRelationshipsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + GetNetworkResourceRelationshipsCommand, + GetNetworkResourceRelationshipsCommandInput, + GetNetworkResourceRelationshipsCommandOutput, +} from "../commands/GetNetworkResourceRelationshipsCommand"; +import { NetworkManager } from "../NetworkManager"; +import { NetworkManagerClient } from "../NetworkManagerClient"; +import { NetworkManagerPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: NetworkManagerClient, + input: GetNetworkResourceRelationshipsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new GetNetworkResourceRelationshipsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: NetworkManager, + input: GetNetworkResourceRelationshipsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.getNetworkResourceRelationships(input, ...args); +}; +export async function* paginateGetNetworkResourceRelationships( + config: NetworkManagerPaginationConfiguration, + input: GetNetworkResourceRelationshipsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: GetNetworkResourceRelationshipsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof NetworkManager) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof NetworkManagerClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected NetworkManager | NetworkManagerClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-networkmanager/src/pagination/GetNetworkResourcesPaginator.ts b/clients/client-networkmanager/src/pagination/GetNetworkResourcesPaginator.ts new file mode 100644 index 000000000000..dca73551a3a7 --- /dev/null +++ b/clients/client-networkmanager/src/pagination/GetNetworkResourcesPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + GetNetworkResourcesCommand, + GetNetworkResourcesCommandInput, + GetNetworkResourcesCommandOutput, +} from "../commands/GetNetworkResourcesCommand"; +import { NetworkManager } from "../NetworkManager"; +import { NetworkManagerClient } from "../NetworkManagerClient"; +import { NetworkManagerPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: NetworkManagerClient, + input: GetNetworkResourcesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new GetNetworkResourcesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: NetworkManager, + input: GetNetworkResourcesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.getNetworkResources(input, ...args); +}; +export async function* paginateGetNetworkResources( + config: NetworkManagerPaginationConfiguration, + input: GetNetworkResourcesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: GetNetworkResourcesCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof NetworkManager) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof NetworkManagerClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected NetworkManager | NetworkManagerClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-networkmanager/src/pagination/GetNetworkTelemetryPaginator.ts b/clients/client-networkmanager/src/pagination/GetNetworkTelemetryPaginator.ts new file mode 100644 index 000000000000..fb5268a7521a --- /dev/null +++ b/clients/client-networkmanager/src/pagination/GetNetworkTelemetryPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + GetNetworkTelemetryCommand, + GetNetworkTelemetryCommandInput, + GetNetworkTelemetryCommandOutput, +} from "../commands/GetNetworkTelemetryCommand"; +import { NetworkManager } from "../NetworkManager"; +import { NetworkManagerClient } from "../NetworkManagerClient"; +import { NetworkManagerPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: NetworkManagerClient, + input: GetNetworkTelemetryCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new GetNetworkTelemetryCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: NetworkManager, + input: GetNetworkTelemetryCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.getNetworkTelemetry(input, ...args); +}; +export async function* paginateGetNetworkTelemetry( + config: NetworkManagerPaginationConfiguration, + input: GetNetworkTelemetryCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: GetNetworkTelemetryCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof NetworkManager) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof NetworkManagerClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected NetworkManager | NetworkManagerClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-networkmanager/src/pagination/index.ts b/clients/client-networkmanager/src/pagination/index.ts index fcf7c5c810af..7d8ddbdb58bf 100644 --- a/clients/client-networkmanager/src/pagination/index.ts +++ b/clients/client-networkmanager/src/pagination/index.ts @@ -4,7 +4,11 @@ export * from "./GetCustomerGatewayAssociationsPaginator"; export * from "./GetDevicesPaginator"; export * from "./GetLinkAssociationsPaginator"; export * from "./GetLinksPaginator"; +export * from "./GetNetworkResourceCountsPaginator"; +export * from "./GetNetworkResourceRelationshipsPaginator"; +export * from "./GetNetworkResourcesPaginator"; +export * from "./GetNetworkTelemetryPaginator"; +export * from "./Interfaces"; export * from "./GetSitesPaginator"; export * from "./GetTransitGatewayConnectPeerAssociationsPaginator"; export * from "./GetTransitGatewayRegistrationsPaginator"; -export * from "./Interfaces"; diff --git a/clients/client-networkmanager/src/protocols/Aws_restJson1.ts b/clients/client-networkmanager/src/protocols/Aws_restJson1.ts index 3fec4dc8b4a9..0158d9c07547 100644 --- a/clients/client-networkmanager/src/protocols/Aws_restJson1.ts +++ b/clients/client-networkmanager/src/protocols/Aws_restJson1.ts @@ -1,5 +1,6 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, @@ -70,6 +71,24 @@ import { GetLinkAssociationsCommandOutput, } from "../commands/GetLinkAssociationsCommand"; import { GetLinksCommandInput, GetLinksCommandOutput } from "../commands/GetLinksCommand"; +import { + GetNetworkResourceCountsCommandInput, + GetNetworkResourceCountsCommandOutput, +} from "../commands/GetNetworkResourceCountsCommand"; +import { + GetNetworkResourceRelationshipsCommandInput, + GetNetworkResourceRelationshipsCommandOutput, +} from "../commands/GetNetworkResourceRelationshipsCommand"; +import { + GetNetworkResourcesCommandInput, + GetNetworkResourcesCommandOutput, +} from "../commands/GetNetworkResourcesCommand"; +import { GetNetworkRoutesCommandInput, GetNetworkRoutesCommandOutput } from "../commands/GetNetworkRoutesCommand"; +import { + GetNetworkTelemetryCommandInput, + GetNetworkTelemetryCommandOutput, +} from "../commands/GetNetworkTelemetryCommand"; +import { GetRouteAnalysisCommandInput, GetRouteAnalysisCommandOutput } from "../commands/GetRouteAnalysisCommand"; import { GetSitesCommandInput, GetSitesCommandOutput } from "../commands/GetSitesCommand"; import { GetTransitGatewayConnectPeerAssociationsCommandInput, @@ -87,6 +106,7 @@ import { RegisterTransitGatewayCommandInput, RegisterTransitGatewayCommandOutput, } from "../commands/RegisterTransitGatewayCommand"; +import { StartRouteAnalysisCommandInput, StartRouteAnalysisCommandOutput } from "../commands/StartRouteAnalysisCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { UpdateConnectionCommandInput, UpdateConnectionCommandOutput } from "../commands/UpdateConnectionCommand"; @@ -96,6 +116,10 @@ import { UpdateGlobalNetworkCommandOutput, } from "../commands/UpdateGlobalNetworkCommand"; import { UpdateLinkCommandInput, UpdateLinkCommandOutput } from "../commands/UpdateLinkCommand"; +import { + UpdateNetworkResourceMetadataCommandInput, + UpdateNetworkResourceMetadataCommandOutput, +} from "../commands/UpdateNetworkResourceMetadataCommand"; import { UpdateSiteCommandInput, UpdateSiteCommandOutput } from "../commands/UpdateSiteCommand"; import { AccessDeniedException, @@ -103,6 +127,7 @@ import { Bandwidth, ConflictException, Connection, + ConnectionHealth, CustomerGatewayAssociation, Device, GlobalNetwork, @@ -110,7 +135,23 @@ import { Link, LinkAssociation, Location, + NetworkResource, + NetworkResourceCount, + NetworkResourceSummary, + NetworkRoute, + NetworkRouteDestination, + NetworkTelemetry, + PathComponent, + Relationship, ResourceNotFoundException, + RouteAnalysis, + RouteAnalysisCompletion, + RouteAnalysisEndpointOptions, + RouteAnalysisEndpointOptionsSpecification, + RouteAnalysisPath, + RouteState, + RouteTableIdentifier, + RouteType, ServiceQuotaExceededException, Site, Tag, @@ -983,6 +1024,267 @@ export const serializeAws_restJson1GetLinksCommand = async ( }); }; +export const serializeAws_restJson1GetNetworkResourceCountsCommand = async ( + input: GetNetworkResourceCountsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/global-networks/{GlobalNetworkId}/network-resource-count"; + if (input.GlobalNetworkId !== undefined) { + const labelValue: string = input.GlobalNetworkId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: GlobalNetworkId."); + } + resolvedPath = resolvedPath.replace("{GlobalNetworkId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: GlobalNetworkId."); + } + const query: any = { + ...(input.ResourceType !== undefined && { resourceType: input.ResourceType }), + ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), + ...(input.NextToken !== undefined && { nextToken: input.NextToken }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1GetNetworkResourceRelationshipsCommand = async ( + input: GetNetworkResourceRelationshipsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/global-networks/{GlobalNetworkId}/network-resource-relationships"; + if (input.GlobalNetworkId !== undefined) { + const labelValue: string = input.GlobalNetworkId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: GlobalNetworkId."); + } + resolvedPath = resolvedPath.replace("{GlobalNetworkId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: GlobalNetworkId."); + } + const query: any = { + ...(input.RegisteredGatewayArn !== undefined && { registeredGatewayArn: input.RegisteredGatewayArn }), + ...(input.AwsRegion !== undefined && { awsRegion: input.AwsRegion }), + ...(input.AccountId !== undefined && { accountId: input.AccountId }), + ...(input.ResourceType !== undefined && { resourceType: input.ResourceType }), + ...(input.ResourceArn !== undefined && { resourceArn: input.ResourceArn }), + ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), + ...(input.NextToken !== undefined && { nextToken: input.NextToken }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1GetNetworkResourcesCommand = async ( + input: GetNetworkResourcesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/global-networks/{GlobalNetworkId}/network-resources"; + if (input.GlobalNetworkId !== undefined) { + const labelValue: string = input.GlobalNetworkId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: GlobalNetworkId."); + } + resolvedPath = resolvedPath.replace("{GlobalNetworkId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: GlobalNetworkId."); + } + const query: any = { + ...(input.RegisteredGatewayArn !== undefined && { registeredGatewayArn: input.RegisteredGatewayArn }), + ...(input.AwsRegion !== undefined && { awsRegion: input.AwsRegion }), + ...(input.AccountId !== undefined && { accountId: input.AccountId }), + ...(input.ResourceType !== undefined && { resourceType: input.ResourceType }), + ...(input.ResourceArn !== undefined && { resourceArn: input.ResourceArn }), + ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), + ...(input.NextToken !== undefined && { nextToken: input.NextToken }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1GetNetworkRoutesCommand = async ( + input: GetNetworkRoutesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/global-networks/{GlobalNetworkId}/network-routes"; + if (input.GlobalNetworkId !== undefined) { + const labelValue: string = input.GlobalNetworkId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: GlobalNetworkId."); + } + resolvedPath = resolvedPath.replace("{GlobalNetworkId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: GlobalNetworkId."); + } + let body: any; + body = JSON.stringify({ + ...(input.DestinationFilters !== undefined && + input.DestinationFilters !== null && { + DestinationFilters: serializeAws_restJson1FilterMap(input.DestinationFilters, context), + }), + ...(input.ExactCidrMatches !== undefined && + input.ExactCidrMatches !== null && { + ExactCidrMatches: serializeAws_restJson1StringList(input.ExactCidrMatches, context), + }), + ...(input.LongestPrefixMatches !== undefined && + input.LongestPrefixMatches !== null && { + LongestPrefixMatches: serializeAws_restJson1StringList(input.LongestPrefixMatches, context), + }), + ...(input.PrefixListIds !== undefined && + input.PrefixListIds !== null && { + PrefixListIds: serializeAws_restJson1StringList(input.PrefixListIds, context), + }), + ...(input.RouteTableIdentifier !== undefined && + input.RouteTableIdentifier !== null && { + RouteTableIdentifier: serializeAws_restJson1RouteTableIdentifier(input.RouteTableIdentifier, context), + }), + ...(input.States !== undefined && + input.States !== null && { States: serializeAws_restJson1RouteStateList(input.States, context) }), + ...(input.SubnetOfMatches !== undefined && + input.SubnetOfMatches !== null && { + SubnetOfMatches: serializeAws_restJson1StringList(input.SubnetOfMatches, context), + }), + ...(input.SupernetOfMatches !== undefined && + input.SupernetOfMatches !== null && { + SupernetOfMatches: serializeAws_restJson1StringList(input.SupernetOfMatches, context), + }), + ...(input.Types !== undefined && + input.Types !== null && { Types: serializeAws_restJson1RouteTypeList(input.Types, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + +export const serializeAws_restJson1GetNetworkTelemetryCommand = async ( + input: GetNetworkTelemetryCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/global-networks/{GlobalNetworkId}/network-telemetry"; + if (input.GlobalNetworkId !== undefined) { + const labelValue: string = input.GlobalNetworkId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: GlobalNetworkId."); + } + resolvedPath = resolvedPath.replace("{GlobalNetworkId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: GlobalNetworkId."); + } + const query: any = { + ...(input.RegisteredGatewayArn !== undefined && { registeredGatewayArn: input.RegisteredGatewayArn }), + ...(input.AwsRegion !== undefined && { awsRegion: input.AwsRegion }), + ...(input.AccountId !== undefined && { accountId: input.AccountId }), + ...(input.ResourceType !== undefined && { resourceType: input.ResourceType }), + ...(input.ResourceArn !== undefined && { resourceArn: input.ResourceArn }), + ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }), + ...(input.NextToken !== undefined && { nextToken: input.NextToken }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + query, + body, + }); +}; + +export const serializeAws_restJson1GetRouteAnalysisCommand = async ( + input: GetRouteAnalysisCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/global-networks/{GlobalNetworkId}/route-analyses/{RouteAnalysisId}"; + if (input.GlobalNetworkId !== undefined) { + const labelValue: string = input.GlobalNetworkId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: GlobalNetworkId."); + } + resolvedPath = resolvedPath.replace("{GlobalNetworkId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: GlobalNetworkId."); + } + if (input.RouteAnalysisId !== undefined) { + const labelValue: string = input.RouteAnalysisId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: RouteAnalysisId."); + } + resolvedPath = resolvedPath.replace("{RouteAnalysisId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: RouteAnalysisId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1GetSitesCommand = async ( input: GetSitesCommandInput, context: __SerdeContext @@ -1158,6 +1460,52 @@ export const serializeAws_restJson1RegisterTransitGatewayCommand = async ( }); }; +export const serializeAws_restJson1StartRouteAnalysisCommand = async ( + input: StartRouteAnalysisCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/global-networks/{GlobalNetworkId}/route-analyses"; + if (input.GlobalNetworkId !== undefined) { + const labelValue: string = input.GlobalNetworkId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: GlobalNetworkId."); + } + resolvedPath = resolvedPath.replace("{GlobalNetworkId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: GlobalNetworkId."); + } + let body: any; + body = JSON.stringify({ + ...(input.Destination !== undefined && + input.Destination !== null && { + Destination: serializeAws_restJson1RouteAnalysisEndpointOptionsSpecification(input.Destination, context), + }), + ...(input.IncludeReturnPath !== undefined && + input.IncludeReturnPath !== null && { IncludeReturnPath: input.IncludeReturnPath }), + ...(input.Source !== undefined && + input.Source !== null && { + Source: serializeAws_restJson1RouteAnalysisEndpointOptionsSpecification(input.Source, context), + }), + ...(input.UseMiddleboxes !== undefined && + input.UseMiddleboxes !== null && { UseMiddleboxes: input.UseMiddleboxes }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1TagResourceCommand = async ( input: TagResourceCommandInput, context: __SerdeContext @@ -1406,8 +1754,8 @@ export const serializeAws_restJson1UpdateLinkCommand = async ( }); }; -export const serializeAws_restJson1UpdateSiteCommand = async ( - input: UpdateSiteCommandInput, +export const serializeAws_restJson1UpdateNetworkResourceMetadataCommand = async ( + input: UpdateNetworkResourceMetadataCommandInput, context: __SerdeContext ): Promise<__HttpRequest> => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); @@ -1416,7 +1764,7 @@ export const serializeAws_restJson1UpdateSiteCommand = async ( }; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + - "/global-networks/{GlobalNetworkId}/sites/{SiteId}"; + "/global-networks/{GlobalNetworkId}/network-resources/{ResourceArn}/metadata"; if (input.GlobalNetworkId !== undefined) { const labelValue: string = input.GlobalNetworkId; if (labelValue.length <= 0) { @@ -1426,20 +1774,21 @@ export const serializeAws_restJson1UpdateSiteCommand = async ( } else { throw new Error("No value provided for input HTTP label: GlobalNetworkId."); } - if (input.SiteId !== undefined) { - const labelValue: string = input.SiteId; + if (input.ResourceArn !== undefined) { + const labelValue: string = input.ResourceArn; if (labelValue.length <= 0) { - throw new Error("Empty value provided for input HTTP label: SiteId."); + throw new Error("Empty value provided for input HTTP label: ResourceArn."); } - resolvedPath = resolvedPath.replace("{SiteId}", __extendedEncodeURIComponent(labelValue)); + resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue)); } else { - throw new Error("No value provided for input HTTP label: SiteId."); + throw new Error("No value provided for input HTTP label: ResourceArn."); } let body: any; body = JSON.stringify({ - ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), - ...(input.Location !== undefined && - input.Location !== null && { Location: serializeAws_restJson1Location(input.Location, context) }), + ...(input.Metadata !== undefined && + input.Metadata !== null && { + Metadata: serializeAws_restJson1NetworkResourceMetadataMap(input.Metadata, context), + }), }); return new __HttpRequest({ protocol, @@ -1452,8 +1801,54 @@ export const serializeAws_restJson1UpdateSiteCommand = async ( }); }; -export const deserializeAws_restJson1AssociateCustomerGatewayCommand = async ( - output: __HttpResponse, +export const serializeAws_restJson1UpdateSiteCommand = async ( + input: UpdateSiteCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/global-networks/{GlobalNetworkId}/sites/{SiteId}"; + if (input.GlobalNetworkId !== undefined) { + const labelValue: string = input.GlobalNetworkId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: GlobalNetworkId."); + } + resolvedPath = resolvedPath.replace("{GlobalNetworkId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: GlobalNetworkId."); + } + if (input.SiteId !== undefined) { + const labelValue: string = input.SiteId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: SiteId."); + } + resolvedPath = resolvedPath.replace("{SiteId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: SiteId."); + } + let body: any; + body = JSON.stringify({ + ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }), + ...(input.Location !== undefined && + input.Location !== null && { Location: serializeAws_restJson1Location(input.Location, context) }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + +export const deserializeAws_restJson1AssociateCustomerGatewayCommand = async ( + output: __HttpResponse, context: __SerdeContext ): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { @@ -3687,32 +4082,35 @@ const deserializeAws_restJson1GetLinksCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetSitesCommand = async ( +export const deserializeAws_restJson1GetNetworkResourceCountsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetSitesCommandError(output, context); + return deserializeAws_restJson1GetNetworkResourceCountsCommandError(output, context); } - const contents: GetSitesCommandOutput = { + const contents: GetNetworkResourceCountsCommandOutput = { $metadata: deserializeMetadata(output), + NetworkResourceCounts: undefined, NextToken: undefined, - Sites: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.NetworkResourceCounts !== undefined && data.NetworkResourceCounts !== null) { + contents.NetworkResourceCounts = deserializeAws_restJson1NetworkResourceCountList( + data.NetworkResourceCounts, + context + ); + } if (data.NextToken !== undefined && data.NextToken !== null) { contents.NextToken = __expectString(data.NextToken); } - if (data.Sites !== undefined && data.Sites !== null) { - contents.Sites = deserializeAws_restJson1SiteList(data.Sites, context); - } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetSitesCommandError = async ( +const deserializeAws_restJson1GetNetworkResourceCountsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3737,14 +4135,6 @@ const deserializeAws_restJson1GetSitesCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.networkmanager#ResourceNotFoundException": - response = { - ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.networkmanager#ThrottlingException": response = { @@ -3778,35 +4168,32 @@ const deserializeAws_restJson1GetSitesCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = async ( +export const deserializeAws_restJson1GetNetworkResourceRelationshipsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandError(output, context); + return deserializeAws_restJson1GetNetworkResourceRelationshipsCommandError(output, context); } - const contents: GetTransitGatewayConnectPeerAssociationsCommandOutput = { + const contents: GetNetworkResourceRelationshipsCommandOutput = { $metadata: deserializeMetadata(output), NextToken: undefined, - TransitGatewayConnectPeerAssociations: undefined, + Relationships: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data.NextToken !== undefined && data.NextToken !== null) { contents.NextToken = __expectString(data.NextToken); } - if (data.TransitGatewayConnectPeerAssociations !== undefined && data.TransitGatewayConnectPeerAssociations !== null) { - contents.TransitGatewayConnectPeerAssociations = deserializeAws_restJson1TransitGatewayConnectPeerAssociationList( - data.TransitGatewayConnectPeerAssociations, - context - ); + if (data.Relationships !== undefined && data.Relationships !== null) { + contents.Relationships = deserializeAws_restJson1RelationshipList(data.Relationships, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandError = async ( +const deserializeAws_restJson1GetNetworkResourceRelationshipsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3823,14 +4210,6 @@ const deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandErr $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.networkmanager#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.networkmanager#InternalServerException": response = { @@ -3880,35 +4259,32 @@ const deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandErr return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1GetTransitGatewayRegistrationsCommand = async ( +export const deserializeAws_restJson1GetNetworkResourcesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetTransitGatewayRegistrationsCommandError(output, context); + return deserializeAws_restJson1GetNetworkResourcesCommandError(output, context); } - const contents: GetTransitGatewayRegistrationsCommandOutput = { + const contents: GetNetworkResourcesCommandOutput = { $metadata: deserializeMetadata(output), + NetworkResources: undefined, NextToken: undefined, - TransitGatewayRegistrations: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.NetworkResources !== undefined && data.NetworkResources !== null) { + contents.NetworkResources = deserializeAws_restJson1NetworkResourceList(data.NetworkResources, context); + } if (data.NextToken !== undefined && data.NextToken !== null) { contents.NextToken = __expectString(data.NextToken); } - if (data.TransitGatewayRegistrations !== undefined && data.TransitGatewayRegistrations !== null) { - contents.TransitGatewayRegistrations = deserializeAws_restJson1TransitGatewayRegistrationList( - data.TransitGatewayRegistrations, - context - ); - } return Promise.resolve(contents); }; -const deserializeAws_restJson1GetTransitGatewayRegistrationsCommandError = async ( +const deserializeAws_restJson1GetNetworkResourcesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3974,28 +4350,40 @@ const deserializeAws_restJson1GetTransitGatewayRegistrationsCommandError = async return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1ListTagsForResourceCommand = async ( +export const deserializeAws_restJson1GetNetworkRoutesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListTagsForResourceCommandError(output, context); + return deserializeAws_restJson1GetNetworkRoutesCommandError(output, context); } - const contents: ListTagsForResourceCommandOutput = { + const contents: GetNetworkRoutesCommandOutput = { $metadata: deserializeMetadata(output), - TagList: undefined, + NetworkRoutes: undefined, + RouteTableArn: undefined, + RouteTableTimestamp: undefined, + RouteTableType: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TagList !== undefined && data.TagList !== null) { - contents.TagList = deserializeAws_restJson1TagList(data.TagList, context); + if (data.NetworkRoutes !== undefined && data.NetworkRoutes !== null) { + contents.NetworkRoutes = deserializeAws_restJson1NetworkRouteList(data.NetworkRoutes, context); + } + if (data.RouteTableArn !== undefined && data.RouteTableArn !== null) { + contents.RouteTableArn = __expectString(data.RouteTableArn); + } + if (data.RouteTableTimestamp !== undefined && data.RouteTableTimestamp !== null) { + contents.RouteTableTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.RouteTableTimestamp))); + } + if (data.RouteTableType !== undefined && data.RouteTableType !== null) { + contents.RouteTableType = __expectString(data.RouteTableType); } return Promise.resolve(contents); }; -const deserializeAws_restJson1ListTagsForResourceCommandError = async ( +const deserializeAws_restJson1GetNetworkRoutesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4061,31 +4449,32 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1RegisterTransitGatewayCommand = async ( +export const deserializeAws_restJson1GetNetworkTelemetryCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1RegisterTransitGatewayCommandError(output, context); + return deserializeAws_restJson1GetNetworkTelemetryCommandError(output, context); } - const contents: RegisterTransitGatewayCommandOutput = { + const contents: GetNetworkTelemetryCommandOutput = { $metadata: deserializeMetadata(output), - TransitGatewayRegistration: undefined, + NetworkTelemetry: undefined, + NextToken: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TransitGatewayRegistration !== undefined && data.TransitGatewayRegistration !== null) { - contents.TransitGatewayRegistration = deserializeAws_restJson1TransitGatewayRegistration( - data.TransitGatewayRegistration, - context - ); + if (data.NetworkTelemetry !== undefined && data.NetworkTelemetry !== null) { + contents.NetworkTelemetry = deserializeAws_restJson1NetworkTelemetryList(data.NetworkTelemetry, context); + } + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); } return Promise.resolve(contents); }; -const deserializeAws_restJson1RegisterTransitGatewayCommandError = async ( +const deserializeAws_restJson1GetNetworkTelemetryCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4102,14 +4491,6 @@ const deserializeAws_restJson1RegisterTransitGatewayCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.networkmanager#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.networkmanager#InternalServerException": response = { @@ -4159,24 +4540,28 @@ const deserializeAws_restJson1RegisterTransitGatewayCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1TagResourceCommand = async ( +export const deserializeAws_restJson1GetRouteAnalysisCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1TagResourceCommandError(output, context); + return deserializeAws_restJson1GetRouteAnalysisCommandError(output, context); } - const contents: TagResourceCommandOutput = { + const contents: GetRouteAnalysisCommandOutput = { $metadata: deserializeMetadata(output), + RouteAnalysis: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.RouteAnalysis !== undefined && data.RouteAnalysis !== null) { + contents.RouteAnalysis = deserializeAws_restJson1RouteAnalysis(data.RouteAnalysis, context); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1TagResourceCommandError = async ( +const deserializeAws_restJson1GetRouteAnalysisCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4193,14 +4578,6 @@ const deserializeAws_restJson1TagResourceCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.networkmanager#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.networkmanager#InternalServerException": response = { @@ -4217,14 +4594,6 @@ const deserializeAws_restJson1TagResourceCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ServiceQuotaExceededException": - case "com.amazonaws.networkmanager#ServiceQuotaExceededException": - response = { - ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.networkmanager#ThrottlingException": response = { @@ -4258,24 +4627,32 @@ const deserializeAws_restJson1TagResourceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1UntagResourceCommand = async ( +export const deserializeAws_restJson1GetSitesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1UntagResourceCommandError(output, context); + return deserializeAws_restJson1GetSitesCommandError(output, context); } - const contents: UntagResourceCommandOutput = { + const contents: GetSitesCommandOutput = { $metadata: deserializeMetadata(output), + NextToken: undefined, + Sites: undefined, }; - await collectBody(output.body, context); + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); + } + if (data.Sites !== undefined && data.Sites !== null) { + contents.Sites = deserializeAws_restJson1SiteList(data.Sites, context); + } return Promise.resolve(contents); }; -const deserializeAws_restJson1UntagResourceCommandError = async ( +const deserializeAws_restJson1GetSitesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4292,14 +4669,6 @@ const deserializeAws_restJson1UntagResourceCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.networkmanager#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.networkmanager#InternalServerException": response = { @@ -4349,28 +4718,35 @@ const deserializeAws_restJson1UntagResourceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1UpdateConnectionCommand = async ( +export const deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1UpdateConnectionCommandError(output, context); + return deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandError(output, context); } - const contents: UpdateConnectionCommandOutput = { + const contents: GetTransitGatewayConnectPeerAssociationsCommandOutput = { $metadata: deserializeMetadata(output), - Connection: undefined, + NextToken: undefined, + TransitGatewayConnectPeerAssociations: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Connection !== undefined && data.Connection !== null) { - contents.Connection = deserializeAws_restJson1Connection(data.Connection, context); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); + } + if (data.TransitGatewayConnectPeerAssociations !== undefined && data.TransitGatewayConnectPeerAssociations !== null) { + contents.TransitGatewayConnectPeerAssociations = deserializeAws_restJson1TransitGatewayConnectPeerAssociationList( + data.TransitGatewayConnectPeerAssociations, + context + ); } return Promise.resolve(contents); }; -const deserializeAws_restJson1UpdateConnectionCommandError = async ( +const deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4444,28 +4820,35 @@ const deserializeAws_restJson1UpdateConnectionCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1UpdateDeviceCommand = async ( +export const deserializeAws_restJson1GetTransitGatewayRegistrationsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1UpdateDeviceCommandError(output, context); + return deserializeAws_restJson1GetTransitGatewayRegistrationsCommandError(output, context); } - const contents: UpdateDeviceCommandOutput = { + const contents: GetTransitGatewayRegistrationsCommandOutput = { $metadata: deserializeMetadata(output), - Device: undefined, + NextToken: undefined, + TransitGatewayRegistrations: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Device !== undefined && data.Device !== null) { - contents.Device = deserializeAws_restJson1Device(data.Device, context); + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); + } + if (data.TransitGatewayRegistrations !== undefined && data.TransitGatewayRegistrations !== null) { + contents.TransitGatewayRegistrations = deserializeAws_restJson1TransitGatewayRegistrationList( + data.TransitGatewayRegistrations, + context + ); } return Promise.resolve(contents); }; -const deserializeAws_restJson1UpdateDeviceCommandError = async ( +const deserializeAws_restJson1GetTransitGatewayRegistrationsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4482,14 +4865,6 @@ const deserializeAws_restJson1UpdateDeviceCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ConflictException": - case "com.amazonaws.networkmanager#ConflictException": - response = { - ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerException": case "com.amazonaws.networkmanager#InternalServerException": response = { @@ -4539,28 +4914,783 @@ const deserializeAws_restJson1UpdateDeviceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1UpdateGlobalNetworkCommand = async ( +export const deserializeAws_restJson1ListTagsForResourceCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1UpdateGlobalNetworkCommandError(output, context); + return deserializeAws_restJson1ListTagsForResourceCommandError(output, context); + } + const contents: ListTagsForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + TagList: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.TagList !== undefined && data.TagList !== null) { + contents.TagList = deserializeAws_restJson1TagList(data.TagList, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListTagsForResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.networkmanager#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.networkmanager#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.networkmanager#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.networkmanager#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.networkmanager#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1RegisterTransitGatewayCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1RegisterTransitGatewayCommandError(output, context); + } + const contents: RegisterTransitGatewayCommandOutput = { + $metadata: deserializeMetadata(output), + TransitGatewayRegistration: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.TransitGatewayRegistration !== undefined && data.TransitGatewayRegistration !== null) { + contents.TransitGatewayRegistration = deserializeAws_restJson1TransitGatewayRegistration( + data.TransitGatewayRegistration, + context + ); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1RegisterTransitGatewayCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.networkmanager#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.networkmanager#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.networkmanager#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.networkmanager#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.networkmanager#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.networkmanager#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1StartRouteAnalysisCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1StartRouteAnalysisCommandError(output, context); + } + const contents: StartRouteAnalysisCommandOutput = { + $metadata: deserializeMetadata(output), + RouteAnalysis: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.RouteAnalysis !== undefined && data.RouteAnalysis !== null) { + contents.RouteAnalysis = deserializeAws_restJson1RouteAnalysis(data.RouteAnalysis, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1StartRouteAnalysisCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.networkmanager#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.networkmanager#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.networkmanager#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.networkmanager#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.networkmanager#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.networkmanager#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1TagResourceCommandError(output, context); + } + const contents: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1TagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.networkmanager#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.networkmanager#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.networkmanager#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.networkmanager#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.networkmanager#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.networkmanager#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.networkmanager#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UntagResourceCommandError(output, context); + } + const contents: UntagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UntagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.networkmanager#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.networkmanager#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.networkmanager#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.networkmanager#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.networkmanager#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.networkmanager#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UpdateConnectionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateConnectionCommandError(output, context); + } + const contents: UpdateConnectionCommandOutput = { + $metadata: deserializeMetadata(output), + Connection: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Connection !== undefined && data.Connection !== null) { + contents.Connection = deserializeAws_restJson1Connection(data.Connection, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateConnectionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.networkmanager#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.networkmanager#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.networkmanager#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.networkmanager#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.networkmanager#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.networkmanager#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UpdateDeviceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateDeviceCommandError(output, context); + } + const contents: UpdateDeviceCommandOutput = { + $metadata: deserializeMetadata(output), + Device: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Device !== undefined && data.Device !== null) { + contents.Device = deserializeAws_restJson1Device(data.Device, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateDeviceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.networkmanager#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.networkmanager#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.networkmanager#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.networkmanager#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.networkmanager#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.networkmanager#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UpdateGlobalNetworkCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateGlobalNetworkCommandError(output, context); } const contents: UpdateGlobalNetworkCommandOutput = { $metadata: deserializeMetadata(output), - GlobalNetwork: undefined, + GlobalNetwork: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.GlobalNetwork !== undefined && data.GlobalNetwork !== null) { + contents.GlobalNetwork = deserializeAws_restJson1GlobalNetwork(data.GlobalNetwork, context); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdateGlobalNetworkCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.networkmanager#AccessDeniedException": + response = { + ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ConflictException": + case "com.amazonaws.networkmanager#ConflictException": + response = { + ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerException": + case "com.amazonaws.networkmanager#InternalServerException": + response = { + ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.networkmanager#ResourceNotFoundException": + response = { + ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.networkmanager#ThrottlingException": + response = { + ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ValidationException": + case "com.amazonaws.networkmanager#ValidationException": + response = { + ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_restJson1UpdateLinkCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdateLinkCommandError(output, context); + } + const contents: UpdateLinkCommandOutput = { + $metadata: deserializeMetadata(output), + Link: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GlobalNetwork !== undefined && data.GlobalNetwork !== null) { - contents.GlobalNetwork = deserializeAws_restJson1GlobalNetwork(data.GlobalNetwork, context); + if (data.Link !== undefined && data.Link !== null) { + contents.Link = deserializeAws_restJson1Link(data.Link, context); } return Promise.resolve(contents); }; -const deserializeAws_restJson1UpdateGlobalNetworkCommandError = async ( +const deserializeAws_restJson1UpdateLinkCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4601,6 +5731,14 @@ const deserializeAws_restJson1UpdateGlobalNetworkCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ServiceQuotaExceededException": + case "com.amazonaws.networkmanager#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ThrottlingException": case "com.amazonaws.networkmanager#ThrottlingException": response = { @@ -4634,28 +5772,32 @@ const deserializeAws_restJson1UpdateGlobalNetworkCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_restJson1UpdateLinkCommand = async ( +export const deserializeAws_restJson1UpdateNetworkResourceMetadataCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1UpdateLinkCommandError(output, context); + return deserializeAws_restJson1UpdateNetworkResourceMetadataCommandError(output, context); } - const contents: UpdateLinkCommandOutput = { + const contents: UpdateNetworkResourceMetadataCommandOutput = { $metadata: deserializeMetadata(output), - Link: undefined, + Metadata: undefined, + ResourceArn: undefined, }; const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Link !== undefined && data.Link !== null) { - contents.Link = deserializeAws_restJson1Link(data.Link, context); + if (data.Metadata !== undefined && data.Metadata !== null) { + contents.Metadata = deserializeAws_restJson1NetworkResourceMetadataMap(data.Metadata, context); + } + if (data.ResourceArn !== undefined && data.ResourceArn !== null) { + contents.ResourceArn = __expectString(data.ResourceArn); } return Promise.resolve(contents); }; -const deserializeAws_restJson1UpdateLinkCommandError = async ( +const deserializeAws_restJson1UpdateNetworkResourceMetadataCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4696,14 +5838,6 @@ const deserializeAws_restJson1UpdateLinkCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ServiceQuotaExceededException": - case "com.amazonaws.networkmanager#ServiceQuotaExceededException": - response = { - ...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.networkmanager#ThrottlingException": response = { @@ -4903,11 +6037,15 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async ( name: "ResourceNotFoundException", $fault: "client", $metadata: deserializeMetadata(parsedOutput), + Context: undefined, Message: undefined, ResourceId: undefined, ResourceType: undefined, }; const data: any = parsedOutput.body; + if (data.Context !== undefined && data.Context !== null) { + contents.Context = deserializeAws_restJson1ExceptionContextMap(data.Context, context); + } if (data.Message !== undefined && data.Message !== null) { contents.Message = __expectString(data.Message); } @@ -5013,6 +6151,29 @@ const serializeAws_restJson1Bandwidth = (input: Bandwidth, context: __SerdeConte }; }; +const serializeAws_restJson1FilterMap = (input: { [key: string]: string[] }, context: __SerdeContext): any => { + return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: serializeAws_restJson1FilterValues(value, context), + }; + }, {}); +}; + +const serializeAws_restJson1FilterValues = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1Location = (input: Location, context: __SerdeContext): any => { return { ...(input.Address !== undefined && input.Address !== null && { Address: input.Address }), @@ -5021,6 +6182,72 @@ const serializeAws_restJson1Location = (input: Location, context: __SerdeContext }; }; +const serializeAws_restJson1NetworkResourceMetadataMap = ( + input: { [key: string]: string }, + context: __SerdeContext +): any => { + return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: value, + }; + }, {}); +}; + +const serializeAws_restJson1RouteAnalysisEndpointOptionsSpecification = ( + input: RouteAnalysisEndpointOptionsSpecification, + context: __SerdeContext +): any => { + return { + ...(input.IpAddress !== undefined && input.IpAddress !== null && { IpAddress: input.IpAddress }), + ...(input.TransitGatewayAttachmentArn !== undefined && + input.TransitGatewayAttachmentArn !== null && { TransitGatewayAttachmentArn: input.TransitGatewayAttachmentArn }), + }; +}; + +const serializeAws_restJson1RouteStateList = (input: (RouteState | string)[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1RouteTableIdentifier = (input: RouteTableIdentifier, context: __SerdeContext): any => { + return { + ...(input.TransitGatewayRouteTableArn !== undefined && + input.TransitGatewayRouteTableArn !== null && { TransitGatewayRouteTableArn: input.TransitGatewayRouteTableArn }), + }; +}; + +const serializeAws_restJson1RouteTypeList = (input: (RouteType | string)[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_restJson1StringList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1Tag = (input: Tag, context: __SerdeContext): any => { return { ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }), @@ -5075,6 +6302,17 @@ const deserializeAws_restJson1Connection = (output: any, context: __SerdeContext } as any; }; +const deserializeAws_restJson1ConnectionHealth = (output: any, context: __SerdeContext): ConnectionHealth => { + return { + Status: __expectString(output.Status), + Timestamp: + output.Timestamp !== undefined && output.Timestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) + : undefined, + Type: __expectString(output.Type), + } as any; +}; + const deserializeAws_restJson1ConnectionList = (output: any, context: __SerdeContext): Connection[] => { return (output || []) .filter((e: any) => e != null) @@ -5155,6 +6393,21 @@ const deserializeAws_restJson1DeviceList = (output: any, context: __SerdeContext }); }; +const deserializeAws_restJson1ExceptionContextMap = ( + output: any, + context: __SerdeContext +): { [key: string]: string } => { + return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: __expectString(value) as any, + }; + }, {}); +}; + const deserializeAws_restJson1GlobalNetwork = (output: any, context: __SerdeContext): GlobalNetwork => { return { CreatedAt: @@ -5247,6 +6500,288 @@ const deserializeAws_restJson1Location = (output: any, context: __SerdeContext): } as any; }; +const deserializeAws_restJson1NetworkResource = (output: any, context: __SerdeContext): NetworkResource => { + return { + AccountId: __expectString(output.AccountId), + AwsRegion: __expectString(output.AwsRegion), + Definition: __expectString(output.Definition), + DefinitionTimestamp: + output.DefinitionTimestamp !== undefined && output.DefinitionTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DefinitionTimestamp))) + : undefined, + Metadata: + output.Metadata !== undefined && output.Metadata !== null + ? deserializeAws_restJson1NetworkResourceMetadataMap(output.Metadata, context) + : undefined, + RegisteredGatewayArn: __expectString(output.RegisteredGatewayArn), + ResourceArn: __expectString(output.ResourceArn), + ResourceId: __expectString(output.ResourceId), + ResourceType: __expectString(output.ResourceType), + Tags: + output.Tags !== undefined && output.Tags !== null + ? deserializeAws_restJson1TagList(output.Tags, context) + : undefined, + } as any; +}; + +const deserializeAws_restJson1NetworkResourceCount = (output: any, context: __SerdeContext): NetworkResourceCount => { + return { + Count: __expectInt32(output.Count), + ResourceType: __expectString(output.ResourceType), + } as any; +}; + +const deserializeAws_restJson1NetworkResourceCountList = ( + output: any, + context: __SerdeContext +): NetworkResourceCount[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1NetworkResourceCount(entry, context); + }); +}; + +const deserializeAws_restJson1NetworkResourceList = (output: any, context: __SerdeContext): NetworkResource[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1NetworkResource(entry, context); + }); +}; + +const deserializeAws_restJson1NetworkResourceMetadataMap = ( + output: any, + context: __SerdeContext +): { [key: string]: string } => { + return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: __expectString(value) as any, + }; + }, {}); +}; + +const deserializeAws_restJson1NetworkResourceSummary = ( + output: any, + context: __SerdeContext +): NetworkResourceSummary => { + return { + Definition: __expectString(output.Definition), + IsMiddlebox: __expectBoolean(output.IsMiddlebox), + NameTag: __expectString(output.NameTag), + RegisteredGatewayArn: __expectString(output.RegisteredGatewayArn), + ResourceArn: __expectString(output.ResourceArn), + ResourceType: __expectString(output.ResourceType), + } as any; +}; + +const deserializeAws_restJson1NetworkRoute = (output: any, context: __SerdeContext): NetworkRoute => { + return { + DestinationCidrBlock: __expectString(output.DestinationCidrBlock), + Destinations: + output.Destinations !== undefined && output.Destinations !== null + ? deserializeAws_restJson1NetworkRouteDestinationList(output.Destinations, context) + : undefined, + PrefixListId: __expectString(output.PrefixListId), + State: __expectString(output.State), + Type: __expectString(output.Type), + } as any; +}; + +const deserializeAws_restJson1NetworkRouteDestination = ( + output: any, + context: __SerdeContext +): NetworkRouteDestination => { + return { + ResourceId: __expectString(output.ResourceId), + ResourceType: __expectString(output.ResourceType), + TransitGatewayAttachmentId: __expectString(output.TransitGatewayAttachmentId), + } as any; +}; + +const deserializeAws_restJson1NetworkRouteDestinationList = ( + output: any, + context: __SerdeContext +): NetworkRouteDestination[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1NetworkRouteDestination(entry, context); + }); +}; + +const deserializeAws_restJson1NetworkRouteList = (output: any, context: __SerdeContext): NetworkRoute[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1NetworkRoute(entry, context); + }); +}; + +const deserializeAws_restJson1NetworkTelemetry = (output: any, context: __SerdeContext): NetworkTelemetry => { + return { + AccountId: __expectString(output.AccountId), + Address: __expectString(output.Address), + AwsRegion: __expectString(output.AwsRegion), + Health: + output.Health !== undefined && output.Health !== null + ? deserializeAws_restJson1ConnectionHealth(output.Health, context) + : undefined, + RegisteredGatewayArn: __expectString(output.RegisteredGatewayArn), + ResourceArn: __expectString(output.ResourceArn), + ResourceId: __expectString(output.ResourceId), + ResourceType: __expectString(output.ResourceType), + } as any; +}; + +const deserializeAws_restJson1NetworkTelemetryList = (output: any, context: __SerdeContext): NetworkTelemetry[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1NetworkTelemetry(entry, context); + }); +}; + +const deserializeAws_restJson1PathComponent = (output: any, context: __SerdeContext): PathComponent => { + return { + DestinationCidrBlock: __expectString(output.DestinationCidrBlock), + Resource: + output.Resource !== undefined && output.Resource !== null + ? deserializeAws_restJson1NetworkResourceSummary(output.Resource, context) + : undefined, + Sequence: __expectInt32(output.Sequence), + } as any; +}; + +const deserializeAws_restJson1PathComponentList = (output: any, context: __SerdeContext): PathComponent[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1PathComponent(entry, context); + }); +}; + +const deserializeAws_restJson1ReasonContextMap = (output: any, context: __SerdeContext): { [key: string]: string } => { + return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: __expectString(value) as any, + }; + }, {}); +}; + +const deserializeAws_restJson1Relationship = (output: any, context: __SerdeContext): Relationship => { + return { + From: __expectString(output.From), + To: __expectString(output.To), + } as any; +}; + +const deserializeAws_restJson1RelationshipList = (output: any, context: __SerdeContext): Relationship[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1Relationship(entry, context); + }); +}; + +const deserializeAws_restJson1RouteAnalysis = (output: any, context: __SerdeContext): RouteAnalysis => { + return { + Destination: + output.Destination !== undefined && output.Destination !== null + ? deserializeAws_restJson1RouteAnalysisEndpointOptions(output.Destination, context) + : undefined, + ForwardPath: + output.ForwardPath !== undefined && output.ForwardPath !== null + ? deserializeAws_restJson1RouteAnalysisPath(output.ForwardPath, context) + : undefined, + GlobalNetworkId: __expectString(output.GlobalNetworkId), + IncludeReturnPath: __expectBoolean(output.IncludeReturnPath), + OwnerAccountId: __expectString(output.OwnerAccountId), + ReturnPath: + output.ReturnPath !== undefined && output.ReturnPath !== null + ? deserializeAws_restJson1RouteAnalysisPath(output.ReturnPath, context) + : undefined, + RouteAnalysisId: __expectString(output.RouteAnalysisId), + Source: + output.Source !== undefined && output.Source !== null + ? deserializeAws_restJson1RouteAnalysisEndpointOptions(output.Source, context) + : undefined, + StartTimestamp: + output.StartTimestamp !== undefined && output.StartTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTimestamp))) + : undefined, + Status: __expectString(output.Status), + UseMiddleboxes: __expectBoolean(output.UseMiddleboxes), + } as any; +}; + +const deserializeAws_restJson1RouteAnalysisCompletion = ( + output: any, + context: __SerdeContext +): RouteAnalysisCompletion => { + return { + ReasonCode: __expectString(output.ReasonCode), + ReasonContext: + output.ReasonContext !== undefined && output.ReasonContext !== null + ? deserializeAws_restJson1ReasonContextMap(output.ReasonContext, context) + : undefined, + ResultCode: __expectString(output.ResultCode), + } as any; +}; + +const deserializeAws_restJson1RouteAnalysisEndpointOptions = ( + output: any, + context: __SerdeContext +): RouteAnalysisEndpointOptions => { + return { + IpAddress: __expectString(output.IpAddress), + TransitGatewayArn: __expectString(output.TransitGatewayArn), + TransitGatewayAttachmentArn: __expectString(output.TransitGatewayAttachmentArn), + } as any; +}; + +const deserializeAws_restJson1RouteAnalysisPath = (output: any, context: __SerdeContext): RouteAnalysisPath => { + return { + CompletionStatus: + output.CompletionStatus !== undefined && output.CompletionStatus !== null + ? deserializeAws_restJson1RouteAnalysisCompletion(output.CompletionStatus, context) + : undefined, + Path: + output.Path !== undefined && output.Path !== null + ? deserializeAws_restJson1PathComponentList(output.Path, context) + : undefined, + } as any; +}; + const deserializeAws_restJson1Site = (output: any, context: __SerdeContext): Site => { return { CreatedAt: diff --git a/clients/client-rekognition/src/Rekognition.ts b/clients/client-rekognition/src/Rekognition.ts index 3878a0416a85..aed3d3dfb249 100644 --- a/clients/client-rekognition/src/Rekognition.ts +++ b/clients/client-rekognition/src/Rekognition.ts @@ -10,6 +10,11 @@ import { CreateCollectionCommandInput, CreateCollectionCommandOutput, } from "./commands/CreateCollectionCommand"; +import { + CreateDatasetCommand, + CreateDatasetCommandInput, + CreateDatasetCommandOutput, +} from "./commands/CreateDatasetCommand"; import { CreateProjectCommand, CreateProjectCommandInput, @@ -30,6 +35,11 @@ import { DeleteCollectionCommandInput, DeleteCollectionCommandOutput, } from "./commands/DeleteCollectionCommand"; +import { + DeleteDatasetCommand, + DeleteDatasetCommandInput, + DeleteDatasetCommandOutput, +} from "./commands/DeleteDatasetCommand"; import { DeleteFacesCommand, DeleteFacesCommandInput, DeleteFacesCommandOutput } from "./commands/DeleteFacesCommand"; import { DeleteProjectCommand, @@ -51,6 +61,11 @@ import { DescribeCollectionCommandInput, DescribeCollectionCommandOutput, } from "./commands/DescribeCollectionCommand"; +import { + DescribeDatasetCommand, + DescribeDatasetCommandInput, + DescribeDatasetCommandOutput, +} from "./commands/DescribeDatasetCommand"; import { DescribeProjectsCommand, DescribeProjectsCommandInput, @@ -88,6 +103,11 @@ import { DetectProtectiveEquipmentCommandOutput, } from "./commands/DetectProtectiveEquipmentCommand"; import { DetectTextCommand, DetectTextCommandInput, DetectTextCommandOutput } from "./commands/DetectTextCommand"; +import { + DistributeDatasetEntriesCommand, + DistributeDatasetEntriesCommandInput, + DistributeDatasetEntriesCommandOutput, +} from "./commands/DistributeDatasetEntriesCommand"; import { GetCelebrityInfoCommand, GetCelebrityInfoCommandInput, @@ -139,6 +159,16 @@ import { ListCollectionsCommandInput, ListCollectionsCommandOutput, } from "./commands/ListCollectionsCommand"; +import { + ListDatasetEntriesCommand, + ListDatasetEntriesCommandInput, + ListDatasetEntriesCommandOutput, +} from "./commands/ListDatasetEntriesCommand"; +import { + ListDatasetLabelsCommand, + ListDatasetLabelsCommandInput, + ListDatasetLabelsCommandOutput, +} from "./commands/ListDatasetLabelsCommand"; import { ListFacesCommand, ListFacesCommandInput, ListFacesCommandOutput } from "./commands/ListFacesCommand"; import { ListStreamProcessorsCommand, @@ -227,6 +257,11 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput, } from "./commands/UntagResourceCommand"; +import { + UpdateDatasetEntriesCommand, + UpdateDatasetEntriesCommandInput, + UpdateDatasetEntriesCommandOutput, +} from "./commands/UpdateDatasetEntriesCommand"; import { RekognitionClient } from "./RekognitionClient"; /** @@ -369,8 +404,64 @@ export class Rekognition extends RekognitionClient { } /** - *

    Creates a new Amazon Rekognition Custom Labels project. A project is a logical grouping of resources (images, Labels, models) - * and operations (training, evaluation and detection).

    + *

    Creates a new Amazon Rekognition Custom Labels dataset. You can create a dataset by using + * an Amazon Sagemaker format manifest file or by copying an existing Amazon Rekognition Custom Labels dataset.

    + * + *

    To create a training dataset for a project, specify train for the value of + * DatasetType. To create the test dataset for a project, + * specify test for the value of DatasetType. + *

    + * + * + *

    The response from CreateDataset is the Amazon Resource Name (ARN) for the dataset. + * Creating a dataset takes a while to complete. Use DescribeDataset to check the + * current status. The dataset created successfully if the value of Status is + * CREATE_COMPLETE.

    + *

    To check if any non-terminal errors occurred, call ListDatasetEntries + * and check for the presence of errors lists in the JSON Lines.

    + *

    Dataset creation fails if a terminal error occurs (Status = CREATE_FAILED). + * Currently, you can't access the terminal error information. + * + *

    + * + * + *

    For more information, see Creating dataset in the Amazon Rekognition Custom Labels Developer Guide.

    + * + *

    This operation requires permissions to perform the rekognition:CreateDataset action. + * If you want to copy an existing dataset, you also require permission to perform the rekognition:ListDatasetEntries action.

    + */ + public createDataset( + args: CreateDatasetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createDataset( + args: CreateDatasetCommandInput, + cb: (err: any, data?: CreateDatasetCommandOutput) => void + ): void; + public createDataset( + args: CreateDatasetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateDatasetCommandOutput) => void + ): void; + public createDataset( + args: CreateDatasetCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateDatasetCommandOutput) => void), + cb?: (err: any, data?: CreateDatasetCommandOutput) => void + ): Promise | void { + const command = new CreateDatasetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Creates a new Amazon Rekognition Custom Labels project. A project is a group of resources (datasets, model versions) + * that you use to create and manage Amazon Rekognition Custom Labels models.

    *

    This operation requires permissions to perform the rekognition:CreateProject action.

    */ public createProject( @@ -404,14 +495,42 @@ export class Rekognition extends RekognitionClient { /** *

    Creates a new version of a model and begins training. - * Models are managed as part of an Amazon Rekognition Custom Labels project. You can specify - * one training dataset and one testing dataset. The response from CreateProjectVersion + * Models are managed as part of an Amazon Rekognition Custom Labels project. + * The response from CreateProjectVersion * is an Amazon Resource Name (ARN) for the version of the model.

    + * + * + *

    Training uses the training and test datasets associated with the project. + * For more information, see Creating training and test dataset in the Amazon Rekognition Custom Labels Developer Guide. + *

    + * + * + * + *

    You can train a modelin a project that doesn't have associated datasets by specifying manifest files in the + * TrainingData and TestingData fields. + *

    + *

    If you open the console after training a model with manifest files, Amazon Rekognition Custom Labels creates + * the datasets for you using the most recent manifest files. You can no longer train + * a model version for the project by specifying manifest files.

    + *

    Instead of training with a project without associated datasets, + * we recommend that you use the manifest + * files to create training and test datasets for the project.

    + *
    + * + * *

    Training takes a while to complete. You can get the current status by calling - * DescribeProjectVersions.

    + * DescribeProjectVersions. Training completed successfully if + * the value of the Status field is TRAINING_COMPLETED.

    + * + *

    If training + * fails, see Debugging a failed model training in the Amazon Rekognition Custom Labels developer guide.

    + * + * *

    Once training has successfully completed, call DescribeProjectVersions to - * get the training results and evaluate the model. + * get the training results and evaluate the model. For more information, see Improving a trained Amazon Rekognition Custom Labels model + * in the Amazon Rekognition Custom Labels developers guide. *

    + * *

    After evaluating the model, you start the model * by calling StartProjectVersion.

    *

    This operation requires permissions to perform the rekognition:CreateProjectVersion action.

    @@ -523,6 +642,47 @@ export class Rekognition extends RekognitionClient { } } + /** + *

    Deletes an existing Amazon Rekognition Custom Labels dataset. + * Deleting a dataset might take while. Use DescribeDataset to check the + * current status. The dataset is still deleting if the value of Status is + * DELETE_IN_PROGRESS. If you try to access the dataset after it is deleted, you get + * a ResourceNotFoundException exception. + * + *

    + *

    You can't delete a dataset while it is creating (Status = CREATE_IN_PROGRESS) + * or if the dataset is updating (Status = UPDATE_IN_PROGRESS).

    + *

    This operation requires permissions to perform the rekognition:DeleteDataset action.

    + */ + public deleteDataset( + args: DeleteDatasetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteDataset( + args: DeleteDatasetCommandInput, + cb: (err: any, data?: DeleteDatasetCommandOutput) => void + ): void; + public deleteDataset( + args: DeleteDatasetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteDatasetCommandOutput) => void + ): void; + public deleteDataset( + args: DeleteDatasetCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteDatasetCommandOutput) => void), + cb?: (err: any, data?: DeleteDatasetCommandOutput) => void + ): Promise | void { + const command = new DeleteDatasetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Deletes faces from a collection. You specify a collection ID and an array of face IDs * to remove from the collection.

    @@ -555,6 +715,10 @@ export class Rekognition extends RekognitionClient { /** *

    Deletes an Amazon Rekognition Custom Labels project. To delete a project you must first delete all models associated * with the project. To delete a model, see DeleteProjectVersion.

    + *

    + * DeleteProject is an asynchronous operation. To check if the project is deleted, + * call DescribeProjects. The project is deleted when the project no longer appears in the + * response.

    *

    This operation requires permissions to perform the * rekognition:DeleteProject action.

    */ @@ -697,7 +861,43 @@ export class Rekognition extends RekognitionClient { } /** - *

    Lists and gets information about your Amazon Rekognition Custom Labels projects.

    + *

    + * Describes an Amazon Rekognition Custom Labels dataset. You can get information such as the current status of a dataset and + * statistics about the images and labels in a dataset. + *

    + *

    This operation requires permissions to perform the rekognition:DescribeDataset action.

    + */ + public describeDataset( + args: DescribeDatasetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describeDataset( + args: DescribeDatasetCommandInput, + cb: (err: any, data?: DescribeDatasetCommandOutput) => void + ): void; + public describeDataset( + args: DescribeDatasetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeDatasetCommandOutput) => void + ): void; + public describeDataset( + args: DescribeDatasetCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeDatasetCommandOutput) => void), + cb?: (err: any, data?: DescribeDatasetCommandOutput) => void + ): Promise | void { + const command = new DescribeDatasetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Gets information about your Amazon Rekognition Custom Labels projects.

    *

    This operation requires permissions to perform the rekognition:DescribeProjects action.

    */ public describeProjects( @@ -730,9 +930,9 @@ export class Rekognition extends RekognitionClient { } /** - *

    Lists and describes the models in an Amazon Rekognition Custom Labels project. You + *

    Lists and describes the versions of a model in an Amazon Rekognition Custom Labels project. You * can specify up to 10 model versions in ProjectVersionArns. If - * you don't specify a value, descriptions for all models are returned.

    + * you don't specify a value, descriptions for all model versions in the project are returned.

    *

    This operation requires permissions to perform the rekognition:DescribeProjectVersions * action.

    */ @@ -1192,6 +1392,49 @@ export class Rekognition extends RekognitionClient { } } + /** + *

    Distributes the entries (images) in a training dataset across the training dataset and the test dataset for a project. + * DistributeDatasetEntries moves 20% of the training dataset images to the test dataset. + * An entry is a JSON Line that describes an image. + *

    + *

    You supply the Amazon Resource Names (ARN) of a project's training dataset and test dataset. + * The training dataset must contain the images that you want to split. The test dataset + * must be empty. The datasets must belong to the same project. To create training and test datasets for a project, call CreateDataset.

    + *

    Distributing a dataset takes a while to complete. To check the status call DescribeDataset. The operation + * is complete when the Status field for the training dataset and the test dataset is UPDATE_COMPLETE. + * If the dataset split fails, the value of Status is UPDATE_FAILED.

    + * + *

    This operation requires permissions to perform the rekognition:DistributeDatasetEntries action.

    + */ + public distributeDatasetEntries( + args: DistributeDatasetEntriesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public distributeDatasetEntries( + args: DistributeDatasetEntriesCommandInput, + cb: (err: any, data?: DistributeDatasetEntriesCommandOutput) => void + ): void; + public distributeDatasetEntries( + args: DistributeDatasetEntriesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DistributeDatasetEntriesCommandOutput) => void + ): void; + public distributeDatasetEntries( + args: DistributeDatasetEntriesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DistributeDatasetEntriesCommandOutput) => void), + cb?: (err: any, data?: DistributeDatasetEntriesCommandOutput) => void + ): Promise | void { + const command = new DistributeDatasetEntriesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Gets the name and additional information about a celebrity based on their Amazon Rekognition ID. * The additional information is returned as an array of URLs. If there is no additional @@ -1234,28 +1477,33 @@ export class Rekognition extends RekognitionClient { /** *

    Gets the celebrity recognition results for a Amazon Rekognition Video analysis started by * StartCelebrityRecognition.

    - *

    Celebrity recognition in a video is an asynchronous operation. Analysis is started by a call - * to StartCelebrityRecognition which returns a job identifier (JobId). - * When the celebrity recognition operation finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service - * topic registered in the initial call to StartCelebrityRecognition. - * To get the results of the celebrity recognition analysis, first check that the status value published to the Amazon SNS - * topic is SUCCEEDED. If so, call GetCelebrityDetection and pass the job identifier - * (JobId) from the initial call to StartCelebrityDetection.

    + *

    Celebrity recognition in a video is an asynchronous operation. Analysis is started by a + * call to StartCelebrityRecognition which returns a job identifier + * (JobId).

    + *

    When the celebrity recognition operation finishes, Amazon Rekognition Video publishes a completion + * status to the Amazon Simple Notification Service topic registered in the initial call to + * StartCelebrityRecognition. To get the results of the celebrity recognition + * analysis, first check that the status value published to the Amazon SNS topic is + * SUCCEEDED. If so, call GetCelebrityDetection and pass the job + * identifier (JobId) from the initial call to StartCelebrityDetection.

    * *

    For more information, see Working With Stored Videos in the Amazon Rekognition Developer Guide.

    *

    - * GetCelebrityRecognition returns detected celebrities and the time(s) they are detected in an array - * (Celebrities) of CelebrityRecognition - * objects. Each CelebrityRecognition contains information about the celebrity in a CelebrityDetail - * object and the time, Timestamp, the celebrity was detected. - *

    + * GetCelebrityRecognition returns detected celebrities and the time(s) they + * are detected in an array (Celebrities) of CelebrityRecognition + * objects. Each CelebrityRecognition + * contains information about the celebrity in a CelebrityDetail object and the + * time, Timestamp, the celebrity was detected. This CelebrityDetail object stores information about the detected celebrity's face + * attributes, a face bounding box, known gender, the celebrity's name, and a confidence + * estimate.

    * *

    - * GetCelebrityRecognition only returns the default - * facial attributes (BoundingBox, Confidence, - * Landmarks, Pose, and Quality). The other facial attributes listed - * in the Face object of the following response syntax are not returned. For more information, - * see FaceDetail in the Amazon Rekognition Developer Guide.

    + * GetCelebrityRecognition only returns the default facial + * attributes (BoundingBox, Confidence, Landmarks, + * Pose, and Quality). The BoundingBox field only + * applies to the detected face instance. The other facial attributes listed in the + * Face object of the following response syntax are not returned. For more + * information, see FaceDetail in the Amazon Rekognition Developer Guide.

    *
    *

    By default, the Celebrities array is sorted by time (milliseconds from the start of the video). * You can also sort the array by celebrity by specifying the value ID in the SortBy input parameter.

    @@ -1843,6 +2091,89 @@ export class Rekognition extends RekognitionClient { } } + /** + *

    + * Lists the entries (images) within a dataset. An entry is a + * JSON Line that contains the information for a single image, including + * the image location, assigned labels, and object location bounding boxes. For + * more information, see Creating a manifest file.

    + *

    JSON Lines in the response include information about non-terminal + * errors found in the dataset. + * Non terminal errors are reported in errors lists within each JSON Line. The + * same information is reported in the training and testing validation result manifests that + * Amazon Rekognition Custom Labels creates during model training. + *

    + * + *

    You can filter the response in variety of ways, such as choosing which labels to return and returning JSON Lines created after a specific date. + *

    + *

    This operation requires permissions to perform the rekognition:ListDatasetEntries action.

    + */ + public listDatasetEntries( + args: ListDatasetEntriesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listDatasetEntries( + args: ListDatasetEntriesCommandInput, + cb: (err: any, data?: ListDatasetEntriesCommandOutput) => void + ): void; + public listDatasetEntries( + args: ListDatasetEntriesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListDatasetEntriesCommandOutput) => void + ): void; + public listDatasetEntries( + args: ListDatasetEntriesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListDatasetEntriesCommandOutput) => void), + cb?: (err: any, data?: ListDatasetEntriesCommandOutput) => void + ): Promise | void { + const command = new ListDatasetEntriesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + *

    Lists the labels in a dataset. Amazon Rekognition Custom Labels uses labels to describe images. For more information, see + * Labeling images. + *

    + *

    + * Lists the labels in a dataset. Amazon Rekognition Custom Labels uses labels to describe images. For more information, see Labeling images + * in the Amazon Rekognition Custom Labels Developer Guide.

    + */ + public listDatasetLabels( + args: ListDatasetLabelsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listDatasetLabels( + args: ListDatasetLabelsCommandInput, + cb: (err: any, data?: ListDatasetLabelsCommandOutput) => void + ): void; + public listDatasetLabels( + args: ListDatasetLabelsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListDatasetLabelsCommandOutput) => void + ): void; + public listDatasetLabels( + args: ListDatasetLabelsCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListDatasetLabelsCommandOutput) => void), + cb?: (err: any, data?: ListDatasetLabelsCommandOutput) => void + ): Promise | void { + const command = new ListDatasetLabelsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

    Returns metadata for faces in the specified collection. * This metadata includes information such as the bounding box coordinates, the confidence @@ -1948,9 +2279,9 @@ export class Rekognition extends RekognitionClient { *

    Returns an array of celebrities recognized in the input image. For more information, see Recognizing Celebrities * in the Amazon Rekognition Developer Guide.

    *

    - * RecognizeCelebrities returns the 64 largest faces in the image. It lists - * recognized celebrities in the CelebrityFaces array and unrecognized faces in the - * UnrecognizedFaces array. RecognizeCelebrities doesn't return + * RecognizeCelebrities returns the 64 largest faces in the image. It lists the + * recognized celebrities in the CelebrityFaces array and any unrecognized faces in + * the UnrecognizedFaces array. RecognizeCelebrities doesn't return * celebrities whose faces aren't among the largest 64 faces in the image.

    * *

    For each celebrity recognized, RecognizeCelebrities returns a @@ -2678,4 +3009,63 @@ export class Rekognition extends RekognitionClient { return this.send(command, optionsOrCb); } } + + /** + *

    Adds or updates one or more entries (images) in a dataset. An entry is a JSON Line which contains the + * information for a single image, including + * the image location, assigned labels, and object location bounding boxes. For more information, + * see Image-Level labels in manifest files and Object localization in manifest files in the Amazon Rekognition Custom Labels Developer Guide. + *

    + * + * + * + *

    If the source-ref field in the JSON line references an existing image, the existing image in the dataset + * is updated. + * If source-ref field doesn't reference an existing image, the image is added as a new image to the dataset.

    + * + *

    You specify the changes that you want to make in the Changes input parameter. + * There isn't a limit to the number JSON Lines that you can change, but the size of Changes must be less + * than 5MB.

    + * + * + *

    + * UpdateDatasetEntries returns immediatly, but the dataset update might take a while to complete. + * Use DescribeDataset to check the + * current status. The dataset updated successfully if the value of Status is + * UPDATE_COMPLETE.

    + *

    To check if any non-terminal errors occured, call ListDatasetEntries + * and check for the presence of errors lists in the JSON Lines.

    + *

    Dataset update fails if a terminal error occurs (Status = UPDATE_FAILED). + * Currently, you can't access the terminal error information from the Amazon Rekognition Custom Labels SDK. + *

    + *

    This operation requires permissions to perform the rekognition:UpdateDatasetEntries action.

    + */ + public updateDatasetEntries( + args: UpdateDatasetEntriesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateDatasetEntries( + args: UpdateDatasetEntriesCommandInput, + cb: (err: any, data?: UpdateDatasetEntriesCommandOutput) => void + ): void; + public updateDatasetEntries( + args: UpdateDatasetEntriesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateDatasetEntriesCommandOutput) => void + ): void; + public updateDatasetEntries( + args: UpdateDatasetEntriesCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateDatasetEntriesCommandOutput) => void), + cb?: (err: any, data?: UpdateDatasetEntriesCommandOutput) => void + ): Promise | void { + const command = new UpdateDatasetEntriesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } } diff --git a/clients/client-rekognition/src/RekognitionClient.ts b/clients/client-rekognition/src/RekognitionClient.ts index e3a8bcef1d26..c30962d669fe 100644 --- a/clients/client-rekognition/src/RekognitionClient.ts +++ b/clients/client-rekognition/src/RekognitionClient.ts @@ -51,6 +51,7 @@ import { import { CompareFacesCommandInput, CompareFacesCommandOutput } from "./commands/CompareFacesCommand"; import { CreateCollectionCommandInput, CreateCollectionCommandOutput } from "./commands/CreateCollectionCommand"; +import { CreateDatasetCommandInput, CreateDatasetCommandOutput } from "./commands/CreateDatasetCommand"; import { CreateProjectCommandInput, CreateProjectCommandOutput } from "./commands/CreateProjectCommand"; import { CreateProjectVersionCommandInput, @@ -61,6 +62,7 @@ import { CreateStreamProcessorCommandOutput, } from "./commands/CreateStreamProcessorCommand"; import { DeleteCollectionCommandInput, DeleteCollectionCommandOutput } from "./commands/DeleteCollectionCommand"; +import { DeleteDatasetCommandInput, DeleteDatasetCommandOutput } from "./commands/DeleteDatasetCommand"; import { DeleteFacesCommandInput, DeleteFacesCommandOutput } from "./commands/DeleteFacesCommand"; import { DeleteProjectCommandInput, DeleteProjectCommandOutput } from "./commands/DeleteProjectCommand"; import { @@ -72,6 +74,7 @@ import { DeleteStreamProcessorCommandOutput, } from "./commands/DeleteStreamProcessorCommand"; import { DescribeCollectionCommandInput, DescribeCollectionCommandOutput } from "./commands/DescribeCollectionCommand"; +import { DescribeDatasetCommandInput, DescribeDatasetCommandOutput } from "./commands/DescribeDatasetCommand"; import { DescribeProjectsCommandInput, DescribeProjectsCommandOutput } from "./commands/DescribeProjectsCommand"; import { DescribeProjectVersionsCommandInput, @@ -93,6 +96,10 @@ import { DetectProtectiveEquipmentCommandOutput, } from "./commands/DetectProtectiveEquipmentCommand"; import { DetectTextCommandInput, DetectTextCommandOutput } from "./commands/DetectTextCommand"; +import { + DistributeDatasetEntriesCommandInput, + DistributeDatasetEntriesCommandOutput, +} from "./commands/DistributeDatasetEntriesCommand"; import { GetCelebrityInfoCommandInput, GetCelebrityInfoCommandOutput } from "./commands/GetCelebrityInfoCommand"; import { GetCelebrityRecognitionCommandInput, @@ -113,6 +120,8 @@ import { import { GetTextDetectionCommandInput, GetTextDetectionCommandOutput } from "./commands/GetTextDetectionCommand"; import { IndexFacesCommandInput, IndexFacesCommandOutput } from "./commands/IndexFacesCommand"; import { ListCollectionsCommandInput, ListCollectionsCommandOutput } from "./commands/ListCollectionsCommand"; +import { ListDatasetEntriesCommandInput, ListDatasetEntriesCommandOutput } from "./commands/ListDatasetEntriesCommand"; +import { ListDatasetLabelsCommandInput, ListDatasetLabelsCommandOutput } from "./commands/ListDatasetLabelsCommand"; import { ListFacesCommandInput, ListFacesCommandOutput } from "./commands/ListFacesCommand"; import { ListStreamProcessorsCommandInput, @@ -166,20 +175,27 @@ import { } from "./commands/StopStreamProcessorCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { + UpdateDatasetEntriesCommandInput, + UpdateDatasetEntriesCommandOutput, +} from "./commands/UpdateDatasetEntriesCommand"; import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; export type ServiceInputTypes = | CompareFacesCommandInput | CreateCollectionCommandInput + | CreateDatasetCommandInput | CreateProjectCommandInput | CreateProjectVersionCommandInput | CreateStreamProcessorCommandInput | DeleteCollectionCommandInput + | DeleteDatasetCommandInput | DeleteFacesCommandInput | DeleteProjectCommandInput | DeleteProjectVersionCommandInput | DeleteStreamProcessorCommandInput | DescribeCollectionCommandInput + | DescribeDatasetCommandInput | DescribeProjectVersionsCommandInput | DescribeProjectsCommandInput | DescribeStreamProcessorCommandInput @@ -189,6 +205,7 @@ export type ServiceInputTypes = | DetectModerationLabelsCommandInput | DetectProtectiveEquipmentCommandInput | DetectTextCommandInput + | DistributeDatasetEntriesCommandInput | GetCelebrityInfoCommandInput | GetCelebrityRecognitionCommandInput | GetContentModerationCommandInput @@ -200,6 +217,8 @@ export type ServiceInputTypes = | GetTextDetectionCommandInput | IndexFacesCommandInput | ListCollectionsCommandInput + | ListDatasetEntriesCommandInput + | ListDatasetLabelsCommandInput | ListFacesCommandInput | ListStreamProcessorsCommandInput | ListTagsForResourceCommandInput @@ -219,20 +238,24 @@ export type ServiceInputTypes = | StopProjectVersionCommandInput | StopStreamProcessorCommandInput | TagResourceCommandInput - | UntagResourceCommandInput; + | UntagResourceCommandInput + | UpdateDatasetEntriesCommandInput; export type ServiceOutputTypes = | CompareFacesCommandOutput | CreateCollectionCommandOutput + | CreateDatasetCommandOutput | CreateProjectCommandOutput | CreateProjectVersionCommandOutput | CreateStreamProcessorCommandOutput | DeleteCollectionCommandOutput + | DeleteDatasetCommandOutput | DeleteFacesCommandOutput | DeleteProjectCommandOutput | DeleteProjectVersionCommandOutput | DeleteStreamProcessorCommandOutput | DescribeCollectionCommandOutput + | DescribeDatasetCommandOutput | DescribeProjectVersionsCommandOutput | DescribeProjectsCommandOutput | DescribeStreamProcessorCommandOutput @@ -242,6 +265,7 @@ export type ServiceOutputTypes = | DetectModerationLabelsCommandOutput | DetectProtectiveEquipmentCommandOutput | DetectTextCommandOutput + | DistributeDatasetEntriesCommandOutput | GetCelebrityInfoCommandOutput | GetCelebrityRecognitionCommandOutput | GetContentModerationCommandOutput @@ -253,6 +277,8 @@ export type ServiceOutputTypes = | GetTextDetectionCommandOutput | IndexFacesCommandOutput | ListCollectionsCommandOutput + | ListDatasetEntriesCommandOutput + | ListDatasetLabelsCommandOutput | ListFacesCommandOutput | ListStreamProcessorsCommandOutput | ListTagsForResourceCommandOutput @@ -272,7 +298,8 @@ export type ServiceOutputTypes = | StopProjectVersionCommandOutput | StopStreamProcessorCommandOutput | TagResourceCommandOutput - | UntagResourceCommandOutput; + | UntagResourceCommandOutput + | UpdateDatasetEntriesCommandOutput; export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { /** diff --git a/clients/client-rekognition/src/commands/CreateDatasetCommand.ts b/clients/client-rekognition/src/commands/CreateDatasetCommand.ts new file mode 100644 index 000000000000..dd6c0ac4974f --- /dev/null +++ b/clients/client-rekognition/src/commands/CreateDatasetCommand.ts @@ -0,0 +1,119 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CreateDatasetRequest, CreateDatasetResponse } from "../models/models_0"; +import { + deserializeAws_json1_1CreateDatasetCommand, + serializeAws_json1_1CreateDatasetCommand, +} from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +export interface CreateDatasetCommandInput extends CreateDatasetRequest {} +export interface CreateDatasetCommandOutput extends CreateDatasetResponse, __MetadataBearer {} + +/** + *

    Creates a new Amazon Rekognition Custom Labels dataset. You can create a dataset by using + * an Amazon Sagemaker format manifest file or by copying an existing Amazon Rekognition Custom Labels dataset.

    + * + *

    To create a training dataset for a project, specify train for the value of + * DatasetType. To create the test dataset for a project, + * specify test for the value of DatasetType. + *

    + * + * + *

    The response from CreateDataset is the Amazon Resource Name (ARN) for the dataset. + * Creating a dataset takes a while to complete. Use DescribeDataset to check the + * current status. The dataset created successfully if the value of Status is + * CREATE_COMPLETE.

    + *

    To check if any non-terminal errors occurred, call ListDatasetEntries + * and check for the presence of errors lists in the JSON Lines.

    + *

    Dataset creation fails if a terminal error occurs (Status = CREATE_FAILED). + * Currently, you can't access the terminal error information. + * + *

    + * + * + *

    For more information, see Creating dataset in the Amazon Rekognition Custom Labels Developer Guide.

    + * + *

    This operation requires permissions to perform the rekognition:CreateDataset action. + * If you want to copy an existing dataset, you also require permission to perform the rekognition:ListDatasetEntries action.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, CreateDatasetCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, CreateDatasetCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const command = new CreateDatasetCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateDatasetCommandInput} for command's `input` shape. + * @see {@link CreateDatasetCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for command's `input` shape. + * + */ +export class CreateDatasetCommand extends $Command< + CreateDatasetCommandInput, + CreateDatasetCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateDatasetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "CreateDatasetCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: CreateDatasetRequest.filterSensitiveLog, + outputFilterSensitiveLog: CreateDatasetResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: CreateDatasetCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1CreateDatasetCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1CreateDatasetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/CreateProjectCommand.ts b/clients/client-rekognition/src/commands/CreateProjectCommand.ts index 020a245276d3..185164bca0f8 100644 --- a/clients/client-rekognition/src/commands/CreateProjectCommand.ts +++ b/clients/client-rekognition/src/commands/CreateProjectCommand.ts @@ -22,8 +22,8 @@ export interface CreateProjectCommandInput extends CreateProjectRequest {} export interface CreateProjectCommandOutput extends CreateProjectResponse, __MetadataBearer {} /** - *

    Creates a new Amazon Rekognition Custom Labels project. A project is a logical grouping of resources (images, Labels, models) - * and operations (training, evaluation and detection).

    + *

    Creates a new Amazon Rekognition Custom Labels project. A project is a group of resources (datasets, model versions) + * that you use to create and manage Amazon Rekognition Custom Labels models.

    *

    This operation requires permissions to perform the rekognition:CreateProject action.

    * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-rekognition/src/commands/CreateProjectVersionCommand.ts b/clients/client-rekognition/src/commands/CreateProjectVersionCommand.ts index c4d4f233a168..92edd0c77905 100644 --- a/clients/client-rekognition/src/commands/CreateProjectVersionCommand.ts +++ b/clients/client-rekognition/src/commands/CreateProjectVersionCommand.ts @@ -23,14 +23,42 @@ export interface CreateProjectVersionCommandOutput extends CreateProjectVersionR /** *

    Creates a new version of a model and begins training. - * Models are managed as part of an Amazon Rekognition Custom Labels project. You can specify - * one training dataset and one testing dataset. The response from CreateProjectVersion + * Models are managed as part of an Amazon Rekognition Custom Labels project. + * The response from CreateProjectVersion * is an Amazon Resource Name (ARN) for the version of the model.

    + * + * + *

    Training uses the training and test datasets associated with the project. + * For more information, see Creating training and test dataset in the Amazon Rekognition Custom Labels Developer Guide. + *

    + * + * + * + *

    You can train a modelin a project that doesn't have associated datasets by specifying manifest files in the + * TrainingData and TestingData fields. + *

    + *

    If you open the console after training a model with manifest files, Amazon Rekognition Custom Labels creates + * the datasets for you using the most recent manifest files. You can no longer train + * a model version for the project by specifying manifest files.

    + *

    Instead of training with a project without associated datasets, + * we recommend that you use the manifest + * files to create training and test datasets for the project.

    + *
    + * + * *

    Training takes a while to complete. You can get the current status by calling - * DescribeProjectVersions.

    + * DescribeProjectVersions. Training completed successfully if + * the value of the Status field is TRAINING_COMPLETED.

    + * + *

    If training + * fails, see Debugging a failed model training in the Amazon Rekognition Custom Labels developer guide.

    + * + * *

    Once training has successfully completed, call DescribeProjectVersions to - * get the training results and evaluate the model. + * get the training results and evaluate the model. For more information, see Improving a trained Amazon Rekognition Custom Labels model + * in the Amazon Rekognition Custom Labels developers guide. *

    + * *

    After evaluating the model, you start the model * by calling StartProjectVersion.

    *

    This operation requires permissions to perform the rekognition:CreateProjectVersion action.

    diff --git a/clients/client-rekognition/src/commands/DeleteDatasetCommand.ts b/clients/client-rekognition/src/commands/DeleteDatasetCommand.ts new file mode 100644 index 000000000000..158275e5c965 --- /dev/null +++ b/clients/client-rekognition/src/commands/DeleteDatasetCommand.ts @@ -0,0 +1,104 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DeleteDatasetRequest, DeleteDatasetResponse } from "../models/models_0"; +import { + deserializeAws_json1_1DeleteDatasetCommand, + serializeAws_json1_1DeleteDatasetCommand, +} from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +export interface DeleteDatasetCommandInput extends DeleteDatasetRequest {} +export interface DeleteDatasetCommandOutput extends DeleteDatasetResponse, __MetadataBearer {} + +/** + *

    Deletes an existing Amazon Rekognition Custom Labels dataset. + * Deleting a dataset might take while. Use DescribeDataset to check the + * current status. The dataset is still deleting if the value of Status is + * DELETE_IN_PROGRESS. If you try to access the dataset after it is deleted, you get + * a ResourceNotFoundException exception. + * + *

    + *

    You can't delete a dataset while it is creating (Status = CREATE_IN_PROGRESS) + * or if the dataset is updating (Status = UPDATE_IN_PROGRESS).

    + *

    This operation requires permissions to perform the rekognition:DeleteDataset action.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, DeleteDatasetCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, DeleteDatasetCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const command = new DeleteDatasetCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteDatasetCommandInput} for command's `input` shape. + * @see {@link DeleteDatasetCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DeleteDatasetCommand extends $Command< + DeleteDatasetCommandInput, + DeleteDatasetCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteDatasetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "DeleteDatasetCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DeleteDatasetRequest.filterSensitiveLog, + outputFilterSensitiveLog: DeleteDatasetResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DeleteDatasetCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteDatasetCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1DeleteDatasetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/DeleteProjectCommand.ts b/clients/client-rekognition/src/commands/DeleteProjectCommand.ts index d694e844383e..94a98bfd5f57 100644 --- a/clients/client-rekognition/src/commands/DeleteProjectCommand.ts +++ b/clients/client-rekognition/src/commands/DeleteProjectCommand.ts @@ -24,6 +24,10 @@ export interface DeleteProjectCommandOutput extends DeleteProjectResponse, __Met /** *

    Deletes an Amazon Rekognition Custom Labels project. To delete a project you must first delete all models associated * with the project. To delete a model, see DeleteProjectVersion.

    + *

    + * DeleteProject is an asynchronous operation. To check if the project is deleted, + * call DescribeProjects. The project is deleted when the project no longer appears in the + * response.

    *

    This operation requires permissions to perform the * rekognition:DeleteProject action.

    * @example diff --git a/clients/client-rekognition/src/commands/DescribeDatasetCommand.ts b/clients/client-rekognition/src/commands/DescribeDatasetCommand.ts new file mode 100644 index 000000000000..7132fcf386e2 --- /dev/null +++ b/clients/client-rekognition/src/commands/DescribeDatasetCommand.ts @@ -0,0 +1,99 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DescribeDatasetRequest, DescribeDatasetResponse } from "../models/models_0"; +import { + deserializeAws_json1_1DescribeDatasetCommand, + serializeAws_json1_1DescribeDatasetCommand, +} from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +export interface DescribeDatasetCommandInput extends DescribeDatasetRequest {} +export interface DescribeDatasetCommandOutput extends DescribeDatasetResponse, __MetadataBearer {} + +/** + *

    + * Describes an Amazon Rekognition Custom Labels dataset. You can get information such as the current status of a dataset and + * statistics about the images and labels in a dataset. + *

    + *

    This operation requires permissions to perform the rekognition:DescribeDataset action.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, DescribeDatasetCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, DescribeDatasetCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const command = new DescribeDatasetCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeDatasetCommandInput} for command's `input` shape. + * @see {@link DescribeDatasetCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DescribeDatasetCommand extends $Command< + DescribeDatasetCommandInput, + DescribeDatasetCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeDatasetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "DescribeDatasetCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribeDatasetRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribeDatasetResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribeDatasetCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1DescribeDatasetCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1DescribeDatasetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/DescribeProjectVersionsCommand.ts b/clients/client-rekognition/src/commands/DescribeProjectVersionsCommand.ts index c52163eca639..18ce04ed1ceb 100644 --- a/clients/client-rekognition/src/commands/DescribeProjectVersionsCommand.ts +++ b/clients/client-rekognition/src/commands/DescribeProjectVersionsCommand.ts @@ -22,9 +22,9 @@ export interface DescribeProjectVersionsCommandInput extends DescribeProjectVers export interface DescribeProjectVersionsCommandOutput extends DescribeProjectVersionsResponse, __MetadataBearer {} /** - *

    Lists and describes the models in an Amazon Rekognition Custom Labels project. You + *

    Lists and describes the versions of a model in an Amazon Rekognition Custom Labels project. You * can specify up to 10 model versions in ProjectVersionArns. If - * you don't specify a value, descriptions for all models are returned.

    + * you don't specify a value, descriptions for all model versions in the project are returned.

    *

    This operation requires permissions to perform the rekognition:DescribeProjectVersions * action.

    * @example diff --git a/clients/client-rekognition/src/commands/DescribeProjectsCommand.ts b/clients/client-rekognition/src/commands/DescribeProjectsCommand.ts index fd63402e8176..58aca7cc4e9f 100644 --- a/clients/client-rekognition/src/commands/DescribeProjectsCommand.ts +++ b/clients/client-rekognition/src/commands/DescribeProjectsCommand.ts @@ -22,7 +22,7 @@ export interface DescribeProjectsCommandInput extends DescribeProjectsRequest {} export interface DescribeProjectsCommandOutput extends DescribeProjectsResponse, __MetadataBearer {} /** - *

    Lists and gets information about your Amazon Rekognition Custom Labels projects.

    + *

    Gets information about your Amazon Rekognition Custom Labels projects.

    *

    This operation requires permissions to perform the rekognition:DescribeProjects action.

    * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-rekognition/src/commands/DistributeDatasetEntriesCommand.ts b/clients/client-rekognition/src/commands/DistributeDatasetEntriesCommand.ts new file mode 100644 index 000000000000..1145249e1acd --- /dev/null +++ b/clients/client-rekognition/src/commands/DistributeDatasetEntriesCommand.ts @@ -0,0 +1,106 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { DistributeDatasetEntriesRequest, DistributeDatasetEntriesResponse } from "../models/models_0"; +import { + deserializeAws_json1_1DistributeDatasetEntriesCommand, + serializeAws_json1_1DistributeDatasetEntriesCommand, +} from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +export interface DistributeDatasetEntriesCommandInput extends DistributeDatasetEntriesRequest {} +export interface DistributeDatasetEntriesCommandOutput extends DistributeDatasetEntriesResponse, __MetadataBearer {} + +/** + *

    Distributes the entries (images) in a training dataset across the training dataset and the test dataset for a project. + * DistributeDatasetEntries moves 20% of the training dataset images to the test dataset. + * An entry is a JSON Line that describes an image. + *

    + *

    You supply the Amazon Resource Names (ARN) of a project's training dataset and test dataset. + * The training dataset must contain the images that you want to split. The test dataset + * must be empty. The datasets must belong to the same project. To create training and test datasets for a project, call CreateDataset.

    + *

    Distributing a dataset takes a while to complete. To check the status call DescribeDataset. The operation + * is complete when the Status field for the training dataset and the test dataset is UPDATE_COMPLETE. + * If the dataset split fails, the value of Status is UPDATE_FAILED.

    + * + *

    This operation requires permissions to perform the rekognition:DistributeDatasetEntries action.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, DistributeDatasetEntriesCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, DistributeDatasetEntriesCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const command = new DistributeDatasetEntriesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DistributeDatasetEntriesCommandInput} for command's `input` shape. + * @see {@link DistributeDatasetEntriesCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for command's `input` shape. + * + */ +export class DistributeDatasetEntriesCommand extends $Command< + DistributeDatasetEntriesCommandInput, + DistributeDatasetEntriesCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DistributeDatasetEntriesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "DistributeDatasetEntriesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DistributeDatasetEntriesRequest.filterSensitiveLog, + outputFilterSensitiveLog: DistributeDatasetEntriesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DistributeDatasetEntriesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1DistributeDatasetEntriesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1DistributeDatasetEntriesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/GetCelebrityRecognitionCommand.ts b/clients/client-rekognition/src/commands/GetCelebrityRecognitionCommand.ts index 9f08f545cb69..e10abb07c059 100644 --- a/clients/client-rekognition/src/commands/GetCelebrityRecognitionCommand.ts +++ b/clients/client-rekognition/src/commands/GetCelebrityRecognitionCommand.ts @@ -24,28 +24,33 @@ export interface GetCelebrityRecognitionCommandOutput extends GetCelebrityRecogn /** *

    Gets the celebrity recognition results for a Amazon Rekognition Video analysis started by * StartCelebrityRecognition.

    - *

    Celebrity recognition in a video is an asynchronous operation. Analysis is started by a call - * to StartCelebrityRecognition which returns a job identifier (JobId). - * When the celebrity recognition operation finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service - * topic registered in the initial call to StartCelebrityRecognition. - * To get the results of the celebrity recognition analysis, first check that the status value published to the Amazon SNS - * topic is SUCCEEDED. If so, call GetCelebrityDetection and pass the job identifier - * (JobId) from the initial call to StartCelebrityDetection.

    + *

    Celebrity recognition in a video is an asynchronous operation. Analysis is started by a + * call to StartCelebrityRecognition which returns a job identifier + * (JobId).

    + *

    When the celebrity recognition operation finishes, Amazon Rekognition Video publishes a completion + * status to the Amazon Simple Notification Service topic registered in the initial call to + * StartCelebrityRecognition. To get the results of the celebrity recognition + * analysis, first check that the status value published to the Amazon SNS topic is + * SUCCEEDED. If so, call GetCelebrityDetection and pass the job + * identifier (JobId) from the initial call to StartCelebrityDetection.

    * *

    For more information, see Working With Stored Videos in the Amazon Rekognition Developer Guide.

    *

    - * GetCelebrityRecognition returns detected celebrities and the time(s) they are detected in an array - * (Celebrities) of CelebrityRecognition - * objects. Each CelebrityRecognition contains information about the celebrity in a CelebrityDetail - * object and the time, Timestamp, the celebrity was detected. - *

    + * GetCelebrityRecognition returns detected celebrities and the time(s) they + * are detected in an array (Celebrities) of CelebrityRecognition + * objects. Each CelebrityRecognition + * contains information about the celebrity in a CelebrityDetail object and the + * time, Timestamp, the celebrity was detected. This CelebrityDetail object stores information about the detected celebrity's face + * attributes, a face bounding box, known gender, the celebrity's name, and a confidence + * estimate.

    * *

    - * GetCelebrityRecognition only returns the default - * facial attributes (BoundingBox, Confidence, - * Landmarks, Pose, and Quality). The other facial attributes listed - * in the Face object of the following response syntax are not returned. For more information, - * see FaceDetail in the Amazon Rekognition Developer Guide.

    + * GetCelebrityRecognition only returns the default facial + * attributes (BoundingBox, Confidence, Landmarks, + * Pose, and Quality). The BoundingBox field only + * applies to the detected face instance. The other facial attributes listed in the + * Face object of the following response syntax are not returned. For more + * information, see FaceDetail in the Amazon Rekognition Developer Guide.

    *
    *

    By default, the Celebrities array is sorted by time (milliseconds from the start of the video). * You can also sort the array by celebrity by specifying the value ID in the SortBy input parameter.

    diff --git a/clients/client-rekognition/src/commands/ListDatasetEntriesCommand.ts b/clients/client-rekognition/src/commands/ListDatasetEntriesCommand.ts new file mode 100644 index 000000000000..a25a2918302c --- /dev/null +++ b/clients/client-rekognition/src/commands/ListDatasetEntriesCommand.ts @@ -0,0 +1,109 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ListDatasetEntriesRequest, ListDatasetEntriesResponse } from "../models/models_0"; +import { + deserializeAws_json1_1ListDatasetEntriesCommand, + serializeAws_json1_1ListDatasetEntriesCommand, +} from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +export interface ListDatasetEntriesCommandInput extends ListDatasetEntriesRequest {} +export interface ListDatasetEntriesCommandOutput extends ListDatasetEntriesResponse, __MetadataBearer {} + +/** + *

    + * Lists the entries (images) within a dataset. An entry is a + * JSON Line that contains the information for a single image, including + * the image location, assigned labels, and object location bounding boxes. For + * more information, see Creating a manifest file.

    + *

    JSON Lines in the response include information about non-terminal + * errors found in the dataset. + * Non terminal errors are reported in errors lists within each JSON Line. The + * same information is reported in the training and testing validation result manifests that + * Amazon Rekognition Custom Labels creates during model training. + *

    + * + *

    You can filter the response in variety of ways, such as choosing which labels to return and returning JSON Lines created after a specific date. + *

    + *

    This operation requires permissions to perform the rekognition:ListDatasetEntries action.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, ListDatasetEntriesCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, ListDatasetEntriesCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const command = new ListDatasetEntriesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListDatasetEntriesCommandInput} for command's `input` shape. + * @see {@link ListDatasetEntriesCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListDatasetEntriesCommand extends $Command< + ListDatasetEntriesCommandInput, + ListDatasetEntriesCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListDatasetEntriesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "ListDatasetEntriesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListDatasetEntriesRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListDatasetEntriesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListDatasetEntriesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1ListDatasetEntriesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1ListDatasetEntriesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/ListDatasetLabelsCommand.ts b/clients/client-rekognition/src/commands/ListDatasetLabelsCommand.ts new file mode 100644 index 000000000000..3aed05c1c17f --- /dev/null +++ b/clients/client-rekognition/src/commands/ListDatasetLabelsCommand.ts @@ -0,0 +1,100 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ListDatasetLabelsRequest, ListDatasetLabelsResponse } from "../models/models_0"; +import { + deserializeAws_json1_1ListDatasetLabelsCommand, + serializeAws_json1_1ListDatasetLabelsCommand, +} from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +export interface ListDatasetLabelsCommandInput extends ListDatasetLabelsRequest {} +export interface ListDatasetLabelsCommandOutput extends ListDatasetLabelsResponse, __MetadataBearer {} + +/** + *

    Lists the labels in a dataset. Amazon Rekognition Custom Labels uses labels to describe images. For more information, see + * Labeling images. + *

    + *

    + * Lists the labels in a dataset. Amazon Rekognition Custom Labels uses labels to describe images. For more information, see Labeling images + * in the Amazon Rekognition Custom Labels Developer Guide.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, ListDatasetLabelsCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, ListDatasetLabelsCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const command = new ListDatasetLabelsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListDatasetLabelsCommandInput} for command's `input` shape. + * @see {@link ListDatasetLabelsCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for command's `input` shape. + * + */ +export class ListDatasetLabelsCommand extends $Command< + ListDatasetLabelsCommandInput, + ListDatasetLabelsCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListDatasetLabelsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "ListDatasetLabelsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListDatasetLabelsRequest.filterSensitiveLog, + outputFilterSensitiveLog: ListDatasetLabelsResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListDatasetLabelsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1ListDatasetLabelsCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1ListDatasetLabelsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/RecognizeCelebritiesCommand.ts b/clients/client-rekognition/src/commands/RecognizeCelebritiesCommand.ts index ce85300df11e..84a53061fefb 100644 --- a/clients/client-rekognition/src/commands/RecognizeCelebritiesCommand.ts +++ b/clients/client-rekognition/src/commands/RecognizeCelebritiesCommand.ts @@ -25,9 +25,9 @@ export interface RecognizeCelebritiesCommandOutput extends RecognizeCelebritiesR *

    Returns an array of celebrities recognized in the input image. For more information, see Recognizing Celebrities * in the Amazon Rekognition Developer Guide.

    *

    - * RecognizeCelebrities returns the 64 largest faces in the image. It lists - * recognized celebrities in the CelebrityFaces array and unrecognized faces in the - * UnrecognizedFaces array. RecognizeCelebrities doesn't return + * RecognizeCelebrities returns the 64 largest faces in the image. It lists the + * recognized celebrities in the CelebrityFaces array and any unrecognized faces in + * the UnrecognizedFaces array. RecognizeCelebrities doesn't return * celebrities whose faces aren't among the largest 64 faces in the image.

    * *

    For each celebrity recognized, RecognizeCelebrities returns a diff --git a/clients/client-rekognition/src/commands/UpdateDatasetEntriesCommand.ts b/clients/client-rekognition/src/commands/UpdateDatasetEntriesCommand.ts new file mode 100644 index 000000000000..7225d053421f --- /dev/null +++ b/clients/client-rekognition/src/commands/UpdateDatasetEntriesCommand.ts @@ -0,0 +1,122 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { UpdateDatasetEntriesRequest, UpdateDatasetEntriesResponse } from "../models/models_0"; +import { + deserializeAws_json1_1UpdateDatasetEntriesCommand, + serializeAws_json1_1UpdateDatasetEntriesCommand, +} from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +export interface UpdateDatasetEntriesCommandInput extends UpdateDatasetEntriesRequest {} +export interface UpdateDatasetEntriesCommandOutput extends UpdateDatasetEntriesResponse, __MetadataBearer {} + +/** + *

    Adds or updates one or more entries (images) in a dataset. An entry is a JSON Line which contains the + * information for a single image, including + * the image location, assigned labels, and object location bounding boxes. For more information, + * see Image-Level labels in manifest files and Object localization in manifest files in the Amazon Rekognition Custom Labels Developer Guide. + *

    + * + * + * + *

    If the source-ref field in the JSON line references an existing image, the existing image in the dataset + * is updated. + * If source-ref field doesn't reference an existing image, the image is added as a new image to the dataset.

    + * + *

    You specify the changes that you want to make in the Changes input parameter. + * There isn't a limit to the number JSON Lines that you can change, but the size of Changes must be less + * than 5MB.

    + * + * + *

    + * UpdateDatasetEntries returns immediatly, but the dataset update might take a while to complete. + * Use DescribeDataset to check the + * current status. The dataset updated successfully if the value of Status is + * UPDATE_COMPLETE.

    + *

    To check if any non-terminal errors occured, call ListDatasetEntries + * and check for the presence of errors lists in the JSON Lines.

    + *

    Dataset update fails if a terminal error occurs (Status = UPDATE_FAILED). + * Currently, you can't access the terminal error information from the Amazon Rekognition Custom Labels SDK. + *

    + *

    This operation requires permissions to perform the rekognition:UpdateDatasetEntries action.

    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, UpdateDatasetEntriesCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, UpdateDatasetEntriesCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const command = new UpdateDatasetEntriesCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateDatasetEntriesCommandInput} for command's `input` shape. + * @see {@link UpdateDatasetEntriesCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for command's `input` shape. + * + */ +export class UpdateDatasetEntriesCommand extends $Command< + UpdateDatasetEntriesCommandInput, + UpdateDatasetEntriesCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateDatasetEntriesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "UpdateDatasetEntriesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdateDatasetEntriesRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdateDatasetEntriesResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdateDatasetEntriesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateDatasetEntriesCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1UpdateDatasetEntriesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/index.ts b/clients/client-rekognition/src/commands/index.ts index d333219e1916..3e2644e18dad 100644 --- a/clients/client-rekognition/src/commands/index.ts +++ b/clients/client-rekognition/src/commands/index.ts @@ -1,14 +1,17 @@ export * from "./CompareFacesCommand"; export * from "./CreateCollectionCommand"; +export * from "./CreateDatasetCommand"; export * from "./CreateProjectCommand"; export * from "./CreateProjectVersionCommand"; export * from "./CreateStreamProcessorCommand"; export * from "./DeleteCollectionCommand"; +export * from "./DeleteDatasetCommand"; export * from "./DeleteFacesCommand"; export * from "./DeleteProjectCommand"; export * from "./DeleteProjectVersionCommand"; export * from "./DeleteStreamProcessorCommand"; export * from "./DescribeCollectionCommand"; +export * from "./DescribeDatasetCommand"; export * from "./DescribeProjectVersionsCommand"; export * from "./DescribeProjectsCommand"; export * from "./DescribeStreamProcessorCommand"; @@ -18,6 +21,7 @@ export * from "./DetectLabelsCommand"; export * from "./DetectModerationLabelsCommand"; export * from "./DetectProtectiveEquipmentCommand"; export * from "./DetectTextCommand"; +export * from "./DistributeDatasetEntriesCommand"; export * from "./GetCelebrityInfoCommand"; export * from "./GetCelebrityRecognitionCommand"; export * from "./GetContentModerationCommand"; @@ -29,6 +33,8 @@ export * from "./GetSegmentDetectionCommand"; export * from "./GetTextDetectionCommand"; export * from "./IndexFacesCommand"; export * from "./ListCollectionsCommand"; +export * from "./ListDatasetEntriesCommand"; +export * from "./ListDatasetLabelsCommand"; export * from "./ListFacesCommand"; export * from "./ListStreamProcessorsCommand"; export * from "./ListTagsForResourceCommand"; @@ -49,3 +55,4 @@ export * from "./StopProjectVersionCommand"; export * from "./StopStreamProcessorCommand"; export * from "./TagResourceCommand"; export * from "./UntagResourceCommand"; +export * from "./UpdateDatasetEntriesCommand"; diff --git a/clients/client-rekognition/src/models/models_0.ts b/clients/client-rekognition/src/models/models_0.ts index 14f65a06fd6e..121ece25a009 100644 --- a/clients/client-rekognition/src/models/models_0.ts +++ b/clients/client-rekognition/src/models/models_0.ts @@ -1029,6 +1029,11 @@ export interface CelebrityDetail { *

    Face details for the recognized celebrity.

    */ Face?: FaceDetail; + + /** + *

    Retrieves the known gender for the celebrity.

    + */ + KnownGender?: KnownGender; } export namespace CelebrityDetail { @@ -1633,35 +1638,97 @@ export namespace ServiceQuotaExceededException { }); } -export interface CreateProjectRequest { +/** + *

    + * The source that Amazon Rekognition Custom Labels uses to create a dataset. To + * use an Amazon Sagemaker format manifest file, specify the S3 bucket location in the GroundTruthManifest field. + * The S3 bucket must be in your AWS account. + * To create a copy of an existing dataset, specify the Amazon Resource Name (ARN) of + * an existing dataset in DatasetArn.

    + *

    You need to specify a value for DatasetArn or GroundTruthManifest, but not both. + * if you supply both values, or if you don't specify any values, an InvalidParameterException exception occurs. + *

    + *

    For more information, see CreateDataset.

    + */ +export interface DatasetSource { /** - *

    The name of the project to create.

    + *

    The S3 bucket that contains an Amazon Sagemaker Ground Truth format manifest file. + *

    */ - ProjectName: string | undefined; + GroundTruthManifest?: GroundTruthManifest; + + /** + *

    + * The ARN of an Amazon Rekognition Custom Labels dataset that you want to copy. + *

    + */ + DatasetArn?: string; } -export namespace CreateProjectRequest { +export namespace DatasetSource { /** * @internal */ - export const filterSensitiveLog = (obj: CreateProjectRequest): any => ({ + export const filterSensitiveLog = (obj: DatasetSource): any => ({ ...obj, }); } -export interface CreateProjectResponse { +export enum DatasetType { + TEST = "TEST", + TRAIN = "TRAIN", +} + +export interface CreateDatasetRequest { /** - *

    The Amazon Resource Name (ARN) of the new project. You can use the ARN to - * configure IAM access to the project.

    + *

    + * The source files for the dataset. You can specify the ARN of an existing dataset or specify the Amazon S3 bucket location + * of an Amazon Sagemaker format manifest file. If you don't specify datasetSource, an empty dataset is created. + * To add labeled images to the dataset, You can use the console or call UpdateDatasetEntries. + * + *

    */ - ProjectArn?: string; + DatasetSource?: DatasetSource; + + /** + *

    + * The type of the dataset. Specify train to create a training dataset. Specify test + * to create a test dataset. + *

    + */ + DatasetType: DatasetType | string | undefined; + + /** + *

    + * The ARN of the Amazon Rekognition Custom Labels project to which you want to asssign the dataset. + *

    + */ + ProjectArn: string | undefined; } -export namespace CreateProjectResponse { +export namespace CreateDatasetRequest { /** * @internal */ - export const filterSensitiveLog = (obj: CreateProjectResponse): any => ({ + export const filterSensitiveLog = (obj: CreateDatasetRequest): any => ({ + ...obj, + }); +} + +export interface CreateDatasetResponse { + /** + *

    + * The ARN of the created Amazon Rekognition Custom Labels dataset. + *

    + */ + DatasetArn?: string; +} + +export namespace CreateDatasetResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateDatasetResponse): any => ({ ...obj, }); } @@ -1691,6 +1758,62 @@ export namespace LimitExceededException { }); } +/** + *

    The resource specified in the request cannot be found.

    + */ +export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer { + name: "ResourceNotFoundException"; + $fault: "client"; + Message?: string; + Code?: string; + /** + *

    A universally unique identifier (UUID) for the request.

    + */ + Logref?: string; +} + +export namespace ResourceNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ResourceNotFoundException): any => ({ + ...obj, + }); +} + +export interface CreateProjectRequest { + /** + *

    The name of the project to create.

    + */ + ProjectName: string | undefined; +} + +export namespace CreateProjectRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateProjectRequest): any => ({ + ...obj, + }); +} + +export interface CreateProjectResponse { + /** + *

    The Amazon Resource Name (ARN) of the new project. You can use the ARN to + * configure IAM access to the project.

    + */ + ProjectArn?: string; +} + +export namespace CreateProjectResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateProjectResponse): any => ({ + ...obj, + }); +} + /** *

    The specified resource is already being used.

    */ @@ -1739,8 +1862,8 @@ export namespace OutputConfig { } /** - *

    The dataset used for testing. Optionally, if AutoCreate is set, Amazon Rekognition Custom Labels creates a - * testing dataset using an 80/20 split of the training dataset.

    + *

    The dataset used for testing. Optionally, if AutoCreate is set, Amazon Rekognition Custom Labels uses the + * training dataset to create a test dataset with a temporary split of the training dataset.

    */ export interface TestingData { /** @@ -1749,7 +1872,8 @@ export interface TestingData { Assets?: Asset[]; /** - *

    If specified, Amazon Rekognition Custom Labels creates a testing dataset with an 80/20 split of the training dataset.

    + *

    If specified, Amazon Rekognition Custom Labels temporarily splits the training dataset (80%) to create a test dataset (20%) for the training job. + * After training completes, the test dataset is not stored and the training dataset reverts to its previous size.

    */ AutoCreate?: boolean; } @@ -1802,14 +1926,19 @@ export interface CreateProjectVersionRequest { OutputConfig: OutputConfig | undefined; /** - *

    The dataset to use for training.

    + *

    Specifies an external manifest that the services uses to train the model. + * If you specify TrainingData you must also specify TestingData. + * The project must not have any associated datasets. + *

    */ - TrainingData: TrainingData | undefined; + TrainingData?: TrainingData; /** - *

    The dataset to use for testing.

    + *

    Specifies an external manifest that the service uses to test the model. + * If you specify TestingData you must also specify TrainingData. + * The project must not have any associated datasets.

    */ - TestingData: TestingData | undefined; + TestingData?: TestingData; /** *

    @@ -1819,13 +1948,13 @@ export interface CreateProjectVersionRequest { Tags?: { [key: string]: string }; /** - *

    The identifier for your AWS Key Management Service (AWS KMS) customer master key (CMK). - * You can supply the Amazon Resource Name (ARN) of your CMK, the ID of your CMK, - * an alias for your CMK, or an alias ARN. + *

    The identifier for your AWS Key Management Service key (AWS KMS key). + * You can supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS key, + * an alias for your KMS key, or an alias ARN. * The key is used to encrypt training and test images copied into the service for model training. * Your source images are unaffected. The key is also used to encrypt training results * and manifest files written to the output Amazon S3 bucket (OutputConfig).

    - *

    If you choose to use your own CMK, you need the following permissions on the CMK.

    + *

    If you choose to use your own KMS key, you need the following permissions on the KMS key.

    *
      *
    • *

      kms:CreateGrant

      @@ -1872,29 +2001,6 @@ export namespace CreateProjectVersionResponse { }); } -/** - *

      The resource specified in the request cannot be found.

      - */ -export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer { - name: "ResourceNotFoundException"; - $fault: "client"; - Message?: string; - Code?: string; - /** - *

      A universally unique identifier (UUID) for the request.

      - */ - Logref?: string; -} - -export namespace ResourceNotFoundException { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ResourceNotFoundException): any => ({ - ...obj, - }); -} - /** *

      Kinesis video stream stream that provides the source streaming video for a Amazon Rekognition Video stream processor. For more information, see * CreateStreamProcessor in the Amazon Rekognition Developer Guide.

      @@ -1985,8 +2091,8 @@ export interface FaceSearchSettings { CollectionId?: string; /** - *

      Minimum face match confidence score that must be met to return a result for a recognized face. Default is 80. - * 0 is the lowest confidence. 100 is the highest confidence.

      + *

      Minimum face match confidence score that must be met to return a result for a recognized face. The default is 80. + * 0 is the lowest confidence. 100 is the highest confidence. Values between 0 and 100 are accepted, and values lower than 80 are set to 80.

      */ FaceMatchThreshold?: number; } @@ -2127,46 +2233,323 @@ export interface Geometry { /** *

      Within the bounding box, a fine-grained polygon around the detected item.

      */ - Polygon?: Point[]; + Polygon?: Point[]; +} + +export namespace Geometry { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Geometry): any => ({ + ...obj, + }); +} + +/** + *

      A custom label detected in an image by a call to DetectCustomLabels.

      + */ +export interface CustomLabel { + /** + *

      The name of the custom label.

      + */ + Name?: string; + + /** + *

      The confidence that the model has in the detection of the custom label. The + * range is 0-100. A higher value indicates a higher confidence.

      + */ + Confidence?: number; + + /** + *

      The location of the detected object on the image that corresponds to the custom label. + * Includes an axis aligned coarse bounding box surrounding the object and a finer grain polygon + * for more accurate spatial information.

      + */ + Geometry?: Geometry; +} + +export namespace CustomLabel { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CustomLabel): any => ({ + ...obj, + }); +} + +/** + *

      + * Describes updates or additions to a dataset. A Single update or addition + * is an entry (JSON Line) that provides information about a single image. To update an existing entry, + * you match the source-ref field of the update entry with the source-ref filed of the entry that you want to update. + * If the source-ref field doesn't match an existing entry, the entry is added to dataset as a new entry.

      + */ +export interface DatasetChanges { + /** + *

      A Base64-encoded binary data object + * containing one or JSON lines that either update the dataset or are additions to the dataset. You change a dataset by calling UpdateDatasetEntries. + * If you are using an AWS SDK to call UpdateDatasetEntries, you don't need to encode Changes as the SDK encodes the data for you. + * + *

      + * + * + *

      For example JSON lines, + * see Image-Level labels in manifest files and + * and Object localization in manifest files in the Amazon Rekognition Custom Labels Developer Guide. + *

      + */ + GroundTruth: Uint8Array | undefined; +} + +export namespace DatasetChanges { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DatasetChanges): any => ({ + ...obj, + }); +} + +/** + *

      + * Provides statistics about a dataset. For more information, see DescribeDataset. + * + *

      + */ +export interface DatasetStats { + /** + *

      + * The total number of images in the dataset that have labels. + *

      + */ + LabeledEntries?: number; + + /** + *

      + * The total number of images in the dataset. + *

      + */ + TotalEntries?: number; + + /** + *

      + * The total number of labels declared in the dataset. + *

      + */ + TotalLabels?: number; + + /** + *

      + * The total number of entries that contain at least one error. + *

      + */ + ErrorEntries?: number; +} + +export namespace DatasetStats { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DatasetStats): any => ({ + ...obj, + }); +} + +export enum DatasetStatus { + CREATE_COMPLETE = "CREATE_COMPLETE", + CREATE_FAILED = "CREATE_FAILED", + CREATE_IN_PROGRESS = "CREATE_IN_PROGRESS", + DELETE_IN_PROGRESS = "DELETE_IN_PROGRESS", + UPDATE_COMPLETE = "UPDATE_COMPLETE", + UPDATE_FAILED = "UPDATE_FAILED", + UPDATE_IN_PROGRESS = "UPDATE_IN_PROGRESS", +} + +export enum DatasetStatusMessageCode { + CLIENT_ERROR = "CLIENT_ERROR", + SERVICE_ERROR = "SERVICE_ERROR", + SUCCESS = "SUCCESS", +} + +/** + *

      + * A description for a dataset. For more information, see DescribeDataset.

      + *

      The status fields Status, StatusMessage, and StatusMessageCode + * reflect the last operation on the dataset. + *

      + */ +export interface DatasetDescription { + /** + *

      + * The Unix timestamp for the time and date that the dataset was created. + *

      + */ + CreationTimestamp?: Date; + + /** + *

      + * The Unix timestamp for the date and time that the dataset was last updated. + *

      + */ + LastUpdatedTimestamp?: Date; + + /** + *

      + * The status of the dataset. + *

      + */ + Status?: DatasetStatus | string; + + /** + *

      + * The status message for the dataset. + *

      + */ + StatusMessage?: string; + + /** + *

      + * The status message code for the dataset operation. If a service error occurs, try the + * API call again later. If a client error occurs, check the input parameters to the dataset + * API call that failed. + *

      + */ + StatusMessageCode?: DatasetStatusMessageCode | string; + + /** + *

      + * The status message code for the dataset. + *

      + */ + DatasetStats?: DatasetStats; +} + +export namespace DatasetDescription { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DatasetDescription): any => ({ + ...obj, + }); +} + +/** + *

      + * Statistics about a label used in a dataset. For more information, see DatasetLabelDescription. + *

      + */ +export interface DatasetLabelStats { + /** + *

      + * The total number of images that use the label. + *

      + */ + EntryCount?: number; + + /** + *

      + * The total number of images that have the label assigned to a bounding box. + *

      + */ + BoundingBoxCount?: number; +} + +export namespace DatasetLabelStats { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DatasetLabelStats): any => ({ + ...obj, + }); +} + +/** + *

      + * Describes a dataset label. For more information, see ListDatasetLabels. + *

      + */ +export interface DatasetLabelDescription { + /** + *

      + * The name of the label. + *

      + */ + LabelName?: string; + + /** + *

      + * Statistics about the label. + *

      + */ + LabelStats?: DatasetLabelStats; } -export namespace Geometry { +export namespace DatasetLabelDescription { /** * @internal */ - export const filterSensitiveLog = (obj: Geometry): any => ({ + export const filterSensitiveLog = (obj: DatasetLabelDescription): any => ({ ...obj, }); } /** - *

      A custom label detected in an image by a call to DetectCustomLabels.

      + *

      + * Summary information for an Amazon Rekognition Custom Labels dataset. For more information, see + * ProjectDescription. + *

      */ -export interface CustomLabel { +export interface DatasetMetadata { /** - *

      The name of the custom label.

      + *

      + * The Unix timestamp for the date and time that the dataset was created. + *

      */ - Name?: string; + CreationTimestamp?: Date; /** - *

      The confidence that the model has in the detection of the custom label. The - * range is 0-100. A higher value indicates a higher confidence.

      + *

      + * The type of the dataset. + *

      */ - Confidence?: number; + DatasetType?: DatasetType | string; /** - *

      The location of the detected object on the image that corresponds to the custom label. - * Includes an axis aligned coarse bounding box surrounding the object and a finer grain polygon - * for more accurate spatial information.

      + *

      + * The Amazon Resource Name (ARN) for the dataset. + *

      */ - Geometry?: Geometry; + DatasetArn?: string; + + /** + *

      + * The status for the dataset. + *

      + */ + Status?: DatasetStatus | string; + + /** + *

      + * The status message for the dataset. + *

      + */ + StatusMessage?: string; + + /** + *

      + * The status message code for the dataset operation. If a service error occurs, try the + * API call again later. If a client error occurs, check the input parameters to the dataset + * API call that failed. + *

      + */ + StatusMessageCode?: DatasetStatusMessageCode | string; } -export namespace CustomLabel { +export namespace DatasetMetadata { /** * @internal */ - export const filterSensitiveLog = (obj: CustomLabel): any => ({ + export const filterSensitiveLog = (obj: DatasetMetadata): any => ({ ...obj, }); } @@ -2203,6 +2586,35 @@ export namespace DeleteCollectionResponse { }); } +export interface DeleteDatasetRequest { + /** + *

      + * The ARN of the Amazon Rekognition Custom Labels dataset that you want to delete. + *

      + */ + DatasetArn: string | undefined; +} + +export namespace DeleteDatasetRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteDatasetRequest): any => ({ + ...obj, + }); +} + +export interface DeleteDatasetResponse {} + +export namespace DeleteDatasetResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteDatasetResponse): any => ({ + ...obj, + }); +} + export interface DeleteFacesRequest { /** *

      Collection from which to remove the specific faces.

      @@ -2401,6 +2813,42 @@ export namespace DescribeCollectionResponse { }); } +export interface DescribeDatasetRequest { + /** + *

      + * The Amazon Resource Name (ARN) of the dataset that you want to describe. + *

      + */ + DatasetArn: string | undefined; +} + +export namespace DescribeDatasetRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeDatasetRequest): any => ({ + ...obj, + }); +} + +export interface DescribeDatasetResponse { + /** + *

      + * The description for the dataset. + *

      + */ + DatasetDescription?: DatasetDescription; +} + +export namespace DescribeDatasetResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeDatasetResponse): any => ({ + ...obj, + }); +} + export interface DescribeProjectsRequest { /** *

      If the previous response was incomplete (because there is more @@ -2415,6 +2863,12 @@ export interface DescribeProjectsRequest { * error occurs. The default value is 100.

      */ MaxResults?: number; + + /** + *

      A list of the projects that you want Amazon Rekognition Custom Labels to describe. If you don't specify a value, + * the response includes descriptions for all the projects in your AWS account.

      + */ + ProjectNames?: string[]; } export namespace DescribeProjectsRequest { @@ -2427,7 +2881,7 @@ export namespace DescribeProjectsRequest { } /** - *

      A description of a Amazon Rekognition Custom Labels project.

      + *

      A description of an Amazon Rekognition Custom Labels project. For more information, see DescribeProjects.

      */ export interface ProjectDescription { /** @@ -2444,6 +2898,13 @@ export interface ProjectDescription { *

      The current status of the project.

      */ Status?: ProjectStatus | string; + + /** + *

      + * Information about the training and test datasets in the project. + *

      + */ + Datasets?: DatasetMetadata[]; } export namespace ProjectDescription { @@ -2598,11 +3059,10 @@ export namespace EvaluationResult { /** *

      Contains the Amazon S3 bucket location of the validation data for a model training job.

      + *

      The validation data includes error information for individual JSON Lines in the dataset. + * For more information, see Debugging a Failed Model Training in the + * Amazon Rekognition Custom Labels Developer Guide.

      * - *

      The validation data includes error information for individual - * JSON lines in the dataset. - * For more information, see Debugging a Failed Model Training in the - * Amazon Rekognition Custom Labels Developer Guide.

      *

      You get the ValidationData object for the training dataset (TrainingDataResult) * and the test dataset (TestingDataResult) by calling DescribeProjectVersions.

      *

      The assets array contains a single Asset object. @@ -2686,7 +3146,7 @@ export namespace TrainingDataResult { } /** - *

      The description of a version of a model.

      + *

      A description of a version of an Amazon Rekognition Custom Labels model.

      */ export interface ProjectVersionDescription { /** @@ -2716,7 +3176,7 @@ export interface ProjectVersionDescription { StatusMessage?: string; /** - *

      The duration, in seconds, that the model version has been billed for training. + *

      The duration, in seconds, that you were billed for a successful training of the model version. * This value is only returned if the model version has been successfully trained.

      */ BillableTrainingTimeInSeconds?: number; @@ -2753,7 +3213,7 @@ export interface ProjectVersionDescription { ManifestSummary?: GroundTruthManifest; /** - *

      The identifer for the AWS Key Management Service (AWS KMS) customer master key that was used to encrypt the model during training.

      + *

      The identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model during training.

      */ KmsKeyId?: string; } @@ -3746,6 +4206,58 @@ export namespace DetectTextResponse { }); } +/** + *

      + * A training dataset or a test dataset used in a dataset distribution operation. + * For more information, see DistributeDatasetEntries. + *

      + */ +export interface DistributeDataset { + /** + *

      The Amazon Resource Name (ARN) of the dataset that you want to use. + *

      + */ + Arn: string | undefined; +} + +export namespace DistributeDataset { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DistributeDataset): any => ({ + ...obj, + }); +} + +export interface DistributeDatasetEntriesRequest { + /** + *

      The ARNS for the training dataset and test dataset that you want to use. The datasets must belong to + * the same project. The test dataset must be empty. + *

      + */ + Datasets: DistributeDataset[] | undefined; +} + +export namespace DistributeDatasetEntriesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DistributeDatasetEntriesRequest): any => ({ + ...obj, + }); +} + +export interface DistributeDatasetEntriesResponse {} + +export namespace DistributeDatasetEntriesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DistributeDatasetEntriesResponse): any => ({ + ...obj, + }); +} + /** *

      Describes the face properties such as the bounding box, face ID, image ID of the input * image, and external image ID that you assigned.

      @@ -5200,6 +5712,149 @@ export namespace ListCollectionsResponse { }); } +export interface ListDatasetEntriesRequest { + /** + *

      + * The Amazon Resource Name (ARN) for the dataset that you want to use. + *

      + */ + DatasetArn: string | undefined; + + /** + *

      Specifies a label filter for the response. The response includes an entry only if one or more of the labels in ContainsLabels exist in the entry. + *

      + */ + ContainsLabels?: string[]; + + /** + *

      + * Specify true to get only the JSON Lines where the image is labeled. + * Specify false to get only the JSON Lines where the image isn't labeled. If you + * don't specify Labeled, ListDatasetEntries returns JSON Lines for labeled and unlabeled + * images. + *

      + */ + Labeled?: boolean; + + /** + *

      If specified, ListDatasetEntries only returns JSON Lines where the value of SourceRefContains is + * part of the source-ref field. The source-ref field contains the Amazon S3 location of the image. + * You can use SouceRefContains for tasks such as getting the JSON Line for a single image, or gettting JSON Lines for all images within a specific folder.

      + */ + SourceRefContains?: string; + + /** + *

      Specifies an error filter for the response. Specify True to only include entries that have errors. + *

      + */ + HasErrors?: boolean; + + /** + *

      If the previous response was incomplete (because there is more + * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination + * token to retrieve the next set of results.

      + */ + NextToken?: string; + + /** + *

      The maximum number of results to return per paginated call. The largest value you can specify is 100. + * If you specify a value greater than 100, a ValidationException + * error occurs. The default value is 100.

      + */ + MaxResults?: number; +} + +export namespace ListDatasetEntriesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListDatasetEntriesRequest): any => ({ + ...obj, + }); +} + +export interface ListDatasetEntriesResponse { + /** + *

      + * A list of entries (images) in the dataset. + *

      + */ + DatasetEntries?: string[]; + + /** + *

      If the previous response was incomplete (because there is more + * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination + * token to retrieve the next set of results.

      + */ + NextToken?: string; +} + +export namespace ListDatasetEntriesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListDatasetEntriesResponse): any => ({ + ...obj, + }); +} + +export interface ListDatasetLabelsRequest { + /** + *

      + * The Amazon Resource Name (ARN) of the dataset that you want to use. + *

      + */ + DatasetArn: string | undefined; + + /** + *

      If the previous response was incomplete (because there is more + * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination + * token to retrieve the next set of results.

      + */ + NextToken?: string; + + /** + *

      The maximum number of results to return per paginated call. The largest value you can specify is 100. + * If you specify a value greater than 100, a ValidationException + * error occurs. The default value is 100.

      + */ + MaxResults?: number; +} + +export namespace ListDatasetLabelsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListDatasetLabelsRequest): any => ({ + ...obj, + }); +} + +export interface ListDatasetLabelsResponse { + /** + *

      + * A list of the labels in the dataset. + *

      + */ + DatasetLabelDescriptions?: DatasetLabelDescription[]; + + /** + *

      If the previous response was incomplete (because there is more + * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination + * token to retrieve the next set of results.

      + */ + NextToken?: string; +} + +export namespace ListDatasetLabelsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListDatasetLabelsResponse): any => ({ + ...obj, + }); +} + export interface ListFacesRequest { /** *

      ID of the collection from which to list the faces.

      @@ -6435,3 +7090,39 @@ export namespace UntagResourceResponse { ...obj, }); } + +export interface UpdateDatasetEntriesRequest { + /** + *

      + * The Amazon Resource Name (ARN) of the dataset that you want to update. + *

      + */ + DatasetArn: string | undefined; + + /** + *

      + * The changes that you want to make to the dataset. + *

      + */ + Changes: DatasetChanges | undefined; +} + +export namespace UpdateDatasetEntriesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateDatasetEntriesRequest): any => ({ + ...obj, + }); +} + +export interface UpdateDatasetEntriesResponse {} + +export namespace UpdateDatasetEntriesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateDatasetEntriesResponse): any => ({ + ...obj, + }); +} diff --git a/clients/client-rekognition/src/pagination/ListDatasetEntriesPaginator.ts b/clients/client-rekognition/src/pagination/ListDatasetEntriesPaginator.ts new file mode 100644 index 000000000000..2deae287a670 --- /dev/null +++ b/clients/client-rekognition/src/pagination/ListDatasetEntriesPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListDatasetEntriesCommand, + ListDatasetEntriesCommandInput, + ListDatasetEntriesCommandOutput, +} from "../commands/ListDatasetEntriesCommand"; +import { Rekognition } from "../Rekognition"; +import { RekognitionClient } from "../RekognitionClient"; +import { RekognitionPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: RekognitionClient, + input: ListDatasetEntriesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListDatasetEntriesCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Rekognition, + input: ListDatasetEntriesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listDatasetEntries(input, ...args); +}; +export async function* paginateListDatasetEntries( + config: RekognitionPaginationConfiguration, + input: ListDatasetEntriesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListDatasetEntriesCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof Rekognition) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof RekognitionClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Rekognition | RekognitionClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-rekognition/src/pagination/ListDatasetLabelsPaginator.ts b/clients/client-rekognition/src/pagination/ListDatasetLabelsPaginator.ts new file mode 100644 index 000000000000..d49d66a37d07 --- /dev/null +++ b/clients/client-rekognition/src/pagination/ListDatasetLabelsPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListDatasetLabelsCommand, + ListDatasetLabelsCommandInput, + ListDatasetLabelsCommandOutput, +} from "../commands/ListDatasetLabelsCommand"; +import { Rekognition } from "../Rekognition"; +import { RekognitionClient } from "../RekognitionClient"; +import { RekognitionPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: RekognitionClient, + input: ListDatasetLabelsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListDatasetLabelsCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Rekognition, + input: ListDatasetLabelsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listDatasetLabels(input, ...args); +}; +export async function* paginateListDatasetLabels( + config: RekognitionPaginationConfiguration, + input: ListDatasetLabelsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListDatasetLabelsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof Rekognition) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof RekognitionClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Rekognition | RekognitionClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-rekognition/src/pagination/index.ts b/clients/client-rekognition/src/pagination/index.ts index c1872e6cb606..e913a9b8d7a0 100644 --- a/clients/client-rekognition/src/pagination/index.ts +++ b/clients/client-rekognition/src/pagination/index.ts @@ -10,5 +10,7 @@ export * from "./GetSegmentDetectionPaginator"; export * from "./GetTextDetectionPaginator"; export * from "./Interfaces"; export * from "./ListCollectionsPaginator"; +export * from "./ListDatasetEntriesPaginator"; +export * from "./ListDatasetLabelsPaginator"; export * from "./ListFacesPaginator"; export * from "./ListStreamProcessorsPaginator"; diff --git a/clients/client-rekognition/src/protocols/Aws_json1_1.ts b/clients/client-rekognition/src/protocols/Aws_json1_1.ts index 7d5f84700aaf..2facca8a9b30 100644 --- a/clients/client-rekognition/src/protocols/Aws_json1_1.ts +++ b/clients/client-rekognition/src/protocols/Aws_json1_1.ts @@ -22,6 +22,7 @@ import { import { CompareFacesCommandInput, CompareFacesCommandOutput } from "../commands/CompareFacesCommand"; import { CreateCollectionCommandInput, CreateCollectionCommandOutput } from "../commands/CreateCollectionCommand"; +import { CreateDatasetCommandInput, CreateDatasetCommandOutput } from "../commands/CreateDatasetCommand"; import { CreateProjectCommandInput, CreateProjectCommandOutput } from "../commands/CreateProjectCommand"; import { CreateProjectVersionCommandInput, @@ -32,6 +33,7 @@ import { CreateStreamProcessorCommandOutput, } from "../commands/CreateStreamProcessorCommand"; import { DeleteCollectionCommandInput, DeleteCollectionCommandOutput } from "../commands/DeleteCollectionCommand"; +import { DeleteDatasetCommandInput, DeleteDatasetCommandOutput } from "../commands/DeleteDatasetCommand"; import { DeleteFacesCommandInput, DeleteFacesCommandOutput } from "../commands/DeleteFacesCommand"; import { DeleteProjectCommandInput, DeleteProjectCommandOutput } from "../commands/DeleteProjectCommand"; import { @@ -43,6 +45,7 @@ import { DeleteStreamProcessorCommandOutput, } from "../commands/DeleteStreamProcessorCommand"; import { DescribeCollectionCommandInput, DescribeCollectionCommandOutput } from "../commands/DescribeCollectionCommand"; +import { DescribeDatasetCommandInput, DescribeDatasetCommandOutput } from "../commands/DescribeDatasetCommand"; import { DescribeProjectsCommandInput, DescribeProjectsCommandOutput } from "../commands/DescribeProjectsCommand"; import { DescribeProjectVersionsCommandInput, @@ -64,6 +67,10 @@ import { DetectProtectiveEquipmentCommandOutput, } from "../commands/DetectProtectiveEquipmentCommand"; import { DetectTextCommandInput, DetectTextCommandOutput } from "../commands/DetectTextCommand"; +import { + DistributeDatasetEntriesCommandInput, + DistributeDatasetEntriesCommandOutput, +} from "../commands/DistributeDatasetEntriesCommand"; import { GetCelebrityInfoCommandInput, GetCelebrityInfoCommandOutput } from "../commands/GetCelebrityInfoCommand"; import { GetCelebrityRecognitionCommandInput, @@ -84,6 +91,8 @@ import { import { GetTextDetectionCommandInput, GetTextDetectionCommandOutput } from "../commands/GetTextDetectionCommand"; import { IndexFacesCommandInput, IndexFacesCommandOutput } from "../commands/IndexFacesCommand"; import { ListCollectionsCommandInput, ListCollectionsCommandOutput } from "../commands/ListCollectionsCommand"; +import { ListDatasetEntriesCommandInput, ListDatasetEntriesCommandOutput } from "../commands/ListDatasetEntriesCommand"; +import { ListDatasetLabelsCommandInput, ListDatasetLabelsCommandOutput } from "../commands/ListDatasetLabelsCommand"; import { ListFacesCommandInput, ListFacesCommandOutput } from "../commands/ListFacesCommand"; import { ListStreamProcessorsCommandInput, @@ -137,6 +146,10 @@ import { } from "../commands/StopStreamProcessorCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { + UpdateDatasetEntriesCommandInput, + UpdateDatasetEntriesCommandOutput, +} from "../commands/UpdateDatasetEntriesCommand"; import { AccessDeniedException, AgeRange, @@ -159,6 +172,8 @@ import { CoversBodyPart, CreateCollectionRequest, CreateCollectionResponse, + CreateDatasetRequest, + CreateDatasetResponse, CreateProjectRequest, CreateProjectResponse, CreateProjectVersionRequest, @@ -166,8 +181,17 @@ import { CreateStreamProcessorRequest, CreateStreamProcessorResponse, CustomLabel, + DatasetChanges, + DatasetDescription, + DatasetLabelDescription, + DatasetLabelStats, + DatasetMetadata, + DatasetSource, + DatasetStats, DeleteCollectionRequest, DeleteCollectionResponse, + DeleteDatasetRequest, + DeleteDatasetResponse, DeleteFacesRequest, DeleteFacesResponse, DeleteProjectRequest, @@ -178,6 +202,8 @@ import { DeleteStreamProcessorResponse, DescribeCollectionRequest, DescribeCollectionResponse, + DescribeDatasetRequest, + DescribeDatasetResponse, DescribeProjectsRequest, DescribeProjectsResponse, DescribeProjectVersionsRequest, @@ -198,6 +224,9 @@ import { DetectTextFilters, DetectTextRequest, DetectTextResponse, + DistributeDataset, + DistributeDatasetEntriesRequest, + DistributeDatasetEntriesResponse, Emotion, EquipmentDetection, EvaluationResult, @@ -255,6 +284,10 @@ import { LimitExceededException, ListCollectionsRequest, ListCollectionsResponse, + ListDatasetEntriesRequest, + ListDatasetEntriesResponse, + ListDatasetLabelsRequest, + ListDatasetLabelsResponse, ListFacesRequest, ListFacesResponse, ListStreamProcessorsRequest, @@ -346,6 +379,8 @@ import { UnindexedFace, UntagResourceRequest, UntagResourceResponse, + UpdateDatasetEntriesRequest, + UpdateDatasetEntriesResponse, ValidationData, Video, VideoMetadata, @@ -378,6 +413,19 @@ export const serializeAws_json1_1CreateCollectionCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1CreateDatasetCommand = async ( + input: CreateDatasetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "RekognitionService.CreateDataset", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1CreateDatasetRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1CreateProjectCommand = async ( input: CreateProjectCommandInput, context: __SerdeContext @@ -430,6 +478,19 @@ export const serializeAws_json1_1DeleteCollectionCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1DeleteDatasetCommand = async ( + input: DeleteDatasetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "RekognitionService.DeleteDataset", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1DeleteDatasetRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1DeleteFacesCommand = async ( input: DeleteFacesCommandInput, context: __SerdeContext @@ -495,6 +556,19 @@ export const serializeAws_json1_1DescribeCollectionCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1DescribeDatasetCommand = async ( + input: DescribeDatasetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "RekognitionService.DescribeDataset", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1DescribeDatasetRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1DescribeProjectsCommand = async ( input: DescribeProjectsCommandInput, context: __SerdeContext @@ -612,6 +686,19 @@ export const serializeAws_json1_1DetectTextCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1DistributeDatasetEntriesCommand = async ( + input: DistributeDatasetEntriesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "RekognitionService.DistributeDatasetEntries", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1DistributeDatasetEntriesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1GetCelebrityInfoCommand = async ( input: GetCelebrityInfoCommandInput, context: __SerdeContext @@ -755,6 +842,32 @@ export const serializeAws_json1_1ListCollectionsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1ListDatasetEntriesCommand = async ( + input: ListDatasetEntriesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "RekognitionService.ListDatasetEntries", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1ListDatasetEntriesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_1ListDatasetLabelsCommand = async ( + input: ListDatasetLabelsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "RekognitionService.ListDatasetLabels", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1ListDatasetLabelsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1ListFacesCommand = async ( input: ListFacesCommandInput, context: __SerdeContext @@ -1015,6 +1128,19 @@ export const serializeAws_json1_1UntagResourceCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1UpdateDatasetEntriesCommand = async ( + input: UpdateDatasetEntriesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "RekognitionService.UpdateDatasetEntries", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1UpdateDatasetEntriesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const deserializeAws_json1_1CompareFacesCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -1227,6 +1353,124 @@ const deserializeAws_json1_1CreateCollectionCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_json1_1CreateDatasetCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1CreateDatasetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateDatasetResponse(data, context); + const response: CreateDatasetCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1CreateDatasetCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + response = { + ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + response = { + ...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidS3ObjectException": + case "com.amazonaws.rekognition#InvalidS3ObjectException": + response = { + ...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "LimitExceededException": + case "com.amazonaws.rekognition#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + response = { + ...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceAlreadyExistsException": + case "com.amazonaws.rekognition#ResourceAlreadyExistsException": + response = { + ...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + response = { + ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_json1_1CreateProjectCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -1651,27 +1895,27 @@ const deserializeAws_json1_1DeleteCollectionCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_json1_1DeleteFacesCommand = async ( +export const deserializeAws_json1_1DeleteDatasetCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return deserializeAws_json1_1DeleteFacesCommandError(output, context); + return deserializeAws_json1_1DeleteDatasetCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = deserializeAws_json1_1DeleteFacesResponse(data, context); - const response: DeleteFacesCommandOutput = { + contents = deserializeAws_json1_1DeleteDatasetResponse(data, context); + const response: DeleteDatasetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; return Promise.resolve(response); }; -const deserializeAws_json1_1DeleteFacesCommandError = async ( +const deserializeAws_json1_1DeleteDatasetCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -1704,6 +1948,14 @@ const deserializeAws_json1_1DeleteFacesCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "LimitExceededException": + case "com.amazonaws.rekognition#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ProvisionedThroughputExceededException": case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": response = { @@ -1712,6 +1964,14 @@ const deserializeAws_json1_1DeleteFacesCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ResourceInUseException": + case "com.amazonaws.rekognition#ResourceInUseException": + response = { + ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ResourceNotFoundException": case "com.amazonaws.rekognition#ResourceNotFoundException": response = { @@ -1745,27 +2005,27 @@ const deserializeAws_json1_1DeleteFacesCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_json1_1DeleteProjectCommand = async ( +export const deserializeAws_json1_1DeleteFacesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return deserializeAws_json1_1DeleteProjectCommandError(output, context); + return deserializeAws_json1_1DeleteFacesCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = deserializeAws_json1_1DeleteProjectResponse(data, context); - const response: DeleteProjectCommandOutput = { + contents = deserializeAws_json1_1DeleteFacesResponse(data, context); + const response: DeleteFacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; return Promise.resolve(response); }; -const deserializeAws_json1_1DeleteProjectCommandError = async ( +const deserializeAws_json1_1DeleteFacesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -1806,14 +2066,6 @@ const deserializeAws_json1_1DeleteProjectCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceInUseException": - case "com.amazonaws.rekognition#ResourceInUseException": - response = { - ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ResourceNotFoundException": case "com.amazonaws.rekognition#ResourceNotFoundException": response = { @@ -1847,27 +2099,27 @@ const deserializeAws_json1_1DeleteProjectCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_json1_1DeleteProjectVersionCommand = async ( +export const deserializeAws_json1_1DeleteProjectCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return deserializeAws_json1_1DeleteProjectVersionCommandError(output, context); + return deserializeAws_json1_1DeleteProjectCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = deserializeAws_json1_1DeleteProjectVersionResponse(data, context); - const response: DeleteProjectVersionCommandOutput = { + contents = deserializeAws_json1_1DeleteProjectResponse(data, context); + const response: DeleteProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; return Promise.resolve(response); }; -const deserializeAws_json1_1DeleteProjectVersionCommandError = async ( +const deserializeAws_json1_1DeleteProjectCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -1949,27 +2201,27 @@ const deserializeAws_json1_1DeleteProjectVersionCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_json1_1DeleteStreamProcessorCommand = async ( +export const deserializeAws_json1_1DeleteProjectVersionCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return deserializeAws_json1_1DeleteStreamProcessorCommandError(output, context); + return deserializeAws_json1_1DeleteProjectVersionCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = deserializeAws_json1_1DeleteStreamProcessorResponse(data, context); - const response: DeleteStreamProcessorCommandOutput = { + contents = deserializeAws_json1_1DeleteProjectVersionResponse(data, context); + const response: DeleteProjectVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; return Promise.resolve(response); }; -const deserializeAws_json1_1DeleteStreamProcessorCommandError = async ( +const deserializeAws_json1_1DeleteProjectVersionCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -2051,16 +2303,118 @@ const deserializeAws_json1_1DeleteStreamProcessorCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_json1_1DescribeCollectionCommand = async ( +export const deserializeAws_json1_1DeleteStreamProcessorCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return deserializeAws_json1_1DescribeCollectionCommandError(output, context); + return deserializeAws_json1_1DeleteStreamProcessorCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = deserializeAws_json1_1DescribeCollectionResponse(data, context); + contents = deserializeAws_json1_1DeleteStreamProcessorResponse(data, context); + const response: DeleteStreamProcessorCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1DeleteStreamProcessorCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + response = { + ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + response = { + ...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + response = { + ...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceInUseException": + case "com.amazonaws.rekognition#ResourceInUseException": + response = { + ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + response = { + ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_1DescribeCollectionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeCollectionCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DescribeCollectionResponse(data, context); const response: DescribeCollectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, @@ -2145,6 +2499,100 @@ const deserializeAws_json1_1DescribeCollectionCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_json1_1DescribeDatasetCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DescribeDatasetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DescribeDatasetResponse(data, context); + const response: DescribeDatasetCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1DescribeDatasetCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + response = { + ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + response = { + ...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + response = { + ...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + response = { + ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_json1_1DescribeProjectsCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -3127,6 +3575,108 @@ const deserializeAws_json1_1DetectTextCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_json1_1DistributeDatasetEntriesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1DistributeDatasetEntriesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DistributeDatasetEntriesResponse(data, context); + const response: DistributeDatasetEntriesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1DistributeDatasetEntriesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + response = { + ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + response = { + ...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + response = { + ...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotReadyException": + case "com.amazonaws.rekognition#ResourceNotReadyException": + response = { + ...(await deserializeAws_json1_1ResourceNotReadyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + response = { + ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + export const deserializeAws_json1_1GetCelebrityInfoCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -3544,10 +4094,214 @@ export const deserializeAws_json1_1GetFaceSearchCommand = async ( return Promise.resolve(response); }; -const deserializeAws_json1_1GetFaceSearchCommandError = async ( +const deserializeAws_json1_1GetFaceSearchCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + response = { + ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + response = { + ...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidPaginationTokenException": + case "com.amazonaws.rekognition#InvalidPaginationTokenException": + response = { + ...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + response = { + ...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + response = { + ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_1GetLabelDetectionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetLabelDetectionCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetLabelDetectionResponse(data, context); + const response: GetLabelDetectionCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1GetLabelDetectionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + response = { + ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + response = { + ...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidPaginationTokenException": + case "com.amazonaws.rekognition#InvalidPaginationTokenException": + response = { + ...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + response = { + ...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + response = { + ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_1GetPersonTrackingCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1GetPersonTrackingCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetPersonTrackingResponse(data, context); + const response: GetPersonTrackingCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1GetPersonTrackingCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3629,27 +4383,27 @@ const deserializeAws_json1_1GetFaceSearchCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_json1_1GetLabelDetectionCommand = async ( +export const deserializeAws_json1_1GetSegmentDetectionCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return deserializeAws_json1_1GetLabelDetectionCommandError(output, context); + return deserializeAws_json1_1GetSegmentDetectionCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = deserializeAws_json1_1GetLabelDetectionResponse(data, context); - const response: GetLabelDetectionCommandOutput = { + contents = deserializeAws_json1_1GetSegmentDetectionResponse(data, context); + const response: GetSegmentDetectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; return Promise.resolve(response); }; -const deserializeAws_json1_1GetLabelDetectionCommandError = async ( +const deserializeAws_json1_1GetSegmentDetectionCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3731,27 +4485,27 @@ const deserializeAws_json1_1GetLabelDetectionCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_json1_1GetPersonTrackingCommand = async ( +export const deserializeAws_json1_1GetTextDetectionCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return deserializeAws_json1_1GetPersonTrackingCommandError(output, context); + return deserializeAws_json1_1GetTextDetectionCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = deserializeAws_json1_1GetPersonTrackingResponse(data, context); - const response: GetPersonTrackingCommandOutput = { + contents = deserializeAws_json1_1GetTextDetectionResponse(data, context); + const response: GetTextDetectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; return Promise.resolve(response); }; -const deserializeAws_json1_1GetPersonTrackingCommandError = async ( +const deserializeAws_json1_1GetTextDetectionCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3833,27 +4587,27 @@ const deserializeAws_json1_1GetPersonTrackingCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_json1_1GetSegmentDetectionCommand = async ( +export const deserializeAws_json1_1IndexFacesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return deserializeAws_json1_1GetSegmentDetectionCommandError(output, context); + return deserializeAws_json1_1IndexFacesCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = deserializeAws_json1_1GetSegmentDetectionResponse(data, context); - const response: GetSegmentDetectionCommandOutput = { + contents = deserializeAws_json1_1IndexFacesResponse(data, context); + const response: IndexFacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; return Promise.resolve(response); }; -const deserializeAws_json1_1GetSegmentDetectionCommandError = async ( +const deserializeAws_json1_1IndexFacesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -3870,6 +4624,14 @@ const deserializeAws_json1_1GetSegmentDetectionCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ImageTooLargeException": + case "com.amazonaws.rekognition#ImageTooLargeException": + response = { + ...(await deserializeAws_json1_1ImageTooLargeExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InternalServerError": case "com.amazonaws.rekognition#InternalServerError": response = { @@ -3878,10 +4640,10 @@ const deserializeAws_json1_1GetSegmentDetectionCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "InvalidPaginationTokenException": - case "com.amazonaws.rekognition#InvalidPaginationTokenException": + case "InvalidImageFormatException": + case "com.amazonaws.rekognition#InvalidImageFormatException": response = { - ...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_json1_1InvalidImageFormatExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -3894,6 +4656,14 @@ const deserializeAws_json1_1GetSegmentDetectionCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "InvalidS3ObjectException": + case "com.amazonaws.rekognition#InvalidS3ObjectException": + response = { + ...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ProvisionedThroughputExceededException": case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": response = { @@ -3910,6 +4680,14 @@ const deserializeAws_json1_1GetSegmentDetectionCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ServiceQuotaExceededException": + case "com.amazonaws.rekognition#ServiceQuotaExceededException": + response = { + ...(await deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ThrottlingException": case "com.amazonaws.rekognition#ThrottlingException": response = { @@ -3935,27 +4713,27 @@ const deserializeAws_json1_1GetSegmentDetectionCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_json1_1GetTextDetectionCommand = async ( +export const deserializeAws_json1_1ListCollectionsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return deserializeAws_json1_1GetTextDetectionCommandError(output, context); + return deserializeAws_json1_1ListCollectionsCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = deserializeAws_json1_1GetTextDetectionResponse(data, context); - const response: GetTextDetectionCommandOutput = { + contents = deserializeAws_json1_1ListCollectionsResponse(data, context); + const response: ListCollectionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; return Promise.resolve(response); }; -const deserializeAws_json1_1GetTextDetectionCommandError = async ( +const deserializeAws_json1_1ListCollectionsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4037,27 +4815,27 @@ const deserializeAws_json1_1GetTextDetectionCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_json1_1IndexFacesCommand = async ( +export const deserializeAws_json1_1ListDatasetEntriesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return deserializeAws_json1_1IndexFacesCommandError(output, context); + return deserializeAws_json1_1ListDatasetEntriesCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = deserializeAws_json1_1IndexFacesResponse(data, context); - const response: IndexFacesCommandOutput = { + contents = deserializeAws_json1_1ListDatasetEntriesResponse(data, context); + const response: ListDatasetEntriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; return Promise.resolve(response); }; -const deserializeAws_json1_1IndexFacesCommandError = async ( +const deserializeAws_json1_1ListDatasetEntriesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4074,14 +4852,6 @@ const deserializeAws_json1_1IndexFacesCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ImageTooLargeException": - case "com.amazonaws.rekognition#ImageTooLargeException": - response = { - ...(await deserializeAws_json1_1ImageTooLargeExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "InternalServerError": case "com.amazonaws.rekognition#InternalServerError": response = { @@ -4090,10 +4860,10 @@ const deserializeAws_json1_1IndexFacesCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "InvalidImageFormatException": - case "com.amazonaws.rekognition#InvalidImageFormatException": + case "InvalidPaginationTokenException": + case "com.amazonaws.rekognition#InvalidPaginationTokenException": response = { - ...(await deserializeAws_json1_1InvalidImageFormatExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -4106,18 +4876,18 @@ const deserializeAws_json1_1IndexFacesCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "InvalidS3ObjectException": - case "com.amazonaws.rekognition#InvalidS3ObjectException": + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": response = { - ...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; break; - case "ProvisionedThroughputExceededException": - case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + case "ResourceInUseException": + case "com.amazonaws.rekognition#ResourceInUseException": response = { - ...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -4130,10 +4900,10 @@ const deserializeAws_json1_1IndexFacesCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ServiceQuotaExceededException": - case "com.amazonaws.rekognition#ServiceQuotaExceededException": + case "ResourceNotReadyException": + case "com.amazonaws.rekognition#ResourceNotReadyException": response = { - ...(await deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_json1_1ResourceNotReadyExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -4163,27 +4933,27 @@ const deserializeAws_json1_1IndexFacesCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_json1_1ListCollectionsCommand = async ( +export const deserializeAws_json1_1ListDatasetLabelsCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return deserializeAws_json1_1ListCollectionsCommandError(output, context); + return deserializeAws_json1_1ListDatasetLabelsCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = deserializeAws_json1_1ListCollectionsResponse(data, context); - const response: ListCollectionsCommandOutput = { + contents = deserializeAws_json1_1ListDatasetLabelsResponse(data, context); + const response: ListDatasetLabelsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; return Promise.resolve(response); }; -const deserializeAws_json1_1ListCollectionsCommandError = async ( +const deserializeAws_json1_1ListDatasetLabelsCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -4232,6 +5002,14 @@ const deserializeAws_json1_1ListCollectionsCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ResourceInUseException": + case "com.amazonaws.rekognition#ResourceInUseException": + response = { + ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ResourceNotFoundException": case "com.amazonaws.rekognition#ResourceNotFoundException": response = { @@ -4240,6 +5018,14 @@ const deserializeAws_json1_1ListCollectionsCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ResourceNotReadyException": + case "com.amazonaws.rekognition#ResourceNotReadyException": + response = { + ...(await deserializeAws_json1_1ResourceNotReadyExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ThrottlingException": case "com.amazonaws.rekognition#ThrottlingException": response = { @@ -6212,10 +6998,112 @@ const deserializeAws_json1_1StopStreamProcessorCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ResourceNotFoundException": - case "com.amazonaws.rekognition#ResourceNotFoundException": + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + response = { + ...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + default: + const parsedBody = parsedOutput.body; + errorCode = parsedBody.code || parsedBody.Code || errorCode; + response = { + ...parsedBody, + name: `${errorCode}`, + message: parsedBody.message || parsedBody.Message || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + } as any; + } + const message = response.message || response.Message || errorCode; + response.message = message; + delete response.Message; + return Promise.reject(Object.assign(new Error(message), response)); +}; + +export const deserializeAws_json1_1TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1TagResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1TagResourceResponse(data, context); + const response: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1TagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __SmithyException & __MetadataBearer & { [key: string]: any }; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + response = { + ...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + response = { + ...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + response = { + ...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + response = { + ...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + response = { + ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; + case "ServiceQuotaExceededException": + case "com.amazonaws.rekognition#ServiceQuotaExceededException": response = { - ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)), + ...(await deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), name: errorCode, $metadata: deserializeMetadata(output), }; @@ -6245,27 +7133,27 @@ const deserializeAws_json1_1StopStreamProcessorCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_json1_1TagResourceCommand = async ( +export const deserializeAws_json1_1UntagResourceCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return deserializeAws_json1_1TagResourceCommandError(output, context); + return deserializeAws_json1_1UntagResourceCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = deserializeAws_json1_1TagResourceResponse(data, context); - const response: TagResourceCommandOutput = { + contents = deserializeAws_json1_1UntagResourceResponse(data, context); + const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; return Promise.resolve(response); }; -const deserializeAws_json1_1TagResourceCommandError = async ( +const deserializeAws_json1_1UntagResourceCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6314,14 +7202,6 @@ const deserializeAws_json1_1TagResourceCommandError = async ( $metadata: deserializeMetadata(output), }; break; - case "ServiceQuotaExceededException": - case "com.amazonaws.rekognition#ServiceQuotaExceededException": - response = { - ...(await deserializeAws_json1_1ServiceQuotaExceededExceptionResponse(parsedOutput, context)), - name: errorCode, - $metadata: deserializeMetadata(output), - }; - break; case "ThrottlingException": case "com.amazonaws.rekognition#ThrottlingException": response = { @@ -6347,27 +7227,27 @@ const deserializeAws_json1_1TagResourceCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; -export const deserializeAws_json1_1UntagResourceCommand = async ( +export const deserializeAws_json1_1UpdateDatasetEntriesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return deserializeAws_json1_1UntagResourceCommandError(output, context); + return deserializeAws_json1_1UpdateDatasetEntriesCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = deserializeAws_json1_1UntagResourceResponse(data, context); - const response: UntagResourceCommandOutput = { + contents = deserializeAws_json1_1UpdateDatasetEntriesResponse(data, context); + const response: UpdateDatasetEntriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; return Promise.resolve(response); }; -const deserializeAws_json1_1UntagResourceCommandError = async ( +const deserializeAws_json1_1UpdateDatasetEntriesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseBody(output.body, context), @@ -6400,6 +7280,14 @@ const deserializeAws_json1_1UntagResourceCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "LimitExceededException": + case "com.amazonaws.rekognition#LimitExceededException": + response = { + ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ProvisionedThroughputExceededException": case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": response = { @@ -6408,6 +7296,14 @@ const deserializeAws_json1_1UntagResourceCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "ResourceInUseException": + case "com.amazonaws.rekognition#ResourceInUseException": + response = { + ...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "ResourceNotFoundException": case "com.amazonaws.rekognition#ResourceNotFoundException": response = { @@ -6793,6 +7689,17 @@ const serializeAws_json1_1CreateCollectionRequest = (input: CreateCollectionRequ }; }; +const serializeAws_json1_1CreateDatasetRequest = (input: CreateDatasetRequest, context: __SerdeContext): any => { + return { + ...(input.DatasetSource !== undefined && + input.DatasetSource !== null && { + DatasetSource: serializeAws_json1_1DatasetSource(input.DatasetSource, context), + }), + ...(input.DatasetType !== undefined && input.DatasetType !== null && { DatasetType: input.DatasetType }), + ...(input.ProjectArn !== undefined && input.ProjectArn !== null && { ProjectArn: input.ProjectArn }), + }; +}; + const serializeAws_json1_1CreateProjectRequest = (input: CreateProjectRequest, context: __SerdeContext): any => { return { ...(input.ProjectName !== undefined && input.ProjectName !== null && { ProjectName: input.ProjectName }), @@ -6834,12 +7741,46 @@ const serializeAws_json1_1CreateStreamProcessorRequest = ( }; }; +const serializeAws_json1_1DatasetChanges = (input: DatasetChanges, context: __SerdeContext): any => { + return { + ...(input.GroundTruth !== undefined && + input.GroundTruth !== null && { GroundTruth: context.base64Encoder(input.GroundTruth) }), + }; +}; + +const serializeAws_json1_1DatasetLabels = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + +const serializeAws_json1_1DatasetSource = (input: DatasetSource, context: __SerdeContext): any => { + return { + ...(input.DatasetArn !== undefined && input.DatasetArn !== null && { DatasetArn: input.DatasetArn }), + ...(input.GroundTruthManifest !== undefined && + input.GroundTruthManifest !== null && { + GroundTruthManifest: serializeAws_json1_1GroundTruthManifest(input.GroundTruthManifest, context), + }), + }; +}; + const serializeAws_json1_1DeleteCollectionRequest = (input: DeleteCollectionRequest, context: __SerdeContext): any => { return { ...(input.CollectionId !== undefined && input.CollectionId !== null && { CollectionId: input.CollectionId }), }; }; +const serializeAws_json1_1DeleteDatasetRequest = (input: DeleteDatasetRequest, context: __SerdeContext): any => { + return { + ...(input.DatasetArn !== undefined && input.DatasetArn !== null && { DatasetArn: input.DatasetArn }), + }; +}; + const serializeAws_json1_1DeleteFacesRequest = (input: DeleteFacesRequest, context: __SerdeContext): any => { return { ...(input.CollectionId !== undefined && input.CollectionId !== null && { CollectionId: input.CollectionId }), @@ -6882,10 +7823,18 @@ const serializeAws_json1_1DescribeCollectionRequest = ( }; }; +const serializeAws_json1_1DescribeDatasetRequest = (input: DescribeDatasetRequest, context: __SerdeContext): any => { + return { + ...(input.DatasetArn !== undefined && input.DatasetArn !== null && { DatasetArn: input.DatasetArn }), + }; +}; + const serializeAws_json1_1DescribeProjectsRequest = (input: DescribeProjectsRequest, context: __SerdeContext): any => { return { ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.ProjectNames !== undefined && + input.ProjectNames !== null && { ProjectNames: serializeAws_json1_1ProjectNames(input.ProjectNames, context) }), }; }; @@ -7009,6 +7958,38 @@ const serializeAws_json1_1DetectTextRequest = (input: DetectTextRequest, context }; }; +const serializeAws_json1_1DistributeDataset = (input: DistributeDataset, context: __SerdeContext): any => { + return { + ...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }), + }; +}; + +const serializeAws_json1_1DistributeDatasetEntriesRequest = ( + input: DistributeDatasetEntriesRequest, + context: __SerdeContext +): any => { + return { + ...(input.Datasets !== undefined && + input.Datasets !== null && { + Datasets: serializeAws_json1_1DistributeDatasetMetadataList(input.Datasets, context), + }), + }; +}; + +const serializeAws_json1_1DistributeDatasetMetadataList = ( + input: DistributeDataset[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return serializeAws_json1_1DistributeDataset(entry, context); + }); +}; + const serializeAws_json1_1FaceIdList = (input: string[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -7189,6 +8170,36 @@ const serializeAws_json1_1ListCollectionsRequest = (input: ListCollectionsReques }; }; +const serializeAws_json1_1ListDatasetEntriesRequest = ( + input: ListDatasetEntriesRequest, + context: __SerdeContext +): any => { + return { + ...(input.ContainsLabels !== undefined && + input.ContainsLabels !== null && { + ContainsLabels: serializeAws_json1_1DatasetLabels(input.ContainsLabels, context), + }), + ...(input.DatasetArn !== undefined && input.DatasetArn !== null && { DatasetArn: input.DatasetArn }), + ...(input.HasErrors !== undefined && input.HasErrors !== null && { HasErrors: input.HasErrors }), + ...(input.Labeled !== undefined && input.Labeled !== null && { Labeled: input.Labeled }), + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.SourceRefContains !== undefined && + input.SourceRefContains !== null && { SourceRefContains: input.SourceRefContains }), + }; +}; + +const serializeAws_json1_1ListDatasetLabelsRequest = ( + input: ListDatasetLabelsRequest, + context: __SerdeContext +): any => { + return { + ...(input.DatasetArn !== undefined && input.DatasetArn !== null && { DatasetArn: input.DatasetArn }), + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + }; +}; + const serializeAws_json1_1ListFacesRequest = (input: ListFacesRequest, context: __SerdeContext): any => { return { ...(input.CollectionId !== undefined && input.CollectionId !== null && { CollectionId: input.CollectionId }), @@ -7230,6 +8241,17 @@ const serializeAws_json1_1OutputConfig = (input: OutputConfig, context: __SerdeC }; }; +const serializeAws_json1_1ProjectNames = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_json1_1ProtectiveEquipmentSummarizationAttributes = ( input: ProtectiveEquipmentSummarizationAttributes, context: __SerdeContext @@ -7648,6 +8670,17 @@ const serializeAws_json1_1UntagResourceRequest = (input: UntagResourceRequest, c }; }; +const serializeAws_json1_1UpdateDatasetEntriesRequest = ( + input: UpdateDatasetEntriesRequest, + context: __SerdeContext +): any => { + return { + ...(input.Changes !== undefined && + input.Changes !== null && { Changes: serializeAws_json1_1DatasetChanges(input.Changes, context) }), + ...(input.DatasetArn !== undefined && input.DatasetArn !== null && { DatasetArn: input.DatasetArn }), + }; +}; + const serializeAws_json1_1VersionNames = (input: string[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -7778,6 +8811,10 @@ const deserializeAws_json1_1CelebrityDetail = (output: any, context: __SerdeCont ? deserializeAws_json1_1FaceDetail(output.Face, context) : undefined, Id: __expectString(output.Id), + KnownGender: + output.KnownGender !== undefined && output.KnownGender !== null + ? deserializeAws_json1_1KnownGender(output.KnownGender, context) + : undefined, Name: __expectString(output.Name), Urls: output.Urls !== undefined && output.Urls !== null ? deserializeAws_json1_1Urls(output.Urls, context) : undefined, @@ -7975,6 +9012,12 @@ const deserializeAws_json1_1CreateCollectionResponse = ( } as any; }; +const deserializeAws_json1_1CreateDatasetResponse = (output: any, context: __SerdeContext): CreateDatasetResponse => { + return { + DatasetArn: __expectString(output.DatasetArn), + } as any; +}; + const deserializeAws_json1_1CreateProjectResponse = (output: any, context: __SerdeContext): CreateProjectResponse => { return { ProjectArn: __expectString(output.ProjectArn), @@ -8021,6 +9064,105 @@ const deserializeAws_json1_1CustomLabels = (output: any, context: __SerdeContext }); }; +const deserializeAws_json1_1DatasetDescription = (output: any, context: __SerdeContext): DatasetDescription => { + return { + CreationTimestamp: + output.CreationTimestamp !== undefined && output.CreationTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) + : undefined, + DatasetStats: + output.DatasetStats !== undefined && output.DatasetStats !== null + ? deserializeAws_json1_1DatasetStats(output.DatasetStats, context) + : undefined, + LastUpdatedTimestamp: + output.LastUpdatedTimestamp !== undefined && output.LastUpdatedTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) + : undefined, + Status: __expectString(output.Status), + StatusMessage: __expectString(output.StatusMessage), + StatusMessageCode: __expectString(output.StatusMessageCode), + } as any; +}; + +const deserializeAws_json1_1DatasetEntries = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return __expectString(entry) as any; + }); +}; + +const deserializeAws_json1_1DatasetLabelDescription = ( + output: any, + context: __SerdeContext +): DatasetLabelDescription => { + return { + LabelName: __expectString(output.LabelName), + LabelStats: + output.LabelStats !== undefined && output.LabelStats !== null + ? deserializeAws_json1_1DatasetLabelStats(output.LabelStats, context) + : undefined, + } as any; +}; + +const deserializeAws_json1_1DatasetLabelDescriptions = ( + output: any, + context: __SerdeContext +): DatasetLabelDescription[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_json1_1DatasetLabelDescription(entry, context); + }); +}; + +const deserializeAws_json1_1DatasetLabelStats = (output: any, context: __SerdeContext): DatasetLabelStats => { + return { + BoundingBoxCount: __expectInt32(output.BoundingBoxCount), + EntryCount: __expectInt32(output.EntryCount), + } as any; +}; + +const deserializeAws_json1_1DatasetMetadata = (output: any, context: __SerdeContext): DatasetMetadata => { + return { + CreationTimestamp: + output.CreationTimestamp !== undefined && output.CreationTimestamp !== null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) + : undefined, + DatasetArn: __expectString(output.DatasetArn), + DatasetType: __expectString(output.DatasetType), + Status: __expectString(output.Status), + StatusMessage: __expectString(output.StatusMessage), + StatusMessageCode: __expectString(output.StatusMessageCode), + } as any; +}; + +const deserializeAws_json1_1DatasetMetadataList = (output: any, context: __SerdeContext): DatasetMetadata[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_json1_1DatasetMetadata(entry, context); + }); +}; + +const deserializeAws_json1_1DatasetStats = (output: any, context: __SerdeContext): DatasetStats => { + return { + ErrorEntries: __expectInt32(output.ErrorEntries), + LabeledEntries: __expectInt32(output.LabeledEntries), + TotalEntries: __expectInt32(output.TotalEntries), + TotalLabels: __expectInt32(output.TotalLabels), + } as any; +}; + const deserializeAws_json1_1DeleteCollectionResponse = ( output: any, context: __SerdeContext @@ -8030,6 +9172,10 @@ const deserializeAws_json1_1DeleteCollectionResponse = ( } as any; }; +const deserializeAws_json1_1DeleteDatasetResponse = (output: any, context: __SerdeContext): DeleteDatasetResponse => { + return {} as any; +}; + const deserializeAws_json1_1DeleteFacesResponse = (output: any, context: __SerdeContext): DeleteFacesResponse => { return { DeletedFaces: @@ -8076,6 +9222,18 @@ const deserializeAws_json1_1DescribeCollectionResponse = ( } as any; }; +const deserializeAws_json1_1DescribeDatasetResponse = ( + output: any, + context: __SerdeContext +): DescribeDatasetResponse => { + return { + DatasetDescription: + output.DatasetDescription !== undefined && output.DatasetDescription !== null + ? deserializeAws_json1_1DatasetDescription(output.DatasetDescription, context) + : undefined, + } as any; +}; + const deserializeAws_json1_1DescribeProjectsResponse = ( output: any, context: __SerdeContext @@ -8212,6 +9370,13 @@ const deserializeAws_json1_1DetectTextResponse = (output: any, context: __SerdeC } as any; }; +const deserializeAws_json1_1DistributeDatasetEntriesResponse = ( + output: any, + context: __SerdeContext +): DistributeDatasetEntriesResponse => { + return {} as any; +}; + const deserializeAws_json1_1Emotion = (output: any, context: __SerdeContext): Emotion => { return { Confidence: __limitedParseFloat32(output.Confidence), @@ -8936,6 +10101,32 @@ const deserializeAws_json1_1ListCollectionsResponse = ( } as any; }; +const deserializeAws_json1_1ListDatasetEntriesResponse = ( + output: any, + context: __SerdeContext +): ListDatasetEntriesResponse => { + return { + DatasetEntries: + output.DatasetEntries !== undefined && output.DatasetEntries !== null + ? deserializeAws_json1_1DatasetEntries(output.DatasetEntries, context) + : undefined, + NextToken: __expectString(output.NextToken), + } as any; +}; + +const deserializeAws_json1_1ListDatasetLabelsResponse = ( + output: any, + context: __SerdeContext +): ListDatasetLabelsResponse => { + return { + DatasetLabelDescriptions: + output.DatasetLabelDescriptions !== undefined && output.DatasetLabelDescriptions !== null + ? deserializeAws_json1_1DatasetLabelDescriptions(output.DatasetLabelDescriptions, context) + : undefined, + NextToken: __expectString(output.NextToken), + } as any; +}; + const deserializeAws_json1_1ListFacesResponse = (output: any, context: __SerdeContext): ListFacesResponse => { return { FaceModelVersion: __expectString(output.FaceModelVersion), @@ -9121,6 +10312,10 @@ const deserializeAws_json1_1ProjectDescription = (output: any, context: __SerdeC output.CreationTimestamp !== undefined && output.CreationTimestamp !== null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) : undefined, + Datasets: + output.Datasets !== undefined && output.Datasets !== null + ? deserializeAws_json1_1DatasetMetadataList(output.Datasets, context) + : undefined, ProjectArn: __expectString(output.ProjectArn), Status: __expectString(output.Status), } as any; @@ -9790,6 +10985,13 @@ const deserializeAws_json1_1UntagResourceResponse = (output: any, context: __Ser return {} as any; }; +const deserializeAws_json1_1UpdateDatasetEntriesResponse = ( + output: any, + context: __SerdeContext +): UpdateDatasetEntriesResponse => { + return {} as any; +}; + const deserializeAws_json1_1Urls = (output: any, context: __SerdeContext): string[] => { return (output || []) .filter((e: any) => e != null) diff --git a/clients/client-resource-groups-tagging-api/src/ResourceGroupsTaggingAPI.ts b/clients/client-resource-groups-tagging-api/src/ResourceGroupsTaggingAPI.ts index 4d7502c4f101..7f291f5e0bde 100644 --- a/clients/client-resource-groups-tagging-api/src/ResourceGroupsTaggingAPI.ts +++ b/clients/client-resource-groups-tagging-api/src/ResourceGroupsTaggingAPI.ts @@ -80,11 +80,11 @@ export class ResourceGroupsTaggingAPI extends ResourceGroupsTaggingAPIClient { *

      Returns a table that shows counts of resources that are noncompliant with their tag * policies.

      *

      For more information on tag policies, see Tag Policies in - * the AWS Organizations User Guide. + * the Organizations User Guide. *

      *

      You can call this operation only from the organization's * management account and from the us-east-1 Region.

      - *

      This operation supports pagination, where the response can be sent in + *

      This operation supports pagination, where the response can be sent in * multiple pages. You should check the PaginationToken response parameter to determine * if there are additional results available to return. Repeat the query, passing the * PaginationToken response parameter value as an input to the next request until you @@ -122,7 +122,7 @@ export class ResourceGroupsTaggingAPI extends ResourceGroupsTaggingAPIClient { /** *

      Returns all the tagged or previously tagged resources that are located in the - * specified Region for the AWS account.

      + * specified Amazon Web Services Region for the account.

      *

      Depending on what information you want returned, you can also specify the * following:

      *
        @@ -135,11 +135,11 @@ export class ResourceGroupsTaggingAPI extends ResourceGroupsTaggingAPIClient { *
      • *

        Information about compliance with the account's effective tag policy. For more * information on tag policies, see Tag - * Policies in the AWS Organizations User Guide. + * Policies in the Organizations User Guide. *

        *
      • *
      - *

      This operation supports pagination, where the response can be sent in + *

      This operation supports pagination, where the response can be sent in * multiple pages. You should check the PaginationToken response parameter to determine * if there are additional results available to return. Repeat the query, passing the * PaginationToken response parameter value as an input to the next request until you @@ -173,9 +173,9 @@ export class ResourceGroupsTaggingAPI extends ResourceGroupsTaggingAPIClient { } /** - *

      Returns all tag keys currently in use in the specified Region for the calling AWS + *

      Returns all tag keys currently in use in the specified Amazon Web Services Region for the calling * account.

      - *

      This operation supports pagination, where the response can be sent in + *

      This operation supports pagination, where the response can be sent in * multiple pages. You should check the PaginationToken response parameter to determine * if there are additional results available to return. Repeat the query, passing the * PaginationToken response parameter value as an input to the next request until you @@ -206,9 +206,9 @@ export class ResourceGroupsTaggingAPI extends ResourceGroupsTaggingAPIClient { } /** - *

      Returns all tag values for the specified key that are used in the specified AWS - * Region for the calling AWS account.

      - *

      This operation supports pagination, where the response can be sent in + *

      Returns all tag values for the specified key that are used in the specified Amazon Web Services + * Region for the calling account.

      + *

      This operation supports pagination, where the response can be sent in * multiple pages. You should check the PaginationToken response parameter to determine * if there are additional results available to return. Repeat the query, passing the * PaginationToken response parameter value as an input to the next request until you @@ -287,16 +287,19 @@ export class ResourceGroupsTaggingAPI extends ResourceGroupsTaggingAPIClient { *

    • *

      Not all resources can have tags. For a list of services with resources that * support tagging using this operation, see Services that support the - * Resource Groups Tagging API.

      + * Resource Groups Tagging API. If the resource doesn't yet support + * this operation, the resource's service might support tagging using its own API + * operations. For more information, refer to the documentation for that + * service.

      *
    • *
    • - *

      Each resource can have up to 50 tags. For other limits, see Tag Naming and Usage Conventions in the AWS General + *

      Each resource can have up to 50 tags. For other limits, see Tag Naming and Usage Conventions in the Amazon Web Services General * Reference. *

      *
    • *
    • - *

      You can only tag resources that are located in the specified AWS Region for - * the AWS account.

      + *

      You can only tag resources that are located in the specified Amazon Web Services Region for + * the Amazon Web Services account.

      *
    • *
    • *

      To add tags to a resource, you need the necessary permissions for the service @@ -310,6 +313,25 @@ export class ResourceGroupsTaggingAPI extends ResourceGroupsTaggingAPIClient { * administration services. Tags are not intended to be used for private or sensitive * data.

      * + *

      + * Minimum permissions + *

      + *

      In addition to the tag:TagResources permission required by this + * operation, you must also have the tagging permission defined by the service that created + * the resource. For example, to tag an Amazon EC2 instance using the TagResources + * operation, you must have both of the following permissions:

      + *
        + *
      • + *

        + * tag:TagResource + *

        + *
      • + *
      • + *

        + * ec2:CreateTags + *

        + *
      • + *
      */ public tagResources( args: TagResourcesCommandInput, @@ -350,8 +372,29 @@ export class ResourceGroupsTaggingAPI extends ResourceGroupsTaggingAPIClient { * want to untag.

      *
    • *
    • - *

      You can only tag resources that are located in the specified AWS Region for - * the calling AWS account.

      + *

      You can only tag resources that are located in the specified Amazon Web Services Region for + * the calling Amazon Web Services account.

      + *
    • + *
    + * + *

    + * Minimum permissions + *

    + *

    In addition to the tag:UntagResources permission required by this + * operation, you must also have the remove tags permission defined by the service that + * created the resource. For example, to remove the tags from an Amazon EC2 instance using the + * UntagResources operation, you must have both of the following + * permissions:

    + *
      + *
    • + *

      + * tag:UntagResource + *

      + *
    • + *
    • + *

      + * ec2:DeleteTags + *

      *
    • *
    */ diff --git a/clients/client-resource-groups-tagging-api/src/commands/GetComplianceSummaryCommand.ts b/clients/client-resource-groups-tagging-api/src/commands/GetComplianceSummaryCommand.ts index d08bbd27a0b6..469678cdbc84 100644 --- a/clients/client-resource-groups-tagging-api/src/commands/GetComplianceSummaryCommand.ts +++ b/clients/client-resource-groups-tagging-api/src/commands/GetComplianceSummaryCommand.ts @@ -29,11 +29,11 @@ export interface GetComplianceSummaryCommandOutput extends GetComplianceSummaryO *

    Returns a table that shows counts of resources that are noncompliant with their tag * policies.

    *

    For more information on tag policies, see Tag Policies in - * the AWS Organizations User Guide. + * the Organizations User Guide. *

    *

    You can call this operation only from the organization's * management account and from the us-east-1 Region.

    - *

    This operation supports pagination, where the response can be sent in + *

    This operation supports pagination, where the response can be sent in * multiple pages. You should check the PaginationToken response parameter to determine * if there are additional results available to return. Repeat the query, passing the * PaginationToken response parameter value as an input to the next request until you diff --git a/clients/client-resource-groups-tagging-api/src/commands/GetResourcesCommand.ts b/clients/client-resource-groups-tagging-api/src/commands/GetResourcesCommand.ts index 62bccb69ded9..d9595a48c083 100644 --- a/clients/client-resource-groups-tagging-api/src/commands/GetResourcesCommand.ts +++ b/clients/client-resource-groups-tagging-api/src/commands/GetResourcesCommand.ts @@ -27,7 +27,7 @@ export interface GetResourcesCommandOutput extends GetResourcesOutput, __Metadat /** *

    Returns all the tagged or previously tagged resources that are located in the - * specified Region for the AWS account.

    + * specified Amazon Web Services Region for the account.

    *

    Depending on what information you want returned, you can also specify the * following:

    *
      @@ -40,11 +40,11 @@ export interface GetResourcesCommandOutput extends GetResourcesOutput, __Metadat *
    • *

      Information about compliance with the account's effective tag policy. For more * information on tag policies, see Tag - * Policies in the AWS Organizations User Guide. + * Policies in the Organizations User Guide. *

      *
    • *
    - *

    This operation supports pagination, where the response can be sent in + *

    This operation supports pagination, where the response can be sent in * multiple pages. You should check the PaginationToken response parameter to determine * if there are additional results available to return. Repeat the query, passing the * PaginationToken response parameter value as an input to the next request until you diff --git a/clients/client-resource-groups-tagging-api/src/commands/GetTagKeysCommand.ts b/clients/client-resource-groups-tagging-api/src/commands/GetTagKeysCommand.ts index c44c6227c5da..25de87f33358 100644 --- a/clients/client-resource-groups-tagging-api/src/commands/GetTagKeysCommand.ts +++ b/clients/client-resource-groups-tagging-api/src/commands/GetTagKeysCommand.ts @@ -26,9 +26,9 @@ export interface GetTagKeysCommandInput extends GetTagKeysInput {} export interface GetTagKeysCommandOutput extends GetTagKeysOutput, __MetadataBearer {} /** - *

    Returns all tag keys currently in use in the specified Region for the calling AWS + *

    Returns all tag keys currently in use in the specified Amazon Web Services Region for the calling * account.

    - *

    This operation supports pagination, where the response can be sent in + *

    This operation supports pagination, where the response can be sent in * multiple pages. You should check the PaginationToken response parameter to determine * if there are additional results available to return. Repeat the query, passing the * PaginationToken response parameter value as an input to the next request until you diff --git a/clients/client-resource-groups-tagging-api/src/commands/GetTagValuesCommand.ts b/clients/client-resource-groups-tagging-api/src/commands/GetTagValuesCommand.ts index 4800d96adbe3..fa9f1853029e 100644 --- a/clients/client-resource-groups-tagging-api/src/commands/GetTagValuesCommand.ts +++ b/clients/client-resource-groups-tagging-api/src/commands/GetTagValuesCommand.ts @@ -26,9 +26,9 @@ export interface GetTagValuesCommandInput extends GetTagValuesInput {} export interface GetTagValuesCommandOutput extends GetTagValuesOutput, __MetadataBearer {} /** - *

    Returns all tag values for the specified key that are used in the specified AWS - * Region for the calling AWS account.

    - *

    This operation supports pagination, where the response can be sent in + *

    Returns all tag values for the specified key that are used in the specified Amazon Web Services + * Region for the calling account.

    + *

    This operation supports pagination, where the response can be sent in * multiple pages. You should check the PaginationToken response parameter to determine * if there are additional results available to return. Repeat the query, passing the * PaginationToken response parameter value as an input to the next request until you diff --git a/clients/client-resource-groups-tagging-api/src/commands/TagResourcesCommand.ts b/clients/client-resource-groups-tagging-api/src/commands/TagResourcesCommand.ts index db064f5de288..1f610240c7cf 100644 --- a/clients/client-resource-groups-tagging-api/src/commands/TagResourcesCommand.ts +++ b/clients/client-resource-groups-tagging-api/src/commands/TagResourcesCommand.ts @@ -31,16 +31,19 @@ export interface TagResourcesCommandOutput extends TagResourcesOutput, __Metadat *

  • *

    Not all resources can have tags. For a list of services with resources that * support tagging using this operation, see Services that support the - * Resource Groups Tagging API.

    + * Resource Groups Tagging API. If the resource doesn't yet support + * this operation, the resource's service might support tagging using its own API + * operations. For more information, refer to the documentation for that + * service.

    *
  • *
  • - *

    Each resource can have up to 50 tags. For other limits, see Tag Naming and Usage Conventions in the AWS General + *

    Each resource can have up to 50 tags. For other limits, see Tag Naming and Usage Conventions in the Amazon Web Services General * Reference. *

    *
  • *
  • - *

    You can only tag resources that are located in the specified AWS Region for - * the AWS account.

    + *

    You can only tag resources that are located in the specified Amazon Web Services Region for + * the Amazon Web Services account.

    *
  • *
  • *

    To add tags to a resource, you need the necessary permissions for the service @@ -54,6 +57,25 @@ export interface TagResourcesCommandOutput extends TagResourcesOutput, __Metadat * administration services. Tags are not intended to be used for private or sensitive * data.

    * + *

    + * Minimum permissions + *

    + *

    In addition to the tag:TagResources permission required by this + * operation, you must also have the tagging permission defined by the service that created + * the resource. For example, to tag an Amazon EC2 instance using the TagResources + * operation, you must have both of the following permissions:

    + *
      + *
    • + *

      + * tag:TagResource + *

      + *
    • + *
    • + *

      + * ec2:CreateTags + *

      + *
    • + *
    * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-resource-groups-tagging-api/src/commands/UntagResourcesCommand.ts b/clients/client-resource-groups-tagging-api/src/commands/UntagResourcesCommand.ts index a6b23dd4d9d1..7dfff3b4c868 100644 --- a/clients/client-resource-groups-tagging-api/src/commands/UntagResourcesCommand.ts +++ b/clients/client-resource-groups-tagging-api/src/commands/UntagResourcesCommand.ts @@ -38,8 +38,29 @@ export interface UntagResourcesCommandOutput extends UntagResourcesOutput, __Met * want to untag.

    *
  • *
  • - *

    You can only tag resources that are located in the specified AWS Region for - * the calling AWS account.

    + *

    You can only tag resources that are located in the specified Amazon Web Services Region for + * the calling Amazon Web Services account.

    + *
  • + * + * + *

    + * Minimum permissions + *

    + *

    In addition to the tag:UntagResources permission required by this + * operation, you must also have the remove tags permission defined by the service that + * created the resource. For example, to remove the tags from an Amazon EC2 instance using the + * UntagResources operation, you must have both of the following + * permissions:

    + *
      + *
    • + *

      + * tag:UntagResource + *

      + *
    • + *
    • + *

      + * ec2:DeleteTags + *

      *
    • *
    * @example diff --git a/clients/client-resource-groups-tagging-api/src/models/models_0.ts b/clients/client-resource-groups-tagging-api/src/models/models_0.ts index ab06ab6bd15d..2474514b1de4 100644 --- a/clients/client-resource-groups-tagging-api/src/models/models_0.ts +++ b/clients/client-resource-groups-tagging-api/src/models/models_0.ts @@ -57,14 +57,14 @@ export namespace ConcurrentModificationException { * @@ -235,34 +235,33 @@ export enum ErrorCode { *

    Information about the errors that are returned for each failed resource. This * information can include InternalServiceException and * InvalidParameterException errors. It can also include any valid error - * code returned by the AWS service that hosts the resource that the ARN key + * code returned by the Amazon Web Services service that hosts the resource that the ARN key * represents.

    - *

    The following are common error codes that you might receive from other AWS + *

    The following are common error codes that you might receive from other Amazon Web Services * services:

    * - *

    For more information on errors that are generated from other AWS services, see the + *

    For more information on errors that are generated from other Amazon Web Services services, see the * documentation for that service.

    */ export interface FailureInfo { @@ -274,7 +273,7 @@ export interface FailureInfo { /** *

    The code of the common error. Valid values include * InternalServiceException, InvalidParameterException, and - * any valid error code returned by the AWS service that hosts the resource that you want + * any valid error code returned by the Amazon Web Services service that hosts the resource that you want * to tag.

    */ ErrorCode?: ErrorCode | string; @@ -309,7 +308,7 @@ export interface GetComplianceSummaryInput { TargetIdFilters?: string[]; /** - *

    Specifies a list of AWS Regions to limit the output by. If you use this parameter, + *

    Specifies a list of Amazon Web Services Regions to limit the output to. If you use this parameter, * the count of returned noncompliant resources includes only resources in the specified * Regions.

    */ @@ -320,13 +319,16 @@ export interface GetComplianceSummaryInput { * specified types. The format of each resource type is * service[:resourceType]. For example, specifying a resource type of * ec2 returns all Amazon EC2 resources (which includes EC2 instances). - * Specifying a resource type of ec2:instance returns only EC2 instances.

    + * Specifying a resource type of ec2:instance returns only EC2 + * instances.

    *

    The string for each service name and resource type is the same as that embedded in a - * resource's Amazon Resource Name (ARN). Consult the AWS General - * Reference for the following:

    + * resource's Amazon Resource Name (ARN). Consult the + * Amazon Web Services General Reference + * + * for the following:

    * *

    You can specify multiple resource types by using a comma separated array. The array @@ -398,7 +400,7 @@ export interface Summary { /** *

    The account identifier or the root identifier of the organization. If you don't know - * the root ID, you can call the AWS Organizations ListRoots API.

    + * the root ID, you can call the Organizations ListRoots API.

    */ TargetId?: string; @@ -408,12 +410,12 @@ export interface Summary { TargetIdType?: TargetIdType | string; /** - *

    The AWS Region that the summary applies to.

    + *

    The Amazon Web Services Region that the summary applies to.

    */ Region?: string; /** - *

    The AWS resource type.

    + *

    The Amazon Web Services resource type.

    */ ResourceType?: string; @@ -461,12 +463,14 @@ export namespace GetComplianceSummaryOutput { */ export interface TagFilter { /** - *

    One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values.

    + *

    One part of a key-value pair that makes up a tag. A key is a general label + * that acts like a category for more specific tag values.

    */ Key?: string; /** - *

    One part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key). The value can be empty or null.

    + *

    One part of a key-value pair that make up a tag. A value acts as a + * descriptor within a tag category (key). The value can be empty or null.

    */ Values?: string[]; } @@ -490,8 +494,8 @@ export interface GetResourcesInput { /** *

    Specifies a list of TagFilters (keys and values) to restrict the output to only those - * resources that have the specified tag and, if included, the specified value. Each - * TagFilter must contain a key with values optional. A request can + * resources that have tags with the specified keys and, if included, the specified values. + * Each TagFilter must contain a key with values optional. A request can * include up to 50 keys, and each key can include up to 20 values.

    *

    Note the following when deciding how to use TagFilters:

    *
      @@ -507,12 +511,12 @@ export interface GetResourcesInput { * *
    • *

      If you specify a filter that contains more than one value for a key, the - * response returns resources that match any of the specified values for that - * key.

      + * response returns resources that match any of the specified + * values for that key.

      *
    • *
    • - *

      If you don't specify any values for a key, the response returns resources that - * are tagged with that key and any or no value.

      + *

      If you don't specify a value for a key, the response returns all resources + * that are tagged with that key, with any or no value.

      *

      For example, for the following filters: filter1= {keyA,{value1}}, * filter2={keyB,{value2,value3,value4}}, filter3= * {keyC}:

      @@ -557,7 +561,7 @@ export interface GetResourcesInput { ResourcesPerPage?: number; /** - *

      AWS recommends using ResourcesPerPage instead of this parameter.

      + *

      Amazon Web Services recommends using ResourcesPerPage instead of this parameter.

      *

      A limit that restricts the number of tags (key and value pairs) returned by * GetResources in paginated output. A resource with no tags is counted as * having one tag (one key and value pair).

      @@ -583,13 +587,15 @@ export interface GetResourcesInput { * instances). Specifying a resource type of ec2:instance returns only EC2 * instances.

      *

      The string for each service name and resource type is the same as that embedded in a - * resource's Amazon Resource Name (ARN). Consult the AWS General - * Reference for the following:

      - *

      For more information about ARNs, see Amazon Resource Names (ARNs) and - * AWS Service Namespaces.

      + * resource's Amazon Resource Name (ARN). For the list of services whose resources you can + * use in this parameter, see Services that support the Resource Groups Tagging API.

      *

      You can specify multiple resource types by using an array. The array can include up to * 100 items. Note that the length constraint requirement applies to each resource type - * filter.

      + * filter. For example, the following string would limit the response to only Amazon EC2 + * instances, Amazon S3 buckets, or any Audit Manager resource:

      + *

      + * ec2:instance,s3:bucket,auditmanager + *

      */ ResourceTypeFilters?: string[]; @@ -618,9 +624,9 @@ export interface GetResourcesInput { *

      If a resource specified by this parameter doesn't exist, it doesn't generate an error; * it simply isn't included in the response.

      *

      An ARN (Amazon Resource Name) uniquely identifies a resource. For more information, - * see Amazon - * Resource Names (ARNs) and AWS Service Namespaces in the AWS - * General Reference.

      + * see Amazon + * Resource Names (ARNs) and Amazon Web Services Service Namespaces in the + * Amazon Web Services General Reference.

      */ ResourceARNList?: string[]; } @@ -635,19 +641,20 @@ export namespace GetResourcesInput { } /** - *

      The metadata that you apply to AWS resources to help you categorize and organize + *

      The metadata that you apply to Amazon Web Services resources to help you categorize and organize * them. Each tag consists of a key and a value, both of which you define. For more - * information, see Tagging AWS - * Resources in the AWS General Reference.

      + * information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference.

      */ export interface Tag { /** - *

      One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values.

      + *

      One part of a key-value pair that makes up a tag. A key is a general label + * that acts like a category for more specific tag values.

      */ Key: string | undefined; /** - *

      One part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key). The value can be empty or null.

      + *

      One part of a key-value pair that make up a tag. A value acts as a + * descriptor within a tag category (key). The value can be empty or null.

      */ Value: string | undefined; } @@ -672,7 +679,7 @@ export interface ResourceTagMapping { ResourceARN?: string; /** - *

      The tags that have been applied to one or more AWS resources.

      + *

      The tags that have been applied to one or more Amazon Web Services resources.

      */ Tags?: Tag[]; @@ -702,7 +709,7 @@ export interface GetResourcesOutput { /** *

      A list of resource ARNs and the tags (keys and values) associated with - * those ARNs.

      + * each.

      */ ResourceTagMappingList?: ResourceTagMapping[]; } @@ -762,7 +769,7 @@ export interface GetTagKeysOutput { PaginationToken?: string; /** - *

      A list of all tag keys in the AWS account.

      + *

      A list of all tag keys in the Amazon Web Services account.

      */ TagKeys?: string[]; } @@ -786,7 +793,7 @@ export interface GetTagValuesInput { /** *

      Specifies the tag key for which you want to list all existing values that are - * currently used in the specified AWS Region for the calling AWS account.

      + * currently used in the specified Amazon Web Services Region for the calling account.

      */ Key: string | undefined; } @@ -809,8 +816,8 @@ export interface GetTagValuesOutput { PaginationToken?: string; /** - *

      A list of all tag values for the specified key currently used in the specified AWS - * Region for the calling AWS account.

      + *

      A list of all tag values for the specified key currently used in the specified Amazon Web Services + * Region for the calling account.

      */ TagValues?: string[]; } @@ -860,8 +867,8 @@ export interface TagResourcesInput { /** *

      Specifies the list of ARNs of the resources that you want to apply tags to.

      *

      An ARN (Amazon Resource Name) uniquely identifies a resource. For more information, - * see Amazon - * Resource Names (ARNs) and AWS Service Namespaces in the AWS + * see Amazon + * Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services * General Reference.

      */ ResourceARNList: string[] | undefined; @@ -905,8 +912,8 @@ export interface UntagResourcesInput { /** *

      Specifies a list of ARNs of the resources that you want to remove tags from.

      *

      An ARN (Amazon Resource Name) uniquely identifies a resource. For more information, - * see Amazon - * Resource Names (ARNs) and AWS Service Namespaces in the AWS + * see Amazon + * Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services * General Reference.

      */ ResourceARNList: string[] | undefined; diff --git a/clients/client-sagemaker/src/models/models_1.ts b/clients/client-sagemaker/src/models/models_1.ts index 57283ba12f81..5f86d89ad7c4 100644 --- a/clients/client-sagemaker/src/models/models_1.ts +++ b/clients/client-sagemaker/src/models/models_1.ts @@ -6590,6 +6590,11 @@ export interface DescribeDeviceResponse { *

      The response from the last list when returning a list large enough to need tokening.

      */ NextToken?: string; + + /** + *

      Edge Manager agent version.

      + */ + AgentVersion?: string; } export namespace DescribeDeviceResponse { diff --git a/clients/client-sagemaker/src/models/models_2.ts b/clients/client-sagemaker/src/models/models_2.ts index 12fcbdea8e0f..5190656686ab 100644 --- a/clients/client-sagemaker/src/models/models_2.ts +++ b/clients/client-sagemaker/src/models/models_2.ts @@ -2131,6 +2131,11 @@ export interface DeviceSummary { *

      Models on the device.

      */ Models?: EdgeModelSummary[]; + + /** + *

      Edge Manager agent version.

      + */ + AgentVersion?: string; } export namespace DeviceSummary { diff --git a/clients/client-sagemaker/src/protocols/Aws_json1_1.ts b/clients/client-sagemaker/src/protocols/Aws_json1_1.ts index e8ca1aa9abd7..21b75bc41dee 100644 --- a/clients/client-sagemaker/src/protocols/Aws_json1_1.ts +++ b/clients/client-sagemaker/src/protocols/Aws_json1_1.ts @@ -27374,6 +27374,7 @@ const deserializeAws_json1_1DescribeDeviceFleetResponse = ( const deserializeAws_json1_1DescribeDeviceResponse = (output: any, context: __SerdeContext): DescribeDeviceResponse => { return { + AgentVersion: __expectString(output.AgentVersion), Description: __expectString(output.Description), DeviceArn: __expectString(output.DeviceArn), DeviceFleetName: __expectString(output.DeviceFleetName), @@ -28739,6 +28740,7 @@ const deserializeAws_json1_1DeviceSummaries = (output: any, context: __SerdeCont const deserializeAws_json1_1DeviceSummary = (output: any, context: __SerdeContext): DeviceSummary => { return { + AgentVersion: __expectString(output.AgentVersion), Description: __expectString(output.Description), DeviceArn: __expectString(output.DeviceArn), DeviceFleetName: __expectString(output.DeviceFleetName), diff --git a/clients/client-transcribe/src/Transcribe.ts b/clients/client-transcribe/src/Transcribe.ts index eac38fb9074f..3c3378e3beb6 100644 --- a/clients/client-transcribe/src/Transcribe.ts +++ b/clients/client-transcribe/src/Transcribe.ts @@ -1285,7 +1285,7 @@ export class Transcribe extends TranscribeClient { } /** - *

      Tags a Amazon Transcribe resource with the given list of tags.

      + *

      Tags an Amazon Transcribe resource with the given list of tags.

      */ public tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise; public tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void; diff --git a/clients/client-transcribe/src/commands/TagResourceCommand.ts b/clients/client-transcribe/src/commands/TagResourceCommand.ts index ee5679d869d0..211cc0dcf8fc 100644 --- a/clients/client-transcribe/src/commands/TagResourceCommand.ts +++ b/clients/client-transcribe/src/commands/TagResourceCommand.ts @@ -22,7 +22,7 @@ export interface TagResourceCommandInput extends TagResourceRequest {} export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer {} /** - *

      Tags a Amazon Transcribe resource with the given list of tags.

      + *

      Tags an Amazon Transcribe resource with the given list of tags.

      * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-transcribe/src/models/models_0.ts b/clients/client-transcribe/src/models/models_0.ts index 8bc51e0204e7..28c9285966e3 100644 --- a/clients/client-transcribe/src/models/models_0.ts +++ b/clients/client-transcribe/src/models/models_0.ts @@ -238,6 +238,41 @@ export namespace ContentRedaction { }); } +/** + *

      Language-specific settings that can be specified when language identification is enabled.

      + */ +export interface LanguageIdSettings { + /** + *

      The name of the vocabulary you want to use when processing your transcription job. The + * vocabulary you specify must have the same language code as the transcription job; if the languages don't + * match, the vocabulary won't be applied.

      + */ + VocabularyName?: string; + + /** + *

      The name of the vocabulary filter you want to use when transcribing your audio. The filter you specify + * must have the same language code as the transcription job; if the languages don't match, the vocabulary + * filter won't be applied.

      + */ + VocabularyFilterName?: string; + + /** + *

      The name of the language model you want to use when transcribing your audio. The model you specify + * must have the same language code as the transcription job; if the languages don't match, the language model + * won't be applied.

      + */ + LanguageModelName?: string; +} + +export namespace LanguageIdSettings { + /** + * @internal + */ + export const filterSensitiveLog = (obj: LanguageIdSettings): any => ({ + ...obj, + }); +} + export enum VocabularyFilterMethod { MASK = "mask", REMOVE = "remove", @@ -287,6 +322,13 @@ export interface CallAnalyticsJobSettings { * features for additional information.

      */ LanguageOptions?: (LanguageCode | string)[]; + + /** + *

      The language identification settings associated with your call analytics job. These settings include + * VocabularyName, VocabularyFilterName, and + * LanguageModelName.

      + */ + LanguageIdSettings?: { [key: string]: LanguageIdSettings }; } export namespace CallAnalyticsJobSettings { @@ -435,7 +477,8 @@ export interface CallAnalyticsJob { FailureReason?: string; /** - *

      The Amazon Resource Number (ARN) that you use to get access to the analytics job.

      + *

      The Amazon Resource Number (ARN) that you use to access the analytics job. ARNs have the format + * arn:partition:service:region:account-id:resource-type/resource-id.

      */ DataAccessRoleArn?: string; @@ -1023,7 +1066,8 @@ export interface InputDataConfig { /** *

      The Amazon Resource Name (ARN) that uniquely identifies the permissions you've given Amazon Transcribe to access your - * Amazon S3 buckets containing your media files or text data.

      + * Amazon S3 buckets containing your media files or text data. ARNs have the format + * arn:partition:service:region:account-id:resource-type/resource-id.

      */ DataAccessRoleArn: string | undefined; } @@ -2111,9 +2155,11 @@ export interface JobExecutionSettings { AllowDeferredExecution?: boolean; /** - *

      The Amazon Resource Name (ARN) of a role that has access to the S3 bucket that contains the input files. Amazon Transcribe - * assumes this role to read queued media files. If you have specified an output S3 bucket for the transcription results, - * this role should have access to the output bucket as well.

      + *

      The Amazon Resource Name (ARN), in the form + * arn:partition:service:region:account-id:resource-type/resource-id, of a role + * that has access to the S3 bucket that contains the input files. Amazon Transcribe assumes this role to read queued + * media files. If you have specified an output S3 bucket for the transcription results, this role should + * have access to the output bucket as well.

      *

      If you specify the AllowDeferredExecution field, you must specify the * DataAccessRoleArn field.

      */ @@ -2398,6 +2444,13 @@ export interface TranscriptionJob { *

      Generate subtitles for your batch transcription job.

      */ Subtitles?: SubtitlesOutput; + + /** + *

      Language-specific settings that can be specified when language identification is enabled for your transcription + * job. These settings include VocabularyName, VocabularyFilterName, and + * LanguageModelNameLanguageModelName.

      + */ + LanguageIdSettings?: { [key: string]: LanguageIdSettings }; } export namespace TranscriptionJob { @@ -2953,7 +3006,13 @@ export namespace ListMedicalVocabulariesResponse { export interface ListTagsForResourceRequest { /** - *

      Lists all tags associated with a given Amazon Resource Name (ARN).

      + *

      Lists all tags associated with a given Amazon Resource Name (ARN). ARNs have the format + * arn:partition:service:region:account-id:resource-type/resource-id (for example, + * arn:aws:transcribe:us-east-1:account-id:transcription-job/your-job-name). Valid + * values for resource-type are: transcription-job, + * medical-transcription-job, vocabulary, + * medical-vocabulary, vocabulary-filter, and + * language-model.

      */ ResourceArn: string | undefined; } @@ -2969,7 +3028,7 @@ export namespace ListTagsForResourceRequest { export interface ListTagsForResourceResponse { /** - *

      Lists all tags associated with the given Amazon Resource Name (ARN).

      + *

      Lists all tags associated with the given Amazon Resource Name (ARN).

      */ ResourceArn?: string; @@ -3475,7 +3534,7 @@ export interface StartMedicalTranscriptionJobRequest { *
        *
      • *

        Amazon Resource Name (ARN) of a KMS key in the current account or another - * account: "arn:aws:kms:region:account ID:key/1234abcd-12ab-34cd-56ef-1234567890ab"

        + * account: "arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab"

        *
      • *
      • *

        ARN of a KMS Key Alias: "arn:aws:kms:region:account ID:alias/ExampleAlias"

        @@ -3652,7 +3711,7 @@ export interface StartTranscriptionJobRequest { * ID:key/1234abcd-12ab-34cd-56ef-1234567890ab"

        *
      • *
      • - *

        ARN of a KMS Key Alias: "arn:aws:kms:region:account ID:alias/ExampleAlias"

        + *

        ARN of a KMS Key Alias: "arn:aws:kms:region:account-ID:alias/ExampleAlias"

        *
      • *
      *

      If you don't specify an encryption key, the output of the transcription job is encrypted with the default @@ -3714,6 +3773,13 @@ export interface StartTranscriptionJobRequest { *

      Add tags to an Amazon Transcribe transcription job.

      */ Tags?: Tag[]; + + /** + *

      The language identification settings associated with your transcription job. These settings include + * VocabularyName, VocabularyFilterName, and + * LanguageModelName.

      + */ + LanguageIdSettings?: { [key: string]: LanguageIdSettings }; } export namespace StartTranscriptionJobRequest { @@ -3743,7 +3809,13 @@ export namespace StartTranscriptionJobResponse { export interface TagResourceRequest { /** - *

      The Amazon Resource Name (ARN) of the Amazon Transcribe resource you want to tag.

      + *

      The Amazon Resource Name (ARN) of the Amazon Transcribe resource you want to tag. ARNs have the format + * arn:partition:service:region:account-id:resource-type/resource-id (for example, + * arn:aws:transcribe:us-east-1:account-id:transcription-job/your-job-name). Valid + * values for resource-type are: transcription-job, + * medical-transcription-job, vocabulary, + * medical-vocabulary, vocabulary-filter, and + * language-model.

      */ ResourceArn: string | undefined; @@ -3775,7 +3847,14 @@ export namespace TagResourceResponse { export interface UntagResourceRequest { /** - *

      The Amazon Resource Name (ARN) of the Amazon Transcribe resource you want to remove tags from.

      + *

      The Amazon Resource Name (ARN) of the Amazon Transcribe resource you want to remove tags from. + * ARNs have the format + * arn:partition:service:region:account-id:resource-type/resource-id (for example, + * arn:aws:transcribe:us-east-1:account-id:transcription-job/your-job-name). Valid + * values for resource-type are: transcription-job, + * medical-transcription-job, vocabulary, + * medical-vocabulary, vocabulary-filter, and + * language-model.

      */ ResourceArn: string | undefined; diff --git a/clients/client-transcribe/src/protocols/Aws_json1_1.ts b/clients/client-transcribe/src/protocols/Aws_json1_1.ts index d83c6ea65478..aa0f78f1c324 100644 --- a/clients/client-transcribe/src/protocols/Aws_json1_1.ts +++ b/clients/client-transcribe/src/protocols/Aws_json1_1.ts @@ -202,6 +202,7 @@ import { InterruptionFilter, JobExecutionSettings, LanguageCode, + LanguageIdSettings, LanguageModel, LimitExceededException, ListCallAnalyticsCategoriesRequest, @@ -3833,6 +3834,10 @@ const serializeAws_json1_1CallAnalyticsJobSettings = ( input.ContentRedaction !== null && { ContentRedaction: serializeAws_json1_1ContentRedaction(input.ContentRedaction, context), }), + ...(input.LanguageIdSettings !== undefined && + input.LanguageIdSettings !== null && { + LanguageIdSettings: serializeAws_json1_1LanguageIdSettingsMap(input.LanguageIdSettings, context), + }), ...(input.LanguageModelName !== undefined && input.LanguageModelName !== null && { LanguageModelName: input.LanguageModelName }), ...(input.LanguageOptions !== undefined && @@ -4146,6 +4151,32 @@ const serializeAws_json1_1KMSEncryptionContextMap = ( }, {}); }; +const serializeAws_json1_1LanguageIdSettings = (input: LanguageIdSettings, context: __SerdeContext): any => { + return { + ...(input.LanguageModelName !== undefined && + input.LanguageModelName !== null && { LanguageModelName: input.LanguageModelName }), + ...(input.VocabularyFilterName !== undefined && + input.VocabularyFilterName !== null && { VocabularyFilterName: input.VocabularyFilterName }), + ...(input.VocabularyName !== undefined && + input.VocabularyName !== null && { VocabularyName: input.VocabularyName }), + }; +}; + +const serializeAws_json1_1LanguageIdSettingsMap = ( + input: { [key: string]: LanguageIdSettings }, + context: __SerdeContext +): any => { + return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [LanguageCode | string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: serializeAws_json1_1LanguageIdSettings(value, context), + }; + }, {}); +}; + const serializeAws_json1_1LanguageOptions = (input: (LanguageCode | string)[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -4479,6 +4510,10 @@ const serializeAws_json1_1StartTranscriptionJobRequest = ( KMSEncryptionContext: serializeAws_json1_1KMSEncryptionContextMap(input.KMSEncryptionContext, context), }), ...(input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode }), + ...(input.LanguageIdSettings !== undefined && + input.LanguageIdSettings !== null && { + LanguageIdSettings: serializeAws_json1_1LanguageIdSettingsMap(input.LanguageIdSettings, context), + }), ...(input.LanguageOptions !== undefined && input.LanguageOptions !== null && { LanguageOptions: serializeAws_json1_1LanguageOptions(input.LanguageOptions, context), @@ -4726,6 +4761,10 @@ const deserializeAws_json1_1CallAnalyticsJobSettings = ( output.ContentRedaction !== undefined && output.ContentRedaction !== null ? deserializeAws_json1_1ContentRedaction(output.ContentRedaction, context) : undefined, + LanguageIdSettings: + output.LanguageIdSettings !== undefined && output.LanguageIdSettings !== null + ? deserializeAws_json1_1LanguageIdSettingsMap(output.LanguageIdSettings, context) + : undefined, LanguageModelName: __expectString(output.LanguageModelName), LanguageOptions: output.LanguageOptions !== undefined && output.LanguageOptions !== null @@ -5069,6 +5108,32 @@ const deserializeAws_json1_1JobExecutionSettings = (output: any, context: __Serd } as any; }; +const deserializeAws_json1_1LanguageIdSettings = (output: any, context: __SerdeContext): LanguageIdSettings => { + return { + LanguageModelName: __expectString(output.LanguageModelName), + VocabularyFilterName: __expectString(output.VocabularyFilterName), + VocabularyName: __expectString(output.VocabularyName), + } as any; +}; + +const deserializeAws_json1_1LanguageIdSettingsMap = ( + output: any, + context: __SerdeContext +): { [key: string]: LanguageIdSettings } => { + return Object.entries(output).reduce( + (acc: { [key: string]: LanguageIdSettings }, [key, value]: [LanguageCode | string, any]) => { + if (value === null) { + return acc; + } + return { + ...acc, + [key]: deserializeAws_json1_1LanguageIdSettings(value, context), + }; + }, + {} + ); +}; + const deserializeAws_json1_1LanguageModel = (output: any, context: __SerdeContext): LanguageModel => { return { BaseModelName: __expectString(output.BaseModelName), @@ -5626,6 +5691,10 @@ const deserializeAws_json1_1TranscriptionJob = (output: any, context: __SerdeCon ? deserializeAws_json1_1JobExecutionSettings(output.JobExecutionSettings, context) : undefined, LanguageCode: __expectString(output.LanguageCode), + LanguageIdSettings: + output.LanguageIdSettings !== undefined && output.LanguageIdSettings !== null + ? deserializeAws_json1_1LanguageIdSettingsMap(output.LanguageIdSettings, context) + : undefined, LanguageOptions: output.LanguageOptions !== undefined && output.LanguageOptions !== null ? deserializeAws_json1_1LanguageOptions(output.LanguageOptions, context) diff --git a/clients/client-translate/src/Translate.ts b/clients/client-translate/src/Translate.ts index 9254d38055e0..e49b3ba46c59 100644 --- a/clients/client-translate/src/Translate.ts +++ b/clients/client-translate/src/Translate.ts @@ -79,9 +79,9 @@ import { TranslateClient } from "./TranslateClient"; export class Translate extends TranslateClient { /** *

      Creates a parallel data resource in Amazon Translate by importing an input file from - * Amazon S3. Parallel data files contain examples of source phrases and their translations from - * your translation memory. By adding parallel data, you can influence the style, tone, and word - * choice in your translation output.

      + * Amazon S3. Parallel data files contain examples that show how you want segments of text to be + * translated. By adding parallel data, you can influence the style, tone, and word choice in + * your translation output.

      */ public createParallelData( args: CreateParallelDataCommandInput, @@ -177,7 +177,7 @@ export class Translate extends TranslateClient { } /** - *

      Gets the properties associated with an asycnhronous batch translation job including name, + *

      Gets the properties associated with an asynchronous batch translation job including name, * ID, status, source and target languages, input/output S3 buckets, and so on.

      */ public describeTextTranslationJob( diff --git a/clients/client-translate/src/commands/CreateParallelDataCommand.ts b/clients/client-translate/src/commands/CreateParallelDataCommand.ts index fe0a6ba5042c..089d33b34963 100644 --- a/clients/client-translate/src/commands/CreateParallelDataCommand.ts +++ b/clients/client-translate/src/commands/CreateParallelDataCommand.ts @@ -23,9 +23,9 @@ export interface CreateParallelDataCommandOutput extends CreateParallelDataRespo /** *

      Creates a parallel data resource in Amazon Translate by importing an input file from - * Amazon S3. Parallel data files contain examples of source phrases and their translations from - * your translation memory. By adding parallel data, you can influence the style, tone, and word - * choice in your translation output.

      + * Amazon S3. Parallel data files contain examples that show how you want segments of text to be + * translated. By adding parallel data, you can influence the style, tone, and word choice in + * your translation output.

      * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-translate/src/commands/DescribeTextTranslationJobCommand.ts b/clients/client-translate/src/commands/DescribeTextTranslationJobCommand.ts index 304492f7d888..3deb0b013b60 100644 --- a/clients/client-translate/src/commands/DescribeTextTranslationJobCommand.ts +++ b/clients/client-translate/src/commands/DescribeTextTranslationJobCommand.ts @@ -22,7 +22,7 @@ export interface DescribeTextTranslationJobCommandInput extends DescribeTextTran export interface DescribeTextTranslationJobCommandOutput extends DescribeTextTranslationJobResponse, __MetadataBearer {} /** - *

      Gets the properties associated with an asycnhronous batch translation job including name, + *

      Gets the properties associated with an asynchronous batch translation job including name, * ID, status, source and target languages, input/output S3 buckets, and so on.

      * @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-translate/src/models/models_0.ts b/clients/client-translate/src/models/models_0.ts index 09be22245881..e8d9b996c5a3 100644 --- a/clients/client-translate/src/models/models_0.ts +++ b/clients/client-translate/src/models/models_0.ts @@ -444,6 +444,11 @@ export interface InputDataConfig { * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: The * input data consists of one or more Excel Workbook files (.xlsx).

      *
    • + *
    • + *

      + * application/x-xliff+xml: The input data consists of one or more XML + * Localization Interchange File Format (XLIFF) files (.xlf). Amazon Translate supports only XLIFF version 1.2.

      + *
    • *
    * *

    If you structure your input data as HTML, ensure that you set this parameter to @@ -513,6 +518,11 @@ export interface OutputDataConfig { * be in the same Region as the API endpoint that you are calling.

    */ S3Uri: string | undefined; + + /** + *

    The encryption key used to encrypt this object.

    + */ + EncryptionKey?: EncryptionKey; } export namespace OutputDataConfig { @@ -575,7 +585,7 @@ export interface TextTranslationJobProperties { ParallelDataNames?: string[]; /** - *

    An explanation of any errors that may have occured during the translation job.

    + *

    An explanation of any errors that may have occurred during the translation job.

    */ Message?: string; @@ -661,6 +671,16 @@ export interface ParallelDataDataLocation { /** *

    The Amazon S3 location of the parallel data input file. The location is returned as a * presigned URL to that has a 30 minute expiration.

    + * + * + *

    Amazon Translate doesn't scan parallel data input files for the risk of CSV injection + * attacks.

    + *

    CSV injection occurs when a .csv or .tsv file is altered so that a record contains + * malicious code. The record begins with a special character, such as =, +, -, or @. When the + * file is opened in a spreadsheet program, the program might interpret the record as a formula + * and run the code within it.

    + *

    Before you download a parallel data input file from Amazon S3, ensure that you recognize the file and trust its creator.

    + *
    */ Location: string | undefined; } @@ -787,9 +807,19 @@ export interface GetParallelDataResponse { ParallelDataProperties?: ParallelDataProperties; /** - *

    The location of the most recent parallel data input file that was successfully imported - * into Amazon Translate. The location is returned as a presigned URL that has a 30 minute - * expiration.

    + *

    The Amazon S3 location of the most recent parallel data input file that was successfully + * imported into Amazon Translate. The location is returned as a presigned URL that has a 30 + * minute expiration.

    + * + * + *

    Amazon Translate doesn't scan parallel data input files for the risk of CSV injection + * attacks.

    + *

    CSV injection occurs when a .csv or .tsv file is altered so that a record contains + * malicious code. The record begins with a special character, such as =, +, -, or @. When the + * file is opened in a spreadsheet program, the program might interpret the record as a formula + * and run the code within it.

    + *

    Before you download a parallel data input file from Amazon S3, ensure that you recognize the file and trust its creator.

    + *
    */ DataLocation?: ParallelDataDataLocation; @@ -1221,7 +1251,7 @@ export interface ListTextTranslationJobsResponse { TextTranslationJobPropertiesList?: TextTranslationJobProperties[]; /** - *

    The token to use to retreive the next page of results. This value is null + *

    The token to use to retrieve the next page of results. This value is null * when there are no more results to return.

    */ NextToken?: string; @@ -1256,7 +1286,7 @@ export interface StartTextTranslationJobRequest { /** *

    The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role - * that grants Amazon Translate read access to your input data. For more nformation, see identity-and-access-management.

    + * that grants Amazon Translate read access to your input data. For more information, see identity-and-access-management.

    */ DataAccessRoleArn: string | undefined; @@ -1273,15 +1303,25 @@ export interface StartTextTranslationJobRequest { TargetLanguageCodes: string[] | undefined; /** - *

    The name of the terminology to use in the batch translation job. For a list of available - * terminologies, use the ListTerminologies operation.

    + *

    The name of a custom terminology resource to add to the translation job. This resource + * lists examples source terms and the desired translation for each term.

    + *

    This parameter accepts only one custom terminology resource.

    + *

    For a list of available custom terminology resources, use the ListTerminologies operation.

    + *

    For more information, see how-custom-terminology.

    */ TerminologyNames?: string[]; /** - *

    The names of the parallel data resources to use in the batch translation job. For a list - * of available parallel data resources, use the ListParallelData - * operation.

    + *

    The name of a parallel data resource to add to the translation job. This resource consists + * of examples that show how you want segments of text to be translated. When you add parallel + * data to a translation job, you create an Active Custom Translation job.

    + *

    This parameter accepts only one parallel data resource.

    + * + *

    Active Custom Translation jobs are priced at a higher rate than other jobs that don't + * use parallel data. For more information, see Amazon Translate pricing.

    + *
    + *

    For a list of available parallel data resources, use the ListParallelData operation.

    + *

    For more information, see customizing-translations-parallel-data.

    */ ParallelDataNames?: string[]; diff --git a/clients/client-translate/src/protocols/Aws_json1_1.ts b/clients/client-translate/src/protocols/Aws_json1_1.ts index a6d290f683be..8fc33015f090 100644 --- a/clients/client-translate/src/protocols/Aws_json1_1.ts +++ b/clients/client-translate/src/protocols/Aws_json1_1.ts @@ -1088,6 +1088,14 @@ const deserializeAws_json1_1StartTextTranslationJobCommandError = async ( $metadata: deserializeMetadata(output), }; break; + case "InvalidParameterValueException": + case "com.amazonaws.translate#InvalidParameterValueException": + response = { + ...(await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)), + name: errorCode, + $metadata: deserializeMetadata(output), + }; + break; case "InvalidRequestException": case "com.amazonaws.translate#InvalidRequestException": response = { @@ -1746,6 +1754,10 @@ const serializeAws_json1_1ListTextTranslationJobsRequest = ( const serializeAws_json1_1OutputDataConfig = (input: OutputDataConfig, context: __SerdeContext): any => { return { + ...(input.EncryptionKey !== undefined && + input.EncryptionKey !== null && { + EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context), + }), ...(input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }), }; }; @@ -2117,6 +2129,10 @@ const deserializeAws_json1_1ListTextTranslationJobsResponse = ( const deserializeAws_json1_1OutputDataConfig = (output: any, context: __SerdeContext): OutputDataConfig => { return { + EncryptionKey: + output.EncryptionKey !== undefined && output.EncryptionKey !== null + ? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context) + : undefined, S3Uri: __expectString(output.S3Uri), } as any; }; diff --git a/codegen/sdk-codegen/aws-models/application-insights.json b/codegen/sdk-codegen/aws-models/application-insights.json index adab37dc90ad..fa90de81ee13 100644 --- a/codegen/sdk-codegen/aws-models/application-insights.json +++ b/codegen/sdk-codegen/aws-models/application-insights.json @@ -37,6 +37,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "AccessDeniedException", + "httpResponseCode": 403 + }, "smithy.api#documentation": "

    \n User does not have permissions to perform this action.\n

    ", "smithy.api#error": "client", "smithy.api#httpError": 403 @@ -149,6 +153,12 @@ "traits": { "smithy.api#documentation": "

    The issues on the user side that block Application Insights from successfully monitoring\n an application. Example remarks include:

    \n
      \n
    • \n

      “Configuring application, detected 1 Errors, 3 Warnings”

      \n
    • \n
    • \n

      “Configuring application, detected 1 Unconfigured Components”

      \n
    • \n
    " } + }, + "AutoConfigEnabled": { + "target": "com.amazonaws.applicationinsights#AutoConfigEnabled" + }, + "DiscoveryType": { + "target": "com.amazonaws.applicationinsights#DiscoveryType" } }, "traits": { @@ -161,6 +171,18 @@ "target": "com.amazonaws.applicationinsights#ApplicationInfo" } }, + "com.amazonaws.applicationinsights#AutoConfigEnabled": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.applicationinsights#AutoCreate": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, "com.amazonaws.applicationinsights#BadRequestException": { "type": "structure", "members": { @@ -169,6 +191,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "BadRequestException", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

    The request is not understood by the server.

    ", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -231,7 +257,7 @@ "min": 1, "max": 10000 }, - "smithy.api#pattern": "[\\S\\s]+" + "smithy.api#pattern": "^[\\S\\s]+$" } }, "com.amazonaws.applicationinsights#ComponentName": { @@ -241,7 +267,7 @@ "min": 1, "max": 1011 }, - "smithy.api#pattern": "(?:^[\\d\\w\\-_\\.+]*$)|(?:^arn:aws(-\\w+)*:[\\w\\d-]+:([\\w\\d-]*)?:[\\w\\d_-]*([:/].+)*$)" + "smithy.api#pattern": "^(?:^[\\d\\w\\-_\\.+]*$)|(?:^arn:aws(-\\w+)*:[\\w\\d-]+:([\\w\\d-]*)?:[\\w\\d_-]*([:/].+)*$)$" } }, "com.amazonaws.applicationinsights#ConfigurationEvent": { @@ -386,8 +412,7 @@ "ResourceGroupName": { "target": "com.amazonaws.applicationinsights#ResourceGroupName", "traits": { - "smithy.api#documentation": "

    The name of the resource group.

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

    The name of the resource group.

    " } }, "OpsCenterEnabled": { @@ -413,6 +438,12 @@ "traits": { "smithy.api#documentation": "

    List of tags to add to the application.\n tag key (Key) and an associated tag value (Value). The maximum\n length of a tag key is 128 characters. The maximum length of a tag value is 256\n characters.

    " } + }, + "AutoConfigEnabled": { + "target": "com.amazonaws.applicationinsights#AutoConfigEnabled" + }, + "AutoCreate": { + "target": "com.amazonaws.applicationinsights#AutoCreate" } } }, @@ -1160,6 +1191,21 @@ "target": "com.amazonaws.applicationinsights#WorkloadMetaData" } }, + "com.amazonaws.applicationinsights#DiscoveryType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "RESOURCE_GROUP_BASED", + "name": "RESOURCE_GROUP_BASED" + }, + { + "value": "ACCOUNT_BASED", + "name": "ACCOUNT_BASED" + } + ] + } + }, "com.amazonaws.applicationinsights#EC2WindowsBarleyService": { "type": "service", "version": "2018-11-25", @@ -1357,11 +1403,18 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InternalServerException", + "httpResponseCode": 500 + }, "smithy.api#documentation": "

    The server encountered an internal error and is unable to complete the request.

    ", "smithy.api#error": "server", "smithy.api#httpError": 500 } }, + "com.amazonaws.applicationinsights#LastRecurrenceTime": { + "type": "timestamp" + }, "com.amazonaws.applicationinsights#LifeCycle": { "type": "string" }, @@ -1798,6 +1851,9 @@ "traits": { "smithy.api#documentation": "

    The token to request the next page of results.

    " } + }, + "ComponentName": { + "target": "com.amazonaws.applicationinsights#ComponentName" } } }, @@ -1815,6 +1871,9 @@ "traits": { "smithy.api#documentation": "

    The token used to retrieve the next page of results. This value is null\n when there are no more results to return.

    " } + }, + "ResourceGroupName": { + "target": "com.amazonaws.applicationinsights#ResourceGroupName" } } }, @@ -1928,7 +1987,7 @@ "min": 1, "max": 50 }, - "smithy.api#pattern": "[a-zA-Z0-9\\.\\-_]*" + "smithy.api#pattern": "^[a-zA-Z0-9\\.\\-_]*$" } }, "com.amazonaws.applicationinsights#LogPatternRank": { @@ -1941,7 +2000,7 @@ "min": 1, "max": 50 }, - "smithy.api#pattern": "[\\S\\s]+" + "smithy.api#pattern": "^[\\S\\s]+$" } }, "com.amazonaws.applicationinsights#LogPatternSetList": { @@ -1957,7 +2016,7 @@ "min": 1, "max": 30 }, - "smithy.api#pattern": "[a-zA-Z0-9\\.\\-_]*" + "smithy.api#pattern": "^[a-zA-Z0-9\\.\\-_]*$" } }, "com.amazonaws.applicationinsights#LogText": { @@ -2276,7 +2335,7 @@ "min": 38, "max": 38 }, - "smithy.api#pattern": "o-[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}" + "smithy.api#pattern": "^o-[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}$" } }, "com.amazonaws.applicationinsights#ObservationList": { @@ -2323,7 +2382,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": ".+" + "smithy.api#pattern": "^.+$" } }, "com.amazonaws.applicationinsights#Problem": { @@ -2388,6 +2447,12 @@ "traits": { "smithy.api#documentation": "

    Feedback provided by the user about the problem.

    " } + }, + "RecurringCount": { + "target": "com.amazonaws.applicationinsights#RecurringCount" + }, + "LastRecurrenceTime": { + "target": "com.amazonaws.applicationinsights#LastRecurrenceTime" } }, "traits": { @@ -2401,7 +2466,7 @@ "min": 38, "max": 38 }, - "smithy.api#pattern": "p-[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}" + "smithy.api#pattern": "^p-[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}$" } }, "com.amazonaws.applicationinsights#ProblemList": { @@ -2416,6 +2481,12 @@ "com.amazonaws.applicationinsights#RdsEventMessage": { "type": "string" }, + "com.amazonaws.applicationinsights#RecurringCount": { + "type": "long", + "traits": { + "smithy.api#box": {} + } + }, "com.amazonaws.applicationinsights#RelatedObservations": { "type": "structure", "members": { @@ -2456,7 +2527,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[a-zA-Z0-9\\.\\-_]*" + "smithy.api#pattern": "^[a-zA-Z0-9\\.\\-_]*$" } }, "com.amazonaws.applicationinsights#ResourceInUseException": { @@ -2467,6 +2538,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ResourceInUseException", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

    The resource is already created or in use.

    ", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2486,6 +2561,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ResourceNotFoundException", + "httpResponseCode": 404 + }, "smithy.api#documentation": "

    The resource does not exist in the customer account.

    ", "smithy.api#error": "client", "smithy.api#httpError": 404 @@ -2498,7 +2577,7 @@ "min": 1, "max": 50 }, - "smithy.api#pattern": "[0-9a-zA-Z:_]*" + "smithy.api#pattern": "^[0-9a-zA-Z:_]*$" } }, "com.amazonaws.applicationinsights#S3EventName": { @@ -2559,6 +2638,10 @@ { "value": "PENDING", "name": "PENDING" + }, + { + "value": "RECURRING", + "name": "RECURRING" } ] } @@ -2739,6 +2822,26 @@ { "value": "ORACLE", "name": "ORACLE" + }, + { + "value": "SAP_HANA", + "name": "SAP_HANA" + }, + { + "value": "SAP_HANA_MULTI_NODE", + "name": "SAP_HANA_MULTI_NODE" + }, + { + "value": "SAP_HANA_SINGLE_NODE", + "name": "SAP_HANA_SINGLE_NODE" + }, + { + "value": "SAP_HANA_HIGH_AVAILABILITY", + "name": "SAP_HANA_HIGH_AVAILABILITY" + }, + { + "value": "SQL_SERVER_FAILOVER_CLUSTER_INSTANCE", + "name": "SQL_SERVER_FAILOVER_CLUSTER_INSTANCE" } ], "smithy.api#length": { @@ -2871,6 +2974,9 @@ "traits": { "smithy.api#documentation": "

    \n Disassociates the SNS topic from the opsItem created for detected problems.

    " } + }, + "AutoConfigEnabled": { + "target": "com.amazonaws.applicationinsights#AutoConfigEnabled" } } }, @@ -2968,6 +3074,9 @@ "traits": { "smithy.api#documentation": "

    The configuration settings of the component. The value is the escaped JSON of the configuration. For\n more information about the JSON format, see Working with JSON.\n You can send a request to DescribeComponentConfigurationRecommendation to see the recommended configuration for a component. For the complete\n format of the component configuration file, see Component Configuration.

    " } + }, + "AutoConfigEnabled": { + "target": "com.amazonaws.applicationinsights#AutoConfigEnabled" } } }, @@ -3099,6 +3208,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ValidationException", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

    The parameter is not valid.

    ", "smithy.api#error": "client", "smithy.api#httpError": 400 diff --git a/codegen/sdk-codegen/aws-models/chime-sdk-meetings.json b/codegen/sdk-codegen/aws-models/chime-sdk-meetings.json new file mode 100644 index 000000000000..8ffd934a3e1c --- /dev/null +++ b/codegen/sdk-codegen/aws-models/chime-sdk-meetings.json @@ -0,0 +1,1569 @@ +{ + "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.chimesdkmeetings#Arn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^arn[\\/\\:\\-\\_\\.a-zA-Z0-9]+$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmeetings#Attendee": { + "type": "structure", + "members": { + "ExternalUserId": { + "target": "com.amazonaws.chimesdkmeetings#ExternalUserId", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK external user ID. An idempotency token. Links the attendee to an identity managed by a builder application.

    " + } + }, + "AttendeeId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK attendee ID.

    " + } + }, + "JoinToken": { + "target": "com.amazonaws.chimesdkmeetings#JoinTokenString", + "traits": { + "smithy.api#documentation": "

    The join token used by the Amazon Chime SDK attendee.

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

    An Amazon Chime SDK meeting attendee. Includes a unique \n AttendeeId and JoinToken. The \n JoinToken\n allows a client to authenticate and join as the specified attendee. The \n JoinToken\n expires when the meeting ends, or when \n DeleteAttendee\n is called. After that, the attendee is unable to join the meeting.\n

    \n \n

    We recommend securely transferring each JoinToken from your server application\n to the client so that no other client has access to the token except for the one\n authorized to represent the attendee.

    " + } + }, + "com.amazonaws.chimesdkmeetings#AttendeeList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmeetings#Attendee" + } + }, + "com.amazonaws.chimesdkmeetings#BadRequestException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "Message": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "RequestId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The request id associated with the call responsible for the exception.

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

    The input parameters don't match the service's restrictions.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.chimesdkmeetings#BatchCreateAttendee": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmeetings#BatchCreateAttendeeRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmeetings#BatchCreateAttendeeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmeetings#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#LimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#NotFoundException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

    Creates a group of meeting attendees.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/meetings/{MeetingId}/attendees?operation=batch-create", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmeetings#BatchCreateAttendeeErrorList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmeetings#CreateAttendeeError" + } + }, + "com.amazonaws.chimesdkmeetings#BatchCreateAttendeeRequest": { + "type": "structure", + "members": { + "MeetingId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK ID of the meeting to which you're adding attendees.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Attendees": { + "target": "com.amazonaws.chimesdkmeetings#CreateAttendeeRequestItemList", + "traits": { + "smithy.api#documentation": "

    The attendee information, including attendees' IDs and join tokens.

    ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmeetings#BatchCreateAttendeeResponse": { + "type": "structure", + "members": { + "Attendees": { + "target": "com.amazonaws.chimesdkmeetings#AttendeeList", + "traits": { + "smithy.api#documentation": "

    The attendee information, including attendees' IDs and join tokens.

    " + } + }, + "Errors": { + "target": "com.amazonaws.chimesdkmeetings#BatchCreateAttendeeErrorList", + "traits": { + "smithy.api#documentation": "

    If the action fails for one or more of the attendees in the request, a list of the attendees is returned, along with error codes and error messages.

    " + } + } + } + }, + "com.amazonaws.chimesdkmeetings#ChimeMeetingsSDKService": { + "type": "service", + "version": "2021-07-15", + "operations": [ + { + "target": "com.amazonaws.chimesdkmeetings#BatchCreateAttendee" + }, + { + "target": "com.amazonaws.chimesdkmeetings#CreateAttendee" + }, + { + "target": "com.amazonaws.chimesdkmeetings#CreateMeeting" + }, + { + "target": "com.amazonaws.chimesdkmeetings#CreateMeetingWithAttendees" + }, + { + "target": "com.amazonaws.chimesdkmeetings#DeleteAttendee" + }, + { + "target": "com.amazonaws.chimesdkmeetings#DeleteMeeting" + }, + { + "target": "com.amazonaws.chimesdkmeetings#GetAttendee" + }, + { + "target": "com.amazonaws.chimesdkmeetings#GetMeeting" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ListAttendees" + }, + { + "target": "com.amazonaws.chimesdkmeetings#StartMeetingTranscription" + }, + { + "target": "com.amazonaws.chimesdkmeetings#StopMeetingTranscription" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Chime SDK Meetings", + "arnNamespace": "chime", + "cloudFormationName": "ChimeSDKMeetings", + "cloudTrailEventSource": "chimesdkmeetings.amazonaws.com", + "endpointPrefix": "meetings-chime" + }, + "aws.auth#sigv4": { + "name": "chime" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

    The Amazon Chime SDK meetings APIs in this section allow software developers to create Amazon Chime SDK meetings, set the AWS Regions for meetings, create and manage users, and send and \n receive meeting notifications. For more information \n about the meeting APIs, see Amazon Chime SDK meetings.

    ", + "smithy.api#title": "Amazon Chime SDK Meetings" + } + }, + "com.amazonaws.chimesdkmeetings#ClientRequestToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 64 + }, + "smithy.api#pattern": "^[-_a-zA-Z0-9]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmeetings#CreateAttendee": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmeetings#CreateAttendeeRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmeetings#CreateAttendeeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmeetings#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#LimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#NotFoundException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#UnauthorizedException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#UnprocessableEntityException" + } + ], + "traits": { + "smithy.api#documentation": "

    \n Creates a new attendee for an active Amazon Chime SDK meeting. For more information about the Amazon Chime SDK, see \n Using the Amazon Chime SDK\n in the \n Amazon Chime Developer Guide.\n

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/meetings/{MeetingId}/attendees", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmeetings#CreateAttendeeError": { + "type": "structure", + "members": { + "ExternalUserId": { + "target": "com.amazonaws.chimesdkmeetings#ExternalUserId", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK external user ID. An idempotency token. Links the attendee to an identity managed by a builder application.

    " + } + }, + "ErrorCode": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The error code.

    " + } + }, + "ErrorMessage": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The error message.

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

    The list of errors returned when errors are encountered during the BatchCreateAttendee and CreateAttendee actions. This includes external user IDs, error codes, and error messages.

    " + } + }, + "com.amazonaws.chimesdkmeetings#CreateAttendeeRequest": { + "type": "structure", + "members": { + "MeetingId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The unique ID of the meeting.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ExternalUserId": { + "target": "com.amazonaws.chimesdkmeetings#ExternalUserId", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK external user ID. An idempotency token. Links the attendee to an identity managed by a builder application.

    ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmeetings#CreateAttendeeRequestItem": { + "type": "structure", + "members": { + "ExternalUserId": { + "target": "com.amazonaws.chimesdkmeetings#ExternalUserId", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK external user ID. An idempotency token. Links the attendee to an identity managed by a builder application.

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

    The Amazon Chime SDK attendee fields to create, used with the BatchCreateAttendee action.

    " + } + }, + "com.amazonaws.chimesdkmeetings#CreateAttendeeRequestItemList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmeetings#CreateAttendeeRequestItem" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.chimesdkmeetings#CreateAttendeeResponse": { + "type": "structure", + "members": { + "Attendee": { + "target": "com.amazonaws.chimesdkmeetings#Attendee", + "traits": { + "smithy.api#documentation": "

    The attendee information, including attendee ID and join token.

    " + } + } + } + }, + "com.amazonaws.chimesdkmeetings#CreateMeeting": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmeetings#CreateMeetingRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmeetings#CreateMeetingResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmeetings#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#LimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

    Creates a new Amazon Chime SDK meeting in the specified media Region with no initial attendees. For more information about specifying media Regions, see \n Amazon Chime SDK Media Regions\n in the Amazon Chime Developer Guide. For more information about the Amazon Chime SDK, see \n Using the Amazon Chime SDK\n in the \n Amazon Chime Developer Guide.\n

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/meetings", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmeetings#CreateMeetingRequest": { + "type": "structure", + "members": { + "ClientRequestToken": { + "target": "com.amazonaws.chimesdkmeetings#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

    The unique identifier for the client request. Use a different token for different meetings.

    ", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "MediaRegion": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The Region in which to create the meeting. Default: us-east-1.

    \n \n

    \n Available values: \n af-south-1\n , \n ap-northeast-1\n , \n ap-northeast-2\n , \n ap-south-1\n , \n ap-southeast-1\n , \n ap-southeast-2\n , \n ca-central-1\n , \n eu-central-1\n , \n eu-north-1\n , \n eu-south-1\n , \n eu-west-1\n , \n eu-west-2\n , \n eu-west-3\n , \n sa-east-1\n , \n us-east-1\n , \n us-east-2\n , \n us-west-1\n , \n us-west-2\n .\n

    ", + "smithy.api#required": {} + } + }, + "MeetingHostId": { + "target": "com.amazonaws.chimesdkmeetings#ExternalUserId", + "traits": { + "smithy.api#documentation": "

    Reserved.

    " + } + }, + "ExternalMeetingId": { + "target": "com.amazonaws.chimesdkmeetings#ExternalMeetingId", + "traits": { + "smithy.api#documentation": "

    The external meeting ID.

    ", + "smithy.api#required": {} + } + }, + "NotificationsConfiguration": { + "target": "com.amazonaws.chimesdkmeetings#NotificationsConfiguration", + "traits": { + "smithy.api#documentation": "

    The configuration for resource targets to receive notifications when meeting and attendee events occur.

    " + } + } + } + }, + "com.amazonaws.chimesdkmeetings#CreateMeetingResponse": { + "type": "structure", + "members": { + "Meeting": { + "target": "com.amazonaws.chimesdkmeetings#Meeting", + "traits": { + "smithy.api#documentation": "

    The meeting information, including the meeting ID and \n MediaPlacement.

    " + } + } + } + }, + "com.amazonaws.chimesdkmeetings#CreateMeetingWithAttendees": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmeetings#CreateMeetingWithAttendeesRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmeetings#CreateMeetingWithAttendeesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmeetings#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#LimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

    \n Creates a new Amazon Chime SDK meeting in the specified media Region, with attendees. For more information about specifying media Regions, see \n Amazon Chime SDK Media Regions\n in the Amazon Chime Developer Guide. For more information about the Amazon Chime SDK, see \n Using the Amazon Chime SDK\n in the Amazon Chime Developer Guide.\n

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/meetings?operation=create-attendees", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmeetings#CreateMeetingWithAttendeesRequest": { + "type": "structure", + "members": { + "ClientRequestToken": { + "target": "com.amazonaws.chimesdkmeetings#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

    The unique identifier for the client request. Use a different token for different meetings.

    ", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + }, + "MediaRegion": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The Region in which to create the meeting. Default: us-east-1.

    ", + "smithy.api#required": {} + } + }, + "MeetingHostId": { + "target": "com.amazonaws.chimesdkmeetings#ExternalUserId", + "traits": { + "smithy.api#documentation": "

    Reserved.

    " + } + }, + "ExternalMeetingId": { + "target": "com.amazonaws.chimesdkmeetings#ExternalMeetingId", + "traits": { + "smithy.api#documentation": "

    The external meeting ID.

    ", + "smithy.api#required": {} + } + }, + "NotificationsConfiguration": { + "target": "com.amazonaws.chimesdkmeetings#NotificationsConfiguration", + "traits": { + "smithy.api#documentation": "

    The configuration for resource targets to receive notifications when meeting and attendee events occur.

    " + } + }, + "Attendees": { + "target": "com.amazonaws.chimesdkmeetings#CreateMeetingWithAttendeesRequestItemList", + "traits": { + "smithy.api#documentation": "

    The attendee information, including attendees' IDs and join tokens.

    ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmeetings#CreateMeetingWithAttendeesRequestItemList": { + "type": "list", + "member": { + "target": "com.amazonaws.chimesdkmeetings#CreateAttendeeRequestItem" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 20 + } + } + }, + "com.amazonaws.chimesdkmeetings#CreateMeetingWithAttendeesResponse": { + "type": "structure", + "members": { + "Meeting": { + "target": "com.amazonaws.chimesdkmeetings#Meeting", + "traits": { + "smithy.api#documentation": "

    The meeting information, including the meeting ID and \n MediaPlacement.

    " + } + }, + "Attendees": { + "target": "com.amazonaws.chimesdkmeetings#AttendeeList", + "traits": { + "smithy.api#documentation": "

    The attendee information, including attendees' IDs and join tokens.

    " + } + }, + "Errors": { + "target": "com.amazonaws.chimesdkmeetings#BatchCreateAttendeeErrorList", + "traits": { + "smithy.api#documentation": "

    If the action fails for one or more of the attendees in the request, a list of the attendees is returned, along with error codes and error messages.

    " + } + } + } + }, + "com.amazonaws.chimesdkmeetings#DeleteAttendee": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmeetings#DeleteAttendeeRequest" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmeetings#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#NotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

    Deletes an attendee from the specified Amazon Chime SDK meeting and deletes their \n JoinToken. Attendees are automatically deleted when a Amazon Chime SDK meeting is deleted. For more information about the Amazon Chime SDK, see \n Using the Amazon Chime SDK\n in the Amazon Chime Developer Guide.

    ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/meetings/{MeetingId}/attendees/{AttendeeId}", + "code": 204 + } + } + }, + "com.amazonaws.chimesdkmeetings#DeleteAttendeeRequest": { + "type": "structure", + "members": { + "MeetingId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK meeting ID.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AttendeeId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK attendee ID.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmeetings#DeleteMeeting": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmeetings#DeleteMeetingRequest" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmeetings#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ForbiddenException" + } + ], + "traits": { + "smithy.api#documentation": "

    Deletes the specified Amazon Chime SDK meeting. The operation deletes all attendees, disconnects all clients, and prevents new clients from \n joining the meeting. For more information about the Amazon Chime SDK, see \n Using the Amazon Chime SDK in the \n Amazon Chime Developer Guide.

    ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/meetings/{MeetingId}", + "code": 204 + } + } + }, + "com.amazonaws.chimesdkmeetings#DeleteMeetingRequest": { + "type": "structure", + "members": { + "MeetingId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK meeting ID.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmeetings#EngineTranscribeMedicalSettings": { + "type": "structure", + "members": { + "LanguageCode": { + "target": "com.amazonaws.chimesdkmeetings#TranscribeMedicalLanguageCode", + "traits": { + "smithy.api#documentation": "

    The language code specified for the Amazon Transcribe Medical engine.

    ", + "smithy.api#required": {} + } + }, + "Specialty": { + "target": "com.amazonaws.chimesdkmeetings#TranscribeMedicalSpecialty", + "traits": { + "smithy.api#documentation": "

    The specialty specified for the Amazon Transcribe Medical engine.

    ", + "smithy.api#required": {} + } + }, + "Type": { + "target": "com.amazonaws.chimesdkmeetings#TranscribeMedicalType", + "traits": { + "smithy.api#documentation": "

    The type of transcription.

    ", + "smithy.api#required": {} + } + }, + "VocabularyName": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The name of the vocabulary passed to Amazon Transcribe Medical.

    " + } + }, + "Region": { + "target": "com.amazonaws.chimesdkmeetings#TranscribeMedicalRegion", + "traits": { + "smithy.api#documentation": "

    The AWS Region passed to Amazon Transcribe Medical. If you don't specify a Region, Amazon Chime uses the meeting's Region.

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

    Settings specific to the Amazon Transcribe Medical engine.

    " + } + }, + "com.amazonaws.chimesdkmeetings#EngineTranscribeSettings": { + "type": "structure", + "members": { + "LanguageCode": { + "target": "com.amazonaws.chimesdkmeetings#TranscribeLanguageCode", + "traits": { + "smithy.api#documentation": "

    The language code specified for the Amazon Transcribe engine.

    ", + "smithy.api#required": {} + } + }, + "VocabularyFilterMethod": { + "target": "com.amazonaws.chimesdkmeetings#TranscribeVocabularyFilterMethod", + "traits": { + "smithy.api#documentation": "

    The filtering method passed to Amazon Transcribe.

    " + } + }, + "VocabularyFilterName": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The name of the vocabulary filter passed to Amazon Transcribe.

    " + } + }, + "VocabularyName": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The name of the vocabulary passed to Amazon Transcribe.

    " + } + }, + "Region": { + "target": "com.amazonaws.chimesdkmeetings#TranscribeRegion", + "traits": { + "smithy.api#documentation": "

    The AWS Region passed to Amazon Transcribe. If you don't specify a Region, Amazon Chime uses the meeting's Region.

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

    Settings specific to the Amazon Transcribe engine.

    " + } + }, + "com.amazonaws.chimesdkmeetings#ExternalMeetingId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 64 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmeetings#ExternalUserId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 64 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmeetings#ForbiddenException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "Message": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "RequestId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The request id associated with the call responsible for the exception.

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

    The client is permanently forbidden from making the request.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.chimesdkmeetings#GetAttendee": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmeetings#GetAttendeeRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmeetings#GetAttendeeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmeetings#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#NotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

    \n Gets the Amazon Chime SDK attendee details for a specified meeting ID and attendee ID. For more information about the Amazon Chime SDK, see \n Using the Amazon Chime SDK\n in the Amazon Chime Developer Guide.\n

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/meetings/{MeetingId}/attendees/{AttendeeId}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmeetings#GetAttendeeRequest": { + "type": "structure", + "members": { + "MeetingId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK meeting ID.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AttendeeId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK attendee ID.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmeetings#GetAttendeeResponse": { + "type": "structure", + "members": { + "Attendee": { + "target": "com.amazonaws.chimesdkmeetings#Attendee", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK attendee information.

    " + } + } + } + }, + "com.amazonaws.chimesdkmeetings#GetMeeting": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmeetings#GetMeetingRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmeetings#GetMeetingResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmeetings#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#NotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

    Gets the Amazon Chime SDK meeting details for the specified meeting ID. For more information about the Amazon Chime SDK, see \n Using the Amazon Chime SDK\n in the Amazon Chime Developer Guide.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/meetings/{MeetingId}", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmeetings#GetMeetingRequest": { + "type": "structure", + "members": { + "MeetingId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK meeting ID.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmeetings#GetMeetingResponse": { + "type": "structure", + "members": { + "Meeting": { + "target": "com.amazonaws.chimesdkmeetings#Meeting", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK meeting information.

    " + } + } + } + }, + "com.amazonaws.chimesdkmeetings#GuidString": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-fA-F0-9]{8}(?:-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}$" + } + }, + "com.amazonaws.chimesdkmeetings#JoinTokenString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 4096 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.chimesdkmeetings#LimitExceededException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "Message": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "RequestId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The request id associated with the call responsible for the exception.

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

    The request exceeds the resource limit.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.chimesdkmeetings#ListAttendees": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmeetings#ListAttendeesRequest" + }, + "output": { + "target": "com.amazonaws.chimesdkmeetings#ListAttendeesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmeetings#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#NotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

    \n Lists the attendees for the specified Amazon Chime SDK meeting. For more information about the Amazon Chime SDK, see \n Using the Amazon Chime SDK\n in the Amazon Chime Developer Guide.\n

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/meetings/{MeetingId}/attendees", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.chimesdkmeetings#ListAttendeesRequest": { + "type": "structure", + "members": { + "MeetingId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK meeting ID.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The token to use to retrieve the next page of results.

    ", + "smithy.api#httpQuery": "next-token" + } + }, + "MaxResults": { + "target": "com.amazonaws.chimesdkmeetings#ResultMax", + "traits": { + "smithy.api#documentation": "

    The maximum number of results to return in a single call.

    ", + "smithy.api#httpQuery": "max-results" + } + } + } + }, + "com.amazonaws.chimesdkmeetings#ListAttendeesResponse": { + "type": "structure", + "members": { + "Attendees": { + "target": "com.amazonaws.chimesdkmeetings#AttendeeList", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK attendee information.

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

    The token to use to retrieve the next page of results.

    " + } + } + } + }, + "com.amazonaws.chimesdkmeetings#MediaPlacement": { + "type": "structure", + "members": { + "AudioHostUrl": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The audio host URL.

    " + } + }, + "AudioFallbackUrl": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The audio fallback URL.

    " + } + }, + "SignalingUrl": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The signaling URL.

    " + } + }, + "TurnControlUrl": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The turn control URL.

    " + } + }, + "ScreenDataUrl": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The screen data URL.

    " + } + }, + "ScreenViewingUrl": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The screen viewing URL.

    " + } + }, + "ScreenSharingUrl": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The screen sharing URL.

    " + } + }, + "EventIngestionUrl": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The event ingestion URL.

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

    A set of endpoints used by clients to connect to the media service group for an Amazon Chime SDK meeting.

    " + } + }, + "com.amazonaws.chimesdkmeetings#Meeting": { + "type": "structure", + "members": { + "MeetingId": { + "target": "com.amazonaws.chimesdkmeetings#GuidString", + "traits": { + "smithy.api#documentation": "

    The Amazon Chime SDK meeting ID.

    " + } + }, + "MeetingHostId": { + "target": "com.amazonaws.chimesdkmeetings#ExternalUserId", + "traits": { + "smithy.api#documentation": "

    Reserved.

    " + } + }, + "ExternalMeetingId": { + "target": "com.amazonaws.chimesdkmeetings#ExternalMeetingId", + "traits": { + "smithy.api#documentation": "

    The external meeting ID.

    " + } + }, + "MediaRegion": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The Region in which you create the meeting. Available values: af-south-1, ap-northeast-1, \n ap-northeast-2, ap-south-1, ap-southeast-1, ap-southeast-2, ca-central-1, \n eu-central-1, eu-north-1, eu-south-1,\n eu-west-1, eu-west-2, eu-west-3,\n sa-east-1, us-east-1, us-east-2,\n us-west-1, us-west-2.

    " + } + }, + "MediaPlacement": { + "target": "com.amazonaws.chimesdkmeetings#MediaPlacement", + "traits": { + "smithy.api#documentation": "

    The media placement for the meeting.

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

    A meeting created using the Amazon Chime SDK.

    " + } + }, + "com.amazonaws.chimesdkmeetings#NotFoundException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "Message": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "RequestId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The request id associated with the call responsible for the exception.

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

    One or more of the resources in the request does not exist in the system.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.chimesdkmeetings#NotificationsConfiguration": { + "type": "structure", + "members": { + "LambdaFunctionArn": { + "target": "com.amazonaws.chimesdkmeetings#Arn", + "traits": { + "smithy.api#documentation": "

    The ARN of the AWS Lambda function in the notifications configuration.

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

    The ARN of the SNS topic.

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

    The ARN of the SQS queue.

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

    The configuration for resource targets to receive notifications when meeting and attendee events occur.

    " + } + }, + "com.amazonaws.chimesdkmeetings#ResultMax": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.chimesdkmeetings#RetryAfterSeconds": { + "type": "string" + }, + "com.amazonaws.chimesdkmeetings#ServiceUnavailableException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "Message": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "RequestId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The request id associated with the call responsible for the exception.

    " + } + }, + "RetryAfterSeconds": { + "target": "com.amazonaws.chimesdkmeetings#RetryAfterSeconds", + "traits": { + "smithy.api#documentation": "

    The number of seconds the caller should wait before retrying.

    ", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "

    The service is currently unavailable.

    ", + "smithy.api#error": "server", + "smithy.api#httpError": 503 + } + }, + "com.amazonaws.chimesdkmeetings#StartMeetingTranscription": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmeetings#StartMeetingTranscriptionRequest" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmeetings#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#LimitExceededException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#NotFoundException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#UnauthorizedException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#UnprocessableEntityException" + } + ], + "traits": { + "smithy.api#documentation": "

    Starts transcription for the specified meetingId.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/meetings/{MeetingId}/transcription?operation=start", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmeetings#StartMeetingTranscriptionRequest": { + "type": "structure", + "members": { + "MeetingId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The unique ID of the meeting being transcribed.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TranscriptionConfiguration": { + "target": "com.amazonaws.chimesdkmeetings#TranscriptionConfiguration", + "traits": { + "smithy.api#documentation": "

    The configuration for the current transcription operation. Must contain EngineTranscribeSettings or \n EngineTranscribeMedicalSettings.

    ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmeetings#StopMeetingTranscription": { + "type": "operation", + "input": { + "target": "com.amazonaws.chimesdkmeetings#StopMeetingTranscriptionRequest" + }, + "errors": [ + { + "target": "com.amazonaws.chimesdkmeetings#BadRequestException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ForbiddenException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#NotFoundException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#UnauthorizedException" + }, + { + "target": "com.amazonaws.chimesdkmeetings#UnprocessableEntityException" + } + ], + "traits": { + "smithy.api#documentation": "

    Stops transcription for the specified meetingId.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/meetings/{MeetingId}/transcription?operation=stop", + "code": 200 + } + } + }, + "com.amazonaws.chimesdkmeetings#StopMeetingTranscriptionRequest": { + "type": "structure", + "members": { + "MeetingId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The unique ID of the meeting for which you stop transcription.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.chimesdkmeetings#String": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 4096 + } + } + }, + "com.amazonaws.chimesdkmeetings#TranscribeLanguageCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "en-US", + "name": "EN_US" + }, + { + "value": "en-GB", + "name": "EN_GB" + }, + { + "value": "es-US", + "name": "ES_US" + }, + { + "value": "fr-CA", + "name": "FR_CA" + }, + { + "value": "fr-FR", + "name": "FR_FR" + }, + { + "value": "en-AU", + "name": "EN_AU" + }, + { + "value": "it-IT", + "name": "IT_IT" + }, + { + "value": "de-DE", + "name": "DE_DE" + }, + { + "value": "pt-BR", + "name": "PT_BR" + }, + { + "value": "ja-JP", + "name": "JA_JP" + }, + { + "value": "ko-KR", + "name": "KO_KR" + }, + { + "value": "zh-CN", + "name": "ZH_CN" + } + ] + } + }, + "com.amazonaws.chimesdkmeetings#TranscribeMedicalLanguageCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "en-US", + "name": "EN_US" + } + ] + } + }, + "com.amazonaws.chimesdkmeetings#TranscribeMedicalRegion": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "us-east-1", + "name": "US_EAST_1" + }, + { + "value": "us-east-2", + "name": "US_EAST_2" + }, + { + "value": "us-west-2", + "name": "US_WEST_2" + }, + { + "value": "ap-southeast-2", + "name": "AP_SOUTHEAST_2" + }, + { + "value": "ca-central-1", + "name": "CA_CENTRAL_1" + }, + { + "value": "eu-west-1", + "name": "EU_WEST_1" + }, + { + "value": "auto", + "name": "AUTO" + } + ] + } + }, + "com.amazonaws.chimesdkmeetings#TranscribeMedicalSpecialty": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PRIMARYCARE", + "name": "PRIMARYCARE" + }, + { + "value": "CARDIOLOGY", + "name": "CARDIOLOGY" + }, + { + "value": "NEUROLOGY", + "name": "NEUROLOGY" + }, + { + "value": "ONCOLOGY", + "name": "ONCOLOGY" + }, + { + "value": "RADIOLOGY", + "name": "RADIOLOGY" + }, + { + "value": "UROLOGY", + "name": "UROLOGY" + } + ] + } + }, + "com.amazonaws.chimesdkmeetings#TranscribeMedicalType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CONVERSATION", + "name": "CONVERSATION" + }, + { + "value": "DICTATION", + "name": "DICTATION" + } + ] + } + }, + "com.amazonaws.chimesdkmeetings#TranscribeRegion": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "us-east-2", + "name": "US_EAST_2" + }, + { + "value": "us-east-1", + "name": "US_EAST_1" + }, + { + "value": "us-west-2", + "name": "US_WEST_2" + }, + { + "value": "ap-northeast-2", + "name": "AP_NORTHEAST_2" + }, + { + "value": "ap-southeast-2", + "name": "AP_SOUTHEAST_2" + }, + { + "value": "ap-northeast-1", + "name": "AP_NORTHEAST_1" + }, + { + "value": "ca-central-1", + "name": "CA_CENTRAL_1" + }, + { + "value": "eu-central-1", + "name": "EU_CENTRAL_1" + }, + { + "value": "eu-west-1", + "name": "EU_WEST_1" + }, + { + "value": "eu-west-2", + "name": "EU_WEST_2" + }, + { + "value": "sa-east-1", + "name": "SA_EAST_1" + }, + { + "value": "auto", + "name": "AUTO" + } + ] + } + }, + "com.amazonaws.chimesdkmeetings#TranscribeVocabularyFilterMethod": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "remove", + "name": "REMOVE" + }, + { + "value": "mask", + "name": "MASK" + }, + { + "value": "tag", + "name": "TAG" + } + ] + } + }, + "com.amazonaws.chimesdkmeetings#TranscriptionConfiguration": { + "type": "structure", + "members": { + "EngineTranscribeSettings": { + "target": "com.amazonaws.chimesdkmeetings#EngineTranscribeSettings", + "traits": { + "smithy.api#documentation": "

    The transcription configuration settings passed to Amazon Transcribe.

    " + } + }, + "EngineTranscribeMedicalSettings": { + "target": "com.amazonaws.chimesdkmeetings#EngineTranscribeMedicalSettings", + "traits": { + "smithy.api#documentation": "

    The transcription configuration settings passed to Amazon Transcribe Medical.

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

    The configuration for the current transcription operation. Must contain EngineTranscribeSettings or EngineTranscribeMedicalSettings.

    " + } + }, + "com.amazonaws.chimesdkmeetings#UnauthorizedException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "Message": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "RequestId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The request id associated with the call responsible for the exception.

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

    The user isn't authorized to request a resource.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 401 + } + }, + "com.amazonaws.chimesdkmeetings#UnprocessableEntityException": { + "type": "structure", + "members": { + "Code": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "Message": { + "target": "com.amazonaws.chimesdkmeetings#String" + }, + "RequestId": { + "target": "com.amazonaws.chimesdkmeetings#String", + "traits": { + "smithy.api#documentation": "

    The request id associated with the call responsible for the exception.

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

    The request was well-formed but was unable to be followed due to semantic errors.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 422 + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/cloudfront.json b/codegen/sdk-codegen/aws-models/cloudfront.json index 87593daa760e..054facc69dac 100644 --- a/codegen/sdk-codegen/aws-models/cloudfront.json +++ b/codegen/sdk-codegen/aws-models/cloudfront.json @@ -29,6 +29,42 @@ ] }, "shapes": { + "com.amazonaws.cloudfront#AccessControlAllowHeadersList": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#xmlName": "Header" + } + } + }, + "com.amazonaws.cloudfront#AccessControlAllowMethodsList": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowMethodsValues", + "traits": { + "smithy.api#xmlName": "Method" + } + } + }, + "com.amazonaws.cloudfront#AccessControlAllowOriginsList": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#xmlName": "Origin" + } + } + }, + "com.amazonaws.cloudfront#AccessControlExposeHeadersList": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#xmlName": "Header" + } + } + }, "com.amazonaws.cloudfront#AccessDenied": { "type": "structure", "members": { @@ -76,26 +112,26 @@ "Enabled": { "target": "com.amazonaws.cloudfront#boolean", "traits": { - "smithy.api#documentation": "

    This field is true if any of the accounts in the list have active CloudFront\n\t\t\tkey pairs that CloudFront can use to verify the signatures of signed URLs and signed cookies.\n\t\t\tIf not, this field is false.

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

    This field is true if any of the Amazon Web Services accounts in the list have active CloudFront\n\t\t\tkey pairs that CloudFront can use to verify the signatures of signed URLs and signed cookies.\n\t\t\tIf not, this field is false.

    ", "smithy.api#required": {} } }, "Quantity": { "target": "com.amazonaws.cloudfront#integer", "traits": { - "smithy.api#documentation": "

    The number of accounts in the list.

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

    The number of Amazon Web Services accounts in the list.

    ", "smithy.api#required": {} } }, "Items": { "target": "com.amazonaws.cloudfront#SignerList", "traits": { - "smithy.api#documentation": "

    A list of accounts and the identifiers of active CloudFront key pairs in each account that\n\t\t\tCloudFront can use to verify the signatures of signed URLs and signed cookies.

    " + "smithy.api#documentation": "

    A list of Amazon Web Services accounts and the identifiers of active CloudFront key pairs in each account that\n\t\t\tCloudFront can use to verify the signatures of signed URLs and signed cookies.

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

    A list of accounts and the active CloudFront key pairs in each account that CloudFront can use\n\t\t\tto verify the signatures of signed URLs and signed cookies.

    " + "smithy.api#documentation": "

    A list of Amazon Web Services accounts and the active CloudFront key pairs in each account that CloudFront can use\n\t\t\tto verify the signatures of signed URLs and signed cookies.

    " } }, "com.amazonaws.cloudfront#AliasICPRecordal": { @@ -289,7 +325,7 @@ "TrustedSigners": { "target": "com.amazonaws.cloudfront#TrustedSigners", "traits": { - "smithy.api#documentation": "\n\t\t\t

    We recommend using TrustedKeyGroups instead of\n\t\t\t\tTrustedSigners.

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

    A list of account IDs whose public keys CloudFront can use to validate signed URLs or signed\n\t\t\tcookies.

    \n\t\t

    When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies\n\t\t\tfor all requests that match the cache behavior. The URLs or cookies must be signed with\n\t\t\tthe private key of a CloudFront key pair in the trusted signer’s account. The signed URL\n\t\t\tor cookie contains information about which public key CloudFront should use to verify the\n\t\t\tsignature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

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

    We recommend using TrustedKeyGroups instead of\n\t\t\t\tTrustedSigners.

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

    A list of Amazon Web Services account IDs whose public keys CloudFront can use to validate signed URLs or signed\n\t\t\tcookies.

    \n\t\t

    When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies\n\t\t\tfor all requests that match the cache behavior. The URLs or cookies must be signed with\n\t\t\tthe private key of a CloudFront key pair in the trusted signer’s Amazon Web Services account. The signed URL\n\t\t\tor cookie contains information about which public key CloudFront should use to verify the\n\t\t\tsignature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

    " } }, "TrustedKeyGroups": { @@ -356,6 +392,12 @@ "smithy.api#documentation": "

    The unique identifier of the origin request policy that is attached to this cache behavior.\n\t\t\tFor more information, see Creating origin request policies or Using the managed origin request policies in the\n\t\t\tAmazon CloudFront Developer Guide.

    " } }, + "ResponseHeadersPolicyId": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The identifier for a response headers policy.

    " + } + }, "ForwardedValues": { "target": "com.amazonaws.cloudfront#ForwardedValues", "traits": { @@ -678,7 +720,7 @@ "Type": { "target": "com.amazonaws.cloudfront#CachePolicyType", "traits": { - "smithy.api#documentation": "

    The type of cache policy, either managed (created by Amazon Web Services) or\n\t\t\tcustom (created in this account).

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

    The type of cache policy, either managed (created by Amazon Web Services) or\n\t\t\tcustom (created in this Amazon Web Services account).

    ", "smithy.api#required": {} } }, @@ -881,14 +923,14 @@ "Quantity": { "target": "com.amazonaws.cloudfront#integer", "traits": { - "smithy.api#documentation": "

    The number of CloudFront origin access identities that were created by the current account.

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

    The number of CloudFront origin access identities that were created by the current Amazon Web Services account.

    ", "smithy.api#required": {} } }, "Items": { "target": "com.amazonaws.cloudfront#CloudFrontOriginAccessIdentitySummaryList", "traits": { - "smithy.api#documentation": "

    A complex type that contains one CloudFrontOriginAccessIdentitySummary \n\t\t\telement for each origin access identity that was created by the current account.

    " + "smithy.api#documentation": "

    A complex type that contains one CloudFrontOriginAccessIdentitySummary \n\t\t\telement for each origin access identity that was created by the current Amazon Web Services account.

    " } } }, @@ -936,6 +978,24 @@ }, "com.amazonaws.cloudfront#Cloudfront2020_05_31": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "CloudFront", + "arnNamespace": "cloudfront", + "cloudFormationName": "CloudFront", + "cloudTrailEventSource": "cloudfront.amazonaws.com", + "endpointPrefix": "cloudfront" + }, + "aws.auth#sigv4": { + "name": "cloudfront" + }, + "aws.protocols#restXml": {}, + "smithy.api#documentation": "Amazon CloudFront\n\t\t

    This is the Amazon CloudFront API Reference. This guide\n is for developers who need detailed information about \n\t\t\tCloudFront API actions, data types, and errors. For detailed information about CloudFront features, see the Amazon CloudFront Developer Guide.

    ", + "smithy.api#title": "Amazon CloudFront", + "smithy.api#xmlNamespace": { + "uri": "http://cloudfront.amazonaws.com/doc/2020-05-31/" + } + }, "version": "2020-05-31", "operations": [ { @@ -980,6 +1040,9 @@ { "target": "com.amazonaws.cloudfront#CreateRealtimeLogConfig" }, + { + "target": "com.amazonaws.cloudfront#CreateResponseHeadersPolicy" + }, { "target": "com.amazonaws.cloudfront#CreateStreamingDistribution" }, @@ -1019,6 +1082,9 @@ { "target": "com.amazonaws.cloudfront#DeleteRealtimeLogConfig" }, + { + "target": "com.amazonaws.cloudfront#DeleteResponseHeadersPolicy" + }, { "target": "com.amazonaws.cloudfront#DeleteStreamingDistribution" }, @@ -1085,6 +1151,12 @@ { "target": "com.amazonaws.cloudfront#GetRealtimeLogConfig" }, + { + "target": "com.amazonaws.cloudfront#GetResponseHeadersPolicy" + }, + { + "target": "com.amazonaws.cloudfront#GetResponseHeadersPolicyConfig" + }, { "target": "com.amazonaws.cloudfront#GetStreamingDistribution" }, @@ -1115,6 +1187,9 @@ { "target": "com.amazonaws.cloudfront#ListDistributionsByRealtimeLogConfig" }, + { + "target": "com.amazonaws.cloudfront#ListDistributionsByResponseHeadersPolicyId" + }, { "target": "com.amazonaws.cloudfront#ListDistributionsByWebACLId" }, @@ -1142,6 +1217,9 @@ { "target": "com.amazonaws.cloudfront#ListRealtimeLogConfigs" }, + { + "target": "com.amazonaws.cloudfront#ListResponseHeadersPolicies" + }, { "target": "com.amazonaws.cloudfront#ListStreamingDistributions" }, @@ -1191,27 +1269,12 @@ "target": "com.amazonaws.cloudfront#UpdateRealtimeLogConfig" }, { - "target": "com.amazonaws.cloudfront#UpdateStreamingDistribution" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "CloudFront", - "arnNamespace": "cloudfront", - "cloudFormationName": "CloudFront", - "cloudTrailEventSource": "cloudfront.amazonaws.com", - "endpointPrefix": "cloudfront" - }, - "aws.auth#sigv4": { - "name": "cloudfront" + "target": "com.amazonaws.cloudfront#UpdateResponseHeadersPolicy" }, - "aws.protocols#restXml": {}, - "smithy.api#documentation": "Amazon CloudFront\n\t\t

    This is the Amazon CloudFront API Reference. This guide\n is for developers who need detailed information about \n\t\t\tCloudFront API actions, data types, and errors. For detailed information about CloudFront features, see the Amazon CloudFront Developer Guide.

    ", - "smithy.api#title": "Amazon CloudFront", - "smithy.api#xmlNamespace": { - "uri": "http://cloudfront.amazonaws.com/doc/2020-05-31/" + { + "target": "com.amazonaws.cloudfront#UpdateStreamingDistribution" } - } + ] }, "com.amazonaws.cloudfront#CommentType": { "type": "string", @@ -1687,6 +1750,9 @@ { "target": "com.amazonaws.cloudfront#NoSuchRealtimeLogConfig" }, + { + "target": "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy" + }, { "target": "com.amazonaws.cloudfront#RealtimeLogConfigOwnerMismatch" }, @@ -1717,6 +1783,9 @@ { "target": "com.amazonaws.cloudfront#TooManyDistributionsAssociatedToOriginRequestPolicy" }, + { + "target": "com.amazonaws.cloudfront#TooManyDistributionsAssociatedToResponseHeadersPolicy" + }, { "target": "com.amazonaws.cloudfront#TooManyDistributionsWithFunctionAssociations" }, @@ -1926,6 +1995,9 @@ { "target": "com.amazonaws.cloudfront#NoSuchRealtimeLogConfig" }, + { + "target": "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy" + }, { "target": "com.amazonaws.cloudfront#RealtimeLogConfigOwnerMismatch" }, @@ -1956,6 +2028,9 @@ { "target": "com.amazonaws.cloudfront#TooManyDistributionsAssociatedToOriginRequestPolicy" }, + { + "target": "com.amazonaws.cloudfront#TooManyDistributionsAssociatedToResponseHeadersPolicy" + }, { "target": "com.amazonaws.cloudfront#TooManyDistributionsWithFunctionAssociations" }, @@ -2752,6 +2827,83 @@ } } }, + "com.amazonaws.cloudfront#CreateResponseHeadersPolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudfront#CreateResponseHeadersPolicyRequest" + }, + "output": { + "target": "com.amazonaws.cloudfront#CreateResponseHeadersPolicyResult" + }, + "errors": [ + { + "target": "com.amazonaws.cloudfront#AccessDenied" + }, + { + "target": "com.amazonaws.cloudfront#InconsistentQuantities" + }, + { + "target": "com.amazonaws.cloudfront#InvalidArgument" + }, + { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyAlreadyExists" + }, + { + "target": "com.amazonaws.cloudfront#TooManyCustomHeadersInResponseHeadersPolicy" + }, + { + "target": "com.amazonaws.cloudfront#TooManyResponseHeadersPolicies" + } + ], + "traits": { + "smithy.api#documentation": "

    Creates a response headers policy.

    \n\t\t

    A response headers policy contains information about a set of HTTP response headers\n\t\t\tand their values. To create a response headers policy, you provide some metadata about\n\t\t\tthe policy, and a set of configurations that specify the response headers.

    \n\t\t

    After you create a response headers policy, you can use its ID to attach it to one or more\n\t\t\tcache behaviors in a CloudFront distribution. When it’s attached to a cache behavior, CloudFront\n\t\t\tadds the headers in the policy to HTTP responses that it sends for requests that match\n\t\t\tthe cache behavior.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/2020-05-31/response-headers-policy", + "code": 201 + } + } + }, + "com.amazonaws.cloudfront#CreateResponseHeadersPolicyRequest": { + "type": "structure", + "members": { + "ResponseHeadersPolicyConfig": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyConfig", + "traits": { + "smithy.api#documentation": "

    Contains metadata about the response headers policy, and a set of configurations that\n\t\t\tspecify the response headers.

    ", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "ResponseHeadersPolicyConfig" + } + } + } + }, + "com.amazonaws.cloudfront#CreateResponseHeadersPolicyResult": { + "type": "structure", + "members": { + "ResponseHeadersPolicy": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicy", + "traits": { + "smithy.api#documentation": "

    Contains a response headers policy.

    ", + "smithy.api#httpPayload": {} + } + }, + "Location": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The URL of the response headers policy.

    ", + "smithy.api#httpHeader": "Location" + } + }, + "ETag": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The version identifier for the current version of the response headers policy.

    ", + "smithy.api#httpHeader": "ETag" + } + } + } + }, "com.amazonaws.cloudfront#CreateStreamingDistribution": { "type": "operation", "input": { @@ -3101,7 +3253,7 @@ "TrustedSigners": { "target": "com.amazonaws.cloudfront#TrustedSigners", "traits": { - "smithy.api#documentation": "\n\t\t\t

    We recommend using TrustedKeyGroups instead of\n\t\t\t\tTrustedSigners.

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

    A list of account IDs whose public keys CloudFront can use to validate signed URLs or signed\n\t\t\tcookies.

    \n\t\t

    When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies\n\t\t\tfor all requests that match the cache behavior. The URLs or cookies must be signed with\n\t\t\tthe private key of a CloudFront key pair in a trusted signer’s account. The signed URL or\n\t\t\tcookie contains information about which public key CloudFront should use to verify the\n\t\t\tsignature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

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

    We recommend using TrustedKeyGroups instead of\n\t\t\t\tTrustedSigners.

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

    A list of Amazon Web Services account IDs whose public keys CloudFront can use to validate signed URLs or signed\n\t\t\tcookies.

    \n\t\t

    When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies\n\t\t\tfor all requests that match the cache behavior. The URLs or cookies must be signed with\n\t\t\tthe private key of a CloudFront key pair in a trusted signer’s Amazon Web Services account. The signed URL or\n\t\t\tcookie contains information about which public key CloudFront should use to verify the\n\t\t\tsignature. For more information, see Serving private content in the Amazon CloudFront Developer Guide.

    " } }, "TrustedKeyGroups": { @@ -3168,6 +3320,12 @@ "smithy.api#documentation": "

    The unique identifier of the origin request policy that is attached to the default cache\n\t\t\tbehavior. For more information, see Creating origin request policies or Using the managed origin request policies in the\n\t\t\tAmazon CloudFront Developer Guide.

    " } }, + "ResponseHeadersPolicyId": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The identifier for a response headers policy.

    " + } + }, "ForwardedValues": { "target": "com.amazonaws.cloudfront#ForwardedValues", "traits": { @@ -3760,6 +3918,60 @@ } } }, + "com.amazonaws.cloudfront#DeleteResponseHeadersPolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudfront#DeleteResponseHeadersPolicyRequest" + }, + "errors": [ + { + "target": "com.amazonaws.cloudfront#AccessDenied" + }, + { + "target": "com.amazonaws.cloudfront#IllegalDelete" + }, + { + "target": "com.amazonaws.cloudfront#InvalidIfMatchVersion" + }, + { + "target": "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy" + }, + { + "target": "com.amazonaws.cloudfront#PreconditionFailed" + }, + { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyInUse" + } + ], + "traits": { + "smithy.api#documentation": "

    Deletes a response headers policy.

    \n\t\t

    You cannot delete a response headers policy if it’s attached to a cache behavior.\n\t\t\tFirst update your distributions to remove the response headers policy from all cache\n\t\t\tbehaviors, then delete the response headers policy.

    \n\t\t

    To delete a response headers policy, you must provide the policy’s identifier and\n\t\t\tversion. To get these values, you can use ListResponseHeadersPolicies or\n\t\t\t\tGetResponseHeadersPolicy.

    ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/2020-05-31/response-headers-policy/{Id}", + "code": 204 + } + } + }, + "com.amazonaws.cloudfront#DeleteResponseHeadersPolicyRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The identifier for the response headers policy that you are deleting.

    \n\t\t

    To get the identifier, you can use ListResponseHeadersPolicies.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "IfMatch": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The version of the response headers policy that you are deleting.

    \n\t\t

    The version is the response headers policy’s ETag value, which you can\n\t\t\tget using ListResponseHeadersPolicies,\n\t\t\t\tGetResponseHeadersPolicy, or\n\t\t\t\tGetResponseHeadersPolicyConfig.

    ", + "smithy.api#httpHeader": "If-Match" + } + } + } + }, "com.amazonaws.cloudfront#DeleteStreamingDistribution": { "type": "operation", "input": { @@ -3891,7 +4103,7 @@ "ARN": { "target": "com.amazonaws.cloudfront#string", "traits": { - "smithy.api#documentation": "

    The ARN (Amazon Resource Name) for the distribution. For example: \n\t\t\t\tarn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where \n\t\t\t\t123456789012 is your account ID.

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

    The ARN (Amazon Resource Name) for the distribution. For example: \n\t\t\t\tarn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where \n\t\t\t\t123456789012 is your Amazon Web Services account ID.

    ", "smithy.api#required": {} } }, @@ -3926,7 +4138,7 @@ "ActiveTrustedSigners": { "target": "com.amazonaws.cloudfront#ActiveTrustedSigners", "traits": { - "smithy.api#documentation": "\n\t\t\t

    We recommend using TrustedKeyGroups instead of\n\t\t\t\tTrustedSigners.

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

    CloudFront automatically adds this field to the response if you’ve configured a cache behavior in\n\t\t\tthis distribution to serve private content using trusted signers. This field contains a\n\t\t\tlist of account IDs and the active CloudFront key pairs in each account that CloudFront can use\n\t\t\tto verify the signatures of signed URLs or signed cookies.

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

    We recommend using TrustedKeyGroups instead of\n\t\t\t\tTrustedSigners.

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

    CloudFront automatically adds this field to the response if you’ve configured a cache behavior in\n\t\t\tthis distribution to serve private content using trusted signers. This field contains a\n\t\t\tlist of Amazon Web Services account IDs and the active CloudFront key pairs in each account that CloudFront can use\n\t\t\tto verify the signatures of signed URLs or signed cookies.

    " } }, "ActiveTrustedKeyGroups": { @@ -4073,7 +4285,7 @@ "IsIPV6Enabled": { "target": "com.amazonaws.cloudfront#boolean", "traits": { - "smithy.api#documentation": "

    If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your \n\t\t\tdistribution, specify true. If you specify false, CloudFront responds to \n\t\t\tIPv6 DNS requests with the DNS response code NOERROR and with no IP addresses. \n\t\t\tThis allows viewers to submit a second request, for an IPv4 address for your distribution.

    \n\t\t

    In general, you should enable IPv6 if you have users on IPv6 networks who want to \n\t\t\taccess your content. However, if you're using signed URLs or signed cookies to restrict access \n\t\t\tto your content, and if you're using a custom policy that includes the IpAddress \n\t\t\tparameter to restrict the IP addresses that can access your content, don't enable IPv6. If \n\t\t\tyou want to restrict access to some content by IP address and not restrict access to other \n\t\t\tcontent (or restrict access but not by IP address), you can create two distributions. For more \n\t\t\tinformation, see \n\t\t\tCreating a Signed URL Using a Custom Policy in the Amazon CloudFront Developer Guide.

    \n\t\t

    If you're using an Route 53 Amazon Web Services Integration alias resource record set to route traffic to your CloudFront \n\t\t\tdistribution, you need to create a second alias resource record set when both of the following \n\t\t\tare true:

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

      You enable IPv6 for the distribution

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

      You're using alternate domain names in the URLs for your objects

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

    For more information, see Routing Traffic \n\t\t\t\tto an Amazon CloudFront Web Distribution by Using Your Domain Name in the Route 53 Amazon Web Services Integration \n\t\t\t\tDeveloper Guide.

    \n\t\t

    If you created a CNAME resource record set, either with Route 53 Amazon Web Services Integration or with another DNS \n\t\t\tservice, you don't need to make any changes. A CNAME record will route traffic to your \n\t\t\tdistribution regardless of the IP address format of the viewer request.

    " + "smithy.api#documentation": "

    If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your \n\t\t\tdistribution, specify true. If you specify false, CloudFront responds to \n\t\t\tIPv6 DNS requests with the DNS response code NOERROR and with no IP addresses. \n\t\t\tThis allows viewers to submit a second request, for an IPv4 address for your distribution.

    \n\t\t

    In general, you should enable IPv6 if you have users on IPv6 networks who want to \n\t\t\taccess your content. However, if you're using signed URLs or signed cookies to restrict access \n\t\t\tto your content, and if you're using a custom policy that includes the IpAddress \n\t\t\tparameter to restrict the IP addresses that can access your content, don't enable IPv6. If \n\t\t\tyou want to restrict access to some content by IP address and not restrict access to other \n\t\t\tcontent (or restrict access but not by IP address), you can create two distributions. For more \n\t\t\tinformation, see \n\t\t\tCreating a Signed URL Using a Custom Policy in the Amazon CloudFront Developer Guide.

    \n\t\t

    If you're using an Route 53 Amazon Web Services Integration alias resource record set to route traffic to your CloudFront \n\t\t\tdistribution, you need to create a second alias resource record set when both of the following \n\t\t\tare true:

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

      You enable IPv6 for the distribution

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

      You're using alternate domain names in the URLs for your objects

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

    For more information, see Routing Traffic \n\t\t\t\tto an Amazon CloudFront Web Distribution by Using Your Domain Name in the Route 53 Amazon Web Services Integration \n\t\t\t\tDeveloper Guide.

    \n\t\t

    If you created a CNAME resource record set, either with Route 53 Amazon Web Services Integration or with another DNS \n\t\t\tservice, you don't need to make any changes. A CNAME record will route traffic to your \n\t\t\tdistribution regardless of the IP address format of the viewer request.

    " } } }, @@ -4193,14 +4405,14 @@ "Quantity": { "target": "com.amazonaws.cloudfront#integer", "traits": { - "smithy.api#documentation": "

    The number of distributions that were created by the current account.

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

    The number of distributions that were created by the current Amazon Web Services account.

    ", "smithy.api#required": {} } }, "Items": { "target": "com.amazonaws.cloudfront#DistributionSummaryList", "traits": { - "smithy.api#documentation": "

    A complex type that contains one DistributionSummary element for each \n\t\t\tdistribution that was created by the current account.

    " + "smithy.api#documentation": "

    A complex type that contains one DistributionSummary element for each \n\t\t\tdistribution that was created by the current Amazon Web Services account.

    " } } }, @@ -4234,7 +4446,7 @@ "ARN": { "target": "com.amazonaws.cloudfront#string", "traits": { - "smithy.api#documentation": "

    The ARN (Amazon Resource Name) for the distribution. For example: \n\t\t\t\tarn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where \n\t\t\t\t123456789012 is your account ID.

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

    The ARN (Amazon Resource Name) for the distribution. For example: \n\t\t\t\tarn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where \n\t\t\t\t123456789012 is your Amazon Web Services account ID.

    ", "smithy.api#required": {} } }, @@ -4928,6 +5140,21 @@ "smithy.api#documentation": "

    This field is deprecated. We recommend that you use a cache policy or an origin\n\t\t\trequest policy instead of this field.

    \n\t\t

    If you want to include values in the cache key, use a cache policy. For more information,\n\t\t\tsee Creating cache policies in the Amazon CloudFront Developer Guide.

    \n\t\t

    If you want to send values to the origin but not include them in the cache key, use an\n\t\t\torigin request policy. For more information, see Creating origin request policies in the\n\t\t\tAmazon CloudFront Developer Guide.

    \n\t\t

    A complex type that specifies how CloudFront handles query strings, cookies, and HTTP headers.

    " } }, + "com.amazonaws.cloudfront#FrameOptionsList": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DENY", + "name": "DENY" + }, + { + "value": "SAMEORIGIN", + "name": "SAMEORIGIN" + } + ] + } + }, "com.amazonaws.cloudfront#FunctionARN": { "type": "string", "traits": { @@ -4946,7 +5173,7 @@ } }, "traits": { - "smithy.api#documentation": "

    A function with the same name already exists in this account. To create a\n\t\t\tfunction, you must provide a unique name. To update an existing function, use\n\t\t\tUpdateFunction.

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

    A function with the same name already exists in this Amazon Web Services account. To create a\n\t\t\tfunction, you must provide a unique name. To update an existing function, use\n\t\t\tUpdateFunction.

    ", "smithy.api#error": "client", "smithy.api#httpError": 409 } @@ -5049,6 +5276,9 @@ "type": "list", "member": { "target": "com.amazonaws.cloudfront#string" + }, + "traits": { + "smithy.api#sensitive": {} } }, "com.amazonaws.cloudfront#FunctionInUse": { @@ -6485,113 +6715,227 @@ } } }, - "com.amazonaws.cloudfront#GetStreamingDistribution": { + "com.amazonaws.cloudfront#GetResponseHeadersPolicy": { "type": "operation", "input": { - "target": "com.amazonaws.cloudfront#GetStreamingDistributionRequest" + "target": "com.amazonaws.cloudfront#GetResponseHeadersPolicyRequest" }, "output": { - "target": "com.amazonaws.cloudfront#GetStreamingDistributionResult" + "target": "com.amazonaws.cloudfront#GetResponseHeadersPolicyResult" }, "errors": [ { "target": "com.amazonaws.cloudfront#AccessDenied" }, { - "target": "com.amazonaws.cloudfront#NoSuchStreamingDistribution" + "target": "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy" } ], "traits": { - "smithy.api#documentation": "

    Gets information about a specified RTMP distribution, including the distribution configuration.

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

    Gets a response headers policy, including metadata (the policy’s identifier and the date and\n\t\t\ttime when the policy was last modified).

    \n\t\t

    To get a response headers policy, you must provide the policy’s identifier. If the\n\t\t\tresponse headers policy is attached to a distribution’s cache behavior, you can get the\n\t\t\tpolicy’s identifier using ListDistributions or\n\t\t\tGetDistribution. If the response headers policy is not attached to a cache\n\t\t\tbehavior, you can get the identifier using\n\t\t\tListResponseHeadersPolicies.

    ", "smithy.api#http": { "method": "GET", - "uri": "/2020-05-31/streaming-distribution/{Id}", + "uri": "/2020-05-31/response-headers-policy/{Id}", "code": 200 - }, - "smithy.waiters#waitable": { - "StreamingDistributionDeployed": { - "documentation": "Wait until a streaming distribution is deployed.", - "acceptors": [ - { - "state": "success", - "matcher": { - "output": { - "path": "StreamingDistribution.Status", - "expected": "Deployed", - "comparator": "stringEquals" - } - } - } - ], - "minDelay": 60 - } } } }, - "com.amazonaws.cloudfront#GetStreamingDistributionConfig": { + "com.amazonaws.cloudfront#GetResponseHeadersPolicyConfig": { "type": "operation", "input": { - "target": "com.amazonaws.cloudfront#GetStreamingDistributionConfigRequest" + "target": "com.amazonaws.cloudfront#GetResponseHeadersPolicyConfigRequest" }, "output": { - "target": "com.amazonaws.cloudfront#GetStreamingDistributionConfigResult" + "target": "com.amazonaws.cloudfront#GetResponseHeadersPolicyConfigResult" }, "errors": [ { "target": "com.amazonaws.cloudfront#AccessDenied" }, { - "target": "com.amazonaws.cloudfront#NoSuchStreamingDistribution" + "target": "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy" } ], "traits": { - "smithy.api#documentation": "

    Get the configuration information about a streaming distribution.

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

    Gets a response headers policy configuration.

    \n\t\t

    To get a response headers policy configuration, you must provide the policy’s\n\t\t\tidentifier. If the response headers policy is attached to a distribution’s cache\n\t\t\tbehavior, you can get the policy’s identifier using ListDistributions or\n\t\t\tGetDistribution. If the response headers policy is not attached to a\n\t\t\tcache behavior, you can get the identifier using\n\t\t\tListResponseHeadersPolicies.

    ", "smithy.api#http": { "method": "GET", - "uri": "/2020-05-31/streaming-distribution/{Id}/config", + "uri": "/2020-05-31/response-headers-policy/{Id}/config", "code": 200 } } }, - "com.amazonaws.cloudfront#GetStreamingDistributionConfigRequest": { + "com.amazonaws.cloudfront#GetResponseHeadersPolicyConfigRequest": { "type": "structure", "members": { "Id": { "target": "com.amazonaws.cloudfront#string", "traits": { - "smithy.api#documentation": "

    The streaming distribution's ID.

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

    The identifier for the response headers policy.

    \n\t\t

    If the response headers policy is attached to a distribution’s cache behavior, you can\n\t\t\tget the policy’s identifier using ListDistributions or\n\t\t\t\tGetDistribution. If the response headers policy is not attached to a\n\t\t\tcache behavior, you can get the identifier using\n\t\t\t\tListResponseHeadersPolicies.

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

    To request to get a streaming distribution configuration.

    " } }, - "com.amazonaws.cloudfront#GetStreamingDistributionConfigResult": { + "com.amazonaws.cloudfront#GetResponseHeadersPolicyConfigResult": { "type": "structure", "members": { - "StreamingDistributionConfig": { - "target": "com.amazonaws.cloudfront#StreamingDistributionConfig", + "ResponseHeadersPolicyConfig": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyConfig", "traits": { - "smithy.api#documentation": "

    The streaming distribution's configuration information.

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

    Contains a response headers policy.

    ", "smithy.api#httpPayload": {} } }, "ETag": { "target": "com.amazonaws.cloudfront#string", "traits": { - "smithy.api#documentation": "

    The current version of the configuration. For example: E2QWRUHAPOMQZL. \n\t\t

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

    The version identifier for the current version of the response headers policy.

    ", "smithy.api#httpHeader": "ETag" } } - }, - "traits": { - "smithy.api#documentation": "

    The returned result of the corresponding request.

    " } }, - "com.amazonaws.cloudfront#GetStreamingDistributionRequest": { + "com.amazonaws.cloudfront#GetResponseHeadersPolicyRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The identifier for the response headers policy.

    \n\t\t

    If the response headers policy is attached to a distribution’s cache behavior, you can\n\t\t\tget the policy’s identifier using ListDistributions or\n\t\t\t\tGetDistribution. If the response headers policy is not attached to a\n\t\t\tcache behavior, you can get the identifier using\n\t\t\t\tListResponseHeadersPolicies.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.cloudfront#GetResponseHeadersPolicyResult": { + "type": "structure", + "members": { + "ResponseHeadersPolicy": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicy", + "traits": { + "smithy.api#documentation": "

    Contains a response headers policy.

    ", + "smithy.api#httpPayload": {} + } + }, + "ETag": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The version identifier for the current version of the response headers policy.

    ", + "smithy.api#httpHeader": "ETag" + } + } + } + }, + "com.amazonaws.cloudfront#GetStreamingDistribution": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudfront#GetStreamingDistributionRequest" + }, + "output": { + "target": "com.amazonaws.cloudfront#GetStreamingDistributionResult" + }, + "errors": [ + { + "target": "com.amazonaws.cloudfront#AccessDenied" + }, + { + "target": "com.amazonaws.cloudfront#NoSuchStreamingDistribution" + } + ], + "traits": { + "smithy.api#documentation": "

    Gets information about a specified RTMP distribution, including the distribution configuration.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/2020-05-31/streaming-distribution/{Id}", + "code": 200 + }, + "smithy.waiters#waitable": { + "StreamingDistributionDeployed": { + "documentation": "Wait until a streaming distribution is deployed.", + "acceptors": [ + { + "state": "success", + "matcher": { + "output": { + "path": "StreamingDistribution.Status", + "expected": "Deployed", + "comparator": "stringEquals" + } + } + } + ], + "minDelay": 60 + } + } + } + }, + "com.amazonaws.cloudfront#GetStreamingDistributionConfig": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudfront#GetStreamingDistributionConfigRequest" + }, + "output": { + "target": "com.amazonaws.cloudfront#GetStreamingDistributionConfigResult" + }, + "errors": [ + { + "target": "com.amazonaws.cloudfront#AccessDenied" + }, + { + "target": "com.amazonaws.cloudfront#NoSuchStreamingDistribution" + } + ], + "traits": { + "smithy.api#documentation": "

    Get the configuration information about a streaming distribution.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/2020-05-31/streaming-distribution/{Id}/config", + "code": 200 + } + } + }, + "com.amazonaws.cloudfront#GetStreamingDistributionConfigRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The streaming distribution's ID.

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

    To request to get a streaming distribution configuration.

    " + } + }, + "com.amazonaws.cloudfront#GetStreamingDistributionConfigResult": { + "type": "structure", + "members": { + "StreamingDistributionConfig": { + "target": "com.amazonaws.cloudfront#StreamingDistributionConfig", + "traits": { + "smithy.api#documentation": "

    The streaming distribution's configuration information.

    ", + "smithy.api#httpPayload": {} + } + }, + "ETag": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The current version of the configuration. For example: E2QWRUHAPOMQZL. \n\t\t

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

    The returned result of the corresponding request.

    " + } + }, + "com.amazonaws.cloudfront#GetStreamingDistributionRequest": { "type": "structure", "members": { "Id": { @@ -7148,14 +7492,14 @@ "Quantity": { "target": "com.amazonaws.cloudfront#integer", "traits": { - "smithy.api#documentation": "

    The number of invalidation batches that were created by the current account. \n\t\t

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

    The number of invalidation batches that were created by the current Amazon Web Services account. \n\t\t

    ", "smithy.api#required": {} } }, "Items": { "target": "com.amazonaws.cloudfront#InvalidationSummaryList", "traits": { - "smithy.api#documentation": "

    A complex type that contains one InvalidationSummary element for each \n\t\t\tinvalidation batch created by the current account.

    " + "smithy.api#documentation": "

    A complex type that contains one InvalidationSummary element for each \n\t\t\tinvalidation batch created by the current Amazon Web Services account.

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

    Gets a list of cache policies.

    \n\t\t

    You can optionally apply a filter to return only the managed policies created by Amazon Web Services, or\n\t\t\tonly the custom policies created in your account.

    \n\t\t

    You can optionally specify the maximum number of items to receive in the response. If\n\t\t\tthe total number of items in the list exceeds the maximum that you specify, or the\n\t\t\tdefault maximum, the response is paginated. To get the next page of items, send a\n\t\t\tsubsequent request that specifies the NextMarker value from the current\n\t\t\tresponse as the Marker value in the subsequent request.

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

    Gets a list of cache policies.

    \n\t\t

    You can optionally apply a filter to return only the managed policies created by Amazon Web Services, or\n\t\t\tonly the custom policies created in your Amazon Web Services account.

    \n\t\t

    You can optionally specify the maximum number of items to receive in the response. If\n\t\t\tthe total number of items in the list exceeds the maximum that you specify, or the\n\t\t\tdefault maximum, the response is paginated. To get the next page of items, send a\n\t\t\tsubsequent request that specifies the NextMarker value from the current\n\t\t\tresponse as the Marker value in the subsequent request.

    ", "smithy.api#http": { "method": "GET", "uri": "/2020-05-31/cache-policy", @@ -7521,7 +7865,7 @@ "Type": { "target": "com.amazonaws.cloudfront#CachePolicyType", "traits": { - "smithy.api#documentation": "

    A filter to return only the specified kinds of cache policies. Valid values\n\t\t\tare:

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

      \n managed – Returns only the managed policies created by Amazon Web Services.

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

      \n custom – Returns only the custom policies created in your account.

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

    A filter to return only the specified kinds of cache policies. Valid values\n\t\t\tare:

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

      \n managed – Returns only the managed policies created by Amazon Web Services.

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

      \n custom – Returns only the custom policies created in your Amazon Web Services account.

      \n\t\t\t
    • \n
    ", "smithy.api#httpQuery": "Type" } }, @@ -7977,6 +8321,72 @@ } } }, + "com.amazonaws.cloudfront#ListDistributionsByResponseHeadersPolicyId": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudfront#ListDistributionsByResponseHeadersPolicyIdRequest" + }, + "output": { + "target": "com.amazonaws.cloudfront#ListDistributionsByResponseHeadersPolicyIdResult" + }, + "errors": [ + { + "target": "com.amazonaws.cloudfront#AccessDenied" + }, + { + "target": "com.amazonaws.cloudfront#InvalidArgument" + }, + { + "target": "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy" + } + ], + "traits": { + "smithy.api#documentation": "

    Gets a list of distribution IDs for distributions that have a cache behavior that’s\n\t\t\tassociated with the specified response headers policy.

    \n\t\t

    You can optionally specify the maximum number of items to receive in the response. If\n\t\t\tthe total number of items in the list exceeds the maximum that you specify, or the\n\t\t\tdefault maximum, the response is paginated. To get the next page of items, send a\n\t\t\tsubsequent request that specifies the NextMarker value from the current\n\t\t\tresponse as the Marker value in the subsequent request.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/2020-05-31/distributionsByResponseHeadersPolicyId/{ResponseHeadersPolicyId}", + "code": 200 + } + } + }, + "com.amazonaws.cloudfront#ListDistributionsByResponseHeadersPolicyIdRequest": { + "type": "structure", + "members": { + "Marker": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    Use this field when paginating results to indicate where to begin in your list of\n\t\t\tdistribution IDs. The response includes distribution IDs in the list that occur after\n\t\t\tthe marker. To get the next page of the list, set this field’s value to the value of\n\t\t\t\tNextMarker from the current page’s response.

    ", + "smithy.api#httpQuery": "Marker" + } + }, + "MaxItems": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

    The maximum number of distribution IDs that you want to get in the response.

    ", + "smithy.api#httpQuery": "MaxItems" + } + }, + "ResponseHeadersPolicyId": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The ID of the response headers policy whose associated distribution IDs you want to\n\t\t\tlist.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.cloudfront#ListDistributionsByResponseHeadersPolicyIdResult": { + "type": "structure", + "members": { + "DistributionIdList": { + "target": "com.amazonaws.cloudfront#DistributionIdList", + "traits": { + "smithy.api#httpPayload": {} + } + } + } + }, "com.amazonaws.cloudfront#ListDistributionsByWebACLId": { "type": "operation", "input": { @@ -8207,7 +8617,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Gets a list of all CloudFront functions in your account.

    \n\t\t

    You can optionally apply a filter to return only the functions that are in the\n\t\t\tspecified stage, either DEVELOPMENT or LIVE.

    \n\t\t

    You can optionally specify the maximum number of items to receive in the response. If\n\t\t\tthe total number of items in the list exceeds the maximum that you specify, or the\n\t\t\tdefault maximum, the response is paginated. To get the next page of items, send a\n\t\t\tsubsequent request that specifies the NextMarker value from the current\n\t\t\tresponse as the Marker value in the subsequent request.

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

    Gets a list of all CloudFront functions in your Amazon Web Services account.

    \n\t\t

    You can optionally apply a filter to return only the functions that are in the\n\t\t\tspecified stage, either DEVELOPMENT or LIVE.

    \n\t\t

    You can optionally specify the maximum number of items to receive in the response. If\n\t\t\tthe total number of items in the list exceeds the maximum that you specify, or the\n\t\t\tdefault maximum, the response is paginated. To get the next page of items, send a\n\t\t\tsubsequent request that specifies the NextMarker value from the current\n\t\t\tresponse as the Marker value in the subsequent request.

    ", "smithy.api#http": { "method": "GET", "uri": "/2020-05-31/function", @@ -8405,7 +8815,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Gets a list of origin request policies.

    \n\t\t

    You can optionally apply a filter to return only the managed policies created by Amazon Web Services, or\n\t\t\tonly the custom policies created in your account.

    \n\t\t

    You can optionally specify the maximum number of items to receive in the response. If\n\t\t\tthe total number of items in the list exceeds the maximum that you specify, or the\n\t\t\tdefault maximum, the response is paginated. To get the next page of items, send a\n\t\t\tsubsequent request that specifies the NextMarker value from the current\n\t\t\tresponse as the Marker value in the subsequent request.

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

    Gets a list of origin request policies.

    \n\t\t

    You can optionally apply a filter to return only the managed policies created by Amazon Web Services, or\n\t\t\tonly the custom policies created in your Amazon Web Services account.

    \n\t\t

    You can optionally specify the maximum number of items to receive in the response. If\n\t\t\tthe total number of items in the list exceeds the maximum that you specify, or the\n\t\t\tdefault maximum, the response is paginated. To get the next page of items, send a\n\t\t\tsubsequent request that specifies the NextMarker value from the current\n\t\t\tresponse as the Marker value in the subsequent request.

    ", "smithy.api#http": { "method": "GET", "uri": "/2020-05-31/origin-request-policy", @@ -8419,7 +8829,7 @@ "Type": { "target": "com.amazonaws.cloudfront#OriginRequestPolicyType", "traits": { - "smithy.api#documentation": "

    A filter to return only the specified kinds of origin request policies. Valid values\n\t\t\tare:

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

      \n managed – Returns only the managed policies created by Amazon Web Services.

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

      \n custom – Returns only the custom policies created in your account.

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

    A filter to return only the specified kinds of origin request policies. Valid values\n\t\t\tare:

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

      \n managed – Returns only the managed policies created by Amazon Web Services.

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

      \n custom – Returns only the custom policies created in your Amazon Web Services account.

      \n\t\t\t
    • \n
    ", "smithy.api#httpQuery": "Type" } }, @@ -8563,6 +8973,72 @@ } } }, + "com.amazonaws.cloudfront#ListResponseHeadersPolicies": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudfront#ListResponseHeadersPoliciesRequest" + }, + "output": { + "target": "com.amazonaws.cloudfront#ListResponseHeadersPoliciesResult" + }, + "errors": [ + { + "target": "com.amazonaws.cloudfront#AccessDenied" + }, + { + "target": "com.amazonaws.cloudfront#InvalidArgument" + }, + { + "target": "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy" + } + ], + "traits": { + "smithy.api#documentation": "

    Gets a list of response headers policies.

    \n\t\t

    You can optionally apply a filter to get only the managed policies created by Amazon Web Services,\n\t\t\tor only the custom policies created in your Amazon Web Services account.

    \n\t\t

    You can optionally specify the maximum number of items to receive in the response. If\n\t\t\tthe total number of items in the list exceeds the maximum that you specify, or the\n\t\t\tdefault maximum, the response is paginated. To get the next page of items, send a\n\t\t\tsubsequent request that specifies the NextMarker value from the current\n\t\t\tresponse as the Marker value in the subsequent request.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/2020-05-31/response-headers-policy", + "code": 200 + } + } + }, + "com.amazonaws.cloudfront#ListResponseHeadersPoliciesRequest": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyType", + "traits": { + "smithy.api#documentation": "

    A filter to get only the specified kind of response headers policies. Valid values\n\t\t\tare:

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

      \n managed – Gets only the managed policies created by Amazon Web Services.

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

      \n custom – Gets only the custom policies created in your\n\t\t\t\t\tAmazon Web Services account.

      \n\t\t\t
    • \n
    ", + "smithy.api#httpQuery": "Type" + } + }, + "Marker": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    Use this field when paginating results to indicate where to begin in your list of response\n\t\t\theaders policies. The response includes response headers policies in the list that occur\n\t\t\tafter the marker. To get the next page of the list, set this field’s value to the value\n\t\t\tof NextMarker from the current page’s response.

    ", + "smithy.api#httpQuery": "Marker" + } + }, + "MaxItems": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

    The maximum number of response headers policies that you want to get in the response.

    ", + "smithy.api#httpQuery": "MaxItems" + } + } + } + }, + "com.amazonaws.cloudfront#ListResponseHeadersPoliciesResult": { + "type": "structure", + "members": { + "ResponseHeadersPolicyList": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyList", + "traits": { + "smithy.api#documentation": "

    A list of response headers policies.

    ", + "smithy.api#httpPayload": {} + } + } + } + }, "com.amazonaws.cloudfront#ListStreamingDistributions": { "type": "operation", "input": { @@ -8998,6 +9474,19 @@ "smithy.api#httpError": 404 } }, + "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudfront#string" + } + }, + "traits": { + "smithy.api#documentation": "

    The response headers policy does not exist.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, "com.amazonaws.cloudfront#NoSuchStreamingDistribution": { "type": "structure", "members": { @@ -9086,7 +9575,7 @@ } }, "HeaderValue": { - "target": "com.amazonaws.cloudfront#string", + "target": "com.amazonaws.cloudfront#sensitiveStringType", "traits": { "smithy.api#documentation": "

    The value for the header that you specified in the HeaderName \n\t\t\tfield.

    ", "smithy.api#required": {} @@ -9524,7 +10013,7 @@ "Type": { "target": "com.amazonaws.cloudfront#OriginRequestPolicyType", "traits": { - "smithy.api#documentation": "

    The type of origin request policy, either managed (created by Amazon Web Services) or\n\t\t\tcustom (created in this account).

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

    The type of origin request policy, either managed (created by Amazon Web Services) or\n\t\t\tcustom (created in this Amazon Web Services account).

    ", "smithy.api#required": {} } }, @@ -9577,7 +10066,7 @@ "OriginShieldRegion": { "target": "com.amazonaws.cloudfront#OriginShieldRegion", "traits": { - "smithy.api#documentation": "

    The Region for Origin Shield.

    \n\t\t

    Specify the Region that has the lowest latency to your origin.\n To specify a region, use the region code, not the region name.\n For example, specify the US East (Ohio) region as us-east-2.

    \n

    When you enable CloudFront Origin Shield, you must specify the Region for Origin\n Shield. For the list of Regions that you can specify, and for help choosing the best\n Region for your origin, see Choosing the Region for Origin Shield in the\n\t\t\tAmazon CloudFront Developer Guide.

    " + "smithy.api#documentation": "

    The Amazon Web Services Region for Origin Shield.

    \n\t\t

    Specify the Amazon Web Services Region that has the lowest latency to your origin.\n To specify a region, use the region code, not the region name.\n For example, specify the US East (Ohio) region as us-east-2.

    \n

    When you enable CloudFront Origin Shield, you must specify the Amazon Web Services Region for Origin\n Shield. For the list of Amazon Web Services Regions that you can specify, and for help choosing the best\n Region for your origin, see Choosing the Amazon Web Services Region for Origin Shield in the\n\t\t\tAmazon CloudFront Developer Guide.

    " } } }, @@ -10223,7 +10712,7 @@ } }, "traits": { - "smithy.api#documentation": "

    The specified real-time log configuration belongs to a different account.

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

    The specified real-time log configuration belongs to a different Amazon Web Services account.

    ", "smithy.api#error": "client", "smithy.api#httpError": 401 } @@ -10299,15 +10788,54 @@ ] } }, - "com.amazonaws.cloudfront#ResourceARN": { + "com.amazonaws.cloudfront#ReferrerPolicyList": { "type": "string", "traits": { - "smithy.api#pattern": "^arn:aws(-cn)?:cloudfront::[0-9]+:" - } - }, - "com.amazonaws.cloudfront#ResourceInUse": { - "type": "structure", - "members": { + "smithy.api#enum": [ + { + "value": "no-referrer", + "name": "no_referrer" + }, + { + "value": "no-referrer-when-downgrade", + "name": "no_referrer_when_downgrade" + }, + { + "value": "origin", + "name": "origin" + }, + { + "value": "origin-when-cross-origin", + "name": "origin_when_cross_origin" + }, + { + "value": "same-origin", + "name": "same_origin" + }, + { + "value": "strict-origin", + "name": "strict_origin" + }, + { + "value": "strict-origin-when-cross-origin", + "name": "strict_origin_when_cross_origin" + }, + { + "value": "unsafe-url", + "name": "unsafe_url" + } + ] + } + }, + "com.amazonaws.cloudfront#ResourceARN": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:aws(-cn)?:cloudfront::[0-9]+:" + } + }, + "com.amazonaws.cloudfront#ResourceInUse": { + "type": "structure", + "members": { "Message": { "target": "com.amazonaws.cloudfront#string" } @@ -10318,6 +10846,613 @@ "smithy.api#httpError": 409 } }, + "com.amazonaws.cloudfront#ResponseHeadersPolicy": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The identifier for the response headers policy.

    ", + "smithy.api#required": {} + } + }, + "LastModifiedTime": { + "target": "com.amazonaws.cloudfront#timestamp", + "traits": { + "smithy.api#documentation": "

    The date and time when the response headers policy was last modified.

    ", + "smithy.api#required": {} + } + }, + "ResponseHeadersPolicyConfig": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyConfig", + "traits": { + "smithy.api#documentation": "

    A response headers policy configuration.

    \n\t\t

    A response headers policy contains information about a set of HTTP response headers and\n\t\t\ttheir values. CloudFront adds the headers in the policy to HTTP responses that it sends for\n\t\t\trequests that match a cache behavior that’s associated with the policy.

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

    A response headers policy.

    \n\t\t

    A response headers policy contains information about a set of HTTP response headers\n\t\t\tand their values.

    \n\t\t

    After you create a response headers policy, you can use its ID to attach it to one or more\n\t\t\tcache behaviors in a CloudFront distribution. When it’s attached to a cache behavior, CloudFront\n\t\t\tadds the headers in the policy to HTTP responses that it sends for requests that match\n\t\t\tthe cache behavior.

    \n\t\t

    For more information, see Adding HTTP headers to CloudFront responses in the\n\t\t\tAmazon CloudFront Developer Guide.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowHeaders": { + "type": "structure", + "members": { + "Quantity": { + "target": "com.amazonaws.cloudfront#integer", + "traits": { + "smithy.api#documentation": "

    The number of HTTP header names in the list.

    ", + "smithy.api#required": {} + } + }, + "Items": { + "target": "com.amazonaws.cloudfront#AccessControlAllowHeadersList", + "traits": { + "smithy.api#documentation": "

    The list of HTTP header names. You can specify * to allow all headers.

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

    A list of HTTP header names that CloudFront includes as values for the\n\t\t\t\tAccess-Control-Allow-Headers HTTP response header.

    \n\t\t

    For more information about the Access-Control-Allow-Headers HTTP response\n\t\t\theader, see Access-Control-Allow-Headers in the MDN Web Docs.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowMethods": { + "type": "structure", + "members": { + "Quantity": { + "target": "com.amazonaws.cloudfront#integer", + "traits": { + "smithy.api#documentation": "

    The number of HTTP methods in the list.

    ", + "smithy.api#required": {} + } + }, + "Items": { + "target": "com.amazonaws.cloudfront#AccessControlAllowMethodsList", + "traits": { + "smithy.api#documentation": "

    The list of HTTP methods. Valid values are:

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

      \n GET\n

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

      \n DELETE\n

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

      \n HEAD\n

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

      \n OPTIONS\n

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

      \n PATCH\n

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

      \n POST\n

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

      \n PUT\n

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

      \n ALL\n

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

    \n ALL is a special value that includes all of the listed HTTP\n\t\t\tmethods.

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

    A list of HTTP methods that CloudFront includes as values for the\n\t\t\t\tAccess-Control-Allow-Methods HTTP response header.

    \n\t\t

    For more information about the Access-Control-Allow-Methods HTTP response\n\t\t\theader, see Access-Control-Allow-Methods in the MDN Web Docs.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowMethodsValues": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "GET", + "name": "GET" + }, + { + "value": "POST", + "name": "POST" + }, + { + "value": "OPTIONS", + "name": "OPTIONS" + }, + { + "value": "PUT", + "name": "PUT" + }, + { + "value": "DELETE", + "name": "DELETE" + }, + { + "value": "PATCH", + "name": "PATCH" + }, + { + "value": "HEAD", + "name": "HEAD" + }, + { + "value": "ALL", + "name": "ALL" + } + ] + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowOrigins": { + "type": "structure", + "members": { + "Quantity": { + "target": "com.amazonaws.cloudfront#integer", + "traits": { + "smithy.api#documentation": "

    The number of origins in the list.

    ", + "smithy.api#required": {} + } + }, + "Items": { + "target": "com.amazonaws.cloudfront#AccessControlAllowOriginsList", + "traits": { + "smithy.api#documentation": "

    The list of origins (domain names). You can specify * to allow all\n\t\t\torigins.

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

    A list of origins (domain names) that CloudFront can use as the value for the\n\t\t\tAccess-Control-Allow-Origin HTTP response header.

    \n\t\t

    For more information about the Access-Control-Allow-Origin HTTP response\n\t\t\theader, see Access-Control-Allow-Origin in the MDN Web Docs.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlExposeHeaders": { + "type": "structure", + "members": { + "Quantity": { + "target": "com.amazonaws.cloudfront#integer", + "traits": { + "smithy.api#documentation": "

    The number of HTTP headers in the list.

    ", + "smithy.api#required": {} + } + }, + "Items": { + "target": "com.amazonaws.cloudfront#AccessControlExposeHeadersList", + "traits": { + "smithy.api#documentation": "

    The list of HTTP headers. You can specify * to expose all headers.

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

    A list of HTTP headers that CloudFront includes as values for the\n\t\t\t\tAccess-Control-Expose-Headers HTTP response header.

    \n\t\t

    For more information about the Access-Control-Expose-Headers HTTP\n\t\t\tresponse header, see Access-Control-Expose-Headers in the MDN Web Docs.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyAlreadyExists": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudfront#string" + } + }, + "traits": { + "smithy.api#documentation": "

    A response headers policy with this name already exists. You must provide a unique name. To\n\t\t\tmodify an existing response headers policy, use\n\t\t\tUpdateResponseHeadersPolicy.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyConfig": { + "type": "structure", + "members": { + "Comment": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    A comment to describe the response headers policy.

    \n\t\t

    The comment cannot be longer than 128 characters.

    " + } + }, + "Name": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    A name to identify the response headers policy.

    \n\t\t

    The name must be unique for response headers policies in this Amazon Web Services account.

    ", + "smithy.api#required": {} + } + }, + "CorsConfig": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyCorsConfig", + "traits": { + "smithy.api#documentation": "

    A configuration for a set of HTTP response headers that are used for cross-origin\n\t\t\tresource sharing (CORS).

    " + } + }, + "SecurityHeadersConfig": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicySecurityHeadersConfig", + "traits": { + "smithy.api#documentation": "

    A configuration for a set of security-related HTTP response headers.

    " + } + }, + "CustomHeadersConfig": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyCustomHeadersConfig", + "traits": { + "smithy.api#documentation": "

    A configuration for a set of custom HTTP response headers.

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

    A response headers policy configuration.

    \n\t\t

    A response headers policy configuration contains metadata about the response headers policy,\n\t\t\tand configurations for sets of HTTP response headers and their values. CloudFront adds the\n\t\t\theaders in the policy to HTTP responses that it sends for requests that match a cache\n\t\t\tbehavior associated with the policy.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyContentSecurityPolicy": { + "type": "structure", + "members": { + "Override": { + "target": "com.amazonaws.cloudfront#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean that determines whether CloudFront overrides the Content-Security-Policy\n\t\t\tHTTP response header received from the origin with the one specified in this response\n\t\t\theaders policy.

    ", + "smithy.api#required": {} + } + }, + "ContentSecurityPolicy": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The policy directives and their values that CloudFront includes as values for the\n\t\t\t\tContent-Security-Policy HTTP response header.

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

    The policy directives and their values that CloudFront includes as values for the\n\t\t\t\tContent-Security-Policy HTTP response header.

    \n\t\t

    For more information about the Content-Security-Policy HTTP response\n\t\t\theader, see Content-Security-Policy in the MDN Web Docs.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyContentTypeOptions": { + "type": "structure", + "members": { + "Override": { + "target": "com.amazonaws.cloudfront#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean that determines whether CloudFront overrides the X-Content-Type-Options\n\t\t\tHTTP response header received from the origin with the one specified in this response\n\t\t\theaders policy.

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

    Determines whether CloudFront includes the X-Content-Type-Options HTTP response\n\t\t\theader with its value set to nosniff.

    \n\t\t

    For more information about the X-Content-Type-Options HTTP response\n\t\t\theader, see X-Content-Type-Options in the MDN Web Docs.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyCorsConfig": { + "type": "structure", + "members": { + "AccessControlAllowOrigins": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowOrigins", + "traits": { + "smithy.api#documentation": "

    A list of origins (domain names) that CloudFront can use as the value for the\n\t\t\tAccess-Control-Allow-Origin HTTP response header.

    \n\t\t

    For more information about the Access-Control-Allow-Origin HTTP response\n\t\t\theader, see Access-Control-Allow-Origin in the MDN Web Docs.

    ", + "smithy.api#required": {} + } + }, + "AccessControlAllowHeaders": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowHeaders", + "traits": { + "smithy.api#documentation": "

    A list of HTTP header names that CloudFront includes as values for the\n\t\t\t\tAccess-Control-Allow-Headers HTTP response header.

    \n\t\t

    For more information about the Access-Control-Allow-Headers HTTP response\n\t\t\theader, see Access-Control-Allow-Headers in the MDN Web Docs.

    ", + "smithy.api#required": {} + } + }, + "AccessControlAllowMethods": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlAllowMethods", + "traits": { + "smithy.api#documentation": "

    A list of HTTP methods that CloudFront includes as values for the\n\t\t\t\tAccess-Control-Allow-Methods HTTP response header.

    \n\t\t

    For more information about the Access-Control-Allow-Methods HTTP response\n\t\t\theader, see Access-Control-Allow-Methods in the MDN Web Docs.

    ", + "smithy.api#required": {} + } + }, + "AccessControlAllowCredentials": { + "target": "com.amazonaws.cloudfront#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean that CloudFront uses as the value for the Access-Control-Allow-Credentials\n\t\t\tHTTP response header.

    \n\t\t

    For more information about the Access-Control-Allow-Credentials HTTP\n\t\t\tresponse header, see Access-Control-Allow-Credentials in the MDN Web Docs.

    ", + "smithy.api#required": {} + } + }, + "AccessControlExposeHeaders": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyAccessControlExposeHeaders", + "traits": { + "smithy.api#documentation": "

    A list of HTTP headers that CloudFront includes as values for the\n\t\t\t\tAccess-Control-Expose-Headers HTTP response header.

    \n\t\t

    For more information about the Access-Control-Expose-Headers HTTP\n\t\t\tresponse header, see Access-Control-Expose-Headers in the MDN Web Docs.

    " + } + }, + "AccessControlMaxAgeSec": { + "target": "com.amazonaws.cloudfront#integer", + "traits": { + "smithy.api#documentation": "

    A number that CloudFront uses as the value for the Access-Control-Max-Age HTTP\n\t\t\tresponse header.

    \n\t\t

    For more information about the Access-Control-Max-Age HTTP response\n\t\t\theader, see Access-Control-Max-Age in the MDN Web Docs.

    " + } + }, + "OriginOverride": { + "target": "com.amazonaws.cloudfront#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean that determines whether CloudFront overrides HTTP response headers received from the\n\t\t\torigin with the ones specified in this response headers policy.

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

    A configuration for a set of HTTP response headers that are used for cross-origin resource\n\t\t\tsharing (CORS). CloudFront adds these headers to HTTP responses that it sends for CORS\n\t\t\trequests that match a cache behavior associated with this response headers\n\t\t\tpolicy.

    \n\t\t

    For more information about CORS, see Cross-Origin Resource\n\t\t\t\tSharing (CORS) in the MDN Web Docs.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyCustomHeader": { + "type": "structure", + "members": { + "Header": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The HTTP response header name.

    ", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The value for the HTTP response header.

    ", + "smithy.api#required": {} + } + }, + "Override": { + "target": "com.amazonaws.cloudfront#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean that determines whether CloudFront overrides a response header with the same name\n\t\t\treceived from the origin with the header specified here.

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

    An HTTP response header name and its value. CloudFront includes this header in HTTP responses that\n\t\t\tit sends for requests that match a cache behavior that’s associated with this response\n\t\t\theaders policy.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyCustomHeaderList": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyCustomHeader", + "traits": { + "smithy.api#xmlName": "ResponseHeadersPolicyCustomHeader" + } + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyCustomHeadersConfig": { + "type": "structure", + "members": { + "Quantity": { + "target": "com.amazonaws.cloudfront#integer", + "traits": { + "smithy.api#documentation": "

    The number of HTTP response headers in the list.

    ", + "smithy.api#required": {} + } + }, + "Items": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyCustomHeaderList", + "traits": { + "smithy.api#documentation": "

    The list of HTTP response headers and their values.

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

    A list of HTTP response header names and their values. CloudFront includes these headers in HTTP\n\t\t\tresponses that it sends for requests that match a cache behavior that’s associated with\n\t\t\tthis response headers policy.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyFrameOptions": { + "type": "structure", + "members": { + "Override": { + "target": "com.amazonaws.cloudfront#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean that determines whether CloudFront overrides the X-Frame-Options HTTP\n\t\t\tresponse header received from the origin with the one specified in this response headers\n\t\t\tpolicy.

    ", + "smithy.api#required": {} + } + }, + "FrameOption": { + "target": "com.amazonaws.cloudfront#FrameOptionsList", + "traits": { + "smithy.api#documentation": "

    The value of the X-Frame-Options HTTP response header. Valid values are\n\t\t\t\tDENY and SAMEORIGIN.

    \n\t\t

    For more information about these values, see X-Frame-Options in the MDN Web Docs.

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

    Determines whether CloudFront includes the X-Frame-Options HTTP response header and\n\t\t\tthe header’s value.

    \n\t\t

    For more information about the X-Frame-Options HTTP response header, see\n\t\t\t\tX-Frame-Options in the MDN Web Docs.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyInUse": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudfront#string" + } + }, + "traits": { + "smithy.api#documentation": "

    Cannot delete the response headers policy because it is attached to one or more cache\n\t\t\tbehaviors in a CloudFront distribution.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyList": { + "type": "structure", + "members": { + "NextMarker": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    If there are more items in the list than are in this response, this element is present. It\n\t\t\tcontains the value that you should use in the Marker field of a subsequent\n\t\t\trequest to continue listing response headers policies where you left off.

    " + } + }, + "MaxItems": { + "target": "com.amazonaws.cloudfront#integer", + "traits": { + "smithy.api#documentation": "

    The maximum number of response headers policies requested.

    ", + "smithy.api#required": {} + } + }, + "Quantity": { + "target": "com.amazonaws.cloudfront#integer", + "traits": { + "smithy.api#documentation": "

    The number of response headers policies returned.

    ", + "smithy.api#required": {} + } + }, + "Items": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicySummaryList", + "traits": { + "smithy.api#documentation": "

    The response headers policies in the list.

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

    A list of response headers policies.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyReferrerPolicy": { + "type": "structure", + "members": { + "Override": { + "target": "com.amazonaws.cloudfront#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean that determines whether CloudFront overrides the Referrer-Policy HTTP\n\t\t\tresponse header received from the origin with the one specified in this response headers\n\t\t\tpolicy.

    ", + "smithy.api#required": {} + } + }, + "ReferrerPolicy": { + "target": "com.amazonaws.cloudfront#ReferrerPolicyList", + "traits": { + "smithy.api#documentation": "

    The value of the Referrer-Policy HTTP response header. Valid values\n\t\t\tare:

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

      \n no-referrer\n

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

      \n no-referrer-when-downgrade\n

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

      \n origin\n

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

      \n origin-when-cross-origin\n

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

      \n same-origin\n

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

      \n strict-origin\n

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

      \n strict-origin-when-cross-origin\n

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

      \n unsafe-url\n

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

    For more information about these values, see Referrer-Policy in the MDN Web Docs.

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

    Determines whether CloudFront includes the Referrer-Policy HTTP response header and\n\t\t\tthe header’s value.

    \n\t\t

    For more information about the Referrer-Policy HTTP response header, see\n\t\t\t\tReferrer-Policy in the MDN Web Docs.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicySecurityHeadersConfig": { + "type": "structure", + "members": { + "XSSProtection": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyXSSProtection", + "traits": { + "smithy.api#documentation": "

    Determines whether CloudFront includes the X-XSS-Protection HTTP response header and\n\t\t\tthe header’s value.

    \n\t\t

    For more information about the X-XSS-Protection HTTP response header, see\n\t\t\tX-XSS-Protection in the MDN Web Docs.

    " + } + }, + "FrameOptions": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyFrameOptions", + "traits": { + "smithy.api#documentation": "

    Determines whether CloudFront includes the X-Frame-Options HTTP response header and\n\t\t\tthe header’s value.

    \n\t\t

    For more information about the X-Frame-Options HTTP response header, see\n\t\t\tX-Frame-Options in the MDN Web Docs.

    " + } + }, + "ReferrerPolicy": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyReferrerPolicy", + "traits": { + "smithy.api#documentation": "

    Determines whether CloudFront includes the Referrer-Policy HTTP response header and\n\t\t\tthe header’s value.

    \n\t\t

    For more information about the Referrer-Policy HTTP response header, see\n\t\t\tReferrer-Policy in the MDN Web Docs.

    " + } + }, + "ContentSecurityPolicy": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyContentSecurityPolicy", + "traits": { + "smithy.api#documentation": "

    The policy directives and their values that CloudFront includes as values for the\n\t\t\t\tContent-Security-Policy HTTP response header.

    \n\t\t

    For more information about the Content-Security-Policy HTTP response\n\t\t\theader, see Content-Security-Policy in the MDN Web Docs.

    " + } + }, + "ContentTypeOptions": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyContentTypeOptions", + "traits": { + "smithy.api#documentation": "

    Determines whether CloudFront includes the X-Content-Type-Options HTTP response\n\t\t\theader with its value set to nosniff.

    \n\t\t

    For more information about the X-Content-Type-Options HTTP response\n\t\t\theader, see X-Content-Type-Options in the MDN Web Docs.

    " + } + }, + "StrictTransportSecurity": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity", + "traits": { + "smithy.api#documentation": "

    Determines whether CloudFront includes the Strict-Transport-Security HTTP response\n\t\t\theader and the header’s value.

    \n\t\t

    For more information about the Strict-Transport-Security HTTP response\n\t\t\theader, see Strict-Transport-Security in the MDN Web Docs.

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

    A configuration for a set of security-related HTTP response headers. CloudFront adds these headers\n\t\t\tto HTTP responses that it sends for requests that match a cache behavior associated with\n\t\t\tthis response headers policy.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyStrictTransportSecurity": { + "type": "structure", + "members": { + "Override": { + "target": "com.amazonaws.cloudfront#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean that determines whether CloudFront overrides the Strict-Transport-Security\n\t\t\tHTTP response header received from the origin with the one specified in this response\n\t\t\theaders policy.

    ", + "smithy.api#required": {} + } + }, + "IncludeSubdomains": { + "target": "com.amazonaws.cloudfront#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean that determines whether CloudFront includes the includeSubDomains directive\n\t\t\tin the Strict-Transport-Security HTTP response header.

    " + } + }, + "Preload": { + "target": "com.amazonaws.cloudfront#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean that determines whether CloudFront includes the preload directive in the\n\t\t\tStrict-Transport-Security HTTP response header.

    " + } + }, + "AccessControlMaxAgeSec": { + "target": "com.amazonaws.cloudfront#integer", + "traits": { + "smithy.api#documentation": "

    A number that CloudFront uses as the value for the max-age directive in the\n\t\t\t\tStrict-Transport-Security HTTP response header.

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

    Determines whether CloudFront includes the Strict-Transport-Security HTTP response\n\t\t\theader and the header’s value.

    \n\t\t

    For more information about the Strict-Transport-Security HTTP response\n\t\t\theader, see Strict-Transport-Security in the MDN Web Docs.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicySummary": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyType", + "traits": { + "smithy.api#documentation": "

    The type of response headers policy, either managed (created by Amazon Web Services) or\n\t\t\t\tcustom (created in this Amazon Web Services account).

    ", + "smithy.api#required": {} + } + }, + "ResponseHeadersPolicy": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicy", + "traits": { + "smithy.api#documentation": "

    The response headers policy.

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

    Contains a response headers policy.

    " + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicySummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicySummary", + "traits": { + "smithy.api#xmlName": "ResponseHeadersPolicySummary" + } + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "managed", + "name": "managed" + }, + { + "value": "custom", + "name": "custom" + } + ] + } + }, + "com.amazonaws.cloudfront#ResponseHeadersPolicyXSSProtection": { + "type": "structure", + "members": { + "Override": { + "target": "com.amazonaws.cloudfront#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean that determines whether CloudFront overrides the X-XSS-Protection HTTP\n\t\t\tresponse header received from the origin with the one specified in this response headers\n\t\t\tpolicy.

    ", + "smithy.api#required": {} + } + }, + "Protection": { + "target": "com.amazonaws.cloudfront#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean that determines the value of the X-XSS-Protection HTTP response\n\t\t\theader. When this setting is true, the value of the\n\t\t\tX-XSS-Protection header is 1. When this setting is\n\t\t\tfalse, the value of the X-XSS-Protection header is\n\t\t\t0.

    \n\t\t

    For more information about these settings, see X-XSS-Protection in the MDN Web Docs.

    ", + "smithy.api#required": {} + } + }, + "ModeBlock": { + "target": "com.amazonaws.cloudfront#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean that determines whether CloudFront includes the mode=block directive in the\n\t\t\tX-XSS-Protection header.

    \n\t\t

    For more information about this directive, see X-XSS-Protection in the MDN Web Docs.

    " + } + }, + "ReportUri": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    A reporting URI, which CloudFront uses as the value of the report directive in the\n\t\t\tX-XSS-Protection header.

    \n\t\t

    You cannot specify a ReportUri when ModeBlock is\n\t\t\ttrue.

    \n\t\t

    For more information about using a reporting URL, see X-XSS-Protection in the MDN Web Docs.

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

    Determines whether CloudFront includes the X-XSS-Protection HTTP response header and\n\t\t\tthe header’s value.

    \n\t\t

    For more information about the X-XSS-Protection HTTP response header, see\n\t\t\t\tX-XSS-Protection in the MDN Web Docs.

    " + } + }, "com.amazonaws.cloudfront#Restrictions": { "type": "structure", "members": { @@ -10395,7 +11530,7 @@ "AwsAccountNumber": { "target": "com.amazonaws.cloudfront#string", "traits": { - "smithy.api#documentation": "

    An account number that contains active CloudFront key pairs that CloudFront can use to verify the\n\t\t\tsignatures of signed URLs and signed cookies. If the account that owns the key pairs\n\t\t\tis the same account that owns the CloudFront distribution, the value of this field is\n\t\t\tself.

    " + "smithy.api#documentation": "

    An Amazon Web Services account number that contains active CloudFront key pairs that CloudFront can use to verify the\n\t\t\tsignatures of signed URLs and signed cookies. If the Amazon Web Services account that owns the key pairs\n\t\t\tis the same account that owns the CloudFront distribution, the value of this field is\n\t\t\tself.

    " } }, "KeyPairIds": { @@ -10406,7 +11541,7 @@ } }, "traits": { - "smithy.api#documentation": "

    A list of accounts and the active CloudFront key pairs in each account that CloudFront can use to\n\t\t\tverify the signatures of signed URLs and signed cookies.

    " + "smithy.api#documentation": "

    A list of Amazon Web Services accounts and the active CloudFront key pairs in each account that CloudFront can use to\n\t\t\tverify the signatures of signed URLs and signed cookies.

    " } }, "com.amazonaws.cloudfront#SignerList": { @@ -10500,7 +11635,7 @@ "ARN": { "target": "com.amazonaws.cloudfront#string", "traits": { - "smithy.api#documentation": "

    The ARN (Amazon Resource Name) for the distribution. For example: \n\t\t\tarn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where \n\t\t\t123456789012 is your account ID.

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

    The ARN (Amazon Resource Name) for the distribution. For example: \n\t\t\tarn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where \n\t\t\t123456789012 is your Amazon Web Services account ID.

    ", "smithy.api#required": {} } }, @@ -10527,7 +11662,7 @@ "ActiveTrustedSigners": { "target": "com.amazonaws.cloudfront#ActiveTrustedSigners", "traits": { - "smithy.api#documentation": "

    A complex type that lists the accounts, if any, that you included in the \n\t\t\t\tTrustedSigners complex type for this distribution. These are the accounts that \n\t\t\tyou want to allow to create signed URLs for private content.

    \n\t\t

    The Signer complex type lists the account number of the trusted \n\t\t\tsigner or self if the signer is the account that created the distribution. \n\t\t\tThe Signer element also includes the IDs of any active CloudFront key pairs that are \n\t\t\tassociated with the trusted signer's account. If no KeyPairId element \n\t\t\tappears for a Signer, that signer can't create signed URLs.

    \n\t\t

    For more information, see Serving Private \n\t\t\t\tContent through CloudFront in the Amazon CloudFront Developer Guide.

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

    A complex type that lists the Amazon Web Services accounts, if any, that you included in the \n\t\t\t\tTrustedSigners complex type for this distribution. These are the accounts that \n\t\t\tyou want to allow to create signed URLs for private content.

    \n\t\t

    The Signer complex type lists the Amazon Web Services account number of the trusted \n\t\t\tsigner or self if the signer is the Amazon Web Services account that created the distribution. \n\t\t\tThe Signer element also includes the IDs of any active CloudFront key pairs that are \n\t\t\tassociated with the trusted signer's Amazon Web Services account. If no KeyPairId element \n\t\t\tappears for a Signer, that signer can't create signed URLs.

    \n\t\t

    For more information, see Serving Private \n\t\t\t\tContent through CloudFront in the Amazon CloudFront Developer Guide.

    ", "smithy.api#required": {} } }, @@ -10595,7 +11730,7 @@ "TrustedSigners": { "target": "com.amazonaws.cloudfront#TrustedSigners", "traits": { - "smithy.api#documentation": "

    A complex type that specifies any accounts that you want to permit to create signed \n\t\t\tURLs for private content. If you want the distribution to use signed URLs, include this \n\t\t\telement; if you want the distribution to use public URLs, remove this element. For more \n\t\t\tinformation, see Serving Private Content through \n\t\t\t\tCloudFront in the Amazon CloudFront Developer Guide.

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

    A complex type that specifies any Amazon Web Services accounts that you want to permit to create signed \n\t\t\tURLs for private content. If you want the distribution to use signed URLs, include this \n\t\t\telement; if you want the distribution to use public URLs, remove this element. For more \n\t\t\tinformation, see Serving Private Content through \n\t\t\t\tCloudFront in the Amazon CloudFront Developer Guide.

    ", "smithy.api#required": {} } }, @@ -10672,14 +11807,14 @@ "Quantity": { "target": "com.amazonaws.cloudfront#integer", "traits": { - "smithy.api#documentation": "

    The number of streaming distributions that were created by the current account. \n\t\t

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

    The number of streaming distributions that were created by the current Amazon Web Services account. \n\t\t

    ", "smithy.api#required": {} } }, "Items": { "target": "com.amazonaws.cloudfront#StreamingDistributionSummaryList", "traits": { - "smithy.api#documentation": "

    A complex type that contains one StreamingDistributionSummary element for \n\t\t\teach distribution that was created by the current account.

    " + "smithy.api#documentation": "

    A complex type that contains one StreamingDistributionSummary element for \n\t\t\teach distribution that was created by the current Amazon Web Services account.

    " } } }, @@ -10713,7 +11848,7 @@ "ARN": { "target": "com.amazonaws.cloudfront#string", "traits": { - "smithy.api#documentation": "

    The ARN (Amazon Resource Name) for the streaming distribution. For example: \n\t\t\t\tarn:aws:cloudfront::123456789012:streaming-distribution/EDFDVBD632BHDS5, where \n\t\t\t\t123456789012 is your account ID.

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

    The ARN (Amazon Resource Name) for the streaming distribution. For example: \n\t\t\t\tarn:aws:cloudfront::123456789012:streaming-distribution/EDFDVBD632BHDS5, where \n\t\t\t\t123456789012 is your Amazon Web Services account ID.

    ", "smithy.api#required": {} } }, @@ -10755,7 +11890,7 @@ "TrustedSigners": { "target": "com.amazonaws.cloudfront#TrustedSigners", "traits": { - "smithy.api#documentation": "

    A complex type that specifies the accounts, if any, that you want to allow to \n\t\t\tcreate signed URLs for private content. If you want to require signed URLs in requests for \n\t\t\tobjects in the target origin that match the PathPattern for this cache behavior, \n\t\t\tspecify true for Enabled, and specify the applicable values for \n\t\t\t\tQuantity and Items.If you don't want to require signed URLs in \n\t\t\trequests for objects that match PathPattern, specify false for \n\t\t\t\tEnabled and 0 for Quantity. Omit Items. \n\t\t\tTo add, change, or remove one or more trusted signers, change Enabled to \n\t\t\t\ttrue (if it's currently false), change Quantity as \n\t\t\tapplicable, and specify all of the trusted signers that you want to include in the updated \n\t\t\tdistribution.

    \n\t\t

    For more information, see Serving Private \n\t\t\tContent through CloudFront in the Amazon CloudFront Developer Guide.

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

    A complex type that specifies the Amazon Web Services accounts, if any, that you want to allow to \n\t\t\tcreate signed URLs for private content. If you want to require signed URLs in requests for \n\t\t\tobjects in the target origin that match the PathPattern for this cache behavior, \n\t\t\tspecify true for Enabled, and specify the applicable values for \n\t\t\t\tQuantity and Items.If you don't want to require signed URLs in \n\t\t\trequests for objects that match PathPattern, specify false for \n\t\t\t\tEnabled and 0 for Quantity. Omit Items. \n\t\t\tTo add, change, or remove one or more trusted signers, change Enabled to \n\t\t\t\ttrue (if it's currently false), change Quantity as \n\t\t\tapplicable, and specify all of the trusted signers that you want to include in the updated \n\t\t\tdistribution.

    \n\t\t

    For more information, see Serving Private \n\t\t\tContent through CloudFront in the Amazon CloudFront Developer Guide.

    ", "smithy.api#required": {} } }, @@ -11079,13 +12214,13 @@ } }, "FunctionErrorMessage": { - "target": "com.amazonaws.cloudfront#string", + "target": "com.amazonaws.cloudfront#sensitiveStringType", "traits": { "smithy.api#documentation": "

    If the result of testing the function was an error, this field contains the error\n\t\t\tmessage.

    " } }, "FunctionOutput": { - "target": "com.amazonaws.cloudfront#string", + "target": "com.amazonaws.cloudfront#sensitiveStringType", "traits": { "smithy.api#documentation": "

    The event object returned by the function. For more information about the structure of the\n\t\t\tevent object, see Event object\n\t\t\tstructure in the Amazon CloudFront Developer Guide.

    " } @@ -11116,7 +12251,7 @@ } }, "traits": { - "smithy.api#documentation": "

    You have reached the maximum number of cache policies for this account. For more\n\t\t\tinformation, see Quotas (formerly known as limits) in the\n\t\t\tAmazon CloudFront Developer Guide.

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

    You have reached the maximum number of cache policies for this Amazon Web Services account. For more\n\t\t\tinformation, see Quotas (formerly known as limits) in the\n\t\t\tAmazon CloudFront Developer Guide.

    ", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -11186,6 +12321,19 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.cloudfront#TooManyCustomHeadersInResponseHeadersPolicy": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudfront#string" + } + }, + "traits": { + "smithy.api#documentation": "

    The number of custom headers in the response headers policy exceeds the maximum.

    \n\t\t

    For more information, see Quotas (formerly known as limits) in the\n\t\t\t\tAmazon CloudFront Developer Guide.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, "com.amazonaws.cloudfront#TooManyDistributionCNAMEs": { "type": "structure", "members": { @@ -11264,6 +12412,19 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.cloudfront#TooManyDistributionsAssociatedToResponseHeadersPolicy": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudfront#string" + } + }, + "traits": { + "smithy.api#documentation": "

    The maximum number of distributions have been associated with the specified response headers\n\t\t\tpolicy.

    \n\t\t

    For more information, see Quotas (formerly known as limits) in the\n\t\t\t\tAmazon CloudFront Developer Guide.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, "com.amazonaws.cloudfront#TooManyDistributionsWithFunctionAssociations": { "type": "structure", "members": { @@ -11402,7 +12563,7 @@ } }, "traits": { - "smithy.api#documentation": "

    You have reached the maximum number of CloudFront functions for this account. For more\n\t\t\tinformation, see Quotas (formerly known as limits) in the\n\t\t\tAmazon CloudFront Developer Guide.

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

    You have reached the maximum number of CloudFront functions for this Amazon Web Services account. For more\n\t\t\tinformation, see Quotas (formerly known as limits) in the\n\t\t\tAmazon CloudFront Developer Guide.

    ", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -11467,7 +12628,7 @@ } }, "traits": { - "smithy.api#documentation": "

    You have reached the maximum number of key groups for this account. For more\n\t\t\tinformation, see Quotas (formerly known as limits) in the\n\t\t\tAmazon CloudFront Developer Guide.

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

    You have reached the maximum number of key groups for this Amazon Web Services account. For more\n\t\t\tinformation, see Quotas (formerly known as limits) in the\n\t\t\tAmazon CloudFront Developer Guide.

    ", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -11532,7 +12693,7 @@ } }, "traits": { - "smithy.api#documentation": "

    You have reached the maximum number of origin request policies for this account.\n\t\t\tFor more information, see Quotas (formerly known as limits) in the\n\t\t\tAmazon CloudFront Developer Guide.

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

    You have reached the maximum number of origin request policies for this Amazon Web Services account.\n\t\t\tFor more information, see Quotas (formerly known as limits) in the\n\t\t\tAmazon CloudFront Developer Guide.

    ", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -11623,7 +12784,20 @@ } }, "traits": { - "smithy.api#documentation": "

    You have reached the maximum number of real-time log configurations for this account.\n\t\t\tFor more information, see Quotas (formerly known as limits) in the\n\t\t\tAmazon CloudFront Developer Guide.

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

    You have reached the maximum number of real-time log configurations for this Amazon Web Services account.\n\t\t\tFor more information, see Quotas (formerly known as limits) in the\n\t\t\tAmazon CloudFront Developer Guide.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.cloudfront#TooManyResponseHeadersPolicies": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.cloudfront#string" + } + }, + "traits": { + "smithy.api#documentation": "

    You have reached the maximum number of response headers policies for this\n\t\t\tAmazon Web Services account.

    \n\t\t

    For more information, see Quotas (formerly known as limits) in the\n\t\t\t\tAmazon CloudFront Developer Guide.

    ", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -11736,26 +12910,26 @@ "Enabled": { "target": "com.amazonaws.cloudfront#boolean", "traits": { - "smithy.api#documentation": "

    This field is true if any of the accounts have public keys that CloudFront can\n\t\t\tuse to verify the signatures of signed URLs and signed cookies. If not, this field is\n\t\t\tfalse.

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

    This field is true if any of the Amazon Web Services accounts have public keys that CloudFront can\n\t\t\tuse to verify the signatures of signed URLs and signed cookies. If not, this field is\n\t\t\tfalse.

    ", "smithy.api#required": {} } }, "Quantity": { "target": "com.amazonaws.cloudfront#integer", "traits": { - "smithy.api#documentation": "

    The number of accounts in the list.

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

    The number of Amazon Web Services accounts in the list.

    ", "smithy.api#required": {} } }, "Items": { "target": "com.amazonaws.cloudfront#AwsAccountNumberList", "traits": { - "smithy.api#documentation": "

    A list of account identifiers.

    " + "smithy.api#documentation": "

    A list of Amazon Web Services account identifiers.

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

    A list of accounts whose public keys CloudFront can use to verify the signatures of signed\n\t\t\tURLs and signed cookies.

    " + "smithy.api#documentation": "

    A list of Amazon Web Services accounts whose public keys CloudFront can use to verify the signatures of signed\n\t\t\tURLs and signed cookies.

    " } }, "com.amazonaws.cloudfront#UnsupportedOperation": { @@ -11879,6 +13053,15 @@ "com.amazonaws.cloudfront#UpdateCachePolicyRequest": { "type": "structure", "members": { + "CachePolicyConfig": { + "target": "com.amazonaws.cloudfront#CachePolicyConfig", + "traits": { + "smithy.api#documentation": "

    A cache policy configuration.

    ", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "CachePolicyConfig" + } + }, "Id": { "target": "com.amazonaws.cloudfront#string", "traits": { @@ -11893,15 +13076,6 @@ "smithy.api#documentation": "

    The version of the cache policy that you are updating. The version is returned in the cache\n\t\t\tpolicy’s ETag field in the response to\n\t\t\tGetCachePolicyConfig.

    ", "smithy.api#httpHeader": "If-Match" } - }, - "CachePolicyConfig": { - "target": "com.amazonaws.cloudfront#CachePolicyConfig", - "traits": { - "smithy.api#documentation": "

    A cache policy configuration.

    ", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "CachePolicyConfig" - } } } }, @@ -11970,6 +13144,15 @@ "com.amazonaws.cloudfront#UpdateCloudFrontOriginAccessIdentityRequest": { "type": "structure", "members": { + "CloudFrontOriginAccessIdentityConfig": { + "target": "com.amazonaws.cloudfront#CloudFrontOriginAccessIdentityConfig", + "traits": { + "smithy.api#documentation": "

    The identity's configuration information.

    ", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "CloudFrontOriginAccessIdentityConfig" + } + }, "Id": { "target": "com.amazonaws.cloudfront#string", "traits": { @@ -11984,15 +13167,6 @@ "smithy.api#documentation": "

    The value of the ETag header that you received when retrieving the \n\t\t\tidentity's configuration. For example: E2QWRUHAPOMQZL.

    ", "smithy.api#httpHeader": "If-Match" } - }, - "CloudFrontOriginAccessIdentityConfig": { - "target": "com.amazonaws.cloudfront#CloudFrontOriginAccessIdentityConfig", - "traits": { - "smithy.api#documentation": "

    The identity's configuration information.

    ", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "CloudFrontOriginAccessIdentityConfig" - } } }, "traits": { @@ -12129,6 +13303,9 @@ { "target": "com.amazonaws.cloudfront#NoSuchRealtimeLogConfig" }, + { + "target": "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy" + }, { "target": "com.amazonaws.cloudfront#PreconditionFailed" }, @@ -12159,6 +13336,9 @@ { "target": "com.amazonaws.cloudfront#TooManyDistributionsAssociatedToOriginRequestPolicy" }, + { + "target": "com.amazonaws.cloudfront#TooManyDistributionsAssociatedToResponseHeadersPolicy" + }, { "target": "com.amazonaws.cloudfront#TooManyDistributionsWithFunctionAssociations" }, @@ -12214,6 +13394,15 @@ "com.amazonaws.cloudfront#UpdateDistributionRequest": { "type": "structure", "members": { + "DistributionConfig": { + "target": "com.amazonaws.cloudfront#DistributionConfig", + "traits": { + "smithy.api#documentation": "

    The distribution's configuration information.

    ", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "DistributionConfig" + } + }, "Id": { "target": "com.amazonaws.cloudfront#string", "traits": { @@ -12228,15 +13417,6 @@ "smithy.api#documentation": "

    The value of the ETag header that you received when retrieving the \n\t\t\tdistribution's configuration. For example: E2QWRUHAPOMQZL.

    ", "smithy.api#httpHeader": "If-Match" } - }, - "DistributionConfig": { - "target": "com.amazonaws.cloudfront#DistributionConfig", - "traits": { - "smithy.api#documentation": "

    The distribution's configuration information.

    ", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "DistributionConfig" - } } }, "traits": { @@ -12320,6 +13500,15 @@ "com.amazonaws.cloudfront#UpdateFieldLevelEncryptionConfigRequest": { "type": "structure", "members": { + "FieldLevelEncryptionConfig": { + "target": "com.amazonaws.cloudfront#FieldLevelEncryptionConfig", + "traits": { + "smithy.api#documentation": "

    Request to update a field-level encryption configuration.

    ", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "FieldLevelEncryptionConfig" + } + }, "Id": { "target": "com.amazonaws.cloudfront#string", "traits": { @@ -12334,15 +13523,6 @@ "smithy.api#documentation": "

    The value of the ETag header that you received when retrieving the configuration identity to update. \n\t\t\tFor example: E2QWRUHAPOMQZL.

    ", "smithy.api#httpHeader": "If-Match" } - }, - "FieldLevelEncryptionConfig": { - "target": "com.amazonaws.cloudfront#FieldLevelEncryptionConfig", - "traits": { - "smithy.api#documentation": "

    Request to update a field-level encryption configuration.

    ", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "FieldLevelEncryptionConfig" - } } } }, @@ -12423,6 +13603,15 @@ "com.amazonaws.cloudfront#UpdateFieldLevelEncryptionProfileRequest": { "type": "structure", "members": { + "FieldLevelEncryptionProfileConfig": { + "target": "com.amazonaws.cloudfront#FieldLevelEncryptionProfileConfig", + "traits": { + "smithy.api#documentation": "

    Request to update a field-level encryption profile.

    ", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "FieldLevelEncryptionProfileConfig" + } + }, "Id": { "target": "com.amazonaws.cloudfront#string", "traits": { @@ -12437,15 +13626,6 @@ "smithy.api#documentation": "

    The value of the ETag header that you received when retrieving the profile identity to update. \n\t\t\tFor example: E2QWRUHAPOMQZL.

    ", "smithy.api#httpHeader": "If-Match" } - }, - "FieldLevelEncryptionProfileConfig": { - "target": "com.amazonaws.cloudfront#FieldLevelEncryptionProfileConfig", - "traits": { - "smithy.api#documentation": "

    Request to update a field-level encryption profile.

    ", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "FieldLevelEncryptionProfileConfig" - } } } }, @@ -12599,6 +13779,15 @@ "com.amazonaws.cloudfront#UpdateKeyGroupRequest": { "type": "structure", "members": { + "KeyGroupConfig": { + "target": "com.amazonaws.cloudfront#KeyGroupConfig", + "traits": { + "smithy.api#documentation": "

    The key group configuration.

    ", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "KeyGroupConfig" + } + }, "Id": { "target": "com.amazonaws.cloudfront#string", "traits": { @@ -12613,15 +13802,6 @@ "smithy.api#documentation": "

    The version of the key group that you are updating. The version is the key group’s\n\t\t\tETag value.

    ", "smithy.api#httpHeader": "If-Match" } - }, - "KeyGroupConfig": { - "target": "com.amazonaws.cloudfront#KeyGroupConfig", - "traits": { - "smithy.api#documentation": "

    The key group configuration.

    ", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "KeyGroupConfig" - } } } }, @@ -12699,6 +13879,15 @@ "com.amazonaws.cloudfront#UpdateOriginRequestPolicyRequest": { "type": "structure", "members": { + "OriginRequestPolicyConfig": { + "target": "com.amazonaws.cloudfront#OriginRequestPolicyConfig", + "traits": { + "smithy.api#documentation": "

    An origin request policy configuration.

    ", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "OriginRequestPolicyConfig" + } + }, "Id": { "target": "com.amazonaws.cloudfront#string", "traits": { @@ -12713,15 +13902,6 @@ "smithy.api#documentation": "

    The version of the origin request policy that you are updating. The version is returned in\n\t\t\tthe origin request policy’s ETag field in the response to\n\t\t\tGetOriginRequestPolicyConfig.

    ", "smithy.api#httpHeader": "If-Match" } - }, - "OriginRequestPolicyConfig": { - "target": "com.amazonaws.cloudfront#OriginRequestPolicyConfig", - "traits": { - "smithy.api#documentation": "

    An origin request policy configuration.

    ", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "OriginRequestPolicyConfig" - } } } }, @@ -12787,6 +13967,15 @@ "com.amazonaws.cloudfront#UpdatePublicKeyRequest": { "type": "structure", "members": { + "PublicKeyConfig": { + "target": "com.amazonaws.cloudfront#PublicKeyConfig", + "traits": { + "smithy.api#documentation": "

    A public key configuration.

    ", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "PublicKeyConfig" + } + }, "Id": { "target": "com.amazonaws.cloudfront#string", "traits": { @@ -12801,15 +13990,6 @@ "smithy.api#documentation": "

    The value of the ETag header that you received when retrieving the public key to update. \n\t\t\tFor example: E2QWRUHAPOMQZL.

    ", "smithy.api#httpHeader": "If-Match" } - }, - "PublicKeyConfig": { - "target": "com.amazonaws.cloudfront#PublicKeyConfig", - "traits": { - "smithy.api#documentation": "

    A public key configuration.

    ", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "PublicKeyConfig" - } } } }, @@ -12906,6 +14086,100 @@ } } }, + "com.amazonaws.cloudfront#UpdateResponseHeadersPolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudfront#UpdateResponseHeadersPolicyRequest" + }, + "output": { + "target": "com.amazonaws.cloudfront#UpdateResponseHeadersPolicyResult" + }, + "errors": [ + { + "target": "com.amazonaws.cloudfront#AccessDenied" + }, + { + "target": "com.amazonaws.cloudfront#IllegalUpdate" + }, + { + "target": "com.amazonaws.cloudfront#InconsistentQuantities" + }, + { + "target": "com.amazonaws.cloudfront#InvalidArgument" + }, + { + "target": "com.amazonaws.cloudfront#InvalidIfMatchVersion" + }, + { + "target": "com.amazonaws.cloudfront#NoSuchResponseHeadersPolicy" + }, + { + "target": "com.amazonaws.cloudfront#PreconditionFailed" + }, + { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyAlreadyExists" + }, + { + "target": "com.amazonaws.cloudfront#TooManyCustomHeadersInResponseHeadersPolicy" + } + ], + "traits": { + "smithy.api#documentation": "

    Updates a response headers policy.

    \n\t\t

    When you update a response headers policy, the entire policy is replaced. You cannot\n\t\t\tupdate some policy fields independent of others. To update a response headers policy\n\t\t\tconfiguration:

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

      Use GetResponseHeadersPolicyConfig to get the current policy’s\n\t\t\t\t\tconfiguration.

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

      Modify the fields in the response headers policy configuration that you want\n\t\t\t\t\tto update.

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

      Call UpdateResponseHeadersPolicy, providing the entire response\n\t\t\t\t\theaders policy configuration, including the fields that you modified and those\n\t\t\t\t\tthat you didn’t.

      \n\t\t\t
    6. \n
    ", + "smithy.api#http": { + "method": "PUT", + "uri": "/2020-05-31/response-headers-policy/{Id}", + "code": 200 + } + } + }, + "com.amazonaws.cloudfront#UpdateResponseHeadersPolicyRequest": { + "type": "structure", + "members": { + "ResponseHeadersPolicyConfig": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicyConfig", + "traits": { + "smithy.api#documentation": "

    A response headers policy configuration.

    ", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "ResponseHeadersPolicyConfig" + } + }, + "Id": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The identifier for the response headers policy that you are updating.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "IfMatch": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The version of the response headers policy that you are updating.

    \n\t\t

    The version is returned in the cache policy’s ETag field in the response\n\t\t\tto GetResponseHeadersPolicyConfig.

    ", + "smithy.api#httpHeader": "If-Match" + } + } + } + }, + "com.amazonaws.cloudfront#UpdateResponseHeadersPolicyResult": { + "type": "structure", + "members": { + "ResponseHeadersPolicy": { + "target": "com.amazonaws.cloudfront#ResponseHeadersPolicy", + "traits": { + "smithy.api#documentation": "

    A response headers policy.

    ", + "smithy.api#httpPayload": {} + } + }, + "ETag": { + "target": "com.amazonaws.cloudfront#string", + "traits": { + "smithy.api#documentation": "

    The current version of the response headers policy.

    ", + "smithy.api#httpHeader": "ETag" + } + } + } + }, "com.amazonaws.cloudfront#UpdateStreamingDistribution": { "type": "operation", "input": { @@ -12967,6 +14241,15 @@ "com.amazonaws.cloudfront#UpdateStreamingDistributionRequest": { "type": "structure", "members": { + "StreamingDistributionConfig": { + "target": "com.amazonaws.cloudfront#StreamingDistributionConfig", + "traits": { + "smithy.api#documentation": "

    The streaming distribution's configuration information.

    ", + "smithy.api#httpPayload": {}, + "smithy.api#required": {}, + "smithy.api#xmlName": "StreamingDistributionConfig" + } + }, "Id": { "target": "com.amazonaws.cloudfront#string", "traits": { @@ -12981,15 +14264,6 @@ "smithy.api#documentation": "

    The value of the ETag header that you received when retrieving the \n\t\t\tstreaming distribution's configuration. For example: E2QWRUHAPOMQZL.

    ", "smithy.api#httpHeader": "If-Match" } - }, - "StreamingDistributionConfig": { - "target": "com.amazonaws.cloudfront#StreamingDistributionConfig", - "traits": { - "smithy.api#documentation": "

    The streaming distribution's configuration information.

    ", - "smithy.api#httpPayload": {}, - "smithy.api#required": {}, - "smithy.api#xmlName": "StreamingDistributionConfig" - } } }, "traits": { @@ -13134,6 +14408,12 @@ "smithy.api#box": {} } }, + "com.amazonaws.cloudfront#sensitiveStringType": { + "type": "string", + "traits": { + "smithy.api#sensitive": {} + } + }, "com.amazonaws.cloudfront#string": { "type": "string" }, diff --git a/codegen/sdk-codegen/aws-models/connect.json b/codegen/sdk-codegen/aws-models/connect.json index b603b4e42739..404ea6942a91 100644 --- a/codegen/sdk-codegen/aws-models/connect.json +++ b/codegen/sdk-codegen/aws-models/connect.json @@ -32,6 +32,23 @@ "com.amazonaws.connect#ARN": { "type": "string" }, + "com.amazonaws.connect#AccessDeniedException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.connect#Message" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "AccessDeniedException", + "httpResponseCode": 403 + }, + "smithy.api#documentation": "

    You do not have sufficient access to perform this action.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, "com.amazonaws.connect#AfterContactWorkTimeLimit": { "type": "integer", "traits": { @@ -106,7 +123,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

    One or more tags.

    " + "smithy.api#documentation": "

    The tags used to organize, track, or control access for this resource.

    " } } }, @@ -249,6 +266,21 @@ }, "com.amazonaws.connect#AmazonConnectService": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Connect", + "arnNamespace": "connect", + "cloudFormationName": "Connect", + "cloudTrailEventSource": "connect.amazonaws.com", + "endpointPrefix": "connect" + }, + "aws.auth#sigv4": { + "name": "connect" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

    Amazon Connect is a cloud-based contact center solution that you use to set up and manage a customer\n contact center and provide reliable customer engagement at any scale.

    \n

    Amazon Connect provides metrics and real-time reporting that enable you to optimize contact routing.\n You can also resolve customer issues more efficiently by getting customers in touch with the\n appropriate agents.

    \n

    There are limits to the number of Amazon Connect resources that you can create. There are also limits\n to the number of requests that you can make per second. For more information, see Amazon Connect\n Service Quotas in the Amazon Connect Administrator Guide.

    \n

    You can\n connect\n programmatically to an Amazon Web Services service by using an endpoint. For a list of Amazon Connect endpoints, see\n Amazon Connect\n Endpoints.

    \n \n

    Working with contact flows? Check out the Amazon Connect Flow language.

    \n
    ", + "smithy.api#title": "Amazon Connect Service" + }, "version": "2017-08-08", "operations": [ { @@ -299,6 +331,9 @@ { "target": "com.amazonaws.connect#CreateRoutingProfile" }, + { + "target": "com.amazonaws.connect#CreateSecurityProfile" + }, { "target": "com.amazonaws.connect#CreateUseCase" }, @@ -320,6 +355,9 @@ { "target": "com.amazonaws.connect#DeleteQuickConnect" }, + { + "target": "com.amazonaws.connect#DeleteSecurityProfile" + }, { "target": "com.amazonaws.connect#DeleteUseCase" }, @@ -356,6 +394,9 @@ { "target": "com.amazonaws.connect#DescribeRoutingProfile" }, + { + "target": "com.amazonaws.connect#DescribeSecurityProfile" + }, { "target": "com.amazonaws.connect#DescribeUser" }, @@ -458,6 +499,9 @@ { "target": "com.amazonaws.connect#ListSecurityKeys" }, + { + "target": "com.amazonaws.connect#ListSecurityProfilePermissions" + }, { "target": "com.amazonaws.connect#ListSecurityProfiles" }, @@ -482,6 +526,9 @@ { "target": "com.amazonaws.connect#StartContactRecording" }, + { + "target": "com.amazonaws.connect#StartContactStreaming" + }, { "target": "com.amazonaws.connect#StartOutboundVoiceContact" }, @@ -494,6 +541,9 @@ { "target": "com.amazonaws.connect#StopContactRecording" }, + { + "target": "com.amazonaws.connect#StopContactStreaming" + }, { "target": "com.amazonaws.connect#SuspendContactRecording" }, @@ -557,6 +607,9 @@ { "target": "com.amazonaws.connect#UpdateRoutingProfileQueues" }, + { + "target": "com.amazonaws.connect#UpdateSecurityProfile" + }, { "target": "com.amazonaws.connect#UpdateUserHierarchy" }, @@ -578,22 +631,7 @@ { "target": "com.amazonaws.connect#UpdateUserSecurityProfiles" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Connect", - "arnNamespace": "connect", - "cloudFormationName": "Connect", - "cloudTrailEventSource": "connect.amazonaws.com", - "endpointPrefix": "connect" - }, - "aws.auth#sigv4": { - "name": "connect" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

    Amazon Connect is a cloud-based contact center solution that you use to set up and manage a customer\n contact center and provide reliable customer engagement at any scale.

    \n

    Amazon Connect provides metrics and real-time reporting that enable you to optimize contact routing.\n You can also resolve customer issues more efficiently by getting customers in touch with the\n appropriate agents.

    \n

    There are limits to the number of Amazon Connect resources that you can create. There are also limits\n to the number of requests that you can make per second. For more information, see Amazon Connect\n Service Quotas in the Amazon Connect Administrator Guide.

    \n

    You can\n connect\n programmatically to an AWS service by using an endpoint. For a list of Amazon Connect endpoints, see\n Amazon Connect\n Endpoints.

    \n \n

    Working with contact flows? Check out the Amazon Connect Flow language.

    \n
    ", - "smithy.api#title": "Amazon Connect Service" - } + ] }, "com.amazonaws.connect#AnswerMachineDetectionConfig": { "type": "structure", @@ -1278,6 +1316,30 @@ "smithy.api#documentation": "

    A chat message.

    " } }, + "com.amazonaws.connect#ChatStreamingConfiguration": { + "type": "structure", + "members": { + "StreamingEndpointArn": { + "target": "com.amazonaws.connect#ChatStreamingEndpointARN", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the standard Amazon SNS topic. The Amazon Resource Name (ARN) of the streaming endpoint that is used\n to publish real-time message streaming for chat conversations.

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

    The streaming configuration, such as the Amazon SNS streaming endpoint.

    " + } + }, + "com.amazonaws.connect#ChatStreamingEndpointARN": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 350 + } + } + }, "com.amazonaws.connect#ClientToken": { "type": "string", "traits": { @@ -1614,7 +1676,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

    One or more tags.

    " + "smithy.api#documentation": "

    The tags used to organize, track, or control access for this resource.

    " } } } @@ -1823,7 +1885,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

    One or more tags.

    " + "smithy.api#documentation": "

    The tags used to organize, track, or control access for this resource.

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

    Creates an AWS resource association with an Amazon Connect instance.

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

    Creates an Amazon Web Services resource association with an Amazon Connect instance.

    ", "smithy.api#http": { "method": "PUT", "uri": "/instance/{InstanceId}/integration-associations", @@ -2020,7 +2082,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

    One or more tags.

    " + "smithy.api#documentation": "

    The tags used to organize, track, or control access for this resource.

    " } } } @@ -2135,7 +2197,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

    One or more tags.

    " + "smithy.api#documentation": "

    The tags used to organize, track, or control access for this resource.

    " } } } @@ -2231,7 +2293,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

    One or more tags.

    " + "smithy.api#documentation": "

    The tags used to organize, track, or control access for this resource.

    " } } } @@ -2363,6 +2425,101 @@ } } }, + "com.amazonaws.connect#CreateSecurityProfile": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#CreateSecurityProfileRequest" + }, + "output": { + "target": "com.amazonaws.connect#CreateSecurityProfileResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#DuplicateResourceException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#LimitExceededException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

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

    \n

    Creates a security profile.

    ", + "smithy.api#http": { + "method": "PUT", + "uri": "/security-profiles/{InstanceId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#CreateSecurityProfileRequest": { + "type": "structure", + "members": { + "SecurityProfileName": { + "target": "com.amazonaws.connect#SecurityProfileName", + "traits": { + "smithy.api#documentation": "

    The name of the security profile.

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

    The description of the security profile.

    " + } + }, + "Permissions": { + "target": "com.amazonaws.connect#PermissionsList", + "traits": { + "smithy.api#documentation": "

    Permissions assigned to the security profile.

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

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

    The tags used to organize, track, or control access for this resource.

    " + } + } + } + }, + "com.amazonaws.connect#CreateSecurityProfileResponse": { + "type": "structure", + "members": { + "SecurityProfileId": { + "target": "com.amazonaws.connect#SecurityProfileId", + "traits": { + "smithy.api#documentation": "

    The identifier for the security profle.

    " + } + }, + "SecurityProfileArn": { + "target": "com.amazonaws.connect#ARN", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) for the security profile.

    " + } + } + } + }, "com.amazonaws.connect#CreateUseCase": { "type": "operation", "input": { @@ -2426,7 +2583,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

    One or more tags.

    " + "smithy.api#documentation": "

    The tags used to organize, track, or control access for this resource.

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

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

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

    Deletes an Amazon Web Services resource 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}", @@ -3030,6 +3187,64 @@ } } }, + "com.amazonaws.connect#DeleteSecurityProfile": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#DeleteSecurityProfileRequest" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceInUseException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

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

    \n

    Deletes a security profile.

    ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/security-profiles/{InstanceId}/{SecurityProfileId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#DeleteSecurityProfileRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

    The identifier for the security profle.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.connect#DeleteUseCase": { "type": "operation", "input": { @@ -3785,6 +4000,72 @@ } } }, + "com.amazonaws.connect#DescribeSecurityProfile": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#DescribeSecurityProfileRequest" + }, + "output": { + "target": "com.amazonaws.connect#DescribeSecurityProfileResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

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

    \n

    Gets basic information about the security profle.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/security-profiles/{InstanceId}/{SecurityProfileId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#DescribeSecurityProfileRequest": { + "type": "structure", + "members": { + "SecurityProfileId": { + "target": "com.amazonaws.connect#SecurityProfileId", + "traits": { + "smithy.api#documentation": "

    The identifier for the security profle.

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

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.connect#DescribeSecurityProfileResponse": { + "type": "structure", + "members": { + "SecurityProfile": { + "target": "com.amazonaws.connect#SecurityProfile", + "traits": { + "smithy.api#documentation": "

    The security profile.

    " + } + } + } + }, "com.amazonaws.connect#DescribeUser": { "type": "operation", "input": { @@ -5472,7 +5753,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

    One or more tags.

    " + "smithy.api#documentation": "

    The tags used to organize, track, or control access for this resource.

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

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

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

    Provides summary information about the Amazon Web Services resource associations for the specified Amazon Connect\n instance.

    ", "smithy.api#http": { "method": "GET", "uri": "/instance/{InstanceId}/integration-associations", @@ -7013,7 +7294,7 @@ "IntegrationType": { "target": "com.amazonaws.connect#IntegrationType", "traits": { - "smithy.api#documentation": "

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

    The type of integration.

    ", "smithy.api#httpQuery": "integrationType" } }, @@ -7125,7 +7406,7 @@ "LambdaFunctions": { "target": "com.amazonaws.connect#FunctionArnsList", "traits": { - "smithy.api#documentation": "

    The Lambdafunction ARNs associated with the specified instance.

    " + "smithy.api#documentation": "

    The Lambda function ARNs associated with the specified instance.

    " } }, "NextToken": { @@ -7858,13 +8139,98 @@ } } }, - "com.amazonaws.connect#ListSecurityKeys": { + "com.amazonaws.connect#ListSecurityKeys": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#ListSecurityKeysRequest" + }, + "output": { + "target": "com.amazonaws.connect#ListSecurityKeysResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

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

    \n

    Returns a paginated list of all security keys associated with the instance.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/instance/{InstanceId}/security-keys", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "SecurityKeys", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.connect#ListSecurityKeysRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

    The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

    ", + "smithy.api#httpQuery": "nextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.connect#MaxResult2", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

    The maximum number of results to return per page.

    ", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.connect#ListSecurityKeysResponse": { + "type": "structure", + "members": { + "SecurityKeys": { + "target": "com.amazonaws.connect#SecurityKeysList", + "traits": { + "smithy.api#documentation": "

    The security keys.

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

    If there are additional results, this is the token for the next set of results.

    " + } + } + } + }, + "com.amazonaws.connect#ListSecurityProfilePermissions": { "type": "operation", "input": { - "target": "com.amazonaws.connect#ListSecurityKeysRequest" + "target": "com.amazonaws.connect#ListSecurityProfilePermissionsRequest" }, "output": { - "target": "com.amazonaws.connect#ListSecurityKeysResponse" + "target": "com.amazonaws.connect#ListSecurityProfilePermissionsResponse" }, "errors": [ { @@ -7884,23 +8250,31 @@ } ], "traits": { - "smithy.api#documentation": "

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

    \n

    Returns a paginated list of all security keys associated with the instance.

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

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

    \n

    Lists the permissions granted to a security profile.

    ", "smithy.api#http": { "method": "GET", - "uri": "/instance/{InstanceId}/security-keys", + "uri": "/security-profiles-permissions/{InstanceId}/{SecurityProfileId}", "code": 200 }, "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", - "items": "SecurityKeys", + "items": "Permissions", "pageSize": "MaxResults" } } }, - "com.amazonaws.connect#ListSecurityKeysRequest": { + "com.amazonaws.connect#ListSecurityProfilePermissionsRequest": { "type": "structure", "members": { + "SecurityProfileId": { + "target": "com.amazonaws.connect#SecurityProfileId", + "traits": { + "smithy.api#documentation": "

    The identifier for the security profle.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, "InstanceId": { "target": "com.amazonaws.connect#InstanceId", "traits": { @@ -7917,7 +8291,7 @@ } }, "MaxResults": { - "target": "com.amazonaws.connect#MaxResult2", + "target": "com.amazonaws.connect#MaxResult1000", "traits": { "smithy.api#box": {}, "smithy.api#documentation": "

    The maximum number of results to return per page.

    ", @@ -7926,13 +8300,13 @@ } } }, - "com.amazonaws.connect#ListSecurityKeysResponse": { + "com.amazonaws.connect#ListSecurityProfilePermissionsResponse": { "type": "structure", "members": { - "SecurityKeys": { - "target": "com.amazonaws.connect#SecurityKeysList", + "Permissions": { + "target": "com.amazonaws.connect#PermissionsList", "traits": { - "smithy.api#documentation": "

    The security keys.

    " + "smithy.api#documentation": "

    The permissions granted to the security profile.

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

    Provides summary information about the security profiles for the specified Amazon Connect\n instance.

    \n

    For more information about security profiles, see Security Profiles in the\n Amazon Connect Administrator Guide.

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

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

    \n

    Provides summary information about the security profiles for the specified Amazon Connect\n instance.

    \n

    For more information about security profiles, see Security Profiles in the\n Amazon Connect Administrator Guide.

    ", "smithy.api#http": { "method": "GET", "uri": "/security-profiles-summary/{InstanceId}", @@ -8579,6 +8953,18 @@ "smithy.api#pattern": "^/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d\\S]{8,64}$/$" } }, + "com.amazonaws.connect#PermissionsList": { + "type": "list", + "member": { + "target": "com.amazonaws.connect#SecurityProfilePermission" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, "com.amazonaws.connect#PhoneNumber": { "type": "string" }, @@ -9811,7 +10197,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

    One or more tags.

    " + "smithy.api#documentation": "

    The tags used to organize, track, or control access for this resource.

    " } } }, @@ -10018,7 +10404,7 @@ "Tags": { "target": "com.amazonaws.connect#TagMap", "traits": { - "smithy.api#documentation": "

    One or more tags.

    " + "smithy.api#documentation": "

    The tags used to organize, track, or control access for this resource.

    " } } }, @@ -10655,6 +11041,59 @@ "target": "com.amazonaws.connect#SecurityKey" } }, + "com.amazonaws.connect#SecurityProfile": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.connect#SecurityProfileId", + "traits": { + "smithy.api#documentation": "

    The identifier for the security profile.

    " + } + }, + "OrganizationResourceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

    The organization resource identifier for the security profile.

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

    The Amazon Resource Name (ARN) for the secruity profile.

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

    The name for the security profile.

    " + } + }, + "Description": { + "target": "com.amazonaws.connect#SecurityProfileDescription", + "traits": { + "smithy.api#documentation": "

    The description of the security profile.

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

    The tags used to organize, track, or control access for this resource.

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

    Contains information about a security profile.

    " + } + }, + "com.amazonaws.connect#SecurityProfileDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 250 + } + } + }, "com.amazonaws.connect#SecurityProfileId": { "type": "string" }, @@ -10673,6 +11112,15 @@ "com.amazonaws.connect#SecurityProfileName": { "type": "string" }, + "com.amazonaws.connect#SecurityProfilePermission": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, "com.amazonaws.connect#SecurityProfileSummary": { "type": "structure", "members": { @@ -10919,6 +11367,86 @@ "type": "structure", "members": {} }, + "com.amazonaws.connect#StartContactStreaming": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#StartContactStreamingRequest" + }, + "output": { + "target": "com.amazonaws.connect#StartContactStreamingResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#LimitExceededException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

    Initiates real-time message streaming for a new chat contact.

    \n

    For more information about message streaming, see Enable real-time chat message\n streaming in the Amazon Connect Administrator Guide.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/contact/start-streaming", + "code": 200 + } + } + }, + "com.amazonaws.connect#StartContactStreamingRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

    The identifier of the contact. This is the identifier of the contact associated with the\n first interaction with the contact center.

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

    The streaming configuration, such as the Amazon SNS streaming endpoint.

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

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.

    ", + "smithy.api#idempotencyToken": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.connect#StartContactStreamingResponse": { + "type": "structure", + "members": { + "StreamingId": { + "target": "com.amazonaws.connect#StreamingId", + "traits": { + "smithy.api#documentation": "

    The identifier of the streaming configuration enabled.

    ", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.connect#StartOutboundVoiceContact": { "type": "operation", "input": { @@ -11278,6 +11806,67 @@ "type": "structure", "members": {} }, + "com.amazonaws.connect#StopContactStreaming": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#StopContactStreamingRequest" + }, + "output": { + "target": "com.amazonaws.connect#StopContactStreamingResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

    Ends message streaming on a specified contact. To restart message streaming on that\n contact, call the StartContactStreaming\n API.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/contact/stop-streaming", + "code": 200 + } + } + }, + "com.amazonaws.connect#StopContactStreamingRequest": { + "type": "structure", + "members": { + "InstanceId": { + "target": "com.amazonaws.connect#InstanceId", + "traits": { + "smithy.api#documentation": "

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

    The identifier of the contact. This is the identifier of the contact that is associated with\n the first interaction with the contact center.

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

    The identifier of the streaming configuration enabled.

    ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.connect#StopContactStreamingResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.connect#StorageType": { "type": "string", "traits": { @@ -11301,6 +11890,15 @@ ] } }, + "com.amazonaws.connect#StreamingId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, "com.amazonaws.connect#String": { "type": "string" }, @@ -12025,7 +12623,7 @@ "AttributeType": { "target": "com.amazonaws.connect#InstanceAttributeType", "traits": { - "smithy.api#documentation": "

    The type of attribute.

    \n \n

    Only allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature, contact AWS Support for allowlisting.

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

    The type of attribute.

    \n \n

    Only allowlisted customers can consume USE_CUSTOM_TTS_VOICES. To access this feature, contact Amazon Web Services Support for allowlisting.

    \n
    ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -12784,6 +13382,70 @@ } } }, + "com.amazonaws.connect#UpdateSecurityProfile": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#UpdateSecurityProfileRequest" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#InvalidRequestException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

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

    \n

    Updates a security profile.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/security-profiles/{InstanceId}/{SecurityProfileId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#UpdateSecurityProfileRequest": { + "type": "structure", + "members": { + "Description": { + "target": "com.amazonaws.connect#SecurityProfileDescription", + "traits": { + "smithy.api#documentation": "

    The description of the security profile.

    " + } + }, + "Permissions": { + "target": "com.amazonaws.connect#PermissionsList", + "traits": { + "smithy.api#documentation": "

    The permissions granted to a security profile.

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

    The identifier for the security profle.

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

    The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.connect#UpdateUserHierarchy": { "type": "operation", "input": { diff --git a/codegen/sdk-codegen/aws-models/connectparticipant.json b/codegen/sdk-codegen/aws-models/connectparticipant.json index f109a15dabc7..fbae744dc3ea 100644 --- a/codegen/sdk-codegen/aws-models/connectparticipant.json +++ b/codegen/sdk-codegen/aws-models/connectparticipant.json @@ -261,22 +261,6 @@ { "value": "CONNECTION_ACK", "name": "CONNECTION_ACK" - }, - { - "value": "PARTICIPANT_ACTIVE", - "name": "PARTICIPANT_ACTIVE" - }, - { - "value": "PARTICIPANT_INACTIVE", - "name": "PARTICIPANT_INACTIVE" - }, - { - "value": "PARTICIPANT_ENGAGED", - "name": "PARTICIPANT_ENGAGED" - }, - { - "value": "PARTICIPANT_DISENGAGED", - "name": "PARTICIPANT_DISENGAGED" } ] } diff --git a/codegen/sdk-codegen/aws-models/datasync.json b/codegen/sdk-codegen/aws-models/datasync.json index 8a65c06e8a73..865ed07b89f3 100644 --- a/codegen/sdk-codegen/aws-models/datasync.json +++ b/codegen/sdk-codegen/aws-models/datasync.json @@ -400,6 +400,123 @@ } } }, + "com.amazonaws.datasync#CreateLocationHdfs": { + "type": "operation", + "input": { + "target": "com.amazonaws.datasync#CreateLocationHdfsRequest" + }, + "output": { + "target": "com.amazonaws.datasync#CreateLocationHdfsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.datasync#InternalException" + }, + { + "target": "com.amazonaws.datasync#InvalidRequestException" + } + ], + "traits": { + "smithy.api#documentation": "

    Creates an endpoint for a Hadoop Distributed File System (HDFS).

    " + } + }, + "com.amazonaws.datasync#CreateLocationHdfsRequest": { + "type": "structure", + "members": { + "Subdirectory": { + "target": "com.amazonaws.datasync#HdfsSubdirectory", + "traits": { + "smithy.api#documentation": "

    A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write\n data to the HDFS cluster. If the subdirectory isn't specified, it will default to\n /.

    " + } + }, + "NameNodes": { + "target": "com.amazonaws.datasync#HdfsNameNodeList", + "traits": { + "smithy.api#documentation": "

    The NameNode that manages the HDFS namespace. The NameNode performs operations such as\n opening, closing, and renaming files and directories. The NameNode contains the information to\n map blocks of data to the DataNodes. You can use only one NameNode.

    ", + "smithy.api#required": {} + } + }, + "BlockSize": { + "target": "com.amazonaws.datasync#HdfsBlockSize", + "traits": { + "smithy.api#documentation": "

    The size of data blocks to write into the HDFS cluster. The block size must be a multiple\n of 512 bytes. The default block size is 128 mebibytes (MiB).

    " + } + }, + "ReplicationFactor": { + "target": "com.amazonaws.datasync#HdfsReplicationFactor", + "traits": { + "smithy.api#documentation": "

    The number of DataNodes to replicate the data to when writing to the HDFS cluster. By\n default, data is replicated to three DataNodes.

    " + } + }, + "KmsKeyProviderUri": { + "target": "com.amazonaws.datasync#KmsKeyProviderUri", + "traits": { + "smithy.api#documentation": "

    The URI of the HDFS cluster's Key Management Server (KMS).

    " + } + }, + "QopConfiguration": { + "target": "com.amazonaws.datasync#QopConfiguration", + "traits": { + "smithy.api#documentation": "

    The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC)\n and data transfer protection settings configured on the Hadoop Distributed File System (HDFS)\n cluster. If QopConfiguration isn't specified, RpcProtection and\n DataTransferProtection default to PRIVACY. If you set\n RpcProtection or DataTransferProtection, the other parameter\n assumes the same value.

    " + } + }, + "AuthenticationType": { + "target": "com.amazonaws.datasync#HdfsAuthenticationType", + "traits": { + "smithy.api#documentation": "

    The type of authentication used to determine the identity of the user.

    ", + "smithy.api#required": {} + } + }, + "SimpleUser": { + "target": "com.amazonaws.datasync#HdfsUser", + "traits": { + "smithy.api#documentation": "

    The user name used to identify the client on the host operating system.

    \n \n

    If SIMPLE is specified for AuthenticationType, this parameter\n is required.

    \n
    " + } + }, + "KerberosPrincipal": { + "target": "com.amazonaws.datasync#KerberosPrincipal", + "traits": { + "smithy.api#documentation": "

    The Kerberos principal with access to the files and folders on the HDFS cluster.

    \n \n

    If KERBEROS is specified for AuthenticationType, this\n parameter is required.

    \n
    " + } + }, + "KerberosKeytab": { + "target": "com.amazonaws.datasync#KerberosKeytabFile", + "traits": { + "smithy.api#documentation": "

    The Kerberos key table (keytab) that contains mappings between the defined Kerberos\n principal and the encrypted keys. You can load the keytab from a file by providing the file's\n address. If you're using the CLI, it performs base64 encoding for you.\n Otherwise, provide the base64-encoded text.

    \n \n

    If KERBEROS is specified for AuthenticationType, this\n parameter is required.

    \n
    " + } + }, + "KerberosKrb5Conf": { + "target": "com.amazonaws.datasync#KerberosKrb5ConfFile", + "traits": { + "smithy.api#documentation": "

    The krb5.conf file that contains the Kerberos configuration information. You\n can load the krb5.conf file by providing the file's address. If you're using the\n CLI, it performs the base64 encoding for you. Otherwise, provide the\n base64-encoded text.

    \n \n

    If KERBEROS is specified for AuthenticationType, this\n parameter is required.

    \n
    " + } + }, + "AgentArns": { + "target": "com.amazonaws.datasync#AgentArnList", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Names (ARNs) of the agents that are used to connect to the HDFS\n cluster.

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

    The key-value pair that represents the tag that you want to add to the location. The value\n can be an empty string. We recommend using tags to name your resources.

    " + } + } + } + }, + "com.amazonaws.datasync#CreateLocationHdfsResponse": { + "type": "structure", + "members": { + "LocationArn": { + "target": "com.amazonaws.datasync#LocationArn", + "traits": { + "smithy.api#documentation": "

    The ARN of the source HDFS cluster location that's created.

    " + } + } + } + }, "com.amazonaws.datasync#CreateLocationNfs": { "type": "operation", "input": { @@ -824,7 +941,7 @@ "Includes": { "target": "com.amazonaws.datasync#FilterList", "traits": { - "smithy.api#documentation": "

    A list of filter rules that determines which files to include when running a task. The\n pattern should contain a single filter string that consists of the patterns to include. The\n patterns are delimited by \"|\" (that is, a pipe). For example:\n \"/folder1|/folder2\"

    " + "smithy.api#documentation": "

    A list of filter rules that determines which files to include when running a task. The\n pattern contains a single filter string that consists of the patterns to include. The patterns\n are delimited by \"|\" (that is, a pipe), for example, \"/folder1|/folder2\".

    " } } }, @@ -1185,6 +1302,115 @@ } } }, + "com.amazonaws.datasync#DescribeLocationHdfs": { + "type": "operation", + "input": { + "target": "com.amazonaws.datasync#DescribeLocationHdfsRequest" + }, + "output": { + "target": "com.amazonaws.datasync#DescribeLocationHdfsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.datasync#InternalException" + }, + { + "target": "com.amazonaws.datasync#InvalidRequestException" + } + ], + "traits": { + "smithy.api#documentation": "

    Returns metadata, such as the authentication information about the Hadoop Distributed File\n System (HDFS) location.

    " + } + }, + "com.amazonaws.datasync#DescribeLocationHdfsRequest": { + "type": "structure", + "members": { + "LocationArn": { + "target": "com.amazonaws.datasync#LocationArn", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the HDFS cluster location to describe.

    ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.datasync#DescribeLocationHdfsResponse": { + "type": "structure", + "members": { + "LocationArn": { + "target": "com.amazonaws.datasync#LocationArn", + "traits": { + "smithy.api#documentation": "

    The ARN of the HDFS cluster location.

    " + } + }, + "LocationUri": { + "target": "com.amazonaws.datasync#LocationUri", + "traits": { + "smithy.api#documentation": "

    The URI of the HDFS cluster location.

    " + } + }, + "NameNodes": { + "target": "com.amazonaws.datasync#HdfsNameNodeList", + "traits": { + "smithy.api#documentation": "

    The NameNode that manage the HDFS namespace.

    " + } + }, + "BlockSize": { + "target": "com.amazonaws.datasync#HdfsBlockSize", + "traits": { + "smithy.api#documentation": "

    The size of the data blocks to write into the HDFS cluster.

    " + } + }, + "ReplicationFactor": { + "target": "com.amazonaws.datasync#HdfsReplicationFactor", + "traits": { + "smithy.api#documentation": "

    The number of DataNodes to replicate the data to when writing to the HDFS cluster.

    " + } + }, + "KmsKeyProviderUri": { + "target": "com.amazonaws.datasync#KmsKeyProviderUri", + "traits": { + "smithy.api#documentation": "

    The URI of the HDFS cluster's Key Management Server (KMS).

    " + } + }, + "QopConfiguration": { + "target": "com.amazonaws.datasync#QopConfiguration", + "traits": { + "smithy.api#documentation": "

    The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC)\n and data transfer protection settings configured on the Hadoop Distributed File System (HDFS)\n cluster.

    " + } + }, + "AuthenticationType": { + "target": "com.amazonaws.datasync#HdfsAuthenticationType", + "traits": { + "smithy.api#documentation": "

    The type of authentication used to determine the identity of the user.

    " + } + }, + "SimpleUser": { + "target": "com.amazonaws.datasync#HdfsUser", + "traits": { + "smithy.api#documentation": "

    The user name used to identify the client on the host operating system. This parameter is\n used if the AuthenticationType is defined as SIMPLE.

    " + } + }, + "KerberosPrincipal": { + "target": "com.amazonaws.datasync#KerberosPrincipal", + "traits": { + "smithy.api#documentation": "

    The Kerberos principal with access to the files and folders on the HDFS cluster. This\n parameter is used if the AuthenticationType is defined as\n KERBEROS.

    " + } + }, + "AgentArns": { + "target": "com.amazonaws.datasync#AgentArnList", + "traits": { + "smithy.api#documentation": "

    The ARNs of the agents that are used to connect to the HDFS cluster.

    " + } + }, + "CreationTime": { + "target": "com.amazonaws.datasync#Time", + "traits": { + "smithy.api#documentation": "

    The time that the HDFS location was created.

    " + } + } + } + }, "com.amazonaws.datasync#DescribeLocationNfs": { "type": "operation", "input": { @@ -1696,13 +1922,13 @@ "SourceNetworkInterfaceArns": { "target": "com.amazonaws.datasync#SourceNetworkInterfaceArns", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the source ENIs (Elastic Network Interface) that was\n created for your subnet.

    " + "smithy.api#documentation": "

    The Amazon Resource Names (ARNs) of the source elastic network interfaces (ENIs) that were\n created for your subnet.

    " } }, "DestinationNetworkInterfaceArns": { "target": "com.amazonaws.datasync#DestinationNetworkInterfaceArns", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the destination ENIs (Elastic Network Interface) that\n was created for your subnet.

    " + "smithy.api#documentation": "

    The Amazon Resource Names (ARNs) of the destination elastic network interfaces (ENIs) that\n were created for your subnet.

    " } }, "Options": { @@ -1714,7 +1940,7 @@ "Excludes": { "target": "com.amazonaws.datasync#FilterList", "traits": { - "smithy.api#documentation": "

    A list of filter rules that determines which files to exclude from a task. The list should\n contain a single filter string that consists of the patterns to exclude. The patterns are\n delimited by \"|\" (that is, a pipe), for example: \"/folder1|/folder2\"\n

    \n

    \n

    " + "smithy.api#documentation": "

    A list of filter rules that determines which files to exclude from a task. The list should\n contain a single filter string that consists of the patterns to exclude. The patterns are\n delimited by \"|\" (that is, a pipe), for example, \"/folder1|/folder2\".

    \n

    \n

    " } }, "Schedule": { @@ -1744,7 +1970,7 @@ "Includes": { "target": "com.amazonaws.datasync#FilterList", "traits": { - "smithy.api#documentation": "

    A list of filter rules that determines which files to include when running a task. The\n pattern should contain a single filter string that consists of the patterns to include. The\n patterns are delimited by \"|\" (that is, a pipe). For example:\n \"/folder1|/folder2\"

    " + "smithy.api#documentation": "

    A list of filter rules that determines which files to include when running a task. The\n pattern contains a single filter string that consists of the patterns to include. The patterns\n are delimited by \"|\" (that is, a pipe), for example, \"/folder1|/folder2\".

    " } } }, @@ -1946,6 +2172,21 @@ }, "com.amazonaws.datasync#FmrsService": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "DataSync", + "arnNamespace": "datasync", + "cloudFormationName": "DataSync", + "cloudTrailEventSource": "datasync.amazonaws.com", + "endpointPrefix": "datasync" + }, + "aws.auth#sigv4": { + "name": "datasync" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "DataSync\n\n

    DataSync is a managed data transfer service that makes it simpler for you to\n automate moving data between on-premises storage and Amazon Simple Storage Service (Amazon S3)\n or Amazon Elastic File System (Amazon EFS).

    \n

    This API interface reference for DataSync contains documentation for a\n programming interface that you can use to manage DataSync.

    ", + "smithy.api#title": "AWS DataSync" + }, "version": "2018-11-09", "operations": [ { @@ -1960,6 +2201,9 @@ { "target": "com.amazonaws.datasync#CreateLocationFsxWindows" }, + { + "target": "com.amazonaws.datasync#CreateLocationHdfs" + }, { "target": "com.amazonaws.datasync#CreateLocationNfs" }, @@ -1993,6 +2237,9 @@ { "target": "com.amazonaws.datasync#DescribeLocationFsxWindows" }, + { + "target": "com.amazonaws.datasync#DescribeLocationHdfs" + }, { "target": "com.amazonaws.datasync#DescribeLocationNfs" }, @@ -2038,6 +2285,9 @@ { "target": "com.amazonaws.datasync#UpdateAgent" }, + { + "target": "com.amazonaws.datasync#UpdateLocationHdfs" + }, { "target": "com.amazonaws.datasync#UpdateLocationNfs" }, @@ -2053,22 +2303,7 @@ { "target": "com.amazonaws.datasync#UpdateTaskExecution" } - ], - "traits": { - "aws.api#service": { - "sdkId": "DataSync", - "arnNamespace": "datasync", - "cloudFormationName": "DataSync", - "cloudTrailEventSource": "datasync.amazonaws.com", - "endpointPrefix": "datasync" - }, - "aws.auth#sigv4": { - "name": "datasync" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "DataSync\n\n

    DataSync is a managed data transfer service that makes it simpler for you to\n automate moving data between on-premises storage and Amazon Simple Storage Service (Amazon S3)\n or Amazon Elastic File System (Amazon EFS).

    \n

    This API interface reference for DataSync contains documentation for a\n programming interface that you can use to manage DataSync.

    ", - "smithy.api#title": "AWS DataSync" - } + ] }, "com.amazonaws.datasync#FsxFilesystemArn": { "type": "string", @@ -2113,6 +2348,160 @@ ] } }, + "com.amazonaws.datasync#HdfsAuthenticationType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SIMPLE", + "name": "SIMPLE" + }, + { + "value": "KERBEROS", + "name": "KERBEROS" + } + ] + } + }, + "com.amazonaws.datasync#HdfsBlockSize": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1048576, + "max": 1073741824 + } + } + }, + "com.amazonaws.datasync#HdfsDataTransferProtection": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DISABLED", + "name": "DISABLED" + }, + { + "value": "AUTHENTICATION", + "name": "AUTHENTICATION" + }, + { + "value": "INTEGRITY", + "name": "INTEGRITY" + }, + { + "value": "PRIVACY", + "name": "PRIVACY" + } + ] + } + }, + "com.amazonaws.datasync#HdfsNameNode": { + "type": "structure", + "members": { + "Hostname": { + "target": "com.amazonaws.datasync#HdfsServerHostname", + "traits": { + "smithy.api#documentation": "

    The hostname of the NameNode in the HDFS cluster. This value is the IP address or Domain\n Name Service (DNS) name of the NameNode. An agent that's installed on-premises uses this\n hostname to communicate with the NameNode in the network.

    ", + "smithy.api#required": {} + } + }, + "Port": { + "target": "com.amazonaws.datasync#HdfsServerPort", + "traits": { + "smithy.api#documentation": "

    The port that the NameNode uses to listen to client requests.

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

    The NameNode of the Hadoop Distributed File System (HDFS). The NameNode manages the file\n system's namespace. The NameNode performs operations such as opening, closing, and renaming\n files and directories. The NameNode contains the information to map blocks of data to the\n DataNodes.

    " + } + }, + "com.amazonaws.datasync#HdfsNameNodeList": { + "type": "list", + "member": { + "target": "com.amazonaws.datasync#HdfsNameNode" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.datasync#HdfsReplicationFactor": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 512 + } + } + }, + "com.amazonaws.datasync#HdfsRpcProtection": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "DISABLED", + "name": "DISABLED" + }, + { + "value": "AUTHENTICATION", + "name": "AUTHENTICATION" + }, + { + "value": "INTEGRITY", + "name": "INTEGRITY" + }, + { + "value": "PRIVACY", + "name": "PRIVACY" + } + ] + } + }, + "com.amazonaws.datasync#HdfsServerHostname": { + "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\\-]*[A-Za-z0-9])$" + } + }, + "com.amazonaws.datasync#HdfsServerPort": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 65536 + } + } + }, + "com.amazonaws.datasync#HdfsSubdirectory": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 4096 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_\\-\\+\\./\\(\\)\\$\\p{Zs}]+$" + } + }, + "com.amazonaws.datasync#HdfsUser": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[_.A-Za-z0-9][-_.A-Za-z0-9]*$" + } + }, "com.amazonaws.datasync#IamRoleArn": { "type": "string", "traits": { @@ -2165,6 +2554,44 @@ "smithy.api#error": "client" } }, + "com.amazonaws.datasync#KerberosKeytabFile": { + "type": "blob", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 65536 + } + } + }, + "com.amazonaws.datasync#KerberosKrb5ConfFile": { + "type": "blob", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 131072 + } + } + }, + "com.amazonaws.datasync#KerberosPrincipal": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^.+$" + } + }, + "com.amazonaws.datasync#KmsKeyProviderUri": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^kms:\\/\\/http[s]?@(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9])(;(([a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9\\-]*[A-Za-z0-9]))*:[0-9]{1,5}\\/kms$" + } + }, "com.amazonaws.datasync#ListAgents": { "type": "operation", "input": { @@ -2695,7 +3122,7 @@ "Version": { "target": "com.amazonaws.datasync#NfsVersion", "traits": { - "smithy.api#documentation": "

    The specific NFS version that you want DataSync to use to mount your NFS share. If the\n server refuses to use the version specified, the sync will fail. If you don't specify a\n version, DataSync defaults to AUTOMATIC. That is, DataSync automatically\n selects a version based on negotiation with the NFS server.

    \n\n

    You can specify the following NFS versions:

    \n
      \n
    • \n

      \n \n NFSv3\n - stateless protocol version that allows for asynchronous\n writes on the server.

      \n
    • \n
    • \n

      \n \n NFSv4.0\n - stateful, firewall-friendly protocol version that supports\n delegations and pseudo filesystems.

      \n
    • \n
    • \n

      \n \n NFSv4.1\n - stateful protocol version that supports sessions,\n directory delegations, and parallel data processing. Version 4.1 also includes all\n features available in version 4.0.

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

    The specific NFS version that you want DataSync to use to mount your NFS share. If the\n server refuses to use the version specified, the sync will fail. If you don't specify a\n version, DataSync defaults to AUTOMATIC. That is, DataSync automatically\n selects a version based on negotiation with the NFS server.

    \n\n

    You can specify the following NFS versions:

    \n
      \n
    • \n

      \n \n NFSv3\n - stateless protocol version that allows for asynchronous\n writes on the server.

      \n
    • \n
    • \n

      \n \n NFSv4.0\n - stateful, firewall-friendly protocol version that supports\n delegations and pseudo file systems.

      \n
    • \n
    • \n

      \n \n NFSv4.1\n - stateful protocol version that supports sessions,\n directory delegations, and parallel data processing. Version 4.1 also includes all\n features available in version 4.0.

      \n
    • \n
    " } } }, @@ -3093,6 +3520,26 @@ "smithy.api#documentation": "

    The VPC endpoint, subnet, and security group that an agent uses to access IP addresses in\n a VPC (Virtual Private Cloud).

    " } }, + "com.amazonaws.datasync#QopConfiguration": { + "type": "structure", + "members": { + "RpcProtection": { + "target": "com.amazonaws.datasync#HdfsRpcProtection", + "traits": { + "smithy.api#documentation": "

    The RPC protection setting configured on the HDFS cluster. This setting corresponds to\n your hadoop.rpc.protection setting in your core-site.xml file on\n your Hadoop cluster.

    " + } + }, + "DataTransferProtection": { + "target": "com.amazonaws.datasync#HdfsDataTransferProtection", + "traits": { + "smithy.api#documentation": "

    The data transfer protection setting configured on the HDFS cluster. This setting\n corresponds to your dfs.data.transfer.protection setting in the\n hdfs-site.xml file on your Hadoop cluster.

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

    The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC)\n and data transfer privacy settings configured on the Hadoop Distributed File System (HDFS)\n cluster.

    " + } + }, "com.amazonaws.datasync#S3BucketArn": { "type": "string", "traits": { @@ -3318,13 +3765,13 @@ "Includes": { "target": "com.amazonaws.datasync#FilterList", "traits": { - "smithy.api#documentation": "

    A list of filter rules that determines which files to include when running a task. The\n pattern should contain a single filter string that consists of the patterns to include. The\n patterns are delimited by \"|\" (that is, a pipe). For example: \"/folder1|/folder2\"\n

    \n \n

    \n

    " + "smithy.api#documentation": "

    A list of filter rules that determines which files to include when running a task. The\n pattern should contain a single filter string that consists of the patterns to include. The\n patterns are delimited by \"|\" (that is, a pipe), for example,\n \"/folder1|/folder2\".

    \n \n

    \n

    " } }, "Excludes": { "target": "com.amazonaws.datasync#FilterList", "traits": { - "smithy.api#documentation": "

    A list of filter rules that determines which files to exclude from a task. The list\n should contain a single filter string that consists of the patterns to exclude. The\n patterns are delimited by \"|\" (that is, a pipe), for example,\n \"/folder1|/folder2\".

    " + "smithy.api#documentation": "

    A list of filter rules that determines which files to exclude from a task. The list\n contains a single filter string that consists of the patterns to exclude. The patterns are\n delimited by \"|\" (that is, a pipe), for example, \"/folder1|/folder2\".

    " } } }, @@ -3386,7 +3833,7 @@ } }, "traits": { - "smithy.api#documentation": "

    Represents a single entry in a list of AWS resource tags. TagListEntry\n returns an array that contains a list of tasks when the \n ListTagsForResource\n operation is called.

    " + "smithy.api#documentation": "

    Represents a single entry in a list of Amazon Web Services resource tags. TagListEntry\n returns an array that contains a list of tasks when the \n ListTagsForResource\n operation is called.

    " } }, "com.amazonaws.datasync#TagResource": { @@ -3869,6 +4316,114 @@ "type": "structure", "members": {} }, + "com.amazonaws.datasync#UpdateLocationHdfs": { + "type": "operation", + "input": { + "target": "com.amazonaws.datasync#UpdateLocationHdfsRequest" + }, + "output": { + "target": "com.amazonaws.datasync#UpdateLocationHdfsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.datasync#InternalException" + }, + { + "target": "com.amazonaws.datasync#InvalidRequestException" + } + ], + "traits": { + "smithy.api#documentation": "

    Updates some parameters of a previously created location for a Hadoop Distributed File\n System cluster.

    " + } + }, + "com.amazonaws.datasync#UpdateLocationHdfsRequest": { + "type": "structure", + "members": { + "LocationArn": { + "target": "com.amazonaws.datasync#LocationArn", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the source HDFS cluster location.

    ", + "smithy.api#required": {} + } + }, + "Subdirectory": { + "target": "com.amazonaws.datasync#HdfsSubdirectory", + "traits": { + "smithy.api#documentation": "

    A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write\n data to the HDFS cluster.

    " + } + }, + "NameNodes": { + "target": "com.amazonaws.datasync#HdfsNameNodeList", + "traits": { + "smithy.api#documentation": "

    The NameNode that manages the HDFS namespace. The NameNode performs operations such as\n opening, closing, and renaming files and directories. The NameNode contains the information to\n map blocks of data to the DataNodes. You can use only one NameNode.

    " + } + }, + "BlockSize": { + "target": "com.amazonaws.datasync#HdfsBlockSize", + "traits": { + "smithy.api#documentation": "

    The size of the data blocks to write into the HDFS cluster.

    " + } + }, + "ReplicationFactor": { + "target": "com.amazonaws.datasync#HdfsReplicationFactor", + "traits": { + "smithy.api#documentation": "

    The number of DataNodes to replicate the data to when writing to the HDFS cluster.

    " + } + }, + "KmsKeyProviderUri": { + "target": "com.amazonaws.datasync#KmsKeyProviderUri", + "traits": { + "smithy.api#documentation": "

    The URI of the HDFS cluster's Key Management Server (KMS).

    " + } + }, + "QopConfiguration": { + "target": "com.amazonaws.datasync#QopConfiguration", + "traits": { + "smithy.api#documentation": "

    The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC)\n and data transfer privacy settings configured on the Hadoop Distributed File System (HDFS)\n cluster.

    " + } + }, + "AuthenticationType": { + "target": "com.amazonaws.datasync#HdfsAuthenticationType", + "traits": { + "smithy.api#documentation": "

    The type of authentication used to determine the identity of the user.

    " + } + }, + "SimpleUser": { + "target": "com.amazonaws.datasync#HdfsUser", + "traits": { + "smithy.api#documentation": "

    The user name used to identify the client on the host operating system.

    " + } + }, + "KerberosPrincipal": { + "target": "com.amazonaws.datasync#KerberosPrincipal", + "traits": { + "smithy.api#documentation": "

    The Kerberos principal with access to the files and folders on the HDFS cluster.

    " + } + }, + "KerberosKeytab": { + "target": "com.amazonaws.datasync#KerberosKeytabFile", + "traits": { + "smithy.api#documentation": "

    The Kerberos key table (keytab) that contains mappings between the defined Kerberos\n principal and the encrypted keys. You can load the keytab from a file by providing the file's\n address. If you use the AWS CLI, it performs base64 encoding for you. Otherwise, provide the\n base64-encoded text.

    " + } + }, + "KerberosKrb5Conf": { + "target": "com.amazonaws.datasync#KerberosKrb5ConfFile", + "traits": { + "smithy.api#documentation": "

    The krb5.conf file that contains the Kerberos configuration information. You\n can load the krb5.conf file by providing the file's address. If you're using the\n AWS CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded\n text.

    " + } + }, + "AgentArns": { + "target": "com.amazonaws.datasync#AgentArnList", + "traits": { + "smithy.api#documentation": "

    The ARNs of the agents that are used to connect to the HDFS cluster.

    " + } + } + } + }, + "com.amazonaws.datasync#UpdateLocationHdfsResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.datasync#UpdateLocationNfs": { "type": "operation", "input": { @@ -4136,7 +4691,7 @@ "Excludes": { "target": "com.amazonaws.datasync#FilterList", "traits": { - "smithy.api#documentation": "

    A list of filter rules that determines which files to exclude from a task. The list should\n contain a single filter string that consists of the patterns to exclude. The patterns are\n delimited by \"|\" (that is, a pipe), for example: \"/folder1|/folder2\"\n

    \n

    \n

    " + "smithy.api#documentation": "

    A list of filter rules that determines which files to exclude from a task. The list should\n contain a single filter string that consists of the patterns to exclude. The patterns are\n delimited by \"|\" (that is, a pipe), for example, \"/folder1|/folder2\".

    \n

    \n

    " } }, "Schedule": { @@ -4154,13 +4709,13 @@ "CloudWatchLogGroupArn": { "target": "com.amazonaws.datasync#LogGroupArn", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the resource name of the CloudWatch\n LogGroup.

    " + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the resource name of the Amazon CloudWatch log\n group.

    " } }, "Includes": { "target": "com.amazonaws.datasync#FilterList", "traits": { - "smithy.api#documentation": "

    A list of filter rules that determines which files to include when running a task. The\n pattern should contain a single filter string that consists of the patterns to include. The\n patterns are delimited by \"|\" (that is, a pipe). For example:\n \"/folder1|/folder2\"

    " + "smithy.api#documentation": "

    A list of filter rules that determines which files to include when running a task. The\n pattern contains a single filter string that consists of the patterns to include. The patterns\n are delimited by \"|\" (that is, a pipe), for example, \"/folder1|/folder2\".

    " } } }, diff --git a/codegen/sdk-codegen/aws-models/ec2.json b/codegen/sdk-codegen/aws-models/ec2.json index 2e0abefe19c4..4223ae7ddcea 100644 --- a/codegen/sdk-codegen/aws-models/ec2.json +++ b/codegen/sdk-codegen/aws-models/ec2.json @@ -20845,7 +20845,7 @@ "ExecutableUsers": { "target": "com.amazonaws.ec2#ExecutableByStringList", "traits": { - "smithy.api#documentation": "

    Scopes the images by users with explicit launch permissions. \n Specify an Amazon Web Services account ID, self (the sender of the request),\n\t\t\t\tor all (public AMIs).

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

    Scopes the images by users with explicit launch permissions. \n Specify an Amazon Web Services account ID, self (the sender of the request),\n\t\t\t\tor all (public AMIs).

    \n
      \n
    • \n

      If you specify an Amazon Web Services account ID that is not your own, only AMIs\n shared with that specific Amazon Web Services account ID are returned. However, AMIs that\n are shared with the account’s organization or organizational unit (OU) are not\n returned.

      \n
    • \n
    • \n

      If you specify self or your own Amazon Web Services account ID, AMIs\n shared with your account are returned. In addition, AMIs that are shared with the\n organization or OU of which you are member are also returned.

      \n
    • \n
    • \n

      If you specify all, all public AMIs are returned.

      \n
    • \n
    ", "smithy.api#xmlName": "ExecutableBy" } }, @@ -33639,6 +33639,10 @@ { "value": "launch", "name": "LAUNCH" + }, + { + "value": "launch-before-terminate", + "name": "LAUNCH_BEFORE_TERMINATE" } ] } @@ -33659,9 +33663,17 @@ "target": "com.amazonaws.ec2#FleetReplacementStrategy", "traits": { "aws.protocols#ec2QueryName": "ReplacementStrategy", - "smithy.api#documentation": "

    To allow EC2 Fleet to launch a replacement Spot Instance when an instance rebalance\n notification is emitted for an existing Spot Instance in the fleet, specify\n launch. Only available for fleets of type maintain.

    \n \n

    When a replacement instance is launched, the instance marked for rebalance is not\n automatically terminated. You can terminate it, or you can leave it running. You are charged for both instances while they are running.

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

    The replacement strategy to use. Only available for fleets of type\n maintain.

    \n

    \n launch - EC2 Fleet launches a new replacement Spot Instance when a\n rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet\n does not terminate the instances that receive a rebalance notification. You can terminate\n the old instances, or you can leave them running. You are charged for all instances while\n they are running.

    \n

    \n launch-before-terminate - EC2 Fleet launches a new replacement Spot\n Instance when a rebalance notification is emitted for an existing Spot Instance in the\n fleet, and then, after a delay that you specify (in TerminationDelay),\n terminates the instances that received a rebalance notification.

    ", "smithy.api#xmlName": "replacementStrategy" } + }, + "TerminationDelay": { + "target": "com.amazonaws.ec2#Integer", + "traits": { + "aws.protocols#ec2QueryName": "TerminationDelay", + "smithy.api#documentation": "

    The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot\n Instance after launching a new replacement Spot Instance.

    ", + "smithy.api#xmlName": "terminationDelay" + } } }, "traits": { @@ -33674,12 +33686,18 @@ "ReplacementStrategy": { "target": "com.amazonaws.ec2#FleetReplacementStrategy", "traits": { - "smithy.api#documentation": "

    The replacement strategy to use. Only available for fleets of type\n maintain.

    \n

    To allow EC2 Fleet to launch a replacement Spot Instance when an instance rebalance\n notification is emitted for an existing Spot Instance in the fleet, specify\n launch. You must specify a value, otherwise you get an error.

    \n \n

    When a replacement instance is launched, the instance marked for rebalance is not\n automatically terminated. You can terminate it, or you can leave it running. You are charged for all instances while they are running.

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

    The replacement strategy to use. Only available for fleets of type\n maintain.

    \n

    \n launch - EC2 Fleet launches a replacement Spot Instance when a rebalance\n notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not\n terminate the instances that receive a rebalance notification. You can terminate the old\n instances, or you can leave them running. You are charged for all instances while they are\n running.

    \n

    \n launch-before-terminate - EC2 Fleet launches a replacement Spot Instance\n when a rebalance notification is emitted for an existing Spot Instance in the fleet, and\n then, after a delay that you specify (in TerminationDelay), terminates the\n instances that received a rebalance notification.

    " + } + }, + "TerminationDelay": { + "target": "com.amazonaws.ec2#Integer", + "traits": { + "smithy.api#documentation": "

    The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot\n Instance after launching a new replacement Spot Instance.

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

    The Spot Instance replacement strategy to use when Amazon EC2 emits a signal that your\n Spot Instance is at an elevated risk of being interrupted. For more information, see\n Capacity rebalancing in the Amazon EC2 User Guide.

    " + "smithy.api#documentation": "

    The Spot Instance replacement strategy to use when Amazon EC2 emits a rebalance\n notification signal that your Spot Instance is at an elevated risk of being interrupted.\n For more information, see Capacity rebalancing in the Amazon EC2 User Guide.

    " } }, "com.amazonaws.ec2#FleetSpotMaintenanceStrategies": { @@ -40891,6 +40909,14 @@ "smithy.api#xmlName": "carrierIp" } }, + "CustomerOwnedIp": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "CustomerOwnedIp", + "smithy.api#documentation": "

    The customer-owned IP address associated with the network interface.

    ", + "smithy.api#xmlName": "customerOwnedIp" + } + }, "IpOwnerId": { "target": "com.amazonaws.ec2#String", "traits": { @@ -41229,7 +41255,7 @@ "target": "com.amazonaws.ec2#ExcludedInstanceTypeSet", "traits": { "aws.protocols#ec2QueryName": "ExcludedInstanceTypeSet", - "smithy.api#documentation": "

    The instance types to exclude. You can use strings with one or more wild cards, represented by\n an asterisk (*), to exclude an instance type, size, or generation. The\n following are examples: m5.8xlarge, c5*.*, m5a.*,\n r*, *3*.

    \n

    For example, if you specify c5*.*, Amazon EC2 will exclude the entire C5\n instance family (all C5a and C5n instance types). If you specify c5a.*, Amazon EC2\n excludes all the C5a instance types, but does not exclude the C5n instance types.

    \n

    Default: No excluded instance types

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

    The instance types to exclude. You can use strings with one or more wild cards, represented by\n an asterisk (*), to exclude an instance type, size, or generation. The\n following are examples: m5.8xlarge, c5*.*, m5a.*,\n r*, *3*.

    \n

    For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance\n family, which includes all C5a and C5n instance types. If you specify\n m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n\n instance types.

    \n

    Default: No excluded instance types

    ", "smithy.api#xmlName": "excludedInstanceTypeSet" } }, @@ -41399,7 +41425,7 @@ "ExcludedInstanceTypes": { "target": "com.amazonaws.ec2#ExcludedInstanceTypeSet", "traits": { - "smithy.api#documentation": "

    The instance types to exclude. You can use strings with one or more wild cards, represented by\n an asterisk (*), to exclude an instance family, type, size, or generation. The\n following are examples: m5.8xlarge, c5*.*, m5a.*,\n r*, *3*.

    \n

    For example, if you specify c5*.*, Amazon EC2 will exclude the entire C5\n instance family (all C5a and C5n instance types). If you specify c5a.*, Amazon EC2\n excludes all the C5a instance types, but does not exclude the C5n instance types.

    \n

    Default: No excluded instance types

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

    The instance types to exclude. You can use strings with one or more wild cards, represented by\n an asterisk (*), to exclude an instance family, type, size, or generation. The\n following are examples: m5.8xlarge, c5*.*, m5a.*,\n r*, *3*.

    \n

    For example, if you specify c5*,Amazon EC2 will exclude the entire C5 instance\n family, which includes all C5a and C5n instance types. If you specify\n m5a.*, Amazon EC2 will exclude all the M5a instance types, but not the M5n\n instance types.

    \n

    Default: No excluded instance types

    ", "smithy.api#xmlName": "ExcludedInstanceType" } }, @@ -44811,6 +44837,22 @@ "smithy.api#documentation": "

    The Amazon Web Services account ID.

    \n

    Constraints: Up to 10 000 account IDs can be specified in a single request.

    ", "smithy.api#xmlName": "userId" } + }, + "OrganizationArn": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "OrganizationArn", + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of an organization.

    ", + "smithy.api#xmlName": "organizationArn" + } + }, + "OrganizationalUnitArn": { + "target": "com.amazonaws.ec2#String", + "traits": { + "aws.protocols#ec2QueryName": "OrganizationalUnitArn", + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of an organizational unit (OU).

    ", + "smithy.api#xmlName": "organizationalUnitArn" + } } }, "traits": { @@ -48649,7 +48691,7 @@ "Attribute": { "target": "com.amazonaws.ec2#String", "traits": { - "smithy.api#documentation": "

    The name of the attribute to modify. \n The valid values are description and launchPermission.

    " + "smithy.api#documentation": "

    The name of the attribute to modify.

    \n

    Valid values: description | launchPermission\n

    " } }, "Description": { @@ -48711,6 +48753,20 @@ "smithy.api#documentation": "

    Checks whether you have the required permissions for the action, without actually making the request, \n and provides an error response. If you have the required permissions, the error response is DryRunOperation. \n Otherwise, it is UnauthorizedOperation.

    ", "smithy.api#xmlName": "dryRun" } + }, + "OrganizationArns": { + "target": "com.amazonaws.ec2#OrganizationArnStringList", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute parameter is launchPermission.

    ", + "smithy.api#xmlName": "OrganizationArn" + } + }, + "OrganizationalUnitArns": { + "target": "com.amazonaws.ec2#OrganizationalUnitArnStringList", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute parameter is launchPermission.

    ", + "smithy.api#xmlName": "OrganizationalUnitArn" + } } }, "traits": { @@ -53132,6 +53188,24 @@ ] } }, + "com.amazonaws.ec2#OrganizationArnStringList": { + "type": "list", + "member": { + "target": "com.amazonaws.ec2#String", + "traits": { + "smithy.api#xmlName": "OrganizationArn" + } + } + }, + "com.amazonaws.ec2#OrganizationalUnitArnStringList": { + "type": "list", + "member": { + "target": "com.amazonaws.ec2#String", + "traits": { + "smithy.api#xmlName": "OrganizationalUnitArn" + } + } + }, "com.amazonaws.ec2#OutpostArn": { "type": "string", "traits": { @@ -56861,6 +56935,10 @@ { "value": "launch", "name": "LAUNCH" + }, + { + "value": "launch-before-terminate", + "name": "LAUNCH_BEFORE_TERMINATE" } ] } @@ -62905,9 +62983,17 @@ "target": "com.amazonaws.ec2#ReplacementStrategy", "traits": { "aws.protocols#ec2QueryName": "ReplacementStrategy", - "smithy.api#documentation": "

    The replacement strategy to use. Only available for fleets of type\n maintain. You must specify a value, otherwise you get an error.

    \n

    To allow Spot Fleet to launch a replacement Spot Instance when an instance rebalance\n notification is emitted for a Spot Instance in the fleet, specify\n launch.

    \n \n

    When a replacement instance is launched, the instance marked for rebalance is not\n automatically terminated. You can terminate it, or you can leave it running. You are\n charged for all instances while they are running.

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

    The replacement strategy to use. Only available for fleets of type\n maintain.

    \n

    \n launch - Spot Fleet launches a new replacement Spot Instance when a\n rebalance notification is emitted for an existing Spot Instance in the fleet. Spot Fleet\n does not terminate the instances that receive a rebalance notification. You can\n terminate the old instances, or you can leave them running. You are charged for all\n instances while they are running.

    \n

    \n launch-before-terminate - Spot Fleet launches a new replacement Spot\n Instance when a rebalance notification is emitted for an existing Spot Instance in the\n fleet, and then, after a delay that you specify (in TerminationDelay),\n terminates the instances that received a rebalance notification.

    ", "smithy.api#xmlName": "replacementStrategy" } + }, + "TerminationDelay": { + "target": "com.amazonaws.ec2#Integer", + "traits": { + "aws.protocols#ec2QueryName": "TerminationDelay", + "smithy.api#documentation": "

    The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot\n Instance after launching a new replacement Spot Instance.

    ", + "smithy.api#xmlName": "terminationDelay" + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/finspace.json b/codegen/sdk-codegen/aws-models/finspace.json index beec23dffe30..dbb39327f1fa 100644 --- a/codegen/sdk-codegen/aws-models/finspace.json +++ b/codegen/sdk-codegen/aws-models/finspace.json @@ -31,6 +31,21 @@ "shapes": { "com.amazonaws.finspace#AWSHabaneroManagementService": { "type": "service", + "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 FinSpace environments.

    ", + "smithy.api#title": "FinSpace User Environment Management service" + }, "version": "2021-03-12", "operations": [ { @@ -57,22 +72,7 @@ { "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", @@ -168,6 +168,18 @@ "traits": { "smithy.api#documentation": "

    Configuration information when authentication mode is FEDERATED.

    " } + }, + "superuserParameters": { + "target": "com.amazonaws.finspace#SuperuserParameters", + "traits": { + "smithy.api#documentation": "

    Configuration information for the superuser.

    " + } + }, + "dataBundles": { + "target": "com.amazonaws.finspace#DataBundleArns", + "traits": { + "smithy.api#documentation": "

    The list of Amazon Resource Names (ARN) of the data bundles to install. Currently supported data bundle ARNs:

    \n
      \n
    • \n

      \n arn:aws:finspace:${Region}::data-bundle/capital-markets-sample - Contains sample Capital Markets datasets, categories and controlled vocabularies.

      \n
    • \n
    • \n

      \n arn:aws:finspace:${Region}::data-bundle/taq (default) - Contains trades and quotes data in addition to sample Capital Markets data.

      \n
    • \n
    " + } } } }, @@ -194,6 +206,23 @@ } } }, + "com.amazonaws.finspace#DataBundleArn": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the data bundle.

    ", + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws:finspace:[A-Za-z0-9_/.-]{0,63}:\\d*:data-bundle/[0-9A-Za-z_-]{1,128}$" + } + }, + "com.amazonaws.finspace#DataBundleArns": { + "type": "list", + "member": { + "target": "com.amazonaws.finspace#DataBundleArn" + } + }, "com.amazonaws.finspace#DeleteEnvironment": { "type": "operation", "input": { @@ -255,6 +284,17 @@ "smithy.api#pattern": "^[a-zA-Z0-9. ]{1,1000}$" } }, + "com.amazonaws.finspace#EmailId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+[.]+[A-Za-z]+$", + "smithy.api#sensitive": {} + } + }, "com.amazonaws.finspace#Environment": { "type": "structure", "members": { @@ -484,7 +524,7 @@ "min": 1, "max": 32 }, - "smithy.api#pattern": "[^_\\p{Z}][\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}][^_\\p{Z}]+" + "smithy.api#pattern": "^[^_\\p{Z}][\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}][^_\\p{Z}]+$" } }, "com.amazonaws.finspace#GetEnvironment": { @@ -714,6 +754,16 @@ } } }, + "com.amazonaws.finspace#NameString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + }, + "smithy.api#pattern": "^[a-zA-Z0-9]{1,50}$" + } + }, "com.amazonaws.finspace#PaginationToken": { "type": "string", "traits": { @@ -779,6 +829,35 @@ "smithy.api#pattern": "^[a-zA-Z-0-9-:\\/.]*$" } }, + "com.amazonaws.finspace#SuperuserParameters": { + "type": "structure", + "members": { + "emailAddress": { + "target": "com.amazonaws.finspace#EmailId", + "traits": { + "smithy.api#documentation": "

    The email address of the superuser.

    ", + "smithy.api#required": {} + } + }, + "firstName": { + "target": "com.amazonaws.finspace#NameString", + "traits": { + "smithy.api#documentation": "

    The first name of the superuser.

    ", + "smithy.api#required": {} + } + }, + "lastName": { + "target": "com.amazonaws.finspace#NameString", + "traits": { + "smithy.api#documentation": "

    The last name of the superuser.

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

    Configuration information for the superuser.

    " + } + }, "com.amazonaws.finspace#TagKey": { "type": "string", "traits": { @@ -1042,7 +1121,7 @@ "min": 1, "max": 1000 }, - "smithy.api#pattern": "^https?://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]" + "smithy.api#pattern": "^https?://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]$" } }, "com.amazonaws.finspace#urn": { diff --git a/codegen/sdk-codegen/aws-models/iot-wireless.json b/codegen/sdk-codegen/aws-models/iot-wireless.json index ca0775ee509d..043e798ee878 100644 --- a/codegen/sdk-codegen/aws-models/iot-wireless.json +++ b/codegen/sdk-codegen/aws-models/iot-wireless.json @@ -215,6 +215,183 @@ } } }, + "com.amazonaws.iotwireless#AssociateMulticastGroupWithFuotaTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#AssociateMulticastGroupWithFuotaTaskRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#AssociateMulticastGroupWithFuotaTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Associate a multicast group with a FUOTA task.

    ", + "smithy.api#http": { + "method": "PUT", + "uri": "/fuota-tasks/{Id}/multicast-group", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#AssociateMulticastGroupWithFuotaTaskRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#FuotaTaskId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MulticastGroupId": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#AssociateMulticastGroupWithFuotaTaskResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.iotwireless#AssociateWirelessDeviceWithFuotaTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#AssociateWirelessDeviceWithFuotaTaskRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#AssociateWirelessDeviceWithFuotaTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Associate a wireless device with a FUOTA task.

    ", + "smithy.api#http": { + "method": "PUT", + "uri": "/fuota-tasks/{Id}/wireless-device", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#AssociateWirelessDeviceWithFuotaTaskRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#FuotaTaskId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "WirelessDeviceId": { + "target": "com.amazonaws.iotwireless#WirelessDeviceId", + "traits": { + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#AssociateWirelessDeviceWithFuotaTaskResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.iotwireless#AssociateWirelessDeviceWithMulticastGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#AssociateWirelessDeviceWithMulticastGroupRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#AssociateWirelessDeviceWithMulticastGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Associates a wireless device with a multicast group.

    ", + "smithy.api#http": { + "method": "PUT", + "uri": "/multicast-groups/{Id}/wireless-device", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#AssociateWirelessDeviceWithMulticastGroupRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "WirelessDeviceId": { + "target": "com.amazonaws.iotwireless#WirelessDeviceId", + "traits": { + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#AssociateWirelessDeviceWithMulticastGroupResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.iotwireless#AssociateWirelessDeviceWithThing": { "type": "operation", "input": { @@ -428,6 +605,59 @@ ] } }, + "com.amazonaws.iotwireless#CancelMulticastGroupSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#CancelMulticastGroupSessionRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#CancelMulticastGroupSessionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Cancels an existing multicast group session.

    ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/multicast-groups/{Id}/session", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#CancelMulticastGroupSessionRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#CancelMulticastGroupSessionResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.iotwireless#CertificateList": { "type": "structure", "members": { @@ -502,6 +732,7 @@ "com.amazonaws.iotwireless#ClientRequestToken": { "type": "string", "traits": { + "smithy.api#documentation": "

    Each resource must have a unique client request token. If you try to create a new resource with the same token as a resource that already exists, an exception occurs. If you omit this value, AWS SDKs will automatically generate a unique client request.

    ", "smithy.api#length": { "min": 1, "max": 64 @@ -746,13 +977,13 @@ } } }, - "com.amazonaws.iotwireless#CreateServiceProfile": { + "com.amazonaws.iotwireless#CreateFuotaTask": { "type": "operation", "input": { - "target": "com.amazonaws.iotwireless#CreateServiceProfileRequest" + "target": "com.amazonaws.iotwireless#CreateFuotaTaskRequest" }, "output": { - "target": "com.amazonaws.iotwireless#CreateServiceProfileResponse" + "target": "com.amazonaws.iotwireless#CreateFuotaTaskResponse" }, "errors": [ { @@ -764,6 +995,9 @@ { "target": "com.amazonaws.iotwireless#InternalServerException" }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, { "target": "com.amazonaws.iotwireless#ThrottlingException" }, @@ -772,68 +1006,67 @@ } ], "traits": { - "smithy.api#documentation": "

    Creates a new service profile.

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

    Creates a FUOTA task.

    ", "smithy.api#http": { "method": "POST", - "uri": "/service-profiles", + "uri": "/fuota-tasks", "code": 201 } } }, - "com.amazonaws.iotwireless#CreateServiceProfileRequest": { + "com.amazonaws.iotwireless#CreateFuotaTaskRequest": { "type": "structure", "members": { "Name": { - "target": "com.amazonaws.iotwireless#ServiceProfileName", + "target": "com.amazonaws.iotwireless#FuotaTaskName" + }, + "Description": { + "target": "com.amazonaws.iotwireless#Description" + }, + "ClientRequestToken": { + "target": "com.amazonaws.iotwireless#ClientRequestToken", "traits": { - "smithy.api#documentation": "

    The name of the new resource.

    " + "smithy.api#idempotencyToken": {} } }, "LoRaWAN": { - "target": "com.amazonaws.iotwireless#LoRaWANServiceProfile", - "traits": { - "smithy.api#documentation": "

    The service profile information to use to create the service profile.

    " - } + "target": "com.amazonaws.iotwireless#LoRaWANFuotaTask" }, - "Tags": { - "target": "com.amazonaws.iotwireless#TagList", + "FirmwareUpdateImage": { + "target": "com.amazonaws.iotwireless#FirmwareUpdateImage", "traits": { - "smithy.api#documentation": "

    The tags to attach to the new service profile. Tags are metadata that you can use to manage a resource.

    " + "smithy.api#required": {} } }, - "ClientRequestToken": { - "target": "com.amazonaws.iotwireless#ClientRequestToken", + "FirmwareUpdateRole": { + "target": "com.amazonaws.iotwireless#FirmwareUpdateRole", "traits": { - "smithy.api#documentation": "

    Each resource must have a unique client request token. If you try to create a new resource with the same token as a resource that already exists, an exception occurs. If you omit this value, AWS SDKs will automatically generate a unique client request.

    ", - "smithy.api#idempotencyToken": {} + "smithy.api#required": {} } + }, + "Tags": { + "target": "com.amazonaws.iotwireless#TagList" } } }, - "com.amazonaws.iotwireless#CreateServiceProfileResponse": { + "com.amazonaws.iotwireless#CreateFuotaTaskResponse": { "type": "structure", "members": { "Arn": { - "target": "com.amazonaws.iotwireless#ServiceProfileArn", - "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name of the new resource.

    " - } + "target": "com.amazonaws.iotwireless#FuotaTaskArn" }, "Id": { - "target": "com.amazonaws.iotwireless#ServiceProfileId", - "traits": { - "smithy.api#documentation": "

    The ID of the new service profile.

    " - } + "target": "com.amazonaws.iotwireless#FuotaTaskId" } } }, - "com.amazonaws.iotwireless#CreateWirelessDevice": { + "com.amazonaws.iotwireless#CreateMulticastGroup": { "type": "operation", "input": { - "target": "com.amazonaws.iotwireless#CreateWirelessDeviceRequest" + "target": "com.amazonaws.iotwireless#CreateMulticastGroupRequest" }, "output": { - "target": "com.amazonaws.iotwireless#CreateWirelessDeviceResponse" + "target": "com.amazonaws.iotwireless#CreateMulticastGroupResponse" }, "errors": [ { @@ -856,37 +1089,196 @@ } ], "traits": { - "smithy.api#documentation": "

    Provisions a wireless device.

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

    Creates a multicast group.

    ", "smithy.api#http": { "method": "POST", - "uri": "/wireless-devices", + "uri": "/multicast-groups", "code": 201 } } }, - "com.amazonaws.iotwireless#CreateWirelessDeviceRequest": { + "com.amazonaws.iotwireless#CreateMulticastGroupRequest": { "type": "structure", "members": { - "Type": { - "target": "com.amazonaws.iotwireless#WirelessDeviceType", - "traits": { - "smithy.api#documentation": "

    The wireless device type.

    ", - "smithy.api#required": {} - } - }, "Name": { - "target": "com.amazonaws.iotwireless#WirelessDeviceName", - "traits": { - "smithy.api#documentation": "

    The name of the new resource.

    " - } + "target": "com.amazonaws.iotwireless#MulticastGroupName" }, "Description": { "target": "com.amazonaws.iotwireless#Description", "traits": { - "smithy.api#documentation": "

    The description of the new resource.

    " + "smithy.api#documentation": "

    The description of the multicast group.

    " } }, - "DestinationName": { + "ClientRequestToken": { + "target": "com.amazonaws.iotwireless#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

    Each resource must have a unique client request token. If you try to create a new resource with the\n same token as a resource that already exists, an exception occurs. If you omit this value,\n AWS SDKs will automatically generate a unique client request.

    ", + "smithy.api#idempotencyToken": {} + } + }, + "LoRaWAN": { + "target": "com.amazonaws.iotwireless#LoRaWANMulticast", + "traits": { + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.iotwireless#TagList" + } + } + }, + "com.amazonaws.iotwireless#CreateMulticastGroupResponse": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.iotwireless#MulticastGroupArn" + }, + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId" + } + } + }, + "com.amazonaws.iotwireless#CreateServiceProfile": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#CreateServiceProfileRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#CreateServiceProfileResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Creates a new service profile.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/service-profiles", + "code": 201 + } + } + }, + "com.amazonaws.iotwireless#CreateServiceProfileRequest": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.iotwireless#ServiceProfileName", + "traits": { + "smithy.api#documentation": "

    The name of the new resource.

    " + } + }, + "LoRaWAN": { + "target": "com.amazonaws.iotwireless#LoRaWANServiceProfile", + "traits": { + "smithy.api#documentation": "

    The service profile information to use to create the service profile.

    " + } + }, + "Tags": { + "target": "com.amazonaws.iotwireless#TagList", + "traits": { + "smithy.api#documentation": "

    The tags to attach to the new service profile. Tags are metadata that you can use to manage a resource.

    " + } + }, + "ClientRequestToken": { + "target": "com.amazonaws.iotwireless#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

    Each resource must have a unique client request token. If you try to create a new resource with the same token as a resource that already exists, an exception occurs. If you omit this value, AWS SDKs will automatically generate a unique client request.

    ", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.iotwireless#CreateServiceProfileResponse": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.iotwireless#ServiceProfileArn", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name of the new resource.

    " + } + }, + "Id": { + "target": "com.amazonaws.iotwireless#ServiceProfileId", + "traits": { + "smithy.api#documentation": "

    The ID of the new service profile.

    " + } + } + } + }, + "com.amazonaws.iotwireless#CreateWirelessDevice": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#CreateWirelessDeviceRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#CreateWirelessDeviceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Provisions a wireless device.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/wireless-devices", + "code": 201 + } + } + }, + "com.amazonaws.iotwireless#CreateWirelessDeviceRequest": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.iotwireless#WirelessDeviceType", + "traits": { + "smithy.api#documentation": "

    The wireless device type.

    ", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.iotwireless#WirelessDeviceName", + "traits": { + "smithy.api#documentation": "

    The name of the new resource.

    " + } + }, + "Description": { + "target": "com.amazonaws.iotwireless#Description", + "traits": { + "smithy.api#documentation": "

    The description of the new resource.

    " + } + }, + "DestinationName": { "target": "com.amazonaws.iotwireless#DestinationName", "traits": { "smithy.api#documentation": "

    The name of the destination to assign to the new wireless device.

    ", @@ -1184,6 +1576,12 @@ } } }, + "com.amazonaws.iotwireless#CreatedAt": { + "type": "timestamp", + "traits": { + "smithy.api#documentation": "

    Created at timestamp for the resource.

    " + } + }, "com.amazonaws.iotwireless#DeleteDestination": { "type": "operation", "input": { @@ -1292,6 +1690,109 @@ "type": "structure", "members": {} }, + "com.amazonaws.iotwireless#DeleteFuotaTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#DeleteFuotaTaskRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#DeleteFuotaTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Deletes a FUOTA task.

    ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/fuota-tasks/{Id}", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#DeleteFuotaTaskRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#FuotaTaskId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#DeleteFuotaTaskResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.iotwireless#DeleteMulticastGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#DeleteMulticastGroupRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#DeleteMulticastGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Deletes a multicast group if it is not in use by a fuota task.

    ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/multicast-groups/{Id}", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#DeleteMulticastGroupRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#DeleteMulticastGroupResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.iotwireless#DeleteServiceProfile": { "type": "operation", "input": { @@ -1553,6 +2054,7 @@ "com.amazonaws.iotwireless#Description": { "type": "string", "traits": { + "smithy.api#documentation": "

    The description of the new resource.

    ", "smithy.api#length": { "min": 0, "max": 2048 @@ -1706,8 +2208,22 @@ } } }, - "com.amazonaws.iotwireless#DeviceState": { - "type": "string", + "com.amazonaws.iotwireless#DeviceRegistrationStateEventConfiguration": { + "type": "structure", + "members": { + "Sidewalk": { + "target": "com.amazonaws.iotwireless#SidewalkEventNotificationConfigurations", + "traits": { + "smithy.api#documentation": "

    Device registration state event configuration object for enabling or disabling Sidewalk related event\n topics.

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

    Device registration state event configuration object for enabling and disabling relevant topics.

    " + } + }, + "com.amazonaws.iotwireless#DeviceState": { + "type": "string", "traits": { "smithy.api#documentation": "

    Device state defines the device status of sidewalk device.

    ", "smithy.api#enum": [ @@ -1786,6 +2302,180 @@ "type": "structure", "members": {} }, + "com.amazonaws.iotwireless#DisassociateMulticastGroupFromFuotaTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#DisassociateMulticastGroupFromFuotaTaskRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#DisassociateMulticastGroupFromFuotaTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Disassociates a multicast group from a fuota task.

    ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/fuota-tasks/{Id}/multicast-groups/{MulticastGroupId}", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#DisassociateMulticastGroupFromFuotaTaskRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#FuotaTaskId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MulticastGroupId": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#DisassociateMulticastGroupFromFuotaTaskResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromFuotaTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromFuotaTaskRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromFuotaTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Disassociates a wireless device from a FUOTA task.

    ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/fuota-tasks/{Id}/wireless-devices/{WirelessDeviceId}", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromFuotaTaskRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#FuotaTaskId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "WirelessDeviceId": { + "target": "com.amazonaws.iotwireless#WirelessDeviceId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromFuotaTaskResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromMulticastGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromMulticastGroupRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromMulticastGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Disassociates a wireless device from a multicast group.

    ", + "smithy.api#http": { + "method": "DELETE", + "uri": "/multicast-groups/{Id}/wireless-devices/{WirelessDeviceId}", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromMulticastGroupRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "WirelessDeviceId": { + "target": "com.amazonaws.iotwireless#WirelessDeviceId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromMulticastGroupResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromThing": { "type": "operation", "input": { @@ -1955,6 +2645,48 @@ } } }, + "com.amazonaws.iotwireless#DlClass": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    DlClass for LoRaWAM, valid values are ClassB and ClassC.

    ", + "smithy.api#enum": [ + { + "value": "ClassB", + "name": "ClassB" + }, + { + "value": "ClassC", + "name": "ClassC" + } + ], + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.iotwireless#DlDr": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

    Downlink data rate.

    ", + "smithy.api#range": { + "min": 0, + "max": 15 + } + } + }, + "com.amazonaws.iotwireless#DlFreq": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

    Downlink frequency.

    ", + "smithy.api#range": { + "min": 100000000, + "max": 1000000000 + } + } + }, "com.amazonaws.iotwireless#DlRate": { "type": "integer", "traits": { @@ -2035,6 +2767,32 @@ ] } }, + "com.amazonaws.iotwireless#EventNotificationPartnerType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Sidewalk", + "name": "Sidewalk" + } + ] + } + }, + "com.amazonaws.iotwireless#EventNotificationTopicStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Enabled", + "name": "Enabled" + }, + { + "value": "Disabled", + "name": "Disabled" + } + ] + } + }, "com.amazonaws.iotwireless#Expression": { "type": "string", "traits": { @@ -2069,12 +2827,30 @@ "type": "integer", "traits": { "smithy.api#box": {}, + "smithy.api#documentation": "

    The Fport value.

    ", "smithy.api#range": { "min": 1, "max": 223 } } }, + "com.amazonaws.iotwireless#FPorts": { + "type": "structure", + "members": { + "Fuota": { + "target": "com.amazonaws.iotwireless#FPort" + }, + "Multicast": { + "target": "com.amazonaws.iotwireless#FPort" + }, + "ClockSync": { + "target": "com.amazonaws.iotwireless#FPort" + } + }, + "traits": { + "smithy.api#documentation": "

    List of FPort assigned for different LoRaWAN application packages to use

    " + } + }, "com.amazonaws.iotwireless#FactoryPresetFreqsList": { "type": "list", "member": { @@ -2098,37 +2874,199 @@ "smithy.api#sensitive": {} } }, - "com.amazonaws.iotwireless#GatewayEui": { + "com.amazonaws.iotwireless#FirmwareUpdateImage": { "type": "string", "traits": { - "smithy.api#pattern": "^(([0-9A-Fa-f]{2}-){7}|([0-9A-Fa-f]{2}:){7}|([0-9A-Fa-f]{2}\\s){7}|([0-9A-Fa-f]{2}){7})([0-9A-Fa-f]{2})$" + "smithy.api#documentation": "

    The S3 URI points to a firmware update image that is to be used with a FUOTA task.

    ", + "smithy.api#length": { + "min": 1, + "max": 4096 + } } }, - "com.amazonaws.iotwireless#GetDestination": { - "type": "operation", - "input": { - "target": "com.amazonaws.iotwireless#GetDestinationRequest" - }, - "output": { - "target": "com.amazonaws.iotwireless#GetDestinationResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iotwireless#AccessDeniedException" - }, - { - "target": "com.amazonaws.iotwireless#InternalServerException" - }, - { - "target": "com.amazonaws.iotwireless#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.iotwireless#ThrottlingException" - }, - { - "target": "com.amazonaws.iotwireless#ValidationException" + "com.amazonaws.iotwireless#FirmwareUpdateRole": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    The firmware update role that is to be used with a FUOTA task.

    ", + "smithy.api#length": { + "min": 1, + "max": 2048 } - ], + } + }, + "com.amazonaws.iotwireless#FuotaDeviceStatus": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    The status of a wireless device in a FUOTA task.

    ", + "smithy.api#enum": [ + { + "value": "Initial", + "name": "Initial" + }, + { + "value": "Package_Not_Supported", + "name": "Package_Not_Supported" + }, + { + "value": "FragAlgo_unsupported", + "name": "FragAlgo_unsupported" + }, + { + "value": "Not_enough_memory", + "name": "Not_enough_memory" + }, + { + "value": "FragIndex_unsupported", + "name": "FragIndex_unsupported" + }, + { + "value": "Wrong_descriptor", + "name": "Wrong_descriptor" + }, + { + "value": "SessionCnt_replay", + "name": "SessionCnt_replay" + }, + { + "value": "MissingFrag", + "name": "MissingFrag" + }, + { + "value": "MemoryError", + "name": "MemoryError" + }, + { + "value": "MICError", + "name": "MICError" + }, + { + "value": "Successful", + "name": "Successful" + } + ] + } + }, + "com.amazonaws.iotwireless#FuotaTask": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#FuotaTaskId" + }, + "Arn": { + "target": "com.amazonaws.iotwireless#FuotaTaskArn" + }, + "Name": { + "target": "com.amazonaws.iotwireless#FuotaTaskName" + } + }, + "traits": { + "smithy.api#documentation": "

    A FUOTA task.

    " + } + }, + "com.amazonaws.iotwireless#FuotaTaskArn": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    The arn of a FUOTA task.

    ", + "smithy.api#length": { + "min": 0, + "max": 128 + } + } + }, + "com.amazonaws.iotwireless#FuotaTaskId": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    The ID of a FUOTA task.

    ", + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.iotwireless#FuotaTaskList": { + "type": "list", + "member": { + "target": "com.amazonaws.iotwireless#FuotaTask" + }, + "traits": { + "smithy.api#documentation": "

    Lists the FUOTA tasks registered to your AWS account.

    " + } + }, + "com.amazonaws.iotwireless#FuotaTaskName": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    The name of a FUOTA task.

    ", + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.iotwireless#FuotaTaskStatus": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    The status of a FUOTA task.

    ", + "smithy.api#enum": [ + { + "value": "Pending", + "name": "Pending" + }, + { + "value": "FuotaSession_Waiting", + "name": "FuotaSession_Waiting" + }, + { + "value": "In_FuotaSession", + "name": "In_FuotaSession" + }, + { + "value": "FuotaDone", + "name": "FuotaDone" + }, + { + "value": "Delete_Waiting", + "name": "Delete_Waiting" + } + ] + } + }, + "com.amazonaws.iotwireless#GatewayEui": { + "type": "string", + "traits": { + "smithy.api#pattern": "^(([0-9A-Fa-f]{2}-){7}|([0-9A-Fa-f]{2}:){7}|([0-9A-Fa-f]{2}\\s){7}|([0-9A-Fa-f]{2}){7})([0-9A-Fa-f]{2})$" + } + }, + "com.amazonaws.iotwireless#GenAppKey": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-fA-F0-9]{32}$" + } + }, + "com.amazonaws.iotwireless#GetDestination": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#GetDestinationRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#GetDestinationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], "traits": { "smithy.api#documentation": "

    Gets information about a destination.

    ", "smithy.api#http": { @@ -2268,6 +3206,84 @@ } } }, + "com.amazonaws.iotwireless#GetFuotaTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#GetFuotaTaskRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#GetFuotaTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Gets information about a FUOTA task.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/fuota-tasks/{Id}", + "code": 200 + } + } + }, + "com.amazonaws.iotwireless#GetFuotaTaskRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#FuotaTaskId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#GetFuotaTaskResponse": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.iotwireless#FuotaTaskArn" + }, + "Id": { + "target": "com.amazonaws.iotwireless#FuotaTaskId" + }, + "Status": { + "target": "com.amazonaws.iotwireless#FuotaTaskStatus" + }, + "Name": { + "target": "com.amazonaws.iotwireless#FuotaTaskName" + }, + "Description": { + "target": "com.amazonaws.iotwireless#Description" + }, + "LoRaWAN": { + "target": "com.amazonaws.iotwireless#LoRaWANFuotaTaskGetInfo" + }, + "FirmwareUpdateImage": { + "target": "com.amazonaws.iotwireless#FirmwareUpdateImage" + }, + "FirmwareUpdateRole": { + "target": "com.amazonaws.iotwireless#FirmwareUpdateRole" + }, + "CreatedAt": { + "target": "com.amazonaws.iotwireless#CreatedAt" + } + } + }, "com.amazonaws.iotwireless#GetLogLevelsByResourceTypes": { "type": "operation", "input": { @@ -2302,33 +3318,231 @@ } } }, - "com.amazonaws.iotwireless#GetLogLevelsByResourceTypesRequest": { - "type": "structure", - "members": {} - }, - "com.amazonaws.iotwireless#GetLogLevelsByResourceTypesResponse": { + "com.amazonaws.iotwireless#GetLogLevelsByResourceTypesRequest": { + "type": "structure", + "members": {} + }, + "com.amazonaws.iotwireless#GetLogLevelsByResourceTypesResponse": { + "type": "structure", + "members": { + "DefaultLogLevel": { + "target": "com.amazonaws.iotwireless#LogLevel" + }, + "WirelessGatewayLogOptions": { + "target": "com.amazonaws.iotwireless#WirelessGatewayLogOptionList" + }, + "WirelessDeviceLogOptions": { + "target": "com.amazonaws.iotwireless#WirelessDeviceLogOptionList" + } + } + }, + "com.amazonaws.iotwireless#GetMulticastGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#GetMulticastGroupRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#GetMulticastGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Gets information about a multicast group.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/multicast-groups/{Id}", + "code": 200 + } + } + }, + "com.amazonaws.iotwireless#GetMulticastGroupRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#GetMulticastGroupResponse": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.iotwireless#MulticastGroupArn" + }, + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId" + }, + "Name": { + "target": "com.amazonaws.iotwireless#MulticastGroupName" + }, + "Description": { + "target": "com.amazonaws.iotwireless#Description" + }, + "Status": { + "target": "com.amazonaws.iotwireless#MulticastGroupStatus" + }, + "LoRaWAN": { + "target": "com.amazonaws.iotwireless#LoRaWANMulticastGet" + }, + "CreatedAt": { + "target": "com.amazonaws.iotwireless#CreatedAt" + } + } + }, + "com.amazonaws.iotwireless#GetMulticastGroupSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#GetMulticastGroupSessionRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#GetMulticastGroupSessionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Gets information about a multicast group session.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/multicast-groups/{Id}/session", + "code": 200 + } + } + }, + "com.amazonaws.iotwireless#GetMulticastGroupSessionRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#GetMulticastGroupSessionResponse": { + "type": "structure", + "members": { + "LoRaWAN": { + "target": "com.amazonaws.iotwireless#LoRaWANMulticastSession" + } + } + }, + "com.amazonaws.iotwireless#GetPartnerAccount": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#GetPartnerAccountRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#GetPartnerAccountResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Gets information about a partner account. If PartnerAccountId and PartnerType are null, returns all partner accounts.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/partner-accounts/{PartnerAccountId}", + "code": 200 + } + } + }, + "com.amazonaws.iotwireless#GetPartnerAccountRequest": { + "type": "structure", + "members": { + "PartnerAccountId": { + "target": "com.amazonaws.iotwireless#PartnerAccountId", + "traits": { + "smithy.api#documentation": "

    The partner account ID to disassociate from the AWS account.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "PartnerType": { + "target": "com.amazonaws.iotwireless#PartnerType", + "traits": { + "smithy.api#documentation": "

    The partner type.

    ", + "smithy.api#httpQuery": "partnerType", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.iotwireless#GetPartnerAccountResponse": { "type": "structure", "members": { - "DefaultLogLevel": { - "target": "com.amazonaws.iotwireless#LogLevel" - }, - "WirelessGatewayLogOptions": { - "target": "com.amazonaws.iotwireless#WirelessGatewayLogOptionList" + "Sidewalk": { + "target": "com.amazonaws.iotwireless#SidewalkAccountInfoWithFingerprint", + "traits": { + "smithy.api#documentation": "

    The Sidewalk account credentials.

    " + } }, - "WirelessDeviceLogOptions": { - "target": "com.amazonaws.iotwireless#WirelessDeviceLogOptionList" + "AccountLinked": { + "target": "com.amazonaws.iotwireless#AccountLinked", + "traits": { + "smithy.api#documentation": "

    Whether the partner account is linked to the AWS account.

    " + } } } }, - "com.amazonaws.iotwireless#GetPartnerAccount": { + "com.amazonaws.iotwireless#GetResourceEventConfiguration": { "type": "operation", "input": { - "target": "com.amazonaws.iotwireless#GetPartnerAccountRequest" + "target": "com.amazonaws.iotwireless#GetResourceEventConfigurationRequest" }, "output": { - "target": "com.amazonaws.iotwireless#GetPartnerAccountResponse" + "target": "com.amazonaws.iotwireless#GetResourceEventConfigurationResponse" }, "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, { "target": "com.amazonaws.iotwireless#InternalServerException" }, @@ -2343,48 +3557,55 @@ } ], "traits": { - "smithy.api#documentation": "

    Gets information about a partner account. If PartnerAccountId and PartnerType are null, returns all partner accounts.

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

    Get the event configuration for a particular resource identifier.

    ", "smithy.api#http": { "method": "GET", - "uri": "/partner-accounts/{PartnerAccountId}", + "uri": "/event-configurations/{Identifier}", "code": 200 } } }, - "com.amazonaws.iotwireless#GetPartnerAccountRequest": { + "com.amazonaws.iotwireless#GetResourceEventConfigurationRequest": { "type": "structure", "members": { - "PartnerAccountId": { - "target": "com.amazonaws.iotwireless#PartnerAccountId", + "Identifier": { + "target": "com.amazonaws.iotwireless#Identifier", "traits": { - "smithy.api#documentation": "

    The partner account ID to disassociate from the AWS account.

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

    Resource identifier to opt in for event messaging.

    ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, - "PartnerType": { - "target": "com.amazonaws.iotwireless#PartnerType", + "IdentifierType": { + "target": "com.amazonaws.iotwireless#IdentifierType", "traits": { - "smithy.api#documentation": "

    The partner type.

    ", - "smithy.api#httpQuery": "partnerType", + "smithy.api#documentation": "

    Identifier type of the particular resource identifier for event configuration.

    ", + "smithy.api#httpQuery": "identifierType", "smithy.api#required": {} } + }, + "PartnerType": { + "target": "com.amazonaws.iotwireless#EventNotificationPartnerType", + "traits": { + "smithy.api#documentation": "

    Partner type of the resource if the identifier type is PartnerAccountId.

    ", + "smithy.api#httpQuery": "partnerType" + } } } }, - "com.amazonaws.iotwireless#GetPartnerAccountResponse": { + "com.amazonaws.iotwireless#GetResourceEventConfigurationResponse": { "type": "structure", "members": { - "Sidewalk": { - "target": "com.amazonaws.iotwireless#SidewalkAccountInfoWithFingerprint", + "DeviceRegistrationState": { + "target": "com.amazonaws.iotwireless#DeviceRegistrationStateEventConfiguration", "traits": { - "smithy.api#documentation": "

    The Sidewalk account credentials.

    " + "smithy.api#documentation": "

    Event configuration for the device registration state event

    " } }, - "AccountLinked": { - "target": "com.amazonaws.iotwireless#AccountLinked", + "Proximity": { + "target": "com.amazonaws.iotwireless#ProximityEventConfiguration", "traits": { - "smithy.api#documentation": "

    Whether the partner account is linked to the AWS account.

    " + "smithy.api#documentation": "

    Event configuration for the Proximity event

    " } } } @@ -3259,6 +4480,17 @@ } } }, + "com.amazonaws.iotwireless#IdentifierType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PartnerAccountId", + "name": "PartnerAccountId" + } + ] + } + }, "com.amazonaws.iotwireless#Integer": { "type": "integer", "traits": { @@ -3427,7 +4659,225 @@ } } }, - "com.amazonaws.iotwireless#ListDeviceProfilesRequest": { + "com.amazonaws.iotwireless#ListDeviceProfilesRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.iotwireless#NextToken", + "traits": { + "smithy.api#documentation": "

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    ", + "smithy.api#httpQuery": "nextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.iotwireless#MaxResults", + "traits": { + "smithy.api#documentation": "

    The maximum number of results to return in this operation.

    ", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.iotwireless#ListDeviceProfilesResponse": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.iotwireless#NextToken", + "traits": { + "smithy.api#documentation": "

    The token to use to get the next set of results, or null if there are no additional results.

    " + } + }, + "DeviceProfileList": { + "target": "com.amazonaws.iotwireless#DeviceProfileList", + "traits": { + "smithy.api#documentation": "

    The list of device profiles.

    " + } + } + } + }, + "com.amazonaws.iotwireless#ListFuotaTasks": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#ListFuotaTasksRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#ListFuotaTasksResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Lists the FUOTA tasks registered to your AWS account.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/fuota-tasks", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.iotwireless#ListFuotaTasksRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.iotwireless#NextToken", + "traits": { + "smithy.api#documentation": "

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    ", + "smithy.api#httpQuery": "nextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.iotwireless#MaxResults", + "traits": { + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.iotwireless#ListFuotaTasksResponse": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.iotwireless#NextToken", + "traits": { + "smithy.api#documentation": "

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    " + } + }, + "FuotaTaskList": { + "target": "com.amazonaws.iotwireless#FuotaTaskList" + } + } + }, + "com.amazonaws.iotwireless#ListMulticastGroups": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#ListMulticastGroupsRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#ListMulticastGroupsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Lists the multicast groups registered to your AWS account.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/multicast-groups", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.iotwireless#ListMulticastGroupsByFuotaTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#ListMulticastGroupsByFuotaTaskRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#ListMulticastGroupsByFuotaTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    List all multicast groups associated with a fuota task.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/fuota-tasks/{Id}/multicast-groups", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.iotwireless#ListMulticastGroupsByFuotaTaskRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#FuotaTaskId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.iotwireless#NextToken", + "traits": { + "smithy.api#documentation": "

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    ", + "smithy.api#httpQuery": "nextToken" + } + }, + "MaxResults": { + "target": "com.amazonaws.iotwireless#MaxResults", + "traits": { + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.iotwireless#ListMulticastGroupsByFuotaTaskResponse": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.iotwireless#NextToken", + "traits": { + "smithy.api#documentation": "

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    " + } + }, + "MulticastGroupList": { + "target": "com.amazonaws.iotwireless#MulticastGroupListByFuotaTask" + } + } + }, + "com.amazonaws.iotwireless#ListMulticastGroupsRequest": { "type": "structure", "members": { "NextToken": { @@ -3440,26 +4890,22 @@ "MaxResults": { "target": "com.amazonaws.iotwireless#MaxResults", "traits": { - "smithy.api#documentation": "

    The maximum number of results to return in this operation.

    ", "smithy.api#httpQuery": "maxResults" } } } }, - "com.amazonaws.iotwireless#ListDeviceProfilesResponse": { + "com.amazonaws.iotwireless#ListMulticastGroupsResponse": { "type": "structure", "members": { "NextToken": { "target": "com.amazonaws.iotwireless#NextToken", "traits": { - "smithy.api#documentation": "

    The token to use to get the next set of results, or null if there are no additional results.

    " + "smithy.api#documentation": "

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

    " } }, - "DeviceProfileList": { - "target": "com.amazonaws.iotwireless#DeviceProfileList", - "traits": { - "smithy.api#documentation": "

    The list of device profiles.

    " - } + "MulticastGroupList": { + "target": "com.amazonaws.iotwireless#MulticastGroupList" } } }, @@ -3740,6 +5186,18 @@ "smithy.api#documentation": "

    A filter to list only the wireless devices that use this wireless device type.

    ", "smithy.api#httpQuery": "wirelessDeviceType" } + }, + "FuotaTaskId": { + "target": "com.amazonaws.iotwireless#FuotaTaskId", + "traits": { + "smithy.api#httpQuery": "fuotaTaskId" + } + }, + "MulticastGroupId": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#httpQuery": "multicastGroupId" + } } } }, @@ -3950,6 +5408,9 @@ "traits": { "smithy.api#documentation": "

    LoRaWAN object for create APIs

    " } + }, + "FPorts": { + "target": "com.amazonaws.iotwireless#FPorts" } }, "traits": { @@ -4122,6 +5583,31 @@ "smithy.api#documentation": "

    LoRaWANDeviceProfile object.

    " } }, + "com.amazonaws.iotwireless#LoRaWANFuotaTask": { + "type": "structure", + "members": { + "RfRegion": { + "target": "com.amazonaws.iotwireless#SupportedRfRegion" + } + }, + "traits": { + "smithy.api#documentation": "

    The LoRaWAN information used with a FUOTA task.

    " + } + }, + "com.amazonaws.iotwireless#LoRaWANFuotaTaskGetInfo": { + "type": "structure", + "members": { + "RfRegion": { + "target": "com.amazonaws.iotwireless#RfRegion" + }, + "StartTime": { + "target": "com.amazonaws.iotwireless#StartTime" + } + }, + "traits": { + "smithy.api#documentation": "

    The LoRaWAN information returned from getting a FUOTA task.

    " + } + }, "com.amazonaws.iotwireless#LoRaWANGateway": { "type": "structure", "members": { @@ -4359,14 +5845,76 @@ "smithy.api#documentation": "

    LoRaWAN object for list functions.

    " } }, + "com.amazonaws.iotwireless#LoRaWANMulticast": { + "type": "structure", + "members": { + "RfRegion": { + "target": "com.amazonaws.iotwireless#SupportedRfRegion" + }, + "DlClass": { + "target": "com.amazonaws.iotwireless#DlClass" + } + }, + "traits": { + "smithy.api#documentation": "

    The LoRaWAN information that is to be used with the multicast group.

    " + } + }, + "com.amazonaws.iotwireless#LoRaWANMulticastGet": { + "type": "structure", + "members": { + "RfRegion": { + "target": "com.amazonaws.iotwireless#SupportedRfRegion" + }, + "DlClass": { + "target": "com.amazonaws.iotwireless#DlClass" + }, + "NumberOfDevicesRequested": { + "target": "com.amazonaws.iotwireless#NumberOfDevicesRequested" + }, + "NumberOfDevicesInGroup": { + "target": "com.amazonaws.iotwireless#NumberOfDevicesInGroup" + } + }, + "traits": { + "smithy.api#documentation": "

    The LoRaWAN information that is to be returned from getting multicast group information.

    " + } + }, + "com.amazonaws.iotwireless#LoRaWANMulticastMetadata": { + "type": "structure", + "members": { + "FPort": { + "target": "com.amazonaws.iotwireless#FPort" + } + }, + "traits": { + "smithy.api#documentation": "

    The metadata information of the LoRaWAN multicast group.

    " + } + }, + "com.amazonaws.iotwireless#LoRaWANMulticastSession": { + "type": "structure", + "members": { + "DlDr": { + "target": "com.amazonaws.iotwireless#DlDr" + }, + "DlFreq": { + "target": "com.amazonaws.iotwireless#DlFreq" + }, + "SessionStartTime": { + "target": "com.amazonaws.iotwireless#SessionStartTimeTimestamp" + }, + "SessionTimeout": { + "target": "com.amazonaws.iotwireless#SessionTimeout" + } + }, + "traits": { + "smithy.api#documentation": "

    The LoRaWAN information used with the multicast session.

    " + } + }, "com.amazonaws.iotwireless#LoRaWANSendDataToDevice": { "type": "structure", "members": { "FPort": { - "target": "com.amazonaws.iotwireless#FPort", - "traits": { - "smithy.api#documentation": "

    The Fport value.

    " - } + "target": "com.amazonaws.iotwireless#FPort" } }, "traits": { @@ -4387,6 +5935,17 @@ "smithy.api#documentation": "

    LoRaWANServiceProfile object.

    " } }, + "com.amazonaws.iotwireless#LoRaWANStartFuotaTask": { + "type": "structure", + "members": { + "StartTime": { + "target": "com.amazonaws.iotwireless#StartTime" + } + }, + "traits": { + "smithy.api#documentation": "

    The LoRaWAN information used to start a FUOTA task.

    " + } + }, "com.amazonaws.iotwireless#LoRaWANUpdateDevice": { "type": "structure", "members": { @@ -4511,12 +6070,24 @@ "com.amazonaws.iotwireless#MaxResults": { "type": "integer", "traits": { + "smithy.api#documentation": "

    The maximum number of results to return in this operation.

    ", "smithy.api#range": { "min": 0, "max": 250 } } }, + "com.amazonaws.iotwireless#McGroupId": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

    Id of the multicast group.

    ", + "smithy.api#range": { + "min": 1, + "max": 256 + } + } + }, "com.amazonaws.iotwireless#Message": { "type": "string", "traits": { @@ -4572,6 +6143,122 @@ } } }, + "com.amazonaws.iotwireless#MulticastDeviceStatus": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.iotwireless#MulticastGroup": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId" + }, + "Arn": { + "target": "com.amazonaws.iotwireless#MulticastGroupArn" + }, + "Name": { + "target": "com.amazonaws.iotwireless#MulticastGroupName" + } + }, + "traits": { + "smithy.api#documentation": "

    A multicast group.

    " + } + }, + "com.amazonaws.iotwireless#MulticastGroupArn": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    The arn of the multicast group.

    ", + "smithy.api#length": { + "min": 0, + "max": 128 + } + } + }, + "com.amazonaws.iotwireless#MulticastGroupByFuotaTask": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId" + } + }, + "traits": { + "smithy.api#documentation": "

    A multicast group that is associated with a FUOTA task.

    " + } + }, + "com.amazonaws.iotwireless#MulticastGroupId": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    The ID of the multicast group.

    ", + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.iotwireless#MulticastGroupList": { + "type": "list", + "member": { + "target": "com.amazonaws.iotwireless#MulticastGroup" + }, + "traits": { + "smithy.api#documentation": "

    List of multicast groups.

    " + } + }, + "com.amazonaws.iotwireless#MulticastGroupListByFuotaTask": { + "type": "list", + "member": { + "target": "com.amazonaws.iotwireless#MulticastGroupByFuotaTask" + }, + "traits": { + "smithy.api#documentation": "

    List of multicast groups associated with a FUOTA task.

    " + } + }, + "com.amazonaws.iotwireless#MulticastGroupMessageId": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    ID of a multicast group message.

    ", + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.iotwireless#MulticastGroupName": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    The name of the multicast group.

    ", + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.iotwireless#MulticastGroupStatus": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    The status of the multicast group.

    ", + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.iotwireless#MulticastWirelessMetadata": { + "type": "structure", + "members": { + "LoRaWAN": { + "target": "com.amazonaws.iotwireless#LoRaWANMulticastMetadata" + } + }, + "traits": { + "smithy.api#documentation": "

    Wireless metadata that is to be sent to multicast group.

    " + } + }, "com.amazonaws.iotwireless#NetId": { "type": "string", "traits": { @@ -4601,6 +6288,20 @@ } } }, + "com.amazonaws.iotwireless#NumberOfDevicesInGroup": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

    Number of devices that are associated to the multicast group.

    " + } + }, + "com.amazonaws.iotwireless#NumberOfDevicesRequested": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

    Number of devices that are requested to be associated with the multicast group.

    " + } + }, "com.amazonaws.iotwireless#NwkGeoLoc": { "type": "boolean" }, @@ -4636,6 +6337,12 @@ "traits": { "smithy.api#documentation": "

    The AppEUI value.

    " } + }, + "GenAppKey": { + "target": "com.amazonaws.iotwireless#GenAppKey", + "traits": { + "smithy.api#documentation": "

    The GenAppKey value.

    " + } } }, "traits": { @@ -4703,6 +6410,7 @@ "com.amazonaws.iotwireless#PayloadData": { "type": "string", "traits": { + "smithy.api#documentation": "

    The binary to be sent to the end device, encoded in base64.

    ", "smithy.api#length": { "min": 0, "max": 2048 @@ -4752,6 +6460,20 @@ } } }, + "com.amazonaws.iotwireless#ProximityEventConfiguration": { + "type": "structure", + "members": { + "Sidewalk": { + "target": "com.amazonaws.iotwireless#SidewalkEventNotificationConfigurations", + "traits": { + "smithy.api#documentation": "

    Proximity event configuration object for enabling or disabling Sidewalk related event topics.

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

    Proximity event configuration object for enabling and disabling relevant topics.

    " + } + }, "com.amazonaws.iotwireless#PutResourceLogLevel": { "type": "operation", "input": { @@ -4816,6 +6538,16 @@ "type": "structure", "members": {} }, + "com.amazonaws.iotwireless#QueryString": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    Query string used to search for wireless devices as part of the bulk associate and disassociate process.

    ", + "smithy.api#length": { + "min": 0, + "max": 4096 + } + } + }, "com.amazonaws.iotwireless#RaAllowed": { "type": "boolean" }, @@ -4987,6 +6719,7 @@ "com.amazonaws.iotwireless#RfRegion": { "type": "string", "traits": { + "smithy.api#documentation": "

    The frequency band (RFRegion) value.

    ", "smithy.api#length": { "min": 0, "max": 64 @@ -5032,20 +6765,89 @@ } } }, - "com.amazonaws.iotwireless#RxFreq2": { - "type": "integer", - "traits": { - "smithy.api#box": {}, - "smithy.api#range": { - "min": 1000000, - "max": 16700000 + "com.amazonaws.iotwireless#RxFreq2": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1000000, + "max": 16700000 + } + } + }, + "com.amazonaws.iotwireless#SNwkSIntKey": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-fA-F0-9]{32}$" + } + }, + "com.amazonaws.iotwireless#SendDataToMulticastGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#SendDataToMulticastGroupRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#SendDataToMulticastGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Sends the specified data to a multicast group.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/multicast-groups/{Id}/data", + "code": 201 + } + } + }, + "com.amazonaws.iotwireless#SendDataToMulticastGroupRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "PayloadData": { + "target": "com.amazonaws.iotwireless#PayloadData", + "traits": { + "smithy.api#required": {} + } + }, + "WirelessMetadata": { + "target": "com.amazonaws.iotwireless#MulticastWirelessMetadata", + "traits": { + "smithy.api#required": {} + } } } }, - "com.amazonaws.iotwireless#SNwkSIntKey": { - "type": "string", - "traits": { - "smithy.api#pattern": "^[a-fA-F0-9]{32}$" + "com.amazonaws.iotwireless#SendDataToMulticastGroupResponse": { + "type": "structure", + "members": { + "MessageId": { + "target": "com.amazonaws.iotwireless#MulticastGroupMessageId" + } } }, "com.amazonaws.iotwireless#SendDataToWirelessDevice": { @@ -5100,7 +6902,6 @@ "PayloadData": { "target": "com.amazonaws.iotwireless#PayloadData", "traits": { - "smithy.api#documentation": "

    The binary to be sent to the end device, encoded in base64.

    ", "smithy.api#required": {} } }, @@ -5238,6 +7039,24 @@ "smithy.api#documentation": "

    Session keys for ABP v1.1

    " } }, + "com.amazonaws.iotwireless#SessionStartTimeTimestamp": { + "type": "timestamp", + "traits": { + "smithy.api#documentation": "

    Timestamp of when the multicast group session is to start.

    ", + "smithy.api#timestampFormat": "date-time" + } + }, + "com.amazonaws.iotwireless#SessionTimeout": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#documentation": "

    How long before a multicast group session is to timeout.

    ", + "smithy.api#range": { + "min": 60, + "max": 172800 + } + } + }, "com.amazonaws.iotwireless#SidewalkAccountInfo": { "type": "structure", "members": { @@ -5351,6 +7170,20 @@ "smithy.api#documentation": "

    MetaData for Sidewalk device.

    " } }, + "com.amazonaws.iotwireless#SidewalkEventNotificationConfigurations": { + "type": "structure", + "members": { + "AmazonIdEventTopic": { + "target": "com.amazonaws.iotwireless#EventNotificationTopicStatus", + "traits": { + "smithy.api#documentation": "

    Enum to denote whether amazon id event topic is enabled or disabled.

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

    SidewalkEventNotificationConfigurations object\n Event configuration object for Sidewalk related event topics.

    " + } + }, "com.amazonaws.iotwireless#SidewalkId": { "type": "string", "traits": { @@ -5428,25 +7261,259 @@ "smithy.api#documentation": "

    The new Sidewalk application server private key.

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

    Sidewalk update.

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

    Sidewalk update.

    " + } + }, + "com.amazonaws.iotwireless#SigningAlg": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    The certificate chain algorithm provided by sidewalk.

    ", + "smithy.api#enum": [ + { + "value": "Ed25519", + "name": "Ed25519" + }, + { + "value": "P256r1", + "name": "P256r1" + } + ] + } + }, + "com.amazonaws.iotwireless#StartBulkAssociateWirelessDeviceWithMulticastGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#StartBulkAssociateWirelessDeviceWithMulticastGroupRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#StartBulkAssociateWirelessDeviceWithMulticastGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Starts a bulk association of all qualifying wireless devices with a multicast group.

    ", + "smithy.api#http": { + "method": "PATCH", + "uri": "/multicast-groups/{Id}/bulk", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#StartBulkAssociateWirelessDeviceWithMulticastGroupRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "QueryString": { + "target": "com.amazonaws.iotwireless#QueryString" + }, + "Tags": { + "target": "com.amazonaws.iotwireless#TagList" + } + } + }, + "com.amazonaws.iotwireless#StartBulkAssociateWirelessDeviceWithMulticastGroupResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.iotwireless#StartBulkDisassociateWirelessDeviceFromMulticastGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#StartBulkDisassociateWirelessDeviceFromMulticastGroupRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#StartBulkDisassociateWirelessDeviceFromMulticastGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Starts a bulk disassociatin of all qualifying wireless devices from a multicast group.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/multicast-groups/{Id}/bulk", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#StartBulkDisassociateWirelessDeviceFromMulticastGroupRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "QueryString": { + "target": "com.amazonaws.iotwireless#QueryString" + }, + "Tags": { + "target": "com.amazonaws.iotwireless#TagList" + } + } + }, + "com.amazonaws.iotwireless#StartBulkDisassociateWirelessDeviceFromMulticastGroupResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.iotwireless#StartFuotaTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#StartFuotaTaskRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#StartFuotaTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Starts a FUOTA task.

    ", + "smithy.api#http": { + "method": "PUT", + "uri": "/fuota-tasks/{Id}", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#StartFuotaTaskRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#FuotaTaskId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "LoRaWAN": { + "target": "com.amazonaws.iotwireless#LoRaWANStartFuotaTask" + } + } + }, + "com.amazonaws.iotwireless#StartFuotaTaskResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.iotwireless#StartMulticastGroupSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#StartMulticastGroupSessionRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#StartMulticastGroupSessionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Starts a multicast group session.

    ", + "smithy.api#http": { + "method": "PUT", + "uri": "/multicast-groups/{Id}/session", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#StartMulticastGroupSessionRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "LoRaWAN": { + "target": "com.amazonaws.iotwireless#LoRaWANMulticastSession", + "traits": { + "smithy.api#required": {} + } + } } }, - "com.amazonaws.iotwireless#SigningAlg": { - "type": "string", + "com.amazonaws.iotwireless#StartMulticastGroupSessionResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.iotwireless#StartTime": { + "type": "timestamp", "traits": { - "smithy.api#documentation": "

    The certificate chain algorithm provided by sidewalk.

    ", - "smithy.api#enum": [ - { - "value": "Ed25519", - "name": "Ed25519" - }, - { - "value": "P256r1", - "name": "P256r1" - } - ] + "smithy.api#documentation": "

    Start time of a FUOTA task.

    ", + "smithy.api#timestampFormat": "date-time" } }, "com.amazonaws.iotwireless#Station": { @@ -5481,6 +7548,30 @@ } } }, + "com.amazonaws.iotwireless#SupportedRfRegion": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    Supported RfRegions

    ", + "smithy.api#enum": [ + { + "value": "EU868", + "name": "EU868" + }, + { + "value": "US915", + "name": "US915" + }, + { + "value": "AU915", + "name": "AU915" + }, + { + "value": "AS923-1", + "name": "AS923_1" + } + ] + } + }, "com.amazonaws.iotwireless#Supports32BitFCnt": { "type": "boolean" }, @@ -5545,6 +7636,7 @@ "target": "com.amazonaws.iotwireless#Tag" }, "traits": { + "smithy.api#documentation": "

    The tag to attach to the specified resource. Tags are metadata that you can use to manage a resource.

    ", "smithy.api#length": { "min": 0, "max": 200 @@ -5905,6 +7997,74 @@ "type": "structure", "members": {} }, + "com.amazonaws.iotwireless#UpdateFuotaTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#UpdateFuotaTaskRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#UpdateFuotaTaskResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Updates properties of a FUOTA task.

    ", + "smithy.api#http": { + "method": "PATCH", + "uri": "/fuota-tasks/{Id}", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#UpdateFuotaTaskRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#FuotaTaskId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.iotwireless#FuotaTaskName" + }, + "Description": { + "target": "com.amazonaws.iotwireless#Description" + }, + "LoRaWAN": { + "target": "com.amazonaws.iotwireless#LoRaWANFuotaTask" + }, + "FirmwareUpdateImage": { + "target": "com.amazonaws.iotwireless#FirmwareUpdateImage" + }, + "FirmwareUpdateRole": { + "target": "com.amazonaws.iotwireless#FirmwareUpdateRole" + } + } + }, + "com.amazonaws.iotwireless#UpdateFuotaTaskResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.iotwireless#UpdateLogLevelsByResourceTypes": { "type": "operation", "input": { @@ -5960,6 +8120,68 @@ "type": "structure", "members": {} }, + "com.amazonaws.iotwireless#UpdateMulticastGroup": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#UpdateMulticastGroupRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#UpdateMulticastGroupResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Updates properties of a multicast group session.

    ", + "smithy.api#http": { + "method": "PATCH", + "uri": "/multicast-groups/{Id}", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#UpdateMulticastGroupRequest": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.iotwireless#MulticastGroupId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.iotwireless#MulticastGroupName" + }, + "Description": { + "target": "com.amazonaws.iotwireless#Description" + }, + "LoRaWAN": { + "target": "com.amazonaws.iotwireless#LoRaWANMulticast" + } + } + }, + "com.amazonaws.iotwireless#UpdateMulticastGroupResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.iotwireless#UpdatePartnerAccount": { "type": "operation", "input": { @@ -6023,6 +8245,87 @@ "type": "structure", "members": {} }, + "com.amazonaws.iotwireless#UpdateResourceEventConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.iotwireless#UpdateResourceEventConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.iotwireless#UpdateResourceEventConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.iotwireless#AccessDeniedException" + }, + { + "target": "com.amazonaws.iotwireless#ConflictException" + }, + { + "target": "com.amazonaws.iotwireless#InternalServerException" + }, + { + "target": "com.amazonaws.iotwireless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.iotwireless#ThrottlingException" + }, + { + "target": "com.amazonaws.iotwireless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Update the event configuration for a particular resource identifier.

    ", + "smithy.api#http": { + "method": "PATCH", + "uri": "/event-configurations/{Identifier}", + "code": 204 + } + } + }, + "com.amazonaws.iotwireless#UpdateResourceEventConfigurationRequest": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.iotwireless#Identifier", + "traits": { + "smithy.api#documentation": "

    Resource identifier to opt in for event messaging.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "IdentifierType": { + "target": "com.amazonaws.iotwireless#IdentifierType", + "traits": { + "smithy.api#documentation": "

    Identifier type of the particular resource identifier for event configuration.

    ", + "smithy.api#httpQuery": "identifierType", + "smithy.api#required": {} + } + }, + "PartnerType": { + "target": "com.amazonaws.iotwireless#EventNotificationPartnerType", + "traits": { + "smithy.api#documentation": "

    Partner type of the resource if the identifier type is PartnerAccountId

    ", + "smithy.api#httpQuery": "partnerType" + } + }, + "DeviceRegistrationState": { + "target": "com.amazonaws.iotwireless#DeviceRegistrationStateEventConfiguration", + "traits": { + "smithy.api#documentation": "

    Event configuration for the device registration state event

    " + } + }, + "Proximity": { + "target": "com.amazonaws.iotwireless#ProximityEventConfiguration", + "traits": { + "smithy.api#documentation": "

    Event configuration for the Proximity event

    " + } + } + } + }, + "com.amazonaws.iotwireless#UpdateResourceEventConfigurationResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.iotwireless#UpdateSignature": { "type": "string", "traits": { @@ -6304,6 +8607,7 @@ "com.amazonaws.iotwireless#WirelessDeviceId": { "type": "string", "traits": { + "smithy.api#documentation": "

    The ID of the wireless device.

    ", "smithy.api#length": { "min": 0, "max": 256 @@ -6425,6 +8729,18 @@ "traits": { "smithy.api#documentation": "

    The Sidewalk account credentials.

    " } + }, + "FuotaDeviceStatus": { + "target": "com.amazonaws.iotwireless#FuotaDeviceStatus" + }, + "MulticastDeviceStatus": { + "target": "com.amazonaws.iotwireless#MulticastDeviceStatus", + "traits": { + "smithy.api#documentation": "

    The status of the wireless device in the multicast group.

    " + } + }, + "McGroupId": { + "target": "com.amazonaws.iotwireless#McGroupId" } }, "traits": { @@ -6743,6 +9059,15 @@ { "target": "com.amazonaws.iotwireless#AssociateAwsAccountWithPartnerAccount" }, + { + "target": "com.amazonaws.iotwireless#AssociateMulticastGroupWithFuotaTask" + }, + { + "target": "com.amazonaws.iotwireless#AssociateWirelessDeviceWithFuotaTask" + }, + { + "target": "com.amazonaws.iotwireless#AssociateWirelessDeviceWithMulticastGroup" + }, { "target": "com.amazonaws.iotwireless#AssociateWirelessDeviceWithThing" }, @@ -6752,12 +9077,21 @@ { "target": "com.amazonaws.iotwireless#AssociateWirelessGatewayWithThing" }, + { + "target": "com.amazonaws.iotwireless#CancelMulticastGroupSession" + }, { "target": "com.amazonaws.iotwireless#CreateDestination" }, { "target": "com.amazonaws.iotwireless#CreateDeviceProfile" }, + { + "target": "com.amazonaws.iotwireless#CreateFuotaTask" + }, + { + "target": "com.amazonaws.iotwireless#CreateMulticastGroup" + }, { "target": "com.amazonaws.iotwireless#CreateServiceProfile" }, @@ -6779,6 +9113,12 @@ { "target": "com.amazonaws.iotwireless#DeleteDeviceProfile" }, + { + "target": "com.amazonaws.iotwireless#DeleteFuotaTask" + }, + { + "target": "com.amazonaws.iotwireless#DeleteMulticastGroup" + }, { "target": "com.amazonaws.iotwireless#DeleteServiceProfile" }, @@ -6797,6 +9137,15 @@ { "target": "com.amazonaws.iotwireless#DisassociateAwsAccountFromPartnerAccount" }, + { + "target": "com.amazonaws.iotwireless#DisassociateMulticastGroupFromFuotaTask" + }, + { + "target": "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromFuotaTask" + }, + { + "target": "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromMulticastGroup" + }, { "target": "com.amazonaws.iotwireless#DisassociateWirelessDeviceFromThing" }, @@ -6812,12 +9161,24 @@ { "target": "com.amazonaws.iotwireless#GetDeviceProfile" }, + { + "target": "com.amazonaws.iotwireless#GetFuotaTask" + }, { "target": "com.amazonaws.iotwireless#GetLogLevelsByResourceTypes" }, + { + "target": "com.amazonaws.iotwireless#GetMulticastGroup" + }, + { + "target": "com.amazonaws.iotwireless#GetMulticastGroupSession" + }, { "target": "com.amazonaws.iotwireless#GetPartnerAccount" }, + { + "target": "com.amazonaws.iotwireless#GetResourceEventConfiguration" + }, { "target": "com.amazonaws.iotwireless#GetResourceLogLevel" }, @@ -6857,6 +9218,15 @@ { "target": "com.amazonaws.iotwireless#ListDeviceProfiles" }, + { + "target": "com.amazonaws.iotwireless#ListFuotaTasks" + }, + { + "target": "com.amazonaws.iotwireless#ListMulticastGroups" + }, + { + "target": "com.amazonaws.iotwireless#ListMulticastGroupsByFuotaTask" + }, { "target": "com.amazonaws.iotwireless#ListPartnerAccounts" }, @@ -6884,9 +9254,24 @@ { "target": "com.amazonaws.iotwireless#ResetResourceLogLevel" }, + { + "target": "com.amazonaws.iotwireless#SendDataToMulticastGroup" + }, { "target": "com.amazonaws.iotwireless#SendDataToWirelessDevice" }, + { + "target": "com.amazonaws.iotwireless#StartBulkAssociateWirelessDeviceWithMulticastGroup" + }, + { + "target": "com.amazonaws.iotwireless#StartBulkDisassociateWirelessDeviceFromMulticastGroup" + }, + { + "target": "com.amazonaws.iotwireless#StartFuotaTask" + }, + { + "target": "com.amazonaws.iotwireless#StartMulticastGroupSession" + }, { "target": "com.amazonaws.iotwireless#TagResource" }, @@ -6899,12 +9284,21 @@ { "target": "com.amazonaws.iotwireless#UpdateDestination" }, + { + "target": "com.amazonaws.iotwireless#UpdateFuotaTask" + }, { "target": "com.amazonaws.iotwireless#UpdateLogLevelsByResourceTypes" }, + { + "target": "com.amazonaws.iotwireless#UpdateMulticastGroup" + }, { "target": "com.amazonaws.iotwireless#UpdatePartnerAccount" }, + { + "target": "com.amazonaws.iotwireless#UpdateResourceEventConfiguration" + }, { "target": "com.amazonaws.iotwireless#UpdateWirelessDevice" }, diff --git a/codegen/sdk-codegen/aws-models/lightsail.json b/codegen/sdk-codegen/aws-models/lightsail.json index 7a08e00eb467..2aff208eeaaa 100644 --- a/codegen/sdk-codegen/aws-models/lightsail.json +++ b/codegen/sdk-codegen/aws-models/lightsail.json @@ -1195,12 +1195,55 @@ "traits": { "smithy.api#documentation": "

    An object that describes the state of the bucket.

    " } + }, + "accessLogConfig": { + "target": "com.amazonaws.lightsail#BucketAccessLogConfig", + "traits": { + "smithy.api#documentation": "

    An object that describes the access log configuration for the bucket.

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

    Describes an Amazon Lightsail bucket.

    " } }, + "com.amazonaws.lightsail#BucketAccessLogConfig": { + "type": "structure", + "members": { + "enabled": { + "target": "com.amazonaws.lightsail#boolean", + "traits": { + "smithy.api#documentation": "

    A Boolean value that indicates whether bucket access logging is enabled for the\n bucket.

    ", + "smithy.api#required": {} + } + }, + "destination": { + "target": "com.amazonaws.lightsail#BucketName", + "traits": { + "smithy.api#documentation": "

    The name of the bucket where the access is saved. The destination can be a Lightsail\n bucket in the same account, and in the same AWS Region as the source bucket.

    \n \n

    This parameter is required when enabling the access log for a bucket, and should be\n omitted when disabling the access log.

    \n
    " + } + }, + "prefix": { + "target": "com.amazonaws.lightsail#BucketAccessLogPrefix", + "traits": { + "smithy.api#documentation": "

    The optional object prefix for the bucket access log.

    \n

    The prefix is an optional addition to the object key that organizes your access log files\n in the destination bucket. For example, if you specify a logs/ prefix, then each\n log object will begin with the logs/ prefix in its key (for example,\n logs/2021-11-01-21-32-16-E568B2907131C0C0).

    \n \n

    This parameter can be optionally specified when enabling the access log for a bucket,\n and should be omitted when disabling the access log.

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

    Describes the access log configuration for a bucket in the Amazon Lightsail object storage\n service.

    \n

    For more information about bucket access logs, see Logging bucket requests using access logging in Amazon Lightsail in the\n Amazon Lightsail Developer Guide.

    " + } + }, + "com.amazonaws.lightsail#BucketAccessLogPrefix": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[\\w/!.*')(-]+$" + } + }, "com.amazonaws.lightsail#BucketBundle": { "type": "structure", "members": { @@ -2020,7 +2063,7 @@ "image": { "target": "com.amazonaws.lightsail#string", "traits": { - "smithy.api#documentation": "

    The name of the image used for the container.

    \n\n

    Container images sourced from your Lightsail container service, that are registered and\n stored on your service, start with a colon (:). For example,\n :container-service-1.mystaticwebsite.1. Container images sourced from a public\n registry like Docker Hub don't start with a colon. For example, nginx:latest or\n nginx.

    " + "smithy.api#documentation": "

    The name of the image used for the container.

    \n \n

    Container images sourced from your Lightsail container service, that are registered and\n stored on your service, start with a colon (:). For example, if your container\n service name is container-service-1, the container image label is\n mystaticsite, and you want to use the third (3) version of the\n registered container image, then you should specify\n :container-service-1.mystaticsite.3. To use the latest version of a container\n image, specify latest instead of a version number (for example,\n :container-service-1.mystaticsite.latest). Lightsail will automatically use\n the highest numbered version of the registered container image.

    \n \n

    Container images sourced from a public registry like Docker Hub don't start with a colon.\n For example, nginx:latest or nginx.

    " } }, "command": { @@ -3370,7 +3413,7 @@ "tags": { "target": "com.amazonaws.lightsail#TagList", "traits": { - "smithy.api#documentation": "

    The tag keys and optional values to add to the certificate during create.

    \n

    Use the TagResource action to tag a resource after it's created.

    \n

    For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.

    " + "smithy.api#documentation": "

    The tag keys and optional values to add to the container service during create.

    \n

    Use the TagResource action to tag a resource after it's created.

    \n

    For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.

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

    Deletes a specific SSH key pair.

    \n

    The delete key pair operation supports tag-based access control via resource\n tags applied to the resource identified by key pair name. For more information,\n see the Amazon Lightsail Developer Guide.

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

    Deletes a specific SSH key pair.

    \n \n\n

    The delete key pair operation supports tag-based access control via resource\n tags applied to the resource identified by key pair name. For more information,\n see the Amazon Lightsail Developer Guide.

    ", "smithy.api#http": { "method": "POST", "uri": "/ls/api/2016-11-28/DeleteKeyPair", @@ -13279,6 +13322,21 @@ }, "com.amazonaws.lightsail#Lightsail_20161128": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Lightsail", + "arnNamespace": "lightsail", + "cloudFormationName": "Lightsail", + "cloudTrailEventSource": "lightsail.amazonaws.com", + "endpointPrefix": "lightsail" + }, + "aws.auth#sigv4": { + "name": "lightsail" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "

    Amazon Lightsail is the easiest way to get started with Amazon Web Services (AWS) for developers\n who need to build websites or web applications. It includes everything you need to launch your\n project quickly - instances (virtual private servers), container services, storage buckets,\n managed databases, SSD-based block storage, static IP addresses, load balancers, content\n delivery network (CDN) distributions, DNS management of registered domains, and resource\n snapshots (backups) - for a low, predictable monthly price.

    \n\n

    You can manage your Lightsail resources using the Lightsail console, Lightsail API,\n AWS Command Line Interface (AWS CLI), or SDKs. For more information about Lightsail concepts\n and tasks, see the Amazon Lightsail Developer Guide.

    \n\n

    This API Reference provides detailed information about the actions, data types,\n parameters, and errors of the Lightsail service. For more information about the supported\n AWS Regions, endpoints, and service quotas of the Lightsail service, see Amazon Lightsail Endpoints and\n Quotas in the AWS General Reference.

    ", + "smithy.api#title": "Amazon Lightsail" + }, "version": "2016-11-28", "operations": [ { @@ -13740,22 +13798,7 @@ { "target": "com.amazonaws.lightsail#UpdateRelationalDatabaseParameters" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Lightsail", - "arnNamespace": "lightsail", - "cloudFormationName": "Lightsail", - "cloudTrailEventSource": "lightsail.amazonaws.com", - "endpointPrefix": "lightsail" - }, - "aws.auth#sigv4": { - "name": "lightsail" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "

    Amazon Lightsail is the easiest way to get started with Amazon Web Services (AWS) for developers\n who need to build websites or web applications. It includes everything you need to launch your\n project quickly - instances (virtual private servers), container services, storage buckets,\n managed databases, SSD-based block storage, static IP addresses, load balancers, content\n delivery network (CDN) distributions, DNS management of registered domains, and resource\n snapshots (backups) - for a low, predictable monthly price.

    \n\n

    You can manage your Lightsail resources using the Lightsail console, Lightsail API,\n AWS Command Line Interface (AWS CLI), or SDKs. For more information about Lightsail concepts\n and tasks, see the Amazon Lightsail Developer Guide.

    \n\n

    This API Reference provides detailed information about the actions, data types,\n parameters, and errors of the Lightsail service. For more information about the supported\n AWS Regions, endpoints, and service quotas of the Lightsail service, see Amazon Lightsail Endpoints and\n Quotas in the AWS General Reference.

    ", - "smithy.api#title": "Amazon Lightsail" - } + ] }, "com.amazonaws.lightsail#LoadBalancer": { "type": "structure", @@ -18347,6 +18390,12 @@ "traits": { "smithy.api#documentation": "

    An array of strings to specify the AWS account IDs that can access the bucket.

    \n\n

    You can give a maximum of 10 AWS accounts access to a bucket.

    " } + }, + "accessLogConfig": { + "target": "com.amazonaws.lightsail#BucketAccessLogConfig", + "traits": { + "smithy.api#documentation": "

    An object that describes the access log configuration for the bucket.

    " + } } } }, diff --git a/codegen/sdk-codegen/aws-models/macie2.json b/codegen/sdk-codegen/aws-models/macie2.json index b43002bcdb81..2ff8240af53b 100644 --- a/codegen/sdk-codegen/aws-models/macie2.json +++ b/codegen/sdk-codegen/aws-models/macie2.json @@ -916,7 +916,7 @@ } }, "traits": { - "smithy.api#documentation": "

    Provides statistical data and other information about an S3 bucket that Amazon Macie monitors and analyzes for your account. If an error occurs when Macie attempts to retrieve and process information about the bucket or the bucket's objects, the value for most of these properties is null. Exceptions are accountId, bucketArn, bucketCreatedAt, bucketName, lastUpdated, and region. To identify the cause of the error, refer to the errorCode and errorMessage values.

    " + "smithy.api#documentation": "

    Provides statistical data and other information about an S3 bucket that Amazon Macie monitors and analyzes for your account. If an error occurs when Macie attempts to retrieve and process information about the bucket or the bucket's objects, the value for the versioning property is false and the value for most other properties is null. Exceptions are accountId, bucketArn, bucketCreatedAt, bucketName, lastUpdated, and region. To identify the cause of the error, refer to the errorCode and errorMessage values.

    " } }, "com.amazonaws.macie2#BucketMetadataErrorCode": { @@ -1193,14 +1193,14 @@ "code": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "

    The status of the finding. Possible values are:

    • COMPLETE - Amazon Macie successfully completed its analysis of the S3 object that the finding applies to.

    • PARTIAL - Macie analyzed only a subset of the data in the S3 object that the finding applies to. For example, the object is an archive file that contains files in an unsupported format.

    • SKIPPED - Macie wasn't able to analyze the S3 object that the finding applies to. For example, the object is a file in an unsupported format.

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

    The status of the finding. Possible values are:

    • COMPLETE - Amazon Macie successfully completed its analysis of the S3 object that the finding applies to.

    • PARTIAL - Macie analyzed only a subset of the data in the S3 object that the finding applies to. For example, the object is an archive file that contains files in an unsupported format.

    • SKIPPED - Macie wasn't able to analyze the S3 object that the finding applies to. For example, the object is a file that uses an unsupported format.

    ", "smithy.api#jsonName": "code" } }, "reason": { "target": "com.amazonaws.macie2#__string", "traits": { - "smithy.api#documentation": "

    A brief description of the status of the finding. Amazon Macie uses this value to notify you of any errors, warnings, or considerations that might impact your analysis of the finding.

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

    A brief description of the status of the finding. This value is null if the status (code) of the finding is COMPLETE.

    Amazon Macie uses this value to notify you of any errors, warnings, or considerations that might impact your analysis of the finding and the affected S3 object. Possible values are:

    • ARCHIVE_CONTAINS_UNPROCESSED_FILES - The object is an archive file and Macie extracted and analyzed only some or none of the files in the archive. To determine which files Macie analyzed, if any, you can refer to the corresponding sensitive data discovery result for the finding (ClassificationDetails.detailedResultsLocation).

    • ARCHIVE_EXCEEDS_SIZE_LIMIT - The object is an archive file whose total storage size exceeds the size quota for this type of archive.

    • ARCHIVE_NESTING_LEVEL_OVER_LIMIT - The object is an archive file whose nested depth exceeds the quota for the maximum number of nested levels that Macie analyzes for this type of archive.

    • ARCHIVE_TOTAL_BYTES_EXTRACTED_OVER_LIMIT - The object is an archive file that exceeds the quota for the maximum amount of data that Macie extracts and analyzes for this type of archive.

    • ARCHIVE_TOTAL_DOCUMENTS_PROCESSED_OVER_LIMIT - The object is an archive file that contains more than the maximum number of files that Macie extracts and analyzes for this type of archive.

    • FILE_EXCEEDS_SIZE_LIMIT - The storage size of the object exceeds the size quota for this type of file.

    • INVALID_ENCRYPTION - The object is encrypted using server-side encryption but Macie isn’t allowed to use the key. Macie can’t decrypt and analyze the object.

    • INVALID_KMS_KEY - The object is encrypted with an KMS key that was disabled or is being deleted. Macie can’t decrypt and analyze the object.

    • INVALID_OBJECT_STATE - The object doesn’t use a supported Amazon S3 storage class. For more information, see Discovering sensitive data in the Amazon Macie User Guide.

    • JSON_NESTING_LEVEL_OVER_LIMIT - The object contains JSON data and the nested depth of the data exceeds the quota for the number of nested levels that Macie analyzes for this type of file.

    • MALFORMED_FILE - The object is a malformed or corrupted file. An error occurred when Macie attempted to detect the file’s type or extract data from the file.

    • OBJECT_VERSION_MISMATCH - The object was changed while Macie was analyzing it.

    • NO_SUCH_BUCKET_AVAILABLE - The object was in a bucket that was deleted shortly before or when Macie attempted to analyze the object.

    • MALFORMED_OR_FILE_SIZE_EXCEEDS_LIMIT - The object is a Microsoft Office file that is malformed or exceeds the size quota for this type of file. If the file is malformed, an error occurred when Macie attempted to extract data from the file.

    • OOXML_UNCOMPRESSED_SIZE_EXCEEDS_LIMIT - The object is an Office Open XML file that exceeds the size quota for this type of file.

    • OOXML_UNCOMPRESSED_RATIO_EXCEEDS_LIMIT - The object is an Office Open XML file whose compression ratio exceeds the compression quota for this type of file.

    • PERMISSION_DENIED - Macie isn’t allowed to access the object. The object’s permissions settings prevent Macie from analyzing the object.

    • SOURCE_OBJECT_NO_LONGER_AVAILABLE - The object was deleted shortly before or when Macie attempted to analyze it.

    • UNABLE_TO_PARSE_FILE - The object is a file that contains structured data and an error occurred when Macie attempted to parse the data.

    • UNSUPPORTED_FILE_TYPE_EXCEPTION - The object is a file that uses an unsupported file or storage format. For more information, see Supported file and storage formats in the Amazon Macie User Guide.

    For information about sensitive data discovery quotas for files, see Amazon Macie quotas in the Amazon Macie User Guide.

    ", "smithy.api#jsonName": "reason" } } @@ -1440,21 +1440,21 @@ "ignoreWords": { "target": "com.amazonaws.macie2#__listOf__string", "traits": { - "smithy.api#documentation": "

    An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression is the same as any string in this array, Amazon Macie ignores it. The array can contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case sensitive.

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

    An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression contains any string in this array, Amazon Macie ignores it. The array can contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case sensitive.

    ", "smithy.api#jsonName": "ignoreWords" } }, "keywords": { "target": "com.amazonaws.macie2#__listOf__string", "traits": { - "smithy.api#documentation": "

    An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive.

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

    An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive.

    ", "smithy.api#jsonName": "keywords" } }, "maximumMatchDistance": { "target": "com.amazonaws.macie2#__integer", "traits": { - "smithy.api#documentation": "

    The maximum number of characters that can exist between text that matches the regex pattern and the character sequences specified by the keywords array. Amazon Macie includes or excludes a result based on the proximity of a keyword to text that matches the regex pattern. The distance can be 1-300 characters. The default value is 50.

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

    The maximum number of characters that can exist between text that matches the regular expression and the character sequences specified by the keywords array. Amazon Macie includes or excludes a result based on the proximity of a keyword to text that matches the regular expression. The distance can be 1-300 characters. The default value is 50.

    ", "smithy.api#jsonName": "maximumMatchDistance" } }, @@ -1472,6 +1472,13 @@ "smithy.api#jsonName": "regex" } }, + "severityLevels": { + "target": "com.amazonaws.macie2#SeverityLevelList", + "traits": { + "smithy.api#documentation": "

    The severity to assign to findings that the custom data identifier produces, based on the number of occurrences of text that matches the custom data identifier's detection criteria. You can specify as many as three SeverityLevel objects in this array, one for each severity: LOW, MEDIUM, or HIGH. If you specify more than one, the occurrences thresholds must be in ascending order by severity, moving from LOW to HIGH. For example, 1 for LOW, 50 for MEDIUM, and 100 for HIGH. If an S3 object contains fewer occurrences than the lowest specified threshold, Amazon Macie doesn't create a finding.

    If you don't specify any values for this array, Macie creates findings for S3 objects that contain at least one occurrence of text that matches the detection criteria, and Macie assigns the MEDIUM severity to those findings.

    ", + "smithy.api#jsonName": "severityLevels" + } + }, "tags": { "target": "com.amazonaws.macie2#TagMap", "traits": { @@ -1807,7 +1814,7 @@ "findingTypes": { "target": "com.amazonaws.macie2#__listOfFindingType", "traits": { - "smithy.api#documentation": "

    An array that lists one or more types of findings to include in the set of sample findings. Currently, the only supported value is Policy:IAMUser/S3BucketEncryptionDisabled.

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

    An array of finding types, one for each type of sample finding to create. To create a sample of every type of finding that Amazon Macie supports, don't include this array in your request.

    ", "smithy.api#jsonName": "findingTypes" } } @@ -2052,6 +2059,26 @@ "smithy.api#documentation": "

    Specifies that a classification job runs once a day, every day. This is an empty object.

    " } }, + "com.amazonaws.macie2#DataIdentifierSeverity": { + "type": "string", + "traits": { + "smithy.api#documentation": "

    The severity of a finding, ranging from LOW, for least severe, to HIGH, for most severe. Valid values are:

    ", + "smithy.api#enum": [ + { + "value": "LOW", + "name": "LOW" + }, + { + "value": "MEDIUM", + "name": "MEDIUM" + }, + { + "value": "HIGH", + "name": "HIGH" + } + ] + } + }, "com.amazonaws.macie2#DayOfWeek": { "type": "string", "traits": { @@ -4044,21 +4071,21 @@ "ignoreWords": { "target": "com.amazonaws.macie2#__listOf__string", "traits": { - "smithy.api#documentation": "

    An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression is the same as any string in this array, Amazon Macie ignores it. Ignore words are case sensitive.

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

    An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression contains any string in this array, Amazon Macie ignores it. Ignore words are case sensitive.

    ", "smithy.api#jsonName": "ignoreWords" } }, "keywords": { "target": "com.amazonaws.macie2#__listOf__string", "traits": { - "smithy.api#documentation": "

    An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) of the regular expression to match. Keywords aren't case sensitive.

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

    An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) of the regular expression to match. Keywords aren't case sensitive.

    ", "smithy.api#jsonName": "keywords" } }, "maximumMatchDistance": { "target": "com.amazonaws.macie2#__integer", "traits": { - "smithy.api#documentation": "

    The maximum number of characters that can exist between text that matches the regex pattern and the character sequences specified by the keywords array. Amazon Macie includes or excludes a result based on the proximity of a keyword to text that matches the regex pattern.

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

    The maximum number of characters that can exist between text that matches the regular expression and the character sequences specified by the keywords array. Amazon Macie includes or excludes a result based on the proximity of a keyword to text that matches the regular expression.

    ", "smithy.api#jsonName": "maximumMatchDistance" } }, @@ -4076,6 +4103,13 @@ "smithy.api#jsonName": "regex" } }, + "severityLevels": { + "target": "com.amazonaws.macie2#SeverityLevelList", + "traits": { + "smithy.api#documentation": "

    Specifies the severity that's assigned to findings that the custom data identifier produces, based on the number of occurrences of text that matches the custom data identifier's detection criteria. By default, Amazon Macie creates findings for S3 objects that contain at least one occurrence of text that matches the detection criteria, and Macie assigns the MEDIUM severity to those findings.

    ", + "smithy.api#jsonName": "severityLevels" + } + }, "tags": { "target": "com.amazonaws.macie2#TagMap", "traits": { @@ -6382,6 +6416,21 @@ }, "com.amazonaws.macie2#Macie2": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Macie2", + "arnNamespace": "macie2", + "cloudFormationName": "Macie2", + "cloudTrailEventSource": "macie2.amazonaws.com", + "endpointPrefix": "macie2" + }, + "aws.auth#sigv4": { + "name": "macie2" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

    Amazon Macie is a fully managed data security and data privacy service that uses machine learning and pattern matching to discover and protect your sensitive data in AWS. Macie automates the discovery of sensitive data, such as PII and intellectual property, to provide you with insight into the data that your organization stores in AWS. Macie also provides an inventory of your Amazon S3 buckets, which it continually monitors for you. If Macie detects sensitive data or potential data access issues, it generates detailed findings for you to review and act upon as necessary.

    ", + "smithy.api#title": "Amazon Macie 2" + }, "version": "2020-01-01", "operations": [ { @@ -6555,22 +6604,7 @@ { "target": "com.amazonaws.macie2#UpdateOrganizationConfiguration" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Macie2", - "arnNamespace": "macie2", - "cloudFormationName": "Macie2", - "cloudTrailEventSource": "macie2.amazonaws.com", - "endpointPrefix": "macie2" - }, - "aws.auth#sigv4": { - "name": "macie2" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

    Amazon Macie is a fully managed data security and data privacy service that uses machine learning and pattern matching to discover and protect your sensitive data in AWS. Macie automates the discovery of sensitive data, such as PII and intellectual property, to provide you with insight into the data that your organization stores in AWS. Macie also provides an inventory of your Amazon S3 buckets, which it continually monitors for you. If Macie detects sensitive data or potential data access issues, it generates detailed findings for you to review and act upon as necessary.

    ", - "smithy.api#title": "Amazon Macie 2" - } + ] }, "com.amazonaws.macie2#MacieStatus": { "type": "string", @@ -6618,7 +6652,7 @@ "category": { "target": "com.amazonaws.macie2#SensitiveDataItemCategory", "traits": { - "smithy.api#documentation": "

    The category of sensitive data that the managed data identifier detects: CREDENTIALS, for credentials data such as private keys or Amazon Web Services secret keys; FINANCIAL_INFORMATION, for financial data such as credit card numbers; or, PERSONAL_INFORMATION, for personal health information, such as health insurance identification numbers, or personally identifiable information, such as passport numbers.

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

    The category of sensitive data that the managed data identifier detects: CREDENTIALS, for credentials data such as private keys or Amazon Web Services secret access keys; FINANCIAL_INFORMATION, for financial data such as credit card numbers; or, PERSONAL_INFORMATION, for personal health information, such as health insurance identification numbers, or personally identifiable information, such as passport numbers.

    ", "smithy.api#jsonName": "category" } }, @@ -8026,7 +8060,7 @@ "category": { "target": "com.amazonaws.macie2#SensitiveDataItemCategory", "traits": { - "smithy.api#documentation": "

    The category of sensitive data that was detected. For example: CREDENTIALS, for credentials data such as private keys or Amazon Web Services secret keys; FINANCIAL_INFORMATION, for financial data such as credit card numbers; or, PERSONAL_INFORMATION, for personal health information, such as health insurance identification numbers, or personally identifiable information, such as passport numbers.

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

    The category of sensitive data that was detected. For example: CREDENTIALS, for credentials data such as private keys or Amazon Web Services secret access keys; FINANCIAL_INFORMATION, for financial data such as credit card numbers; or, PERSONAL_INFORMATION, for personal health information, such as health insurance identification numbers, or personally identifiable information, such as passport numbers.

    ", "smithy.api#jsonName": "category" } }, @@ -8270,6 +8304,39 @@ ] } }, + "com.amazonaws.macie2#SeverityLevel": { + "type": "structure", + "members": { + "occurrencesThreshold": { + "target": "com.amazonaws.macie2#__long", + "traits": { + "smithy.api#documentation": "

    The minimum number of occurrences of text that must match the custom data identifier's detection criteria in order to produce a finding with the specified severity (severity).

    ", + "smithy.api#jsonName": "occurrencesThreshold", + "smithy.api#required": {} + } + }, + "severity": { + "target": "com.amazonaws.macie2#DataIdentifierSeverity", + "traits": { + "smithy.api#documentation": "

    The severity to assign to a finding if the number of occurrences is greater than or equal to the specified threshold (occurrencesThreshold) and, if applicable, is less than the threshold for the next consecutive severity level for the custom data identifier.

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

    Specifies a severity level for findings that a custom data identifier produces. A severity level determines which severity is assigned to the findings, based on the number of occurrences of text that matches the custom data identifier's detection criteria.

    " + } + }, + "com.amazonaws.macie2#SeverityLevelList": { + "type": "list", + "member": { + "target": "com.amazonaws.macie2#SeverityLevel" + }, + "traits": { + "smithy.api#documentation": "

    The severity to assign to findings that the custom data identifier produces, based on the number of occurrences of text that matches the custom data identifier's detection criteria. You can specify as many as three SeverityLevel objects in this array, one for each severity: LOW, MEDIUM, or HIGH. If you specify more than one, the occurrences thresholds must be in ascending order by severity, moving from LOW to HIGH. For example, 1 for LOW, 50 for MEDIUM, and 100 for HIGH. If an S3 object contains fewer occurrences than the lowest specified threshold, Amazon Macie doesn't create a finding.

    If you don't specify any values for this array, Macie creates findings for S3 objects that contain at least one occurrence of text that matches the detection criteria, and Macie automatically assigns the MEDIUM severity to those findings.

    " + } + }, "com.amazonaws.macie2#SharedAccess": { "type": "string", "traits": { @@ -8669,21 +8736,21 @@ "ignoreWords": { "target": "com.amazonaws.macie2#__listOf__string", "traits": { - "smithy.api#documentation": "

    An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression is the same as any string in this array, Amazon Macie ignores it. The array can contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case sensitive.

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

    An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression contains any string in this array, Amazon Macie ignores it. The array can contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case sensitive.

    ", "smithy.api#jsonName": "ignoreWords" } }, "keywords": { "target": "com.amazonaws.macie2#__listOf__string", "traits": { - "smithy.api#documentation": "

    An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive.

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

    An array that lists specific character sequences (keywords), one of which must be within proximity (maximumMatchDistance) of the regular expression to match. The array can contain as many as 50 keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive.

    ", "smithy.api#jsonName": "keywords" } }, "maximumMatchDistance": { "target": "com.amazonaws.macie2#__integer", "traits": { - "smithy.api#documentation": "

    The maximum number of characters that can exist between text that matches the regex pattern and the character sequences specified by the keywords array. Amazon Macie includes or excludes a result based on the proximity of a keyword to text that matches the regex pattern. The distance can be 1-300 characters. The default value is 50.

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

    The maximum number of characters that can exist between text that matches the regular expression and the character sequences specified by the keywords array. Amazon Macie includes or excludes a result based on the proximity of a keyword to text that matches the regular expression. The distance can be 1-300 characters. The default value is 50.

    ", "smithy.api#jsonName": "maximumMatchDistance" } }, @@ -8711,7 +8778,7 @@ "matchCount": { "target": "com.amazonaws.macie2#__integer", "traits": { - "smithy.api#documentation": "

    The number of instances of sample text that matched the detection criteria specified in the custom data identifier.

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

    The number of occurrences of sample text that matched the criteria specified by the custom data identifier.

    ", "smithy.api#jsonName": "matchCount" } } @@ -9126,7 +9193,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Enables an Amazon Macie administrator to suspend or re-enable a member account.

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

    Enables an Amazon Macie administrator to suspend or re-enable Macie for a member account.

    ", "smithy.api#http": { "method": "PATCH", "uri": "/macie/members/{id}", diff --git a/codegen/sdk-codegen/aws-models/neptune.json b/codegen/sdk-codegen/aws-models/neptune.json index 4d21c319be98..b1c1ff3f1076 100644 --- a/codegen/sdk-codegen/aws-models/neptune.json +++ b/codegen/sdk-codegen/aws-models/neptune.json @@ -49,7 +49,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Associates an Identity and Access Management (IAM) role from an\n Neptune DB cluster.

    " + "smithy.api#documentation": "

    Associates an Identity and Access Management (IAM) role with an\n Neptune DB cluster.

    " } }, "com.amazonaws.neptune#AddRoleToDBClusterMessage": { @@ -72,7 +72,7 @@ "FeatureName": { "target": "com.amazonaws.neptune#String", "traits": { - "smithy.api#documentation": "

    The name of the feature for the Neptune DB cluster that the IAM role is to be associated with.\n For the list of supported feature names, see DBEngineVersion.

    " + "smithy.api#documentation": "

    The name of the feature for the Neptune DB cluster that the IAM role is to be associated with.\n For the list of supported feature names, see DBEngineVersion.

    " } } } @@ -165,6 +165,24 @@ }, "com.amazonaws.neptune#AmazonRDSv19": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Neptune", + "arnNamespace": "rds", + "cloudFormationName": "Neptune", + "cloudTrailEventSource": "neptune.amazonaws.com", + "endpointPrefix": "rds" + }, + "aws.auth#sigv4": { + "name": "rds" + }, + "aws.protocols#awsQuery": {}, + "smithy.api#documentation": "Amazon Neptune\n

    Amazon Neptune is a fast, reliable, fully-managed graph database service that makes it\n easy to build and run applications that work with highly connected datasets. The core of\n Amazon Neptune is a purpose-built, high-performance graph database engine optimized for\n storing billions of relationships and querying the graph with milliseconds latency. Amazon\n Neptune supports popular graph models Property Graph and W3C's RDF, and their respective query\n languages Apache TinkerPop Gremlin and SPARQL, allowing you to easily build queries that\n efficiently navigate highly connected datasets. Neptune powers graph use cases such as\n recommendation engines, fraud detection, knowledge graphs, drug discovery, and network\n security.

    \n\n

    This interface reference for Amazon Neptune contains documentation for a programming or\n command line interface you can use to manage Amazon Neptune. Note that Amazon Neptune is\n asynchronous, which means that some interfaces might require techniques such as polling or\n callback functions to determine when a command has been applied. In this reference, the\n parameter descriptions indicate whether a command is applied immediately, on the next instance\n reboot, or during the maintenance window. The reference structure is as follows, and we list\n following some related topics from the user guide.

    ", + "smithy.api#title": "Amazon Neptune", + "smithy.api#xmlNamespace": { + "uri": "http://rds.amazonaws.com/doc/2014-10-31/" + } + }, "version": "2014-10-31", "operations": [ { @@ -356,25 +374,7 @@ { "target": "com.amazonaws.neptune#StopDBCluster" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Neptune", - "arnNamespace": "rds", - "cloudFormationName": "Neptune", - "cloudTrailEventSource": "neptune.amazonaws.com", - "endpointPrefix": "rds" - }, - "aws.auth#sigv4": { - "name": "rds" - }, - "aws.protocols#awsQuery": {}, - "smithy.api#documentation": "Amazon Neptune\n

    Amazon Neptune is a fast, reliable, fully-managed graph database service that makes it\n easy to build and run applications that work with highly connected datasets. The core of\n Amazon Neptune is a purpose-built, high-performance graph database engine optimized for\n storing billions of relationships and querying the graph with milliseconds latency. Amazon\n Neptune supports popular graph models Property Graph and W3C's RDF, and their respective query\n languages Apache TinkerPop Gremlin and SPARQL, allowing you to easily build queries that\n efficiently navigate highly connected datasets. Neptune powers graph use cases such as\n recommendation engines, fraud detection, knowledge graphs, drug discovery, and network\n security.

    \n\n

    This interface reference for Amazon Neptune contains documentation for a programming or\n command line interface you can use to manage Amazon Neptune. Note that Amazon Neptune is\n asynchronous, which means that some interfaces might require techniques such as polling or\n callback functions to determine when a command has been applied. In this reference, the\n parameter descriptions indicate whether a command is applied immediately, on the next instance\n reboot, or during the maintenance window. The reference structure is as follows, and we list\n following some related topics from the user guide.

    ", - "smithy.api#title": "Amazon Neptune", - "smithy.api#xmlNamespace": { - "uri": "http://rds.amazonaws.com/doc/2014-10-31/" - } - } + ] }, "com.amazonaws.neptune#ApplyMethod": { "type": "string", @@ -2517,7 +2517,7 @@ "FeatureName": { "target": "com.amazonaws.neptune#String", "traits": { - "smithy.api#documentation": "

    The name of the feature associated with the Amazon Identity and Access Management (IAM) role.\n For the list of supported feature names, see DBEngineVersion.\n

    " + "smithy.api#documentation": "

    The name of the feature associated with the Amazon Identity and Access Management (IAM) role.\n For the list of supported feature names, see DescribeDBEngineVersions.\n

    " } } }, @@ -4482,7 +4482,7 @@ "SnapshotType": { "target": "com.amazonaws.neptune#String", "traits": { - "smithy.api#documentation": "

    The type of DB cluster snapshots to be returned. You can specify one of the following\n values:

    \n
      \n
    • \n

      \n automated - Return all DB cluster snapshots that have been automatically\n taken by Amazon Neptune for my Amazon account.

      \n
    • \n
    • \n

      \n manual - Return all DB cluster snapshots that have been taken by my AWS\n account.

      \n
    • \n
    • \n

      \n shared - Return all manual DB cluster snapshots that have been shared to\n my Amazon account.

      \n
    • \n
    • \n

      \n public - Return all DB cluster snapshots that have been marked as\n public.

      \n
    • \n
    \n

    If you don't specify a SnapshotType value, then both automated and manual DB\n cluster snapshots are returned. You can include shared DB cluster snapshots with these results\n by setting the IncludeShared parameter to true. You can include\n public DB cluster snapshots with these results by setting the IncludePublic\n parameter to true.

    \n

    The IncludeShared and IncludePublic parameters don't apply for\n SnapshotType values of manual or automated. The\n IncludePublic parameter doesn't apply when SnapshotType is set to\n shared. The IncludeShared parameter doesn't apply when\n SnapshotType is set to public.

    " + "smithy.api#documentation": "

    The type of DB cluster snapshots to be returned. You can specify one of the following\n values:

    \n
      \n
    • \n

      \n automated - Return all DB cluster snapshots that have been automatically\n taken by Amazon Neptune for my Amazon account.

      \n
    • \n
    • \n

      \n manual - Return all DB cluster snapshots that have been taken by my Amazon\n account.

      \n
    • \n
    • \n

      \n shared - Return all manual DB cluster snapshots that have been shared to\n my Amazon account.

      \n
    • \n
    • \n

      \n public - Return all DB cluster snapshots that have been marked as\n public.

      \n
    • \n
    \n

    If you don't specify a SnapshotType value, then both automated and manual DB\n cluster snapshots are returned. You can include shared DB cluster snapshots with these results\n by setting the IncludeShared parameter to true. You can include\n public DB cluster snapshots with these results by setting the IncludePublic\n parameter to true.

    \n

    The IncludeShared and IncludePublic parameters don't apply for\n SnapshotType values of manual or automated. The\n IncludePublic parameter doesn't apply when SnapshotType is set to\n shared. The IncludeShared parameter doesn't apply when\n SnapshotType is set to public.

    " } }, "Filters": { @@ -4506,7 +4506,7 @@ "IncludeShared": { "target": "com.amazonaws.neptune#Boolean", "traits": { - "smithy.api#documentation": "

    True to include shared manual DB cluster snapshots from other Amazon accounts that this AWS\n account has been given permission to copy or restore, and otherwise false. The default is\n false.

    \n

    You can give an Amazon account permission to restore a manual DB cluster snapshot from\n another Amazon account by the ModifyDBClusterSnapshotAttribute API\n action.

    " + "smithy.api#documentation": "

    True to include shared manual DB cluster snapshots from other Amazon accounts that this Amazon\n account has been given permission to copy or restore, and otherwise false. The default is\n false.

    \n

    You can give an Amazon account permission to restore a manual DB cluster snapshot from\n another Amazon account by the ModifyDBClusterSnapshotAttribute API\n action.

    " } }, "IncludePublic": { @@ -4667,6 +4667,7 @@ "items": "DBInstances", "pageSize": "MaxRecords" }, + "smithy.api#suppress": ["WaitableTraitInvalidErrorType"], "smithy.waiters#waitable": { "DBInstanceAvailable": { "acceptors": [ @@ -4732,6 +4733,67 @@ } ], "minDelay": 30 + }, + "DBInstanceDeleted": { + "acceptors": [ + { + "state": "success", + "matcher": { + "output": { + "path": "DBInstances[].DBInstanceStatus", + "expected": "deleted", + "comparator": "allStringEquals" + } + } + }, + { + "state": "success", + "matcher": { + "errorType": "DBInstanceNotFound" + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "DBInstances[].DBInstanceStatus", + "expected": "creating", + "comparator": "anyStringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "DBInstances[].DBInstanceStatus", + "expected": "modifying", + "comparator": "anyStringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "DBInstances[].DBInstanceStatus", + "expected": "rebooting", + "comparator": "anyStringEquals" + } + } + }, + { + "state": "failure", + "matcher": { + "output": { + "path": "DBInstances[].DBInstanceStatus", + "expected": "resetting-master-credentials", + "comparator": "anyStringEquals" + } + } + } + ], + "minDelay": 30 } } } @@ -6515,6 +6577,18 @@ "smithy.api#documentation": "

    The version number of the database engine to which you want to upgrade. Changing this\n parameter results in an outage. The change is applied during the next maintenance window\n unless the ApplyImmediately parameter is set to true.

    \n

    For a list of valid engine versions, see Engine Releases for Amazon\n Neptune, or call DescribeDBEngineVersions.

    " } }, + "AllowMajorVersionUpgrade": { + "target": "com.amazonaws.neptune#Boolean", + "traits": { + "smithy.api#documentation": "

    A value that indicates whether upgrades between different major versions are allowed.

    \n

    Constraints: You must set the allow-major-version-upgrade flag when providing an\n EngineVersion parameter that uses a different major version than the DB cluster's current\n version.

    " + } + }, + "DBInstanceParameterGroupName": { + "target": "com.amazonaws.neptune#String", + "traits": { + "smithy.api#documentation": "

    The name of the DB parameter group to apply to all instances of the DB cluster.

    \n \n

    When you apply a parameter group using DBInstanceParameterGroupName,\n parameter changes aren't applied during the next maintenance window but instead are\n applied immediately.

    \n
    \n

    Default: The existing name setting

    \n

    Constraints:

    \n
      \n
    • \n

      The DB parameter group must be in the same DB parameter group family as\n the target DB cluster version.

      \n
    • \n
    • \n

      The DBInstanceParameterGroupName parameter is only valid in combination with\n the AllowMajorVersionUpgrade parameter.

      \n
    • \n
    " + } + }, "DeletionProtection": { "target": "com.amazonaws.neptune#BooleanOptional", "traits": { @@ -6619,7 +6693,7 @@ "ValuesToAdd": { "target": "com.amazonaws.neptune#AttributeValueList", "traits": { - "smithy.api#documentation": "

    A list of DB cluster snapshot attributes to add to the attribute specified by\n AttributeName.

    \n

    To authorize other Amazon accounts to copy or restore a manual DB cluster snapshot, set this\n list to include one or more Amazon account IDs, or all to make the manual DB cluster\n snapshot restorable by any Amazon account. Do not add the all value for any manual\n DB cluster snapshots that contain private information that you don't want available to all AWS\n accounts.

    " + "smithy.api#documentation": "

    A list of DB cluster snapshot attributes to add to the attribute specified by\n AttributeName.

    \n

    To authorize other Amazon accounts to copy or restore a manual DB cluster snapshot, set this\n list to include one or more Amazon account IDs, or all to make the manual DB cluster\n snapshot restorable by any Amazon account. Do not add the all value for any manual\n DB cluster snapshots that contain private information that you don't want available to all Amazon\n accounts.

    " } }, "ValuesToRemove": { @@ -6719,7 +6793,7 @@ "DBInstanceClass": { "target": "com.amazonaws.neptune#String", "traits": { - "smithy.api#documentation": "

    The new compute and memory capacity of the DB instance, for example,\n db.m4.large. Not all DB instance classes are available in all AWS\n Regions.

    \n

    If you modify the DB instance class, an outage occurs during the change. The change is\n applied during the next maintenance window, unless ApplyImmediately is specified\n as true for this request.

    \n

    Default: Uses existing setting

    " + "smithy.api#documentation": "

    The new compute and memory capacity of the DB instance, for example,\n db.m4.large. Not all DB instance classes are available in all Amazon\n Regions.

    \n

    If you modify the DB instance class, an outage occurs during the change. The change is\n applied during the next maintenance window, unless ApplyImmediately is specified\n as true for this request.

    \n

    Default: Uses existing setting

    " } }, "DBSubnetGroupName": { @@ -7793,7 +7867,7 @@ "FeatureName": { "target": "com.amazonaws.neptune#String", "traits": { - "smithy.api#documentation": "

    The name of the feature for the DB cluster that the IAM role is to be disassociated from.\n For the list of supported feature names, see DBEngineVersion.

    " + "smithy.api#documentation": "

    The name of the feature for the DB cluster that the IAM role is to be disassociated from.\n For the list of supported feature names, see DescribeDBEngineVersions.

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

    Starts an Amazon Neptune DB cluster that was stopped using the AWS\n console, the Amazon CLI stop-db-cluster command, or the StopDBCluster API.

    " + "smithy.api#documentation": "

    Starts an Amazon Neptune DB cluster that was stopped using the Amazon\n console, the Amazon CLI stop-db-cluster command, or the StopDBCluster API.

    " } }, "com.amazonaws.neptune#StartDBClusterMessage": { @@ -8808,13 +8882,13 @@ "Key": { "target": "com.amazonaws.neptune#String", "traits": { - "smithy.api#documentation": "

    A key is the required name of the tag. The string value can be from 1 to 128 Unicode\n characters in length and can't be prefixed with \"aws:\" or \"rds:\". The string can only contain\n only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java\n regex: \"^([\\\\p{L}\\\\p{Z}\\\\p{N}_.:/=+\\\\-]*)$\").

    " + "smithy.api#documentation": "

    A key is the required name of the tag. The string value can be from 1 to 128 Unicode\n characters in length and can't be prefixed with aws: or rds:.\n The string can only contain the set of Unicode letters, digits, white-space,\n '_', '.', '/', '=', '+', '-' (Java regex: \"^([\\\\p{L}\\\\p{Z}\\\\p{N}_.:/=+\\\\-]*)$\").

    " } }, "Value": { "target": "com.amazonaws.neptune#String", "traits": { - "smithy.api#documentation": "

    A value is the optional value of the tag. The string value can be from 1 to 256 Unicode\n characters in length and can't be prefixed with \"aws:\" or \"rds:\". The string can only contain\n only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java\n regex: \"^([\\\\p{L}\\\\p{Z}\\\\p{N}_.:/=+\\\\-]*)$\").

    " + "smithy.api#documentation": "

    A value is the optional value of the tag. The string value can be from 1 to 256 Unicode\n characters in length and can't be prefixed with aws: or rds:.\n The string can only contain the set of Unicode letters, digits, white-space,\n '_', '.', '/', '=', '+', '-' (Java regex: \"^([\\\\p{L}\\\\p{Z}\\\\p{N}_.:/=+\\\\-]*)$\").

    " } } }, diff --git a/codegen/sdk-codegen/aws-models/networkmanager.json b/codegen/sdk-codegen/aws-models/networkmanager.json index 4c56e3024d2b..0cbb83599859 100644 --- a/codegen/sdk-codegen/aws-models/networkmanager.json +++ b/codegen/sdk-codegen/aws-models/networkmanager.json @@ -35,18 +35,18 @@ "Zone": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The Zone the device is located in. This can be the ID of an Availability Zone, Local Zone, Wavelength Zone, or an Outpost.

    " + "smithy.api#documentation": "

    The Zone that the device is located in. Specify the ID of an Availability Zone, Local\n Zone, Wavelength Zone, or an Outpost.

    " } }, "SubnetArn": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the subnet the device is located in.

    " + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the subnet that the device is located in.

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

    Specifies a location in AWS.

    " + "smithy.api#documentation": "

    Specifies a location in Amazon Web Services.

    " } }, "com.amazonaws.networkmanager#AccessDeniedException": { @@ -111,7 +111,7 @@ "CustomerGatewayArn": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the customer gateway. For more information, see\n Resources Defined by Amazon EC2.

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

    The Amazon Resource Name (ARN) of the customer gateway.

    ", "smithy.api#required": {} } }, @@ -331,6 +331,9 @@ "smithy.api#documentation": "

    Describes bandwidth information.

    " } }, + "com.amazonaws.networkmanager#Boolean": { + "type": "boolean" + }, "com.amazonaws.networkmanager#ConflictException": { "type": "structure", "members": { @@ -435,6 +438,32 @@ "smithy.api#documentation": "

    Describes a connection.

    " } }, + "com.amazonaws.networkmanager#ConnectionHealth": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.networkmanager#ConnectionType", + "traits": { + "smithy.api#documentation": "

    The connection type.

    " + } + }, + "Status": { + "target": "com.amazonaws.networkmanager#ConnectionStatus", + "traits": { + "smithy.api#documentation": "

    The connection status.

    " + } + }, + "Timestamp": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

    The time the status was last updated.

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

    Describes connection health.

    " + } + }, "com.amazonaws.networkmanager#ConnectionList": { "type": "list", "member": { @@ -464,6 +493,36 @@ ] } }, + "com.amazonaws.networkmanager#ConnectionStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "UP", + "name": "UP" + }, + { + "value": "DOWN", + "name": "DOWN" + } + ] + } + }, + "com.amazonaws.networkmanager#ConnectionType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "BGP", + "name": "BGP" + }, + { + "value": "IPSEC", + "name": "IPSEC" + } + ] + } + }, "com.amazonaws.networkmanager#CreateConnection": { "type": "operation", "input": { @@ -617,13 +676,13 @@ "AWSLocation": { "target": "com.amazonaws.networkmanager#AWSLocation", "traits": { - "smithy.api#documentation": "

    The AWS location of the device.

    " + "smithy.api#documentation": "

    The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.

    " } }, "Description": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    A description of the device.

    \n

    Length Constraints: Maximum length of 256 characters.

    " + "smithy.api#documentation": "

    A description of the device.

    \n

    Constraints: Maximum length of 256 characters.

    " } }, "Type": { @@ -635,19 +694,19 @@ "Vendor": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The vendor of the device.

    \n

    Length Constraints: Maximum length of 128 characters.

    " + "smithy.api#documentation": "

    The vendor of the device.

    \n

    Constraints: Maximum length of 128 characters.

    " } }, "Model": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The model of the device.

    \n

    Length Constraints: Maximum length of 128 characters.

    " + "smithy.api#documentation": "

    The model of the device.

    \n

    Constraints: Maximum length of 128 characters.

    " } }, "SerialNumber": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The serial number of the device.

    \n

    Length Constraints: Maximum length of 128 characters.

    " + "smithy.api#documentation": "

    The serial number of the device.

    \n

    Constraints: Maximum length of 128 characters.

    " } }, "Location": { @@ -724,7 +783,7 @@ "Description": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    A description of the global network.

    \n

    Length Constraints: Maximum length of 256 characters.

    " + "smithy.api#documentation": "

    A description of the global network.

    \n

    Constraints: Maximum length of 256 characters.

    " } }, "Tags": { @@ -800,13 +859,13 @@ "Description": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    A description of the link.

    \n

    Length Constraints: Maximum length of 256 characters.

    " + "smithy.api#documentation": "

    A description of the link.

    \n

    Constraints: Maximum length of 256 characters.

    " } }, "Type": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The type of the link.

    \n

    Constraints: Cannot include the following characters: | \\ ^

    \n

    Length Constraints: Maximum length of 128 characters.

    " + "smithy.api#documentation": "

    The type of the link.

    \n

    Constraints: Maximum length of 128 characters. Cannot include the following characters: | \\ ^

    " } }, "Bandwidth": { @@ -819,7 +878,7 @@ "Provider": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The provider of the link.

    \n

    Constraints: Cannot include the following characters: | \\ ^

    \n

    Length Constraints: Maximum length of 128 characters.

    " + "smithy.api#documentation": "

    The provider of the link.

    \n

    Constraints: Maximum length of 128 characters. Cannot include the following characters: | \\ ^

    " } }, "SiteId": { @@ -902,7 +961,7 @@ "Description": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    A description of your site.

    \n

    Length Constraints: Maximum length of 256 characters.

    " + "smithy.api#documentation": "

    A description of your site.

    \n

    Constraints: Maximum length of 256 characters.

    " } }, "Location": { @@ -1512,7 +1571,7 @@ "AWSLocation": { "target": "com.amazonaws.networkmanager#AWSLocation", "traits": { - "smithy.api#documentation": "

    The AWS location of the device.

    " + "smithy.api#documentation": "

    The Amazon Web Services location of the device.

    " } }, "Description": { @@ -1660,7 +1719,7 @@ "CustomerGatewayArn": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the customer gateway. For more information, see\n Resources Defined by Amazon EC2.

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

    The Amazon Resource Name (ARN) of the customer gateway.

    ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1824,6 +1883,56 @@ } } }, + "com.amazonaws.networkmanager#ExceptionContextKey": { + "type": "string" + }, + "com.amazonaws.networkmanager#ExceptionContextMap": { + "type": "map", + "key": { + "target": "com.amazonaws.networkmanager#ExceptionContextKey" + }, + "value": { + "target": "com.amazonaws.networkmanager#ExceptionContextValue" + } + }, + "com.amazonaws.networkmanager#ExceptionContextValue": { + "type": "string" + }, + "com.amazonaws.networkmanager#FilterMap": { + "type": "map", + "key": { + "target": "com.amazonaws.networkmanager#FilterName" + }, + "value": { + "target": "com.amazonaws.networkmanager#FilterValues" + } + }, + "com.amazonaws.networkmanager#FilterName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 128 + }, + "smithy.api#pattern": "^[0-9a-zA-Z\\.-]*$" + } + }, + "com.amazonaws.networkmanager#FilterValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 255 + }, + "smithy.api#pattern": "^[0-9a-zA-Z\\*\\.\\\\/\\?-]*$" + } + }, + "com.amazonaws.networkmanager#FilterValues": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#FilterValue" + } + }, "com.amazonaws.networkmanager#GetConnections": { "type": "operation", "input": { @@ -1977,7 +2086,7 @@ "CustomerGatewayArns": { "target": "com.amazonaws.networkmanager#StringList", "traits": { - "smithy.api#documentation": "

    One or more customer gateway Amazon Resource Names (ARNs). For more information, see\n Resources Defined by Amazon EC2. The maximum is 10.

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

    One or more customer gateway Amazon Resource Names (ARNs). The maximum is 10.

    ", "smithy.api#httpQuery": "customerGatewayArns" } }, @@ -2319,13 +2428,13 @@ } } }, - "com.amazonaws.networkmanager#GetSites": { + "com.amazonaws.networkmanager#GetNetworkResourceCounts": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetSitesRequest" + "target": "com.amazonaws.networkmanager#GetNetworkResourceCountsRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetSitesResponse" + "target": "com.amazonaws.networkmanager#GetNetworkResourceCountsResponse" }, "errors": [ { @@ -2334,9 +2443,6 @@ { "target": "com.amazonaws.networkmanager#InternalServerException" }, - { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" - }, { "target": "com.amazonaws.networkmanager#ThrottlingException" }, @@ -2345,10 +2451,10 @@ } ], "traits": { - "smithy.api#documentation": "

    Gets information about one or more of your sites in a global network.

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

    Gets the count of network resources, by resource type, for the specified global network.

    ", "smithy.api#http": { "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/sites", + "uri": "/global-networks/{GlobalNetworkId}/network-resource-count", "code": 200 }, "smithy.api#paginated": { @@ -2358,7 +2464,7 @@ } } }, - "com.amazonaws.networkmanager#GetSitesRequest": { + "com.amazonaws.networkmanager#GetNetworkResourceCountsRequest": { "type": "structure", "members": { "GlobalNetworkId": { @@ -2369,11 +2475,11 @@ "smithy.api#required": {} } }, - "SiteIds": { - "target": "com.amazonaws.networkmanager#StringList", + "ResourceType": { + "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    One or more site IDs. The maximum is 10.

    ", - "smithy.api#httpQuery": "siteIds" + "smithy.api#documentation": "

    The resource type.

    \n

    The following are the supported resource types for Direct Connect:

    \n
      \n
    • \n

      \n dxcon\n

      \n
    • \n
    • \n

      \n dx-gateway\n

      \n
    • \n
    • \n

      \n dx-vif\n

      \n
    • \n
    \n \n

    The following are the supported resource types for Network Manager:

    \n
      \n
    • \n

      \n connection\n

      \n
    • \n
    • \n

      \n device\n

      \n
    • \n
    • \n

      \n link\n

      \n
    • \n
    • \n

      \n site\n

      \n
    • \n
    \n\n

    The following are the supported resource types for Amazon VPC:

    \n
      \n
    • \n

      \n customer-gateway\n

      \n
    • \n
    • \n

      \n transit-gateway\n

      \n
    • \n
    • \n

      \n transit-gateway-attachment\n

      \n
    • \n
    • \n

      \n transit-gateway-connect-peer\n

      \n
    • \n
    • \n

      \n transit-gateway-route-table\n

      \n
    • \n
    • \n

      \n vpn-connection\n

      \n
    • \n
    ", + "smithy.api#httpQuery": "resourceType" } }, "MaxResults": { @@ -2392,13 +2498,13 @@ } } }, - "com.amazonaws.networkmanager#GetSitesResponse": { + "com.amazonaws.networkmanager#GetNetworkResourceCountsResponse": { "type": "structure", "members": { - "Sites": { - "target": "com.amazonaws.networkmanager#SiteList", + "NetworkResourceCounts": { + "target": "com.amazonaws.networkmanager#NetworkResourceCountList", "traits": { - "smithy.api#documentation": "

    The sites.

    " + "smithy.api#documentation": "

    The count of resources.

    " } }, "NextToken": { @@ -2409,21 +2515,18 @@ } } }, - "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociations": { + "com.amazonaws.networkmanager#GetNetworkResourceRelationships": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsRequest" + "target": "com.amazonaws.networkmanager#GetNetworkResourceRelationshipsRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsResponse" + "target": "com.amazonaws.networkmanager#GetNetworkResourceRelationshipsResponse" }, "errors": [ { "target": "com.amazonaws.networkmanager#AccessDeniedException" }, - { - "target": "com.amazonaws.networkmanager#ConflictException" - }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, @@ -2438,10 +2541,10 @@ } ], "traits": { - "smithy.api#documentation": "

    Gets information about one or more of your transit gateway Connect peer associations in a global network.

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

    Gets the network resource relationships for the specified global network.

    ", "smithy.api#http": { "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations", + "uri": "/global-networks/{GlobalNetworkId}/network-resource-relationships", "code": 200 }, "smithy.api#paginated": { @@ -2451,7 +2554,7 @@ } } }, - "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsRequest": { + "com.amazonaws.networkmanager#GetNetworkResourceRelationshipsRequest": { "type": "structure", "members": { "GlobalNetworkId": { @@ -2462,11 +2565,39 @@ "smithy.api#required": {} } }, - "TransitGatewayConnectPeerArns": { - "target": "com.amazonaws.networkmanager#StringList", + "RegisteredGatewayArn": { + "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    One or more transit gateway Connect peer Amazon Resource Names (ARNs).

    ", - "smithy.api#httpQuery": "transitGatewayConnectPeerArns" + "smithy.api#documentation": "

    The ARN of the registered gateway.

    ", + "smithy.api#httpQuery": "registeredGatewayArn" + } + }, + "AwsRegion": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Web Services Region.

    ", + "smithy.api#httpQuery": "awsRegion" + } + }, + "AccountId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Web Services account ID.

    ", + "smithy.api#httpQuery": "accountId" + } + }, + "ResourceType": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The resource type.

    \n

    The following are the supported resource types for Direct Connect:

    \n
      \n
    • \n

      \n dxcon\n

      \n
    • \n
    • \n

      \n dx-gateway\n

      \n
    • \n
    • \n

      \n dx-vif\n

      \n
    • \n
    \n \n

    The following are the supported resource types for Network Manager:

    \n
      \n
    • \n

      \n connection\n

      \n
    • \n
    • \n

      \n device\n

      \n
    • \n
    • \n

      \n link\n

      \n
    • \n
    • \n

      \n site\n

      \n
    • \n
    \n\n

    The following are the supported resource types for Amazon VPC:

    \n
      \n
    • \n

      \n customer-gateway\n

      \n
    • \n
    • \n

      \n transit-gateway\n

      \n
    • \n
    • \n

      \n transit-gateway-attachment\n

      \n
    • \n
    • \n

      \n transit-gateway-connect-peer\n

      \n
    • \n
    • \n

      \n transit-gateway-route-table\n

      \n
    • \n
    • \n

      \n vpn-connection\n

      \n
    • \n
    ", + "smithy.api#httpQuery": "resourceType" + } + }, + "ResourceArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ARN of the gateway.

    ", + "smithy.api#httpQuery": "resourceArn" } }, "MaxResults": { @@ -2485,30 +2616,30 @@ } } }, - "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsResponse": { + "com.amazonaws.networkmanager#GetNetworkResourceRelationshipsResponse": { "type": "structure", "members": { - "TransitGatewayConnectPeerAssociations": { - "target": "com.amazonaws.networkmanager#TransitGatewayConnectPeerAssociationList", + "Relationships": { + "target": "com.amazonaws.networkmanager#RelationshipList", "traits": { - "smithy.api#documentation": "

    Information about the transit gateway Connect peer associations.

    " + "smithy.api#documentation": "

    The resource relationships.

    " } }, "NextToken": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The token to use for the next page of results.

    " + "smithy.api#documentation": "

    The token for the next page of results.

    " } } } }, - "com.amazonaws.networkmanager#GetTransitGatewayRegistrations": { + "com.amazonaws.networkmanager#GetNetworkResources": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsRequest" + "target": "com.amazonaws.networkmanager#GetNetworkResourcesRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsResponse" + "target": "com.amazonaws.networkmanager#GetNetworkResourcesResponse" }, "errors": [ { @@ -2528,10 +2659,10 @@ } ], "traits": { - "smithy.api#documentation": "

    Gets information about the transit gateway registrations in a specified\n global network.

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

    Describes the network resources for the specified global network.

    \n

    The results include information from the corresponding Describe call for the resource, minus any sensitive information such as pre-shared keys.

    ", "smithy.api#http": { "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-registrations", + "uri": "/global-networks/{GlobalNetworkId}/network-resources", "code": 200 }, "smithy.api#paginated": { @@ -2541,7 +2672,7 @@ } } }, - "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsRequest": { + "com.amazonaws.networkmanager#GetNetworkResourcesRequest": { "type": "structure", "members": { "GlobalNetworkId": { @@ -2552,11 +2683,39 @@ "smithy.api#required": {} } }, - "TransitGatewayArns": { - "target": "com.amazonaws.networkmanager#StringList", + "RegisteredGatewayArn": { + "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Names (ARNs) of one or more transit gateways. The maximum is\n 10.

    ", - "smithy.api#httpQuery": "transitGatewayArns" + "smithy.api#documentation": "

    The ARN of the gateway.

    ", + "smithy.api#httpQuery": "registeredGatewayArn" + } + }, + "AwsRegion": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Web Services Region.

    ", + "smithy.api#httpQuery": "awsRegion" + } + }, + "AccountId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Web Services account ID.

    ", + "smithy.api#httpQuery": "accountId" + } + }, + "ResourceType": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The resource type.

    \n

    The following are the supported resource types for Direct Connect:

    \n \n \n

    The following are the supported resource types for Network Manager:

    \n
      \n
    • \n

      \n connection - The definition model is\n Connection.

      \n
    • \n
    • \n

      \n device - The definition model is\n Device.

      \n
    • \n
    • \n

      \n link - The definition model is\n Link.

      \n
    • \n
    • \n

      \n site - The definition model is\n Site.

      \n
    • \n
    \n \n

    The following are the supported resource types for Amazon VPC:

    \n ", + "smithy.api#httpQuery": "resourceType" + } + }, + "ResourceArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ARN of the resource.

    ", + "smithy.api#httpQuery": "resourceArn" } }, "MaxResults": { @@ -2575,13 +2734,13 @@ } } }, - "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsResponse": { + "com.amazonaws.networkmanager#GetNetworkResourcesResponse": { "type": "structure", "members": { - "TransitGatewayRegistrations": { - "target": "com.amazonaws.networkmanager#TransitGatewayRegistrationList", + "NetworkResources": { + "target": "com.amazonaws.networkmanager#NetworkResourceList", "traits": { - "smithy.api#documentation": "

    The transit gateway registrations.

    " + "smithy.api#documentation": "

    The network resources.

    " } }, "NextToken": { @@ -2592,279 +2751,262 @@ } } }, - "com.amazonaws.networkmanager#GlobalNetwork": { + "com.amazonaws.networkmanager#GetNetworkRoutes": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetNetworkRoutesRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetNetworkRoutesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Gets the network routes of the specified global network.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/global-networks/{GlobalNetworkId}/network-routes", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#GetNetworkRoutesRequest": { "type": "structure", "members": { "GlobalNetworkId": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The ID of the global network.

    " + "smithy.api#documentation": "

    The ID of the global network.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} } }, - "GlobalNetworkArn": { - "target": "com.amazonaws.networkmanager#String", + "RouteTableIdentifier": { + "target": "com.amazonaws.networkmanager#RouteTableIdentifier", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the global network.

    " + "smithy.api#documentation": "

    The ID of the route table.

    ", + "smithy.api#required": {} } }, - "Description": { - "target": "com.amazonaws.networkmanager#String", + "ExactCidrMatches": { + "target": "com.amazonaws.networkmanager#StringList", "traits": { - "smithy.api#documentation": "

    The description of the global network.

    " + "smithy.api#documentation": "

    An exact CIDR block.

    " } }, - "CreatedAt": { - "target": "com.amazonaws.networkmanager#DateTime", + "LongestPrefixMatches": { + "target": "com.amazonaws.networkmanager#StringList", "traits": { - "smithy.api#documentation": "

    The date and time that the global network was created.

    " + "smithy.api#documentation": "

    The most specific route that matches the traffic (longest prefix match).

    " } }, - "State": { - "target": "com.amazonaws.networkmanager#GlobalNetworkState", + "SubnetOfMatches": { + "target": "com.amazonaws.networkmanager#StringList", "traits": { - "smithy.api#documentation": "

    The state of the global network.

    " + "smithy.api#documentation": "

    The routes with a subnet that match the specified CIDR filter.

    " } }, - "Tags": { - "target": "com.amazonaws.networkmanager#TagList", + "SupernetOfMatches": { + "target": "com.amazonaws.networkmanager#StringList", "traits": { - "smithy.api#documentation": "

    The tags for the global network.

    " + "smithy.api#documentation": "

    The routes with a CIDR that encompasses the CIDR filter. Example: If you specify 10.0.1.0/30, then the result returns 10.0.1.0/29.

    " + } + }, + "PrefixListIds": { + "target": "com.amazonaws.networkmanager#StringList", + "traits": { + "smithy.api#documentation": "

    The IDs of the prefix lists.

    " + } + }, + "States": { + "target": "com.amazonaws.networkmanager#RouteStateList", + "traits": { + "smithy.api#documentation": "

    The route states.

    " + } + }, + "Types": { + "target": "com.amazonaws.networkmanager#RouteTypeList", + "traits": { + "smithy.api#documentation": "

    The route types.

    " + } + }, + "DestinationFilters": { + "target": "com.amazonaws.networkmanager#FilterMap", + "traits": { + "smithy.api#documentation": "

    Filter by route table destination. Possible Values: TRANSIT_GATEWAY_ATTACHMENT_ID, RESOURCE_ID, or RESOURCE_TYPE.

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

    Describes a global network.

    " } }, - "com.amazonaws.networkmanager#GlobalNetworkList": { - "type": "list", - "member": { - "target": "com.amazonaws.networkmanager#GlobalNetwork" + "com.amazonaws.networkmanager#GetNetworkRoutesResponse": { + "type": "structure", + "members": { + "RouteTableArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ARN of the route table.

    " + } + }, + "RouteTableType": { + "target": "com.amazonaws.networkmanager#RouteTableType", + "traits": { + "smithy.api#documentation": "

    The route table type.

    " + } + }, + "RouteTableTimestamp": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

    The route table creation time.

    " + } + }, + "NetworkRoutes": { + "target": "com.amazonaws.networkmanager#NetworkRouteList", + "traits": { + "smithy.api#documentation": "

    The network routes.

    " + } + } } }, - "com.amazonaws.networkmanager#GlobalNetworkState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PENDING", - "name": "pending" - }, - { - "value": "AVAILABLE", - "name": "available" - }, - { - "value": "DELETING", - "name": "deleting" - }, - { - "value": "UPDATING", - "name": "updating" - } - ] - } - }, - "com.amazonaws.networkmanager#Integer": { - "type": "integer", - "traits": { - "smithy.api#box": {} - } - }, - "com.amazonaws.networkmanager#InternalServerException": { - "type": "structure", - "members": { - "Message": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#required": {} - } + "com.amazonaws.networkmanager#GetNetworkTelemetry": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetNetworkTelemetryRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetNetworkTelemetryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" }, - "RetryAfterSeconds": { - "target": "com.amazonaws.networkmanager#RetryAfterSeconds", - "traits": { - "smithy.api#documentation": "

    Indicates when to retry the request.

    ", - "smithy.api#httpHeader": "Retry-After" - } + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" } - }, + ], "traits": { - "smithy.api#documentation": "

    The request has failed due to an internal error.

    ", - "smithy.api#error": "server", - "smithy.api#httpError": 500 + "smithy.api#documentation": "

    Gets the network telemetry of the specified global network.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/network-telemetry", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } } }, - "com.amazonaws.networkmanager#Link": { + "com.amazonaws.networkmanager#GetNetworkTelemetryRequest": { "type": "structure", "members": { - "LinkId": { + "GlobalNetworkId": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The ID of the link.

    " + "smithy.api#documentation": "

    The ID of the global network.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} } }, - "LinkArn": { + "RegisteredGatewayArn": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the link.

    " + "smithy.api#documentation": "

    The ARN of the gateway.

    ", + "smithy.api#httpQuery": "registeredGatewayArn" } }, - "GlobalNetworkId": { + "AwsRegion": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The ID of the global network.

    " + "smithy.api#documentation": "

    The Amazon Web Services Region.

    ", + "smithy.api#httpQuery": "awsRegion" } }, - "SiteId": { + "AccountId": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The ID of the site.

    " + "smithy.api#documentation": "

    The Amazon Web Services account ID.

    ", + "smithy.api#httpQuery": "accountId" } }, - "Description": { + "ResourceType": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The description of the link.

    " + "smithy.api#documentation": "

    The resource type.

    \n

    The following are the supported resource types for Direct Connect:

    \n
      \n
    • \n

      \n dxcon\n

      \n
    • \n
    • \n

      \n dx-gateway\n

      \n
    • \n
    • \n

      \n dx-vif\n

      \n
    • \n
    \n \n

    The following are the supported resource types for Network Manager:

    \n
      \n
    • \n

      \n connection\n

      \n
    • \n
    • \n

      \n device\n

      \n
    • \n
    • \n

      \n link\n

      \n
    • \n
    • \n

      \n site\n

      \n
    • \n
    \n\n

    The following are the supported resource types for Amazon VPC:

    \n
      \n
    • \n

      \n customer-gateway\n

      \n
    • \n
    • \n

      \n transit-gateway\n

      \n
    • \n
    • \n

      \n transit-gateway-attachment\n

      \n
    • \n
    • \n

      \n transit-gateway-connect-peer\n

      \n
    • \n
    • \n

      \n transit-gateway-route-table\n

      \n
    • \n
    • \n

      \n vpn-connection\n

      \n
    • \n
    ", + "smithy.api#httpQuery": "resourceType" } }, - "Type": { + "ResourceArn": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The type of the link.

    " + "smithy.api#documentation": "

    The ARN of the resource.

    ", + "smithy.api#httpQuery": "resourceArn" } }, - "Bandwidth": { - "target": "com.amazonaws.networkmanager#Bandwidth", + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", "traits": { - "smithy.api#documentation": "

    The bandwidth for the link.

    " + "smithy.api#documentation": "

    The maximum number of results to return.

    ", + "smithy.api#httpQuery": "maxResults" } }, - "Provider": { + "NextToken": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The provider of the link.

    " - } - }, - "CreatedAt": { - "target": "com.amazonaws.networkmanager#DateTime", - "traits": { - "smithy.api#documentation": "

    The date and time that the link was created.

    " - } - }, - "State": { - "target": "com.amazonaws.networkmanager#LinkState", - "traits": { - "smithy.api#documentation": "

    The state of the link.

    " - } - }, - "Tags": { - "target": "com.amazonaws.networkmanager#TagList", - "traits": { - "smithy.api#documentation": "

    The tags for the link.

    " + "smithy.api#documentation": "

    The token for the next page of results.

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

    Describes a link.

    " } }, - "com.amazonaws.networkmanager#LinkAssociation": { + "com.amazonaws.networkmanager#GetNetworkTelemetryResponse": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

    The ID of the global network.

    " - } - }, - "DeviceId": { - "target": "com.amazonaws.networkmanager#String", + "NetworkTelemetry": { + "target": "com.amazonaws.networkmanager#NetworkTelemetryList", "traits": { - "smithy.api#documentation": "

    The device ID for the link association.

    " + "smithy.api#documentation": "

    The network telemetry.

    " } }, - "LinkId": { + "NextToken": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The ID of the link.

    " - } - }, - "LinkAssociationState": { - "target": "com.amazonaws.networkmanager#LinkAssociationState", - "traits": { - "smithy.api#documentation": "

    The state of the association.

    " + "smithy.api#documentation": "

    The token for the next page of results.

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

    Describes the association between a device and a link.

    " - } - }, - "com.amazonaws.networkmanager#LinkAssociationList": { - "type": "list", - "member": { - "target": "com.amazonaws.networkmanager#LinkAssociation" - } - }, - "com.amazonaws.networkmanager#LinkAssociationState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PENDING", - "name": "pending" - }, - { - "value": "AVAILABLE", - "name": "available" - }, - { - "value": "DELETING", - "name": "deleting" - }, - { - "value": "DELETED", - "name": "deleted" - } - ] - } - }, - "com.amazonaws.networkmanager#LinkList": { - "type": "list", - "member": { - "target": "com.amazonaws.networkmanager#Link" - } - }, - "com.amazonaws.networkmanager#LinkState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PENDING", - "name": "pending" - }, - { - "value": "AVAILABLE", - "name": "available" - }, - { - "value": "DELETING", - "name": "deleting" - }, - { - "value": "UPDATING", - "name": "updating" - } - ] } }, - "com.amazonaws.networkmanager#ListTagsForResource": { + "com.amazonaws.networkmanager#GetRouteAnalysis": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#ListTagsForResourceRequest" + "target": "com.amazonaws.networkmanager#GetRouteAnalysisRequest" }, "output": { - "target": "com.amazonaws.networkmanager#ListTagsForResourceResponse" + "target": "com.amazonaws.networkmanager#GetRouteAnalysisResponse" }, "errors": [ { @@ -2884,216 +3026,241 @@ } ], "traits": { - "smithy.api#documentation": "

    Lists the tags for a specified resource.

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

    Gets information about the specified route analysis.

    ", "smithy.api#http": { "method": "GET", - "uri": "/tags/{ResourceArn}", + "uri": "/global-networks/{GlobalNetworkId}/route-analyses/{RouteAnalysisId}", "code": 200 } } }, - "com.amazonaws.networkmanager#ListTagsForResourceRequest": { + "com.amazonaws.networkmanager#GetRouteAnalysisRequest": { "type": "structure", "members": { - "ResourceArn": { - "target": "com.amazonaws.networkmanager#ResourceARN", + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the resource.

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

    The ID of the global network.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "RouteAnalysisId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the route analysis.

    ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } } } }, - "com.amazonaws.networkmanager#ListTagsForResourceResponse": { + "com.amazonaws.networkmanager#GetRouteAnalysisResponse": { "type": "structure", "members": { - "TagList": { - "target": "com.amazonaws.networkmanager#TagList", + "RouteAnalysis": { + "target": "com.amazonaws.networkmanager#RouteAnalysis", "traits": { - "smithy.api#documentation": "

    The list of tags.

    " + "smithy.api#documentation": "

    The route analysis.

    " } } } }, - "com.amazonaws.networkmanager#Location": { - "type": "structure", - "members": { - "Address": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

    The physical address.

    " - } + "com.amazonaws.networkmanager#GetSites": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetSitesRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetSitesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" }, - "Latitude": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

    The latitude.

    " - } + { + "target": "com.amazonaws.networkmanager#InternalServerException" }, - "Longitude": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

    The longitude.

    " - } + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" } - }, - "traits": { - "smithy.api#documentation": "

    Describes a location.

    ", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.networkmanager#MaxResults": { - "type": "integer", + ], "traits": { - "smithy.api#box": {}, - "smithy.api#range": { - "min": 1, - "max": 500 + "smithy.api#documentation": "

    Gets information about one or more of your sites in a global network.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/sites", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" } } }, - "com.amazonaws.networkmanager#NetworkManager": { - "type": "service", - "version": "2019-07-05", - "operations": [ - { - "target": "com.amazonaws.networkmanager#AssociateCustomerGateway" - }, - { - "target": "com.amazonaws.networkmanager#AssociateLink" - }, - { - "target": "com.amazonaws.networkmanager#AssociateTransitGatewayConnectPeer" - }, - { - "target": "com.amazonaws.networkmanager#CreateConnection" - }, - { - "target": "com.amazonaws.networkmanager#CreateDevice" - }, - { - "target": "com.amazonaws.networkmanager#CreateGlobalNetwork" - }, - { - "target": "com.amazonaws.networkmanager#CreateLink" - }, - { - "target": "com.amazonaws.networkmanager#CreateSite" - }, - { - "target": "com.amazonaws.networkmanager#DeleteConnection" - }, - { - "target": "com.amazonaws.networkmanager#DeleteDevice" - }, - { - "target": "com.amazonaws.networkmanager#DeleteGlobalNetwork" - }, - { - "target": "com.amazonaws.networkmanager#DeleteLink" - }, - { - "target": "com.amazonaws.networkmanager#DeleteSite" - }, - { - "target": "com.amazonaws.networkmanager#DeregisterTransitGateway" - }, - { - "target": "com.amazonaws.networkmanager#DescribeGlobalNetworks" - }, - { - "target": "com.amazonaws.networkmanager#DisassociateCustomerGateway" - }, - { - "target": "com.amazonaws.networkmanager#DisassociateLink" - }, - { - "target": "com.amazonaws.networkmanager#DisassociateTransitGatewayConnectPeer" - }, - { - "target": "com.amazonaws.networkmanager#GetConnections" - }, - { - "target": "com.amazonaws.networkmanager#GetCustomerGatewayAssociations" - }, - { - "target": "com.amazonaws.networkmanager#GetDevices" - }, - { - "target": "com.amazonaws.networkmanager#GetLinkAssociations" + "com.amazonaws.networkmanager#GetSitesRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the global network.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } }, - { - "target": "com.amazonaws.networkmanager#GetLinks" + "SiteIds": { + "target": "com.amazonaws.networkmanager#StringList", + "traits": { + "smithy.api#documentation": "

    One or more site IDs. The maximum is 10.

    ", + "smithy.api#httpQuery": "siteIds" + } }, - { - "target": "com.amazonaws.networkmanager#GetSites" + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

    The maximum number of results to return.

    ", + "smithy.api#httpQuery": "maxResults" + } }, - { - "target": "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociations" + "NextToken": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The token for the next page of results.

    ", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetSitesResponse": { + "type": "structure", + "members": { + "Sites": { + "target": "com.amazonaws.networkmanager#SiteList", + "traits": { + "smithy.api#documentation": "

    The sites.

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

    The token for the next page of results.

    " + } + } + } + }, + "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociations": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsResponse" + }, + "errors": [ { - "target": "com.amazonaws.networkmanager#GetTransitGatewayRegistrations" + "target": "com.amazonaws.networkmanager#AccessDeniedException" }, { - "target": "com.amazonaws.networkmanager#ListTagsForResource" + "target": "com.amazonaws.networkmanager#ConflictException" }, { - "target": "com.amazonaws.networkmanager#RegisterTransitGateway" + "target": "com.amazonaws.networkmanager#InternalServerException" }, { - "target": "com.amazonaws.networkmanager#TagResource" + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" }, { - "target": "com.amazonaws.networkmanager#UntagResource" + "target": "com.amazonaws.networkmanager#ThrottlingException" }, { - "target": "com.amazonaws.networkmanager#UpdateConnection" + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Gets information about one or more of your transit gateway Connect peer associations in a global network.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations", + "code": 200 }, - { - "target": "com.amazonaws.networkmanager#UpdateDevice" + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the global network.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } }, - { - "target": "com.amazonaws.networkmanager#UpdateGlobalNetwork" + "TransitGatewayConnectPeerArns": { + "target": "com.amazonaws.networkmanager#StringList", + "traits": { + "smithy.api#documentation": "

    One or more transit gateway Connect peer Amazon Resource Names (ARNs).

    ", + "smithy.api#httpQuery": "transitGatewayConnectPeerArns" + } }, - { - "target": "com.amazonaws.networkmanager#UpdateLink" + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

    The maximum number of results to return.

    ", + "smithy.api#httpQuery": "maxResults" + } }, - { - "target": "com.amazonaws.networkmanager#UpdateSite" + "NextToken": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The token for the next page of results.

    ", + "smithy.api#httpQuery": "nextToken" + } } - ], - "traits": { - "aws.api#service": { - "sdkId": "NetworkManager", - "arnNamespace": "networkmanager", - "cloudFormationName": "NetworkManager", - "cloudTrailEventSource": "networkmanager.amazonaws.com", - "endpointPrefix": "networkmanager" - }, - "aws.auth#sigv4": { - "name": "networkmanager" + } + }, + "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsResponse": { + "type": "structure", + "members": { + "TransitGatewayConnectPeerAssociations": { + "target": "com.amazonaws.networkmanager#TransitGatewayConnectPeerAssociationList", + "traits": { + "smithy.api#documentation": "

    Information about the transit gateway Connect peer associations.

    " + } }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

    Transit Gateway Network Manager (Network Manager) enables you to create a global network, in which you can monitor your\n AWS and on-premises networks that are built around transit gateways.

    \n

    The Network Manager APIs are supported in the US West (Oregon) Region only. You must specify the us-west-2 Region in all requests made to Network Manager.

    ", - "smithy.api#title": "AWS Network Manager" + "NextToken": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The token to use for the next page of results.

    " + } + } } }, - "com.amazonaws.networkmanager#RegisterTransitGateway": { + "com.amazonaws.networkmanager#GetTransitGatewayRegistrations": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#RegisterTransitGatewayRequest" + "target": "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsRequest" }, "output": { - "target": "com.amazonaws.networkmanager#RegisterTransitGatewayResponse" + "target": "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsResponse" }, "errors": [ { "target": "com.amazonaws.networkmanager#AccessDeniedException" }, - { - "target": "com.amazonaws.networkmanager#ConflictException" - }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, @@ -3108,82 +3275,1377 @@ } ], "traits": { - "smithy.api#documentation": "

    Registers a transit gateway in your global network. The transit gateway can be in any\n AWS Region, but it must be owned by the same AWS account that owns the global network.\n You cannot register a transit gateway in more than one global network.

    ", - "smithy.api#http": { - "method": "POST", - "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-registrations", - "code": 200 - } + "smithy.api#documentation": "

    Gets information about the transit gateway registrations in a specified\n global network.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-registrations", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the global network.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TransitGatewayArns": { + "target": "com.amazonaws.networkmanager#StringList", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Names (ARNs) of one or more transit gateways. The maximum is\n 10.

    ", + "smithy.api#httpQuery": "transitGatewayArns" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

    The maximum number of results to return.

    ", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The token for the next page of results.

    ", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsResponse": { + "type": "structure", + "members": { + "TransitGatewayRegistrations": { + "target": "com.amazonaws.networkmanager#TransitGatewayRegistrationList", + "traits": { + "smithy.api#documentation": "

    The transit gateway registrations.

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

    The token for the next page of results.

    " + } + } + } + }, + "com.amazonaws.networkmanager#GlobalNetwork": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the global network.

    " + } + }, + "GlobalNetworkArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the global network.

    " + } + }, + "Description": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The description of the global network.

    " + } + }, + "CreatedAt": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

    The date and time that the global network was created.

    " + } + }, + "State": { + "target": "com.amazonaws.networkmanager#GlobalNetworkState", + "traits": { + "smithy.api#documentation": "

    The state of the global network.

    " + } + }, + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

    The tags for the global network.

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

    Describes a global network.

    " + } + }, + "com.amazonaws.networkmanager#GlobalNetworkList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#GlobalNetwork" + } + }, + "com.amazonaws.networkmanager#GlobalNetworkState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "pending" + }, + { + "value": "AVAILABLE", + "name": "available" + }, + { + "value": "DELETING", + "name": "deleting" + }, + { + "value": "UPDATING", + "name": "updating" + } + ] + } + }, + "com.amazonaws.networkmanager#Integer": { + "type": "integer", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.networkmanager#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#required": {} + } + }, + "RetryAfterSeconds": { + "target": "com.amazonaws.networkmanager#RetryAfterSeconds", + "traits": { + "smithy.api#documentation": "

    Indicates when to retry the request.

    ", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "

    The request has failed due to an internal error.

    ", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.networkmanager#Link": { + "type": "structure", + "members": { + "LinkId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the link.

    " + } + }, + "LinkArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the link.

    " + } + }, + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the global network.

    " + } + }, + "SiteId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the site.

    " + } + }, + "Description": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The description of the link.

    " + } + }, + "Type": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The type of the link.

    " + } + }, + "Bandwidth": { + "target": "com.amazonaws.networkmanager#Bandwidth", + "traits": { + "smithy.api#documentation": "

    The bandwidth for the link.

    " + } + }, + "Provider": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The provider of the link.

    " + } + }, + "CreatedAt": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

    The date and time that the link was created.

    " + } + }, + "State": { + "target": "com.amazonaws.networkmanager#LinkState", + "traits": { + "smithy.api#documentation": "

    The state of the link.

    " + } + }, + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

    The tags for the link.

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

    Describes a link.

    " + } + }, + "com.amazonaws.networkmanager#LinkAssociation": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the global network.

    " + } + }, + "DeviceId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The device ID for the link association.

    " + } + }, + "LinkId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the link.

    " + } + }, + "LinkAssociationState": { + "target": "com.amazonaws.networkmanager#LinkAssociationState", + "traits": { + "smithy.api#documentation": "

    The state of the association.

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

    Describes the association between a device and a link.

    " + } + }, + "com.amazonaws.networkmanager#LinkAssociationList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#LinkAssociation" + } + }, + "com.amazonaws.networkmanager#LinkAssociationState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "pending" + }, + { + "value": "AVAILABLE", + "name": "available" + }, + { + "value": "DELETING", + "name": "deleting" + }, + { + "value": "DELETED", + "name": "deleted" + } + ] + } + }, + "com.amazonaws.networkmanager#LinkList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#Link" + } + }, + "com.amazonaws.networkmanager#LinkState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "pending" + }, + { + "value": "AVAILABLE", + "name": "available" + }, + { + "value": "DELETING", + "name": "deleting" + }, + { + "value": "UPDATING", + "name": "updating" + } + ] + } + }, + "com.amazonaws.networkmanager#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Lists the tags for a specified resource.

    ", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{ResourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.networkmanager#ResourceARN", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the resource.

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

    The list of tags.

    " + } + } + } + }, + "com.amazonaws.networkmanager#Location": { + "type": "structure", + "members": { + "Address": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The physical address.

    " + } + }, + "Latitude": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The latitude.

    " + } + }, + "Longitude": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The longitude.

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

    Describes a location.

    ", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.networkmanager#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 500 + } + } + }, + "com.amazonaws.networkmanager#NetworkManager": { + "type": "service", + "version": "2019-07-05", + "operations": [ + { + "target": "com.amazonaws.networkmanager#AssociateCustomerGateway" + }, + { + "target": "com.amazonaws.networkmanager#AssociateLink" + }, + { + "target": "com.amazonaws.networkmanager#AssociateTransitGatewayConnectPeer" + }, + { + "target": "com.amazonaws.networkmanager#CreateConnection" + }, + { + "target": "com.amazonaws.networkmanager#CreateDevice" + }, + { + "target": "com.amazonaws.networkmanager#CreateGlobalNetwork" + }, + { + "target": "com.amazonaws.networkmanager#CreateLink" + }, + { + "target": "com.amazonaws.networkmanager#CreateSite" + }, + { + "target": "com.amazonaws.networkmanager#DeleteConnection" + }, + { + "target": "com.amazonaws.networkmanager#DeleteDevice" + }, + { + "target": "com.amazonaws.networkmanager#DeleteGlobalNetwork" + }, + { + "target": "com.amazonaws.networkmanager#DeleteLink" + }, + { + "target": "com.amazonaws.networkmanager#DeleteSite" + }, + { + "target": "com.amazonaws.networkmanager#DeregisterTransitGateway" + }, + { + "target": "com.amazonaws.networkmanager#DescribeGlobalNetworks" + }, + { + "target": "com.amazonaws.networkmanager#DisassociateCustomerGateway" + }, + { + "target": "com.amazonaws.networkmanager#DisassociateLink" + }, + { + "target": "com.amazonaws.networkmanager#DisassociateTransitGatewayConnectPeer" + }, + { + "target": "com.amazonaws.networkmanager#GetConnections" + }, + { + "target": "com.amazonaws.networkmanager#GetCustomerGatewayAssociations" + }, + { + "target": "com.amazonaws.networkmanager#GetDevices" + }, + { + "target": "com.amazonaws.networkmanager#GetLinkAssociations" + }, + { + "target": "com.amazonaws.networkmanager#GetLinks" + }, + { + "target": "com.amazonaws.networkmanager#GetNetworkResourceCounts" + }, + { + "target": "com.amazonaws.networkmanager#GetNetworkResourceRelationships" + }, + { + "target": "com.amazonaws.networkmanager#GetNetworkResources" + }, + { + "target": "com.amazonaws.networkmanager#GetNetworkRoutes" + }, + { + "target": "com.amazonaws.networkmanager#GetNetworkTelemetry" + }, + { + "target": "com.amazonaws.networkmanager#GetRouteAnalysis" + }, + { + "target": "com.amazonaws.networkmanager#GetSites" + }, + { + "target": "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociations" + }, + { + "target": "com.amazonaws.networkmanager#GetTransitGatewayRegistrations" + }, + { + "target": "com.amazonaws.networkmanager#ListTagsForResource" + }, + { + "target": "com.amazonaws.networkmanager#RegisterTransitGateway" + }, + { + "target": "com.amazonaws.networkmanager#StartRouteAnalysis" + }, + { + "target": "com.amazonaws.networkmanager#TagResource" + }, + { + "target": "com.amazonaws.networkmanager#UntagResource" + }, + { + "target": "com.amazonaws.networkmanager#UpdateConnection" + }, + { + "target": "com.amazonaws.networkmanager#UpdateDevice" + }, + { + "target": "com.amazonaws.networkmanager#UpdateGlobalNetwork" + }, + { + "target": "com.amazonaws.networkmanager#UpdateLink" + }, + { + "target": "com.amazonaws.networkmanager#UpdateNetworkResourceMetadata" + }, + { + "target": "com.amazonaws.networkmanager#UpdateSite" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "NetworkManager", + "arnNamespace": "networkmanager", + "cloudFormationName": "NetworkManager", + "cloudTrailEventSource": "networkmanager.amazonaws.com", + "endpointPrefix": "networkmanager" + }, + "aws.auth#sigv4": { + "name": "networkmanager" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

    Transit Gateway Network Manager (Network Manager) enables you to create a global network, in which you can monitor your\n Amazon Web Services and on-premises networks that are built around transit gateways.

    ", + "smithy.api#title": "AWS Network Manager" + } + }, + "com.amazonaws.networkmanager#NetworkResource": { + "type": "structure", + "members": { + "RegisteredGatewayArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ARN of the gateway.

    " + } + }, + "AwsRegion": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Web Services Region.

    " + } + }, + "AccountId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Web Services account ID.

    " + } + }, + "ResourceType": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The resource type.

    \n

    The following are the supported resource types for Direct Connect:

    \n
      \n
    • \n

      \n dxcon\n

      \n
    • \n
    • \n

      \n dx-gateway\n

      \n
    • \n
    • \n

      \n dx-vif\n

      \n
    • \n
    \n \n

    The following are the supported resource types for Network Manager:

    \n
      \n
    • \n

      \n connection\n

      \n
    • \n
    • \n

      \n device\n

      \n
    • \n
    • \n

      \n link\n

      \n
    • \n
    • \n

      \n site\n

      \n
    • \n
    \n\n

    The following are the supported resource types for Amazon VPC:

    \n
      \n
    • \n

      \n customer-gateway\n

      \n
    • \n
    • \n

      \n transit-gateway\n

      \n
    • \n
    • \n

      \n transit-gateway-attachment\n

      \n
    • \n
    • \n

      \n transit-gateway-connect-peer\n

      \n
    • \n
    • \n

      \n transit-gateway-route-table\n

      \n
    • \n
    • \n

      \n vpn-connection\n

      \n
    • \n
    " + } + }, + "ResourceId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the resource.

    " + } + }, + "ResourceArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ARN of the resource.

    " + } + }, + "Definition": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    Information about the resource, in JSON format. Network Manager gets this information by describing the resource using its Describe API call.

    " + } + }, + "DefinitionTimestamp": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

    The time that the resource definition was retrieved.

    " + } + }, + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

    The tags.

    " + } + }, + "Metadata": { + "target": "com.amazonaws.networkmanager#NetworkResourceMetadataMap", + "traits": { + "smithy.api#documentation": "

    The resource metadata.

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

    Describes a network resource.

    " + } + }, + "com.amazonaws.networkmanager#NetworkResourceCount": { + "type": "structure", + "members": { + "ResourceType": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The resource type.

    " + } + }, + "Count": { + "target": "com.amazonaws.networkmanager#Integer", + "traits": { + "smithy.api#documentation": "

    The resource count.

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

    Describes a resource count.

    " + } + }, + "com.amazonaws.networkmanager#NetworkResourceCountList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#NetworkResourceCount" + } + }, + "com.amazonaws.networkmanager#NetworkResourceList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#NetworkResource" + } + }, + "com.amazonaws.networkmanager#NetworkResourceMetadataKey": { + "type": "string" + }, + "com.amazonaws.networkmanager#NetworkResourceMetadataMap": { + "type": "map", + "key": { + "target": "com.amazonaws.networkmanager#NetworkResourceMetadataKey" + }, + "value": { + "target": "com.amazonaws.networkmanager#NetworkResourceMetadataValue" + } + }, + "com.amazonaws.networkmanager#NetworkResourceMetadataValue": { + "type": "string" + }, + "com.amazonaws.networkmanager#NetworkResourceSummary": { + "type": "structure", + "members": { + "RegisteredGatewayArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ARN of the gateway.

    " + } + }, + "ResourceArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ARN of the resource.

    " + } + }, + "ResourceType": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The resource type.

    " + } + }, + "Definition": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    Information about the resource, in JSON format. Network Manager gets this information by describing the resource using its Describe API call.

    " + } + }, + "NameTag": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The value for the Name tag.

    " + } + }, + "IsMiddlebox": { + "target": "com.amazonaws.networkmanager#Boolean", + "traits": { + "smithy.api#documentation": "

    Indicates whether this is a middlebox appliance.

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

    Describes a network resource.

    " + } + }, + "com.amazonaws.networkmanager#NetworkRoute": { + "type": "structure", + "members": { + "DestinationCidrBlock": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    A unique identifier for the route, such as a CIDR block.

    " + } + }, + "Destinations": { + "target": "com.amazonaws.networkmanager#NetworkRouteDestinationList", + "traits": { + "smithy.api#documentation": "

    The destinations.

    " + } + }, + "PrefixListId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the prefix list.

    " + } + }, + "State": { + "target": "com.amazonaws.networkmanager#RouteState", + "traits": { + "smithy.api#documentation": "

    The route state. The possible values are active and blackhole.

    " + } + }, + "Type": { + "target": "com.amazonaws.networkmanager#RouteType", + "traits": { + "smithy.api#documentation": "

    The route type. The possible values are propagated and static.

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

    Describes a network route.

    " + } + }, + "com.amazonaws.networkmanager#NetworkRouteDestination": { + "type": "structure", + "members": { + "TransitGatewayAttachmentId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the transit gateway attachment.

    " + } + }, + "ResourceType": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The resource type.

    " + } + }, + "ResourceId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the resource.

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

    Describes the destination of a network route.

    " + } + }, + "com.amazonaws.networkmanager#NetworkRouteDestinationList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#NetworkRouteDestination" + } + }, + "com.amazonaws.networkmanager#NetworkRouteList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#NetworkRoute" + } + }, + "com.amazonaws.networkmanager#NetworkTelemetry": { + "type": "structure", + "members": { + "RegisteredGatewayArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ARN of the gateway.

    " + } + }, + "AwsRegion": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Web Services Region.

    " + } + }, + "AccountId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Web Services account ID.

    " + } + }, + "ResourceType": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The resource type.

    " + } + }, + "ResourceId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the resource.

    " + } + }, + "ResourceArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ARN of the resource.

    " + } + }, + "Address": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The address.

    " + } + }, + "Health": { + "target": "com.amazonaws.networkmanager#ConnectionHealth", + "traits": { + "smithy.api#documentation": "

    The connection health.

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

    Describes the telemetry information for a resource.

    " + } + }, + "com.amazonaws.networkmanager#NetworkTelemetryList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#NetworkTelemetry" + } + }, + "com.amazonaws.networkmanager#PathComponent": { + "type": "structure", + "members": { + "Sequence": { + "target": "com.amazonaws.networkmanager#Integer", + "traits": { + "smithy.api#documentation": "

    The sequence number in the path. The destination is 0.

    " + } + }, + "Resource": { + "target": "com.amazonaws.networkmanager#NetworkResourceSummary", + "traits": { + "smithy.api#documentation": "

    The resource.

    " + } + }, + "DestinationCidrBlock": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The destination CIDR block in the route table.

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

    Describes a path component.

    " + } + }, + "com.amazonaws.networkmanager#PathComponentList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#PathComponent" + } + }, + "com.amazonaws.networkmanager#ReasonContextKey": { + "type": "string" + }, + "com.amazonaws.networkmanager#ReasonContextMap": { + "type": "map", + "key": { + "target": "com.amazonaws.networkmanager#ReasonContextKey" + }, + "value": { + "target": "com.amazonaws.networkmanager#ReasonContextValue" + } + }, + "com.amazonaws.networkmanager#ReasonContextValue": { + "type": "string" + }, + "com.amazonaws.networkmanager#RegisterTransitGateway": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#RegisterTransitGatewayRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#RegisterTransitGatewayResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Registers a transit gateway in your global network. The transit gateway can be in any\n Amazon Web Services Region, but it must be owned by the same Amazon Web Services account that owns \n the global network. You cannot register a transit gateway in more than one global network.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-registrations", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#RegisterTransitGatewayRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the global network.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TransitGatewayArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the transit gateway.

    ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#RegisterTransitGatewayResponse": { + "type": "structure", + "members": { + "TransitGatewayRegistration": { + "target": "com.amazonaws.networkmanager#TransitGatewayRegistration", + "traits": { + "smithy.api#documentation": "

    Information about the transit gateway registration.

    " + } + } + } + }, + "com.amazonaws.networkmanager#Relationship": { + "type": "structure", + "members": { + "From": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ARN of the resource.

    " + } + }, + "To": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ARN of the resource.

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

    Describes a resource relationship.

    " + } + }, + "com.amazonaws.networkmanager#RelationshipList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#Relationship" + } + }, + "com.amazonaws.networkmanager#ResourceARN": { + "type": "string" + }, + "com.amazonaws.networkmanager#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#required": {} + } + }, + "ResourceId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the resource.

    ", + "smithy.api#required": {} + } + }, + "ResourceType": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The resource type.

    ", + "smithy.api#required": {} + } + }, + "Context": { + "target": "com.amazonaws.networkmanager#ExceptionContextMap" + } + }, + "traits": { + "smithy.api#documentation": "

    The specified resource could not be found.

    ", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.networkmanager#RetryAfterSeconds": { + "type": "integer", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.networkmanager#RouteAnalysis": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the global network.

    " + } + }, + "OwnerAccountId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the AWS account that created the route analysis.

    " + } + }, + "RouteAnalysisId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the route analysis.

    " + } + }, + "StartTimestamp": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

    The time that the analysis started.

    " + } + }, + "Status": { + "target": "com.amazonaws.networkmanager#RouteAnalysisStatus", + "traits": { + "smithy.api#documentation": "

    The status of the route analysis.

    " + } + }, + "Source": { + "target": "com.amazonaws.networkmanager#RouteAnalysisEndpointOptions", + "traits": { + "smithy.api#documentation": "

    The source.

    " + } + }, + "Destination": { + "target": "com.amazonaws.networkmanager#RouteAnalysisEndpointOptions", + "traits": { + "smithy.api#documentation": "

    The destination.

    " + } + }, + "IncludeReturnPath": { + "target": "com.amazonaws.networkmanager#Boolean", + "traits": { + "smithy.api#documentation": "

    Indicates whether to analyze the return path. The return path is not analyzed if the forward path\n analysis does not succeed.

    " + } + }, + "UseMiddleboxes": { + "target": "com.amazonaws.networkmanager#Boolean", + "traits": { + "smithy.api#documentation": "

    Indicates whether to include the location of middlebox appliances in the route analysis.

    " + } + }, + "ForwardPath": { + "target": "com.amazonaws.networkmanager#RouteAnalysisPath", + "traits": { + "smithy.api#documentation": "

    The forward path.

    " + } + }, + "ReturnPath": { + "target": "com.amazonaws.networkmanager#RouteAnalysisPath", + "traits": { + "smithy.api#documentation": "

    The return path.

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

    Describes a route analysis.

    " + } + }, + "com.amazonaws.networkmanager#RouteAnalysisCompletion": { + "type": "structure", + "members": { + "ResultCode": { + "target": "com.amazonaws.networkmanager#RouteAnalysisCompletionResultCode", + "traits": { + "smithy.api#documentation": "

    The result of the analysis. If the status is NOT_CONNECTED, check the \n reason code.

    " + } + }, + "ReasonCode": { + "target": "com.amazonaws.networkmanager#RouteAnalysisCompletionReasonCode", + "traits": { + "smithy.api#documentation": "

    The reason code. Available only if a connection is not found.

    \n
      \n
    • \n

      \n BLACKHOLE_ROUTE_FOR_DESTINATION_FOUND - Found a black hole route with the destination CIDR block.

      \n
    • \n
    • \n

      \n CYCLIC_PATH_DETECTED - Found the same resource multiple times while traversing the path.

      \n
    • \n
    • \n

      \n INACTIVE_ROUTE_FOR_DESTINATION_FOUND - Found an inactive route with the destination CIDR block.

      \n
    • \n
    • \n

      \n MAX_HOPS_EXCEEDED - Analysis exceeded 64 hops without finding the destination.

      \n
    • \n
    • \n

      \n ROUTE_NOT_FOUND - Cannot find a route table with the destination CIDR block.

      \n
    • \n
    • \n

      \n TGW_ATTACH_ARN_NO_MATCH - Found an attachment, but not with the correct destination ARN.

      \n
    • \n
    • \n

      \n TGW_ATTACH_NOT_FOUND - Cannot find an attachment.

      \n
    • \n
    • \n

      \n TGW_ATTACH_NOT_IN_TGW - Found an attachment, but not to the correct transit gateway.

      \n
    • \n
    • \n

      \n TGW_ATTACH_STABLE_ROUTE_TABLE_NOT_FOUND - The state of the route table association is not associated.

      \n
    • \n
    " + } + }, + "ReasonContext": { + "target": "com.amazonaws.networkmanager#ReasonContextMap", + "traits": { + "smithy.api#documentation": "

    Additional information about the path. Available only if a connection is not found.

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

    Describes the status of an analysis at completion.

    " + } + }, + "com.amazonaws.networkmanager#RouteAnalysisCompletionReasonCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "TRANSIT_GATEWAY_ATTACHMENT_NOT_FOUND", + "name": "TRANSIT_GATEWAY_ATTACHMENT_NOT_FOUND" + }, + { + "value": "TRANSIT_GATEWAY_ATTACHMENT_NOT_IN_TRANSIT_GATEWAY", + "name": "TRANSIT_GATEWAY_ATTACHMENT_NOT_IN_TRANSIT_GATEWAY" + }, + { + "value": "CYCLIC_PATH_DETECTED", + "name": "CYCLIC_PATH_DETECTED" + }, + { + "value": "TRANSIT_GATEWAY_ATTACHMENT_STABLE_ROUTE_TABLE_NOT_FOUND", + "name": "TRANSIT_GATEWAY_ATTACHMENT_STABLE_ROUTE_TABLE_NOT_FOUND" + }, + { + "value": "ROUTE_NOT_FOUND", + "name": "ROUTE_NOT_FOUND" + }, + { + "value": "BLACKHOLE_ROUTE_FOR_DESTINATION_FOUND", + "name": "BLACKHOLE_ROUTE_FOR_DESTINATION_FOUND" + }, + { + "value": "INACTIVE_ROUTE_FOR_DESTINATION_FOUND", + "name": "INACTIVE_ROUTE_FOR_DESTINATION_FOUND" + }, + { + "value": "TRANSIT_GATEWAY_ATTACHMENT_ATTACH_ARN_NO_MATCH", + "name": "TRANSIT_GATEWAY_ATTACHMENT" + }, + { + "value": "MAX_HOPS_EXCEEDED", + "name": "MAX_HOPS_EXCEEDED" + }, + { + "value": "POSSIBLE_MIDDLEBOX", + "name": "POSSIBLE_MIDDLEBOX" + }, + { + "value": "NO_DESTINATION_ARN_PROVIDED", + "name": "NO_DESTINATION_ARN_PROVIDED" + } + ] + } + }, + "com.amazonaws.networkmanager#RouteAnalysisCompletionResultCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CONNECTED", + "name": "CONNECTED" + }, + { + "value": "NOT_CONNECTED", + "name": "NOT_CONNECTED" + } + ] } }, - "com.amazonaws.networkmanager#RegisterTransitGatewayRequest": { + "com.amazonaws.networkmanager#RouteAnalysisEndpointOptions": { "type": "structure", "members": { - "GlobalNetworkId": { + "TransitGatewayAttachmentArn": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The ID of the global network.

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

    The ARN of the transit gateway attachment.

    " } }, "TransitGatewayArn": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the transit gateway. For more information, see\n Resources Defined by Amazon EC2.

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

    The ARN of the transit gateway.

    " + } + }, + "IpAddress": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The IP address.

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

    Describes a source or a destination.

    " } }, - "com.amazonaws.networkmanager#RegisterTransitGatewayResponse": { + "com.amazonaws.networkmanager#RouteAnalysisEndpointOptionsSpecification": { "type": "structure", "members": { - "TransitGatewayRegistration": { - "target": "com.amazonaws.networkmanager#TransitGatewayRegistration", + "TransitGatewayAttachmentArn": { + "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    Information about the transit gateway registration.

    " + "smithy.api#documentation": "

    The ARN of the transit gateway attachment.

    " + } + }, + "IpAddress": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The IP address.

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

    Describes a source or a destination.

    " } }, - "com.amazonaws.networkmanager#ResourceARN": { - "type": "string" - }, - "com.amazonaws.networkmanager#ResourceNotFoundException": { + "com.amazonaws.networkmanager#RouteAnalysisPath": { "type": "structure", "members": { - "Message": { - "target": "com.amazonaws.networkmanager#String", + "CompletionStatus": { + "target": "com.amazonaws.networkmanager#RouteAnalysisCompletion", "traits": { - "smithy.api#required": {} + "smithy.api#documentation": "

    The status of the analysis at completion.

    " } }, - "ResourceId": { - "target": "com.amazonaws.networkmanager#String", + "Path": { + "target": "com.amazonaws.networkmanager#PathComponentList", "traits": { - "smithy.api#documentation": "

    The ID of the resource.

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

    The route analysis path.

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

    Describes a route analysis path.

    " + } + }, + "com.amazonaws.networkmanager#RouteAnalysisStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "RUNNING", + "name": "running" + }, + { + "value": "COMPLETED", + "name": "completed" + }, + { + "value": "FAILED", + "name": "failed" + } + ] + } + }, + "com.amazonaws.networkmanager#RouteState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "BLACKHOLE", + "name": "BLACKHOLE" + } + ] + } + }, + "com.amazonaws.networkmanager#RouteStateList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#RouteState" + } + }, + "com.amazonaws.networkmanager#RouteTableIdentifier": { + "type": "structure", + "members": { + "TransitGatewayRouteTableArn": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The resource type.

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

    The ARN of the transit gateway route table.

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

    The specified resource could not be found.

    ", - "smithy.api#error": "client", - "smithy.api#httpError": 404 + "smithy.api#documentation": "

    Describes a route table.

    " } }, - "com.amazonaws.networkmanager#RetryAfterSeconds": { - "type": "integer", + "com.amazonaws.networkmanager#RouteTableType": { + "type": "string", "traits": { - "smithy.api#box": {} + "smithy.api#enum": [ + { + "value": "TRANSIT_GATEWAY_ROUTE_TABLE", + "name": "TRANSIT_GATEWAY_ROUTE_TABLE" + } + ] + } + }, + "com.amazonaws.networkmanager#RouteType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PROPAGATED", + "name": "PROPAGATED" + }, + { + "value": "STATIC", + "name": "STATIC" + } + ] + } + }, + "com.amazonaws.networkmanager#RouteTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#RouteType" } }, "com.amazonaws.networkmanager#ServiceQuotaExceededException": { @@ -3314,6 +4776,93 @@ ] } }, + "com.amazonaws.networkmanager#StartRouteAnalysis": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#StartRouteAnalysisRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#StartRouteAnalysisResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Starts analyzing the routing path between the specified source and destination. For more information, \n see Route Analyzer.

    ", + "smithy.api#http": { + "method": "POST", + "uri": "/global-networks/{GlobalNetworkId}/route-analyses", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#StartRouteAnalysisRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the global network.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Source": { + "target": "com.amazonaws.networkmanager#RouteAnalysisEndpointOptionsSpecification", + "traits": { + "smithy.api#documentation": "

    The source from which traffic originates.

    ", + "smithy.api#required": {} + } + }, + "Destination": { + "target": "com.amazonaws.networkmanager#RouteAnalysisEndpointOptionsSpecification", + "traits": { + "smithy.api#documentation": "

    The destination.

    ", + "smithy.api#required": {} + } + }, + "IncludeReturnPath": { + "target": "com.amazonaws.networkmanager#Boolean", + "traits": { + "smithy.api#documentation": "

    Indicates whether to analyze the return path. The default is false.

    " + } + }, + "UseMiddleboxes": { + "target": "com.amazonaws.networkmanager#Boolean", + "traits": { + "smithy.api#documentation": "

    Indicates whether to include the location of middlebox appliances in the route analysis.\n The default is false.

    " + } + } + } + }, + "com.amazonaws.networkmanager#StartRouteAnalysisResponse": { + "type": "structure", + "members": { + "RouteAnalysis": { + "target": "com.amazonaws.networkmanager#RouteAnalysis", + "traits": { + "smithy.api#documentation": "

    The route analysis.

    " + } + } + } + }, "com.amazonaws.networkmanager#String": { "type": "string" }, @@ -3329,13 +4878,13 @@ "Key": { "target": "com.amazonaws.networkmanager#TagKey", "traits": { - "smithy.api#documentation": "

    The tag key.

    \n

    Length Constraints: Maximum length of 128 characters.

    " + "smithy.api#documentation": "

    The tag key.

    \n

    Constraints: Maximum length of 128 characters.

    " } }, "Value": { "target": "com.amazonaws.networkmanager#TagValue", "traits": { - "smithy.api#documentation": "

    The tag value.

    \n

    Length Constraints: Maximum length of 256 characters.

    " + "smithy.api#documentation": "

    The tag value.

    \n

    Constraints: Maximum length of 256 characters.

    " } } }, @@ -3802,13 +5351,13 @@ "AWSLocation": { "target": "com.amazonaws.networkmanager#AWSLocation", "traits": { - "smithy.api#documentation": "

    The AWS location of the device.

    " + "smithy.api#documentation": "

    The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.

    " } }, "Description": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    A description of the device.

    \n

    Length Constraints: Maximum length of 256 characters.

    " + "smithy.api#documentation": "

    A description of the device.

    \n

    Constraints: Maximum length of 256 characters.

    " } }, "Type": { @@ -3820,19 +5369,19 @@ "Vendor": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The vendor of the device.

    \n

    Length Constraints: Maximum length of 128 characters.

    " + "smithy.api#documentation": "

    The vendor of the device.

    \n

    Constraints: Maximum length of 128 characters.

    " } }, "Model": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The model of the device.

    \n

    Length Constraints: Maximum length of 128 characters.

    " + "smithy.api#documentation": "

    The model of the device.

    \n

    Constraints: Maximum length of 128 characters.

    " } }, "SerialNumber": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The serial number of the device.

    \n

    Length Constraints: Maximum length of 128 characters.

    " + "smithy.api#documentation": "

    The serial number of the device.

    \n

    Constraints: Maximum length of 128 characters.

    " } }, "Location": { @@ -3908,7 +5457,7 @@ "Description": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    A description of the global network.

    \n

    Length Constraints: Maximum length of 256 characters.

    " + "smithy.api#documentation": "

    A description of the global network.

    \n

    Constraints: Maximum length of 256 characters.

    " } } } @@ -3986,13 +5535,13 @@ "Description": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    A description of the link.

    \n

    Length Constraints: Maximum length of 256 characters.

    " + "smithy.api#documentation": "

    A description of the link.

    \n

    Constraints: Maximum length of 256 characters.

    " } }, "Type": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The type of the link.

    \n

    Length Constraints: Maximum length of 128 characters.

    " + "smithy.api#documentation": "

    The type of the link.

    \n

    Constraints: Maximum length of 128 characters.

    " } }, "Bandwidth": { @@ -4004,7 +5553,7 @@ "Provider": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    The provider of the link.

    \n

    Length Constraints: Maximum length of 128 characters.

    " + "smithy.api#documentation": "

    The provider of the link.

    \n

    Constraints: Maximum length of 128 characters.

    " } } } @@ -4020,6 +5569,88 @@ } } }, + "com.amazonaws.networkmanager#UpdateNetworkResourceMetadata": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#UpdateNetworkResourceMetadataRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#UpdateNetworkResourceMetadataResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

    Updates the resource metadata for the specified global network.

    ", + "smithy.api#http": { + "method": "PATCH", + "uri": "/global-networks/{GlobalNetworkId}/network-resources/{ResourceArn}/metadata", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#UpdateNetworkResourceMetadataRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ID of the global network.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ResourceArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ARN of the resource.

    ", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Metadata": { + "target": "com.amazonaws.networkmanager#NetworkResourceMetadataMap", + "traits": { + "smithy.api#documentation": "

    The resource metadata.

    ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#UpdateNetworkResourceMetadataResponse": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.networkmanager#String", + "traits": { + "smithy.api#documentation": "

    The ARN of the resource.

    " + } + }, + "Metadata": { + "target": "com.amazonaws.networkmanager#NetworkResourceMetadataMap", + "traits": { + "smithy.api#documentation": "

    The updated resource metadata.

    " + } + } + } + }, "com.amazonaws.networkmanager#UpdateSite": { "type": "operation", "input": { @@ -4079,7 +5710,7 @@ "Description": { "target": "com.amazonaws.networkmanager#String", "traits": { - "smithy.api#documentation": "

    A description of your site.

    \n

    Length Constraints: Maximum length of 256 characters.

    " + "smithy.api#documentation": "

    A description of your site.

    \n

    Constraints: Maximum length of 256 characters.

    " } }, "Location": { diff --git a/codegen/sdk-codegen/aws-models/rekognition.json b/codegen/sdk-codegen/aws-models/rekognition.json index c57121c6f90c..fd2f757b86d8 100644 --- a/codegen/sdk-codegen/aws-models/rekognition.json +++ b/codegen/sdk-codegen/aws-models/rekognition.json @@ -349,6 +349,12 @@ "traits": { "smithy.api#documentation": "

    Face details for the recognized celebrity.

    " } + }, + "KnownGender": { + "target": "com.amazonaws.rekognition#KnownGender", + "traits": { + "smithy.api#documentation": "

    Retrieves the known gender for the celebrity.

    " + } } }, "traits": { @@ -804,6 +810,83 @@ } } }, + "com.amazonaws.rekognition#CreateDataset": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#CreateDatasetRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#CreateDatasetResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" + }, + { + "target": "com.amazonaws.rekognition#InternalServerError" + }, + { + "target": "com.amazonaws.rekognition#InvalidParameterException" + }, + { + "target": "com.amazonaws.rekognition#InvalidS3ObjectException" + }, + { + "target": "com.amazonaws.rekognition#LimitExceededException" + }, + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" + }, + { + "target": "com.amazonaws.rekognition#ResourceAlreadyExistsException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    Creates a new Amazon Rekognition Custom Labels dataset. You can create a dataset by using\n an Amazon Sagemaker format manifest file or by copying an existing Amazon Rekognition Custom Labels dataset.

    \n\n

    To create a training dataset for a project, specify train for the value of \n DatasetType. To create the test dataset for a project,\n specify test for the value of DatasetType.\n

    \n \n \n

    The response from CreateDataset is the Amazon Resource Name (ARN) for the dataset.\n Creating a dataset takes a while to complete. Use DescribeDataset to check the \n current status. The dataset created successfully if the value of Status is\n CREATE_COMPLETE.

    \n

    To check if any non-terminal errors occurred, call ListDatasetEntries\nand check for the presence of errors lists in the JSON Lines.

    \n

    Dataset creation fails if a terminal error occurs (Status = CREATE_FAILED). \n Currently, you can't access the terminal error information.\n \n

    \n \n \n

    For more information, see Creating dataset in the Amazon Rekognition Custom Labels Developer Guide.

    \n \n

    This operation requires permissions to perform the rekognition:CreateDataset action.\n If you want to copy an existing dataset, you also require permission to perform the rekognition:ListDatasetEntries action.

    " + } + }, + "com.amazonaws.rekognition#CreateDatasetRequest": { + "type": "structure", + "members": { + "DatasetSource": { + "target": "com.amazonaws.rekognition#DatasetSource", + "traits": { + "smithy.api#documentation": "

    \nThe source files for the dataset. You can specify the ARN of an existing dataset or specify the Amazon S3 bucket location\nof an Amazon Sagemaker format manifest file. If you don't specify datasetSource, an empty dataset is created.\n To add labeled images to the dataset, You can use the console or call UpdateDatasetEntries.\n \n

    " + } + }, + "DatasetType": { + "target": "com.amazonaws.rekognition#DatasetType", + "traits": { + "smithy.api#documentation": "

    \nThe type of the dataset. Specify train to create a training dataset. Specify test \n to create a test dataset.\n

    ", + "smithy.api#required": {} + } + }, + "ProjectArn": { + "target": "com.amazonaws.rekognition#ProjectArn", + "traits": { + "smithy.api#documentation": "

    \nThe ARN of the Amazon Rekognition Custom Labels project to which you want to asssign the dataset.\n

    ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rekognition#CreateDatasetResponse": { + "type": "structure", + "members": { + "DatasetArn": { + "target": "com.amazonaws.rekognition#DatasetArn", + "traits": { + "smithy.api#documentation": "

    \nThe ARN of the created Amazon Rekognition Custom Labels dataset.\n

    " + } + } + } + }, "com.amazonaws.rekognition#CreateProject": { "type": "operation", "input": { @@ -836,7 +919,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Creates a new Amazon Rekognition Custom Labels project. A project is a logical grouping of resources (images, Labels, models) \n and operations (training, evaluation and detection).

    \n

    This operation requires permissions to perform the rekognition:CreateProject action.

    " + "smithy.api#documentation": "

    Creates a new Amazon Rekognition Custom Labels project. A project is a group of resources (datasets, model versions) \n that you use to create and manage Amazon Rekognition Custom Labels models.

    \n

    This operation requires permissions to perform the rekognition:CreateProject action.

    " } }, "com.amazonaws.rekognition#CreateProjectRequest": { @@ -900,7 +983,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Creates a new version of a model and begins training. \n Models are managed as part of an Amazon Rekognition Custom Labels project. You can specify\n one training dataset and one testing dataset. The response from CreateProjectVersion\n is an Amazon Resource Name (ARN) for the version of the model.

    \n

    Training takes a while to complete. You can get the current status by calling\n DescribeProjectVersions.

    \n

    Once training has successfully completed, call DescribeProjectVersions to\n get the training results and evaluate the model. \n

    \n

    After evaluating the model, you start the model\n by calling StartProjectVersion.

    \n

    This operation requires permissions to perform the rekognition:CreateProjectVersion action.

    " + "smithy.api#documentation": "

    Creates a new version of a model and begins training. \n Models are managed as part of an Amazon Rekognition Custom Labels project. \n The response from CreateProjectVersion\n is an Amazon Resource Name (ARN) for the version of the model.

    \n \n \n

    Training uses the training and test datasets associated with the project. \n For more information, see Creating training and test dataset in the Amazon Rekognition Custom Labels Developer Guide.\n

    \n \n \n \n

    You can train a modelin a project that doesn't have associated datasets by specifying manifest files in the\n TrainingData and TestingData fields.\n

    \n

    If you open the console after training a model with manifest files, Amazon Rekognition Custom Labels creates\n the datasets for you using the most recent manifest files. You can no longer train\n a model version for the project by specifying manifest files.

    \n

    Instead of training with a project without associated datasets,\n we recommend that you use the manifest\n files to create training and test datasets for the project.

    \n
    \n \n \n

    Training takes a while to complete. You can get the current status by calling\n DescribeProjectVersions. Training completed successfully if\n the value of the Status field is TRAINING_COMPLETED.

    \n \n

    If training \n fails, see Debugging a failed model training in the Amazon Rekognition Custom Labels developer guide.

    \n \n \n

    Once training has successfully completed, call DescribeProjectVersions to\n get the training results and evaluate the model. For more information, see Improving a trained Amazon Rekognition Custom Labels model\n in the Amazon Rekognition Custom Labels developers guide.\n

    \n \n

    After evaluating the model, you start the model\n by calling StartProjectVersion.

    \n

    This operation requires permissions to perform the rekognition:CreateProjectVersion action.

    " } }, "com.amazonaws.rekognition#CreateProjectVersionRequest": { @@ -930,15 +1013,13 @@ "TrainingData": { "target": "com.amazonaws.rekognition#TrainingData", "traits": { - "smithy.api#documentation": "

    The dataset to use for training.

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

    Specifies an external manifest that the services uses to train the model.\n If you specify TrainingData you must also specify TestingData.\n The project must not have any associated datasets.\n

    " } }, "TestingData": { "target": "com.amazonaws.rekognition#TestingData", "traits": { - "smithy.api#documentation": "

    The dataset to use for testing.

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

    Specifies an external manifest that the service uses to test the model.\n If you specify TestingData you must also specify TrainingData.\n The project must not have any associated datasets.

    " } }, "Tags": { @@ -950,7 +1031,7 @@ "KmsKeyId": { "target": "com.amazonaws.rekognition#KmsKeyId", "traits": { - "smithy.api#documentation": "

    The identifier for your AWS Key Management Service (AWS KMS) customer master key (CMK).\n You can supply the Amazon Resource Name (ARN) of your CMK, the ID of your CMK,\n an alias for your CMK, or an alias ARN.\n The key is used to encrypt training and test images copied into the service for model training.\n Your source images are unaffected. The key is also used to encrypt training results\n and manifest files written to the output Amazon S3 bucket (OutputConfig).

    \n

    If you choose to use your own CMK, you need the following permissions on the CMK.

    \n
      \n
    • \n

      kms:CreateGrant

      \n
    • \n
    • \n

      kms:DescribeKey

      \n
    • \n
    • \n

      kms:GenerateDataKey

      \n
    • \n
    • \n

      kms:Decrypt

      \n
    • \n
    \n

    If you don't specify a value for KmsKeyId, images copied into the service are encrypted\n using a key that AWS owns and manages.

    " + "smithy.api#documentation": "

    The identifier for your AWS Key Management Service key (AWS KMS key).\n You can supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS key,\n an alias for your KMS key, or an alias ARN.\n The key is used to encrypt training and test images copied into the service for model training.\n Your source images are unaffected. The key is also used to encrypt training results\n and manifest files written to the output Amazon S3 bucket (OutputConfig).

    \n

    If you choose to use your own KMS key, you need the following permissions on the KMS key.

    \n
      \n
    • \n

      kms:CreateGrant

      \n
    • \n
    • \n

      kms:DescribeKey

      \n
    • \n
    • \n

      kms:GenerateDataKey

      \n
    • \n
    • \n

      kms:Decrypt

      \n
    • \n
    \n

    If you don't specify a value for KmsKeyId, images copied into the service are encrypted\n using a key that AWS owns and manages.

    " } } } @@ -1093,6 +1174,327 @@ "target": "com.amazonaws.rekognition#CustomLabel" } }, + "com.amazonaws.rekognition#DatasetArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^(^arn:[a-z\\d-]+:rekognition:[a-z\\d-]+:\\d{12}:project\\/[a-zA-Z0-9_.\\-]{1,255}\\/dataset\\/(train|test)\\/[0-9]+$)$" + } + }, + "com.amazonaws.rekognition#DatasetChanges": { + "type": "structure", + "members": { + "GroundTruth": { + "target": "com.amazonaws.rekognition#GroundTruthBlob", + "traits": { + "smithy.api#documentation": "

    A Base64-encoded binary data object\n containing one or JSON lines that either update the dataset or are additions to the dataset. You change a dataset by calling UpdateDatasetEntries.\n If you are using an AWS SDK to call UpdateDatasetEntries, you don't need to encode Changes as the SDK encodes the data for you.\n\n

    \n \n \n

    For example JSON lines,\n see Image-Level labels in manifest files and \n and Object localization in manifest files in the Amazon Rekognition Custom Labels Developer Guide.\n

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

    \nDescribes updates or additions to a dataset. A Single update or addition\nis an entry (JSON Line) that provides information about a single image. To update an existing entry,\nyou match the source-ref field of the update entry with the source-ref filed of the entry that you want to update.\n If the source-ref field doesn't match an existing entry, the entry is added to dataset as a new entry.

    " + } + }, + "com.amazonaws.rekognition#DatasetDescription": { + "type": "structure", + "members": { + "CreationTimestamp": { + "target": "com.amazonaws.rekognition#DateTime", + "traits": { + "smithy.api#documentation": "

    \nThe Unix timestamp for the time and date that the dataset was created.\n

    " + } + }, + "LastUpdatedTimestamp": { + "target": "com.amazonaws.rekognition#DateTime", + "traits": { + "smithy.api#documentation": "

    \n The Unix timestamp for the date and time that the dataset was last updated.\n

    " + } + }, + "Status": { + "target": "com.amazonaws.rekognition#DatasetStatus", + "traits": { + "smithy.api#documentation": "

    \n The status of the dataset.\n

    " + } + }, + "StatusMessage": { + "target": "com.amazonaws.rekognition#StatusMessage", + "traits": { + "smithy.api#documentation": "

    \n The status message for the dataset. \n

    " + } + }, + "StatusMessageCode": { + "target": "com.amazonaws.rekognition#DatasetStatusMessageCode", + "traits": { + "smithy.api#documentation": "

    \n The status message code for the dataset operation. If a service error occurs, try the \n API call again later. If a client error occurs, check the input parameters to the dataset\n API call that failed.\n

    " + } + }, + "DatasetStats": { + "target": "com.amazonaws.rekognition#DatasetStats", + "traits": { + "smithy.api#documentation": "

    \nThe status message code for the dataset.\n

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

    \nA description for a dataset. For more information, see DescribeDataset.

    \n

    The status fields Status, StatusMessage, and StatusMessageCode\nreflect the last operation on the dataset.\n

    " + } + }, + "com.amazonaws.rekognition#DatasetEntries": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#DatasetEntry" + } + }, + "com.amazonaws.rekognition#DatasetEntry": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100000 + }, + "smithy.api#pattern": "^\\{.*\\}$" + } + }, + "com.amazonaws.rekognition#DatasetLabel": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^.{1,}$" + } + }, + "com.amazonaws.rekognition#DatasetLabelDescription": { + "type": "structure", + "members": { + "LabelName": { + "target": "com.amazonaws.rekognition#DatasetLabel", + "traits": { + "smithy.api#documentation": "

    \nThe name of the label.\n

    " + } + }, + "LabelStats": { + "target": "com.amazonaws.rekognition#DatasetLabelStats", + "traits": { + "smithy.api#documentation": "

    \nStatistics about the label.\n

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

    \nDescribes a dataset label. For more information, see ListDatasetLabels.\n

    " + } + }, + "com.amazonaws.rekognition#DatasetLabelDescriptions": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#DatasetLabelDescription" + } + }, + "com.amazonaws.rekognition#DatasetLabelStats": { + "type": "structure", + "members": { + "EntryCount": { + "target": "com.amazonaws.rekognition#UInteger", + "traits": { + "smithy.api#documentation": "

    \nThe total number of images that use the label.\n

    " + } + }, + "BoundingBoxCount": { + "target": "com.amazonaws.rekognition#UInteger", + "traits": { + "smithy.api#documentation": "

    \nThe total number of images that have the label assigned to a bounding box.\n

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

    \n Statistics about a label used in a dataset. For more information, see DatasetLabelDescription.\n

    " + } + }, + "com.amazonaws.rekognition#DatasetLabels": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#DatasetLabel" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.rekognition#DatasetMetadata": { + "type": "structure", + "members": { + "CreationTimestamp": { + "target": "com.amazonaws.rekognition#DateTime", + "traits": { + "smithy.api#documentation": "

    \n The Unix timestamp for the date and time that the dataset was created. \n

    " + } + }, + "DatasetType": { + "target": "com.amazonaws.rekognition#DatasetType", + "traits": { + "smithy.api#documentation": "

    \n The type of the dataset.\n

    " + } + }, + "DatasetArn": { + "target": "com.amazonaws.rekognition#DatasetArn", + "traits": { + "smithy.api#documentation": "

    \nThe Amazon Resource Name (ARN) for the dataset.\n

    " + } + }, + "Status": { + "target": "com.amazonaws.rekognition#DatasetStatus", + "traits": { + "smithy.api#documentation": "

    \n The status for the dataset.\n

    " + } + }, + "StatusMessage": { + "target": "com.amazonaws.rekognition#StatusMessage", + "traits": { + "smithy.api#documentation": "

    \n The status message for the dataset.\n

    " + } + }, + "StatusMessageCode": { + "target": "com.amazonaws.rekognition#DatasetStatusMessageCode", + "traits": { + "smithy.api#documentation": "

    \n The status message code for the dataset operation. If a service error occurs, try the \n API call again later. If a client error occurs, check the input parameters to the dataset\n API call that failed.\n

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

    \n Summary information for an Amazon Rekognition Custom Labels dataset. For more information, see \n ProjectDescription.\n

    " + } + }, + "com.amazonaws.rekognition#DatasetMetadataList": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#DatasetMetadata" + } + }, + "com.amazonaws.rekognition#DatasetSource": { + "type": "structure", + "members": { + "GroundTruthManifest": { + "target": "com.amazonaws.rekognition#GroundTruthManifest" + }, + "DatasetArn": { + "target": "com.amazonaws.rekognition#DatasetArn", + "traits": { + "smithy.api#documentation": "

    \nThe ARN of an Amazon Rekognition Custom Labels dataset that you want to copy.\n

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

    \nThe source that Amazon Rekognition Custom Labels uses to create a dataset. To\nuse an Amazon Sagemaker format manifest file, specify the S3 bucket location in the GroundTruthManifest field.\nThe S3 bucket must be in your AWS account.\nTo create a copy of an existing dataset, specify the Amazon Resource Name (ARN) of\nan existing dataset in DatasetArn.

    \n

    You need to specify a value for DatasetArn or GroundTruthManifest, but not both.\n if you supply both values, or if you don't specify any values, an InvalidParameterException exception occurs. \n

    \n

    For more information, see CreateDataset.

    " + } + }, + "com.amazonaws.rekognition#DatasetStats": { + "type": "structure", + "members": { + "LabeledEntries": { + "target": "com.amazonaws.rekognition#UInteger", + "traits": { + "smithy.api#documentation": "

    \nThe total number of images in the dataset that have labels.\n

    " + } + }, + "TotalEntries": { + "target": "com.amazonaws.rekognition#UInteger", + "traits": { + "smithy.api#documentation": "

    \nThe total number of images in the dataset.\n

    " + } + }, + "TotalLabels": { + "target": "com.amazonaws.rekognition#UInteger", + "traits": { + "smithy.api#documentation": "

    \nThe total number of labels declared in the dataset.\n

    " + } + }, + "ErrorEntries": { + "target": "com.amazonaws.rekognition#UInteger", + "traits": { + "smithy.api#documentation": "

    \n The total number of entries that contain at least one error.\n

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

    \nProvides statistics about a dataset. For more information, see DescribeDataset.\n\n

    " + } + }, + "com.amazonaws.rekognition#DatasetStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATE_IN_PROGRESS", + "name": "CREATE_IN_PROGRESS" + }, + { + "value": "CREATE_COMPLETE", + "name": "CREATE_COMPLETE" + }, + { + "value": "CREATE_FAILED", + "name": "CREATE_FAILED" + }, + { + "value": "UPDATE_IN_PROGRESS", + "name": "UPDATE_IN_PROGRESS" + }, + { + "value": "UPDATE_COMPLETE", + "name": "UPDATE_COMPLETE" + }, + { + "value": "UPDATE_FAILED", + "name": "UPDATE_FAILED" + }, + { + "value": "DELETE_IN_PROGRESS", + "name": "DELETE_IN_PROGRESS" + } + ] + } + }, + "com.amazonaws.rekognition#DatasetStatusMessageCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SUCCESS", + "name": "SUCCESS" + }, + { + "value": "SERVICE_ERROR", + "name": "SERVICE_ERROR" + }, + { + "value": "CLIENT_ERROR", + "name": "CLIENT_ERROR" + } + ] + } + }, + "com.amazonaws.rekognition#DatasetType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "TRAIN", + "name": "TRAIN" + }, + { + "value": "TEST", + "name": "TEST" + } + ] + } + }, "com.amazonaws.rekognition#DateTime": { "type": "timestamp" }, @@ -1106,13 +1508,68 @@ } } }, - "com.amazonaws.rekognition#DeleteCollection": { + "com.amazonaws.rekognition#DeleteCollection": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#DeleteCollectionRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#DeleteCollectionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" + }, + { + "target": "com.amazonaws.rekognition#InternalServerError" + }, + { + "target": "com.amazonaws.rekognition#InvalidParameterException" + }, + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    Deletes the specified collection. Note that this operation\n removes all faces in the collection. For an example, see delete-collection-procedure.

    \n\n

    This operation requires permissions to perform the\n rekognition:DeleteCollection action.

    " + } + }, + "com.amazonaws.rekognition#DeleteCollectionRequest": { + "type": "structure", + "members": { + "CollectionId": { + "target": "com.amazonaws.rekognition#CollectionId", + "traits": { + "smithy.api#documentation": "

    ID of the collection to delete.

    ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rekognition#DeleteCollectionResponse": { + "type": "structure", + "members": { + "StatusCode": { + "target": "com.amazonaws.rekognition#UInteger", + "traits": { + "smithy.api#documentation": "

    HTTP status code that indicates the result of the operation.

    " + } + } + } + }, + "com.amazonaws.rekognition#DeleteDataset": { "type": "operation", "input": { - "target": "com.amazonaws.rekognition#DeleteCollectionRequest" + "target": "com.amazonaws.rekognition#DeleteDatasetRequest" }, "output": { - "target": "com.amazonaws.rekognition#DeleteCollectionResponse" + "target": "com.amazonaws.rekognition#DeleteDatasetResponse" }, "errors": [ { @@ -1124,9 +1581,15 @@ { "target": "com.amazonaws.rekognition#InvalidParameterException" }, + { + "target": "com.amazonaws.rekognition#LimitExceededException" + }, { "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" }, + { + "target": "com.amazonaws.rekognition#ResourceInUseException" + }, { "target": "com.amazonaws.rekognition#ResourceNotFoundException" }, @@ -1135,31 +1598,24 @@ } ], "traits": { - "smithy.api#documentation": "

    Deletes the specified collection. Note that this operation\n removes all faces in the collection. For an example, see delete-collection-procedure.

    \n\n

    This operation requires permissions to perform the\n rekognition:DeleteCollection action.

    " + "smithy.api#documentation": "

    Deletes an existing Amazon Rekognition Custom Labels dataset.\n Deleting a dataset might take while. Use DescribeDataset to check the \n current status. The dataset is still deleting if the value of Status is\n DELETE_IN_PROGRESS. If you try to access the dataset after it is deleted, you get\n a ResourceNotFoundException exception.\n\n

    \n

    You can't delete a dataset while it is creating (Status = CREATE_IN_PROGRESS)\n or if the dataset is updating (Status = UPDATE_IN_PROGRESS).

    \n

    This operation requires permissions to perform the rekognition:DeleteDataset action.

    " } }, - "com.amazonaws.rekognition#DeleteCollectionRequest": { + "com.amazonaws.rekognition#DeleteDatasetRequest": { "type": "structure", "members": { - "CollectionId": { - "target": "com.amazonaws.rekognition#CollectionId", + "DatasetArn": { + "target": "com.amazonaws.rekognition#DatasetArn", "traits": { - "smithy.api#documentation": "

    ID of the collection to delete.

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

    \nThe ARN of the Amazon Rekognition Custom Labels dataset that you want to delete. \n

    ", "smithy.api#required": {} } } } }, - "com.amazonaws.rekognition#DeleteCollectionResponse": { + "com.amazonaws.rekognition#DeleteDatasetResponse": { "type": "structure", - "members": { - "StatusCode": { - "target": "com.amazonaws.rekognition#UInteger", - "traits": { - "smithy.api#documentation": "

    HTTP status code that indicates the result of the operation.

    " - } - } - } + "members": {} }, "com.amazonaws.rekognition#DeleteFaces": { "type": "operation", @@ -1255,7 +1711,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Deletes an Amazon Rekognition Custom Labels project. To delete a project you must first delete all models associated \n with the project. To delete a model, see DeleteProjectVersion.

    \n

    This operation requires permissions to perform the\n rekognition:DeleteProject action.

    " + "smithy.api#documentation": "

    Deletes an Amazon Rekognition Custom Labels project. To delete a project you must first delete all models associated \n with the project. To delete a model, see DeleteProjectVersion.

    \n

    \n DeleteProject is an asynchronous operation. To check if the project is deleted,\n call DescribeProjects. The project is deleted when the project no longer appears in the\n response.

    \n

    This operation requires permissions to perform the\n rekognition:DeleteProject action.

    " } }, "com.amazonaws.rekognition#DeleteProjectRequest": { @@ -1463,6 +1919,61 @@ } } }, + "com.amazonaws.rekognition#DescribeDataset": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#DescribeDatasetRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#DescribeDatasetResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" + }, + { + "target": "com.amazonaws.rekognition#InternalServerError" + }, + { + "target": "com.amazonaws.rekognition#InvalidParameterException" + }, + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    \nDescribes an Amazon Rekognition Custom Labels dataset. You can get information such as the current status of a dataset and\nstatistics about the images and labels in a dataset. \n

    \n

    This operation requires permissions to perform the rekognition:DescribeDataset action.

    " + } + }, + "com.amazonaws.rekognition#DescribeDatasetRequest": { + "type": "structure", + "members": { + "DatasetArn": { + "target": "com.amazonaws.rekognition#DatasetArn", + "traits": { + "smithy.api#documentation": "

    \nThe Amazon Resource Name (ARN) of the dataset that you want to describe.\n

    ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rekognition#DescribeDatasetResponse": { + "type": "structure", + "members": { + "DatasetDescription": { + "target": "com.amazonaws.rekognition#DatasetDescription", + "traits": { + "smithy.api#documentation": "

    \nThe description for the dataset.\n

    " + } + } + } + }, "com.amazonaws.rekognition#DescribeProjectVersions": { "type": "operation", "input": { @@ -1495,7 +2006,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Lists and describes the models in an Amazon Rekognition Custom Labels project. You \n can specify up to 10 model versions in ProjectVersionArns. If\n you don't specify a value, descriptions for all models are returned.

    \n

    This operation requires permissions to perform the rekognition:DescribeProjectVersions\n action.

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

    Lists and describes the versions of a model in an Amazon Rekognition Custom Labels project. You \n can specify up to 10 model versions in ProjectVersionArns. If\n you don't specify a value, descriptions for all model versions in the project are returned.

    \n

    This operation requires permissions to perform the rekognition:DescribeProjectVersions\n action.

    ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1634,7 +2145,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Lists and gets information about your Amazon Rekognition Custom Labels projects.

    \n

    This operation requires permissions to perform the rekognition:DescribeProjects action.

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

    Gets information about your Amazon Rekognition Custom Labels projects.

    \n

    This operation requires permissions to perform the rekognition:DescribeProjects action.

    ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1657,6 +2168,12 @@ "traits": { "smithy.api#documentation": "

    The maximum number of results to return per paginated call. The largest value you can specify is 100. \n If you specify a value greater than 100, a ValidationException\n error occurs. The default value is 100.

    " } + }, + "ProjectNames": { + "target": "com.amazonaws.rekognition#ProjectNames", + "traits": { + "smithy.api#documentation": "

    A list of the projects that you want Amazon Rekognition Custom Labels to describe. If you don't specify a value, \n the response includes descriptions for all the projects in your AWS account.

    " + } } } }, @@ -2315,6 +2832,84 @@ "smithy.api#documentation": "

    A set of parameters that allow you to filter out certain results from your returned results.

    " } }, + "com.amazonaws.rekognition#DistributeDataset": { + "type": "structure", + "members": { + "Arn": { + "target": "com.amazonaws.rekognition#DatasetArn", + "traits": { + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the dataset that you want to use.\n

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

    \n A training dataset or a test dataset used in a dataset distribution operation.\n For more information, see DistributeDatasetEntries.\n

    " + } + }, + "com.amazonaws.rekognition#DistributeDatasetEntries": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#DistributeDatasetEntriesRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#DistributeDatasetEntriesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" + }, + { + "target": "com.amazonaws.rekognition#InternalServerError" + }, + { + "target": "com.amazonaws.rekognition#InvalidParameterException" + }, + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotReadyException" + }, + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    Distributes the entries (images) in a training dataset across the training dataset and the test dataset for a project.\n DistributeDatasetEntries moves 20% of the training dataset images to the test dataset.\n An entry is a JSON Line that describes an image.\n

    \n

    You supply the Amazon Resource Names (ARN) of a project's training dataset and test dataset. \n The training dataset must contain the images that you want to split. The test dataset \n must be empty. The datasets must belong to the same project. To create training and test datasets for a project, call CreateDataset.

    \n

    Distributing a dataset takes a while to complete. To check the status call DescribeDataset. The operation\n is complete when the Status field for the training dataset and the test dataset is UPDATE_COMPLETE. \n If the dataset split fails, the value of Status is UPDATE_FAILED.

    \n\n

    This operation requires permissions to perform the rekognition:DistributeDatasetEntries action.

    " + } + }, + "com.amazonaws.rekognition#DistributeDatasetEntriesRequest": { + "type": "structure", + "members": { + "Datasets": { + "target": "com.amazonaws.rekognition#DistributeDatasetMetadataList", + "traits": { + "smithy.api#documentation": "

    The ARNS for the training dataset and test dataset that you want to use. The datasets must belong to\n the same project. The test dataset must be empty.\n

    ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rekognition#DistributeDatasetEntriesResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.rekognition#DistributeDatasetMetadataList": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#DistributeDataset" + }, + "traits": { + "smithy.api#length": { + "min": 2, + "max": 2 + } + } + }, "com.amazonaws.rekognition#Emotion": { "type": "structure", "members": { @@ -2778,7 +3373,7 @@ "FaceMatchThreshold": { "target": "com.amazonaws.rekognition#Percent", "traits": { - "smithy.api#documentation": "

    Minimum face match confidence score that must be met to return a result for a recognized face. Default is 80.\n 0 is the lowest confidence. 100 is the highest confidence.

    " + "smithy.api#documentation": "

    Minimum face match confidence score that must be met to return a result for a recognized face. The default is 80.\n 0 is the lowest confidence. 100 is the highest confidence. Values between 0 and 100 are accepted, and values lower than 80 are set to 80.

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

    Gets the celebrity recognition results for a Amazon Rekognition Video analysis started by\n StartCelebrityRecognition.

    \n

    Celebrity recognition in a video is an asynchronous operation. Analysis is started by a call\n to StartCelebrityRecognition which returns a job identifier (JobId).\n When the celebrity recognition operation finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service\n topic registered in the initial call to StartCelebrityRecognition.\n To get the results of the celebrity recognition analysis, first check that the status value published to the Amazon SNS\n topic is SUCCEEDED. If so, call GetCelebrityDetection and pass the job identifier\n (JobId) from the initial call to StartCelebrityDetection.

    \n \n

    For more information, see Working With Stored Videos in the Amazon Rekognition Developer Guide.

    \n

    \n GetCelebrityRecognition returns detected celebrities and the time(s) they are detected in an array\n (Celebrities) of CelebrityRecognition \n objects. Each CelebrityRecognition contains information about the celebrity in a CelebrityDetail\n object and the time, Timestamp, the celebrity was detected.\n

    \n \n

    \n GetCelebrityRecognition only returns the default \n facial attributes (BoundingBox, Confidence, \n Landmarks, Pose, and Quality). The other facial attributes listed\n in the Face object of the following response syntax are not returned. For more information,\n see FaceDetail in the Amazon Rekognition Developer Guide.

    \n
    \n

    By default, the Celebrities array is sorted by time (milliseconds from the start of the video).\n You can also sort the array by celebrity by specifying the value ID in the SortBy input parameter.

    \n

    The CelebrityDetail object includes the celebrity identifer and additional information urls. If you don't store\n the additional information urls, you can get them later by calling GetCelebrityInfo with the celebrity identifer.

    \n

    No information is returned for faces not recognized as celebrities.

    \n

    Use MaxResults parameter to limit the number of labels returned. If there are more results than\n specified in MaxResults, the value of NextToken in the operation response contains a\n pagination token for getting the next set of results. To get the next page of results, call GetCelebrityDetection\n and populate the NextToken request parameter with the token\n value returned from the previous call to GetCelebrityRecognition.

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

    Gets the celebrity recognition results for a Amazon Rekognition Video analysis started by\n StartCelebrityRecognition.

    \n

    Celebrity recognition in a video is an asynchronous operation. Analysis is started by a\n call to StartCelebrityRecognition which returns a job identifier\n (JobId).

    \n

    When the celebrity recognition operation finishes, Amazon Rekognition Video publishes a completion\n status to the Amazon Simple Notification Service topic registered in the initial call to\n StartCelebrityRecognition. To get the results of the celebrity recognition\n analysis, first check that the status value published to the Amazon SNS topic is\n SUCCEEDED. If so, call GetCelebrityDetection and pass the job\n identifier (JobId) from the initial call to StartCelebrityDetection.

    \n \n

    For more information, see Working With Stored Videos in the Amazon Rekognition Developer Guide.

    \n

    \n GetCelebrityRecognition returns detected celebrities and the time(s) they\n are detected in an array (Celebrities) of CelebrityRecognition\n objects. Each CelebrityRecognition\n contains information about the celebrity in a CelebrityDetail object and the\n time, Timestamp, the celebrity was detected. This CelebrityDetail object stores information about the detected celebrity's face\n attributes, a face bounding box, known gender, the celebrity's name, and a confidence\n estimate.

    \n \n

    \n GetCelebrityRecognition only returns the default facial\n attributes (BoundingBox, Confidence, Landmarks,\n Pose, and Quality). The BoundingBox field only\n applies to the detected face instance. The other facial attributes listed in the\n Face object of the following response syntax are not returned. For more\n information, see FaceDetail in the Amazon Rekognition Developer Guide.

    \n
    \n

    By default, the Celebrities array is sorted by time (milliseconds from the start of the video).\n You can also sort the array by celebrity by specifying the value ID in the SortBy input parameter.

    \n

    The CelebrityDetail object includes the celebrity identifer and additional information urls. If you don't store\n the additional information urls, you can get them later by calling GetCelebrityInfo with the celebrity identifer.

    \n

    No information is returned for faces not recognized as celebrities.

    \n

    Use MaxResults parameter to limit the number of labels returned. If there are more results than\n specified in MaxResults, the value of NextToken in the operation response contains a\n pagination token for getting the next set of results. To get the next page of results, call GetCelebrityDetection\n and populate the NextToken request parameter with the token\n value returned from the previous call to GetCelebrityRecognition.

    ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -3787,6 +4382,15 @@ } } }, + "com.amazonaws.rekognition#GroundTruthBlob": { + "type": "blob", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5242880 + } + } + }, "com.amazonaws.rekognition#GroundTruthManifest": { "type": "structure", "members": { @@ -3798,6 +4402,12 @@ "smithy.api#documentation": "

    The S3 bucket that contains an Amazon Sagemaker Ground Truth format manifest file. \n

    " } }, + "com.amazonaws.rekognition#HasErrors": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, "com.amazonaws.rekognition#HumanLoopActivationOutput": { "type": "structure", "members": { @@ -4292,6 +4902,12 @@ "smithy.api#error": "client" } }, + "com.amazonaws.rekognition#IsLabeled": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, "com.amazonaws.rekognition#JobId": { "type": "string", "traits": { @@ -4624,40 +5240,243 @@ ] } }, - "com.amazonaws.rekognition#Landmarks": { - "type": "list", - "member": { - "target": "com.amazonaws.rekognition#Landmark" + "com.amazonaws.rekognition#Landmarks": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#Landmark" + } + }, + "com.amazonaws.rekognition#LimitExceededException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.rekognition#String" + }, + "Code": { + "target": "com.amazonaws.rekognition#String" + }, + "Logref": { + "target": "com.amazonaws.rekognition#String", + "traits": { + "smithy.api#documentation": "

    A universally unique identifier (UUID) for the request.

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

    An Amazon Rekognition service limit was exceeded. For example, if you start too many Amazon Rekognition Video jobs concurrently, calls to start operations \n (StartLabelDetection, for example) will raise a LimitExceededException exception (HTTP status code: 400) until\n the number of concurrently running jobs is below the Amazon Rekognition service limit.

    ", + "smithy.api#error": "client" + } + }, + "com.amazonaws.rekognition#ListCollections": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#ListCollectionsRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#ListCollectionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" + }, + { + "target": "com.amazonaws.rekognition#InternalServerError" + }, + { + "target": "com.amazonaws.rekognition#InvalidPaginationTokenException" + }, + { + "target": "com.amazonaws.rekognition#InvalidParameterException" + }, + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    Returns list of collection IDs in your account.\n If the result is truncated, the response also provides a NextToken\n that you can use in the subsequent request to fetch the next set of collection IDs.

    \n \n

    For an example, see Listing Collections in the Amazon Rekognition Developer Guide.

    \n

    This operation requires permissions to perform the rekognition:ListCollections action.

    ", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "CollectionIds", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.rekognition#ListCollectionsRequest": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.rekognition#PaginationToken", + "traits": { + "smithy.api#documentation": "

    Pagination token from the previous response.

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

    Maximum number of collection IDs to return.

    " + } + } + } + }, + "com.amazonaws.rekognition#ListCollectionsResponse": { + "type": "structure", + "members": { + "CollectionIds": { + "target": "com.amazonaws.rekognition#CollectionIdList", + "traits": { + "smithy.api#documentation": "

    An array of collection IDs.

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

    If the result is truncated, the response provides a NextToken that you can\n use in the subsequent request to fetch the next set of collection IDs.

    " + } + }, + "FaceModelVersions": { + "target": "com.amazonaws.rekognition#FaceModelVersionList", + "traits": { + "smithy.api#documentation": "

    Version numbers of the face detection models associated with the collections in the array CollectionIds.\n For example, the value of FaceModelVersions[2] is the version number for the face detection model used\n by the collection in CollectionId[2].

    " + } + } + } + }, + "com.amazonaws.rekognition#ListDatasetEntries": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#ListDatasetEntriesRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#ListDatasetEntriesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" + }, + { + "target": "com.amazonaws.rekognition#InternalServerError" + }, + { + "target": "com.amazonaws.rekognition#InvalidPaginationTokenException" + }, + { + "target": "com.amazonaws.rekognition#InvalidParameterException" + }, + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" + }, + { + "target": "com.amazonaws.rekognition#ResourceInUseException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotReadyException" + }, + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    \nLists the entries (images) within a dataset. An entry is a\nJSON Line that contains the information for a single image, including\nthe image location, assigned labels, and object location bounding boxes. For \nmore information, see Creating a manifest file.

    \n

    JSON Lines in the response include information about non-terminal\n errors found in the dataset. \n Non terminal errors are reported in errors lists within each JSON Line. The\n same information is reported in the training and testing validation result manifests that\n Amazon Rekognition Custom Labels creates during model training.\n

    \n \n

    You can filter the response in variety of ways, such as choosing which labels to return and returning JSON Lines created after a specific date.\n

    \n

    This operation requires permissions to perform the rekognition:ListDatasetEntries action.

    ", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "DatasetEntries", + "pageSize": "MaxResults" + } } }, - "com.amazonaws.rekognition#LimitExceededException": { + "com.amazonaws.rekognition#ListDatasetEntriesPageSize": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.rekognition#ListDatasetEntriesRequest": { "type": "structure", "members": { - "Message": { - "target": "com.amazonaws.rekognition#String" + "DatasetArn": { + "target": "com.amazonaws.rekognition#DatasetArn", + "traits": { + "smithy.api#documentation": "

    \nThe Amazon Resource Name (ARN) for the dataset that you want to use. \n

    ", + "smithy.api#required": {} + } }, - "Code": { - "target": "com.amazonaws.rekognition#String" + "ContainsLabels": { + "target": "com.amazonaws.rekognition#DatasetLabels", + "traits": { + "smithy.api#documentation": "

    Specifies a label filter for the response. The response includes an entry only if one or more of the labels in ContainsLabels exist in the entry. \n

    " + } }, - "Logref": { - "target": "com.amazonaws.rekognition#String", + "Labeled": { + "target": "com.amazonaws.rekognition#IsLabeled", "traits": { - "smithy.api#documentation": "

    A universally unique identifier (UUID) for the request.

    " + "smithy.api#documentation": "

    \n Specify true to get only the JSON Lines where the image is labeled. \n Specify false to get only the JSON Lines where the image isn't labeled. If you\n don't specify Labeled, ListDatasetEntries returns JSON Lines for labeled and unlabeled \n images.\n

    " + } + }, + "SourceRefContains": { + "target": "com.amazonaws.rekognition#QueryString", + "traits": { + "smithy.api#documentation": "

    If specified, ListDatasetEntries only returns JSON Lines where the value of SourceRefContains is\n part of the source-ref field. The source-ref field contains the Amazon S3 location of the image.\n You can use SouceRefContains for tasks such as getting the JSON Line for a single image, or gettting JSON Lines for all images within a specific folder.

    " + } + }, + "HasErrors": { + "target": "com.amazonaws.rekognition#HasErrors", + "traits": { + "smithy.api#documentation": "

    Specifies an error filter for the response. Specify True to only include entries that have errors.\n

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

    If the previous response was incomplete (because there is more\n results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination \n token to retrieve the next set of results.

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

    The maximum number of results to return per paginated call. The largest value you can specify is 100. \n If you specify a value greater than 100, a ValidationException\n error occurs. The default value is 100.

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

    An Amazon Rekognition service limit was exceeded. For example, if you start too many Amazon Rekognition Video jobs concurrently, calls to start operations \n (StartLabelDetection, for example) will raise a LimitExceededException exception (HTTP status code: 400) until\n the number of concurrently running jobs is below the Amazon Rekognition service limit.

    ", - "smithy.api#error": "client" } }, - "com.amazonaws.rekognition#ListCollections": { + "com.amazonaws.rekognition#ListDatasetEntriesResponse": { + "type": "structure", + "members": { + "DatasetEntries": { + "target": "com.amazonaws.rekognition#DatasetEntries", + "traits": { + "smithy.api#documentation": "

    \nA list of entries (images) in the dataset.\n

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

    If the previous response was incomplete (because there is more\n results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination \n token to retrieve the next set of results.

    " + } + } + } + }, + "com.amazonaws.rekognition#ListDatasetLabels": { "type": "operation", "input": { - "target": "com.amazonaws.rekognition#ListCollectionsRequest" + "target": "com.amazonaws.rekognition#ListDatasetLabelsRequest" }, "output": { - "target": "com.amazonaws.rekognition#ListCollectionsResponse" + "target": "com.amazonaws.rekognition#ListDatasetLabelsResponse" }, "errors": [ { @@ -4675,59 +5494,76 @@ { "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" }, + { + "target": "com.amazonaws.rekognition#ResourceInUseException" + }, { "target": "com.amazonaws.rekognition#ResourceNotFoundException" }, + { + "target": "com.amazonaws.rekognition#ResourceNotReadyException" + }, { "target": "com.amazonaws.rekognition#ThrottlingException" } ], "traits": { - "smithy.api#documentation": "

    Returns list of collection IDs in your account.\n If the result is truncated, the response also provides a NextToken\n that you can use in the subsequent request to fetch the next set of collection IDs.

    \n \n

    For an example, see Listing Collections in the Amazon Rekognition Developer Guide.

    \n

    This operation requires permissions to perform the rekognition:ListCollections action.

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

    Lists the labels in a dataset. Amazon Rekognition Custom Labels uses labels to describe images. For more information, see \n Labeling images.\n

    \n

    \n Lists the labels in a dataset. Amazon Rekognition Custom Labels uses labels to describe images. For more information, see Labeling images\n in the Amazon Rekognition Custom Labels Developer Guide.

    ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", - "items": "CollectionIds", + "items": "DatasetLabelDescriptions", "pageSize": "MaxResults" } } }, - "com.amazonaws.rekognition#ListCollectionsRequest": { + "com.amazonaws.rekognition#ListDatasetLabelsPageSize": { + "type": "integer", + "traits": { + "smithy.api#box": {}, + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.rekognition#ListDatasetLabelsRequest": { "type": "structure", "members": { + "DatasetArn": { + "target": "com.amazonaws.rekognition#DatasetArn", + "traits": { + "smithy.api#documentation": "

    \nThe Amazon Resource Name (ARN) of the dataset that you want to use.\n

    ", + "smithy.api#required": {} + } + }, "NextToken": { - "target": "com.amazonaws.rekognition#PaginationToken", + "target": "com.amazonaws.rekognition#ExtendedPaginationToken", "traits": { - "smithy.api#documentation": "

    Pagination token from the previous response.

    " + "smithy.api#documentation": "

    If the previous response was incomplete (because there is more\n results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination \n token to retrieve the next set of results.

    " } }, "MaxResults": { - "target": "com.amazonaws.rekognition#PageSize", + "target": "com.amazonaws.rekognition#ListDatasetLabelsPageSize", "traits": { - "smithy.api#documentation": "

    Maximum number of collection IDs to return.

    " + "smithy.api#documentation": "

    The maximum number of results to return per paginated call. The largest value you can specify is 100. \n If you specify a value greater than 100, a ValidationException\n error occurs. The default value is 100.

    " } } } }, - "com.amazonaws.rekognition#ListCollectionsResponse": { + "com.amazonaws.rekognition#ListDatasetLabelsResponse": { "type": "structure", "members": { - "CollectionIds": { - "target": "com.amazonaws.rekognition#CollectionIdList", + "DatasetLabelDescriptions": { + "target": "com.amazonaws.rekognition#DatasetLabelDescriptions", "traits": { - "smithy.api#documentation": "

    An array of collection IDs.

    " + "smithy.api#documentation": "

    \nA list of the labels in the dataset.\n

    " } }, "NextToken": { - "target": "com.amazonaws.rekognition#PaginationToken", - "traits": { - "smithy.api#documentation": "

    If the result is truncated, the response provides a NextToken that you can\n use in the subsequent request to fetch the next set of collection IDs.

    " - } - }, - "FaceModelVersions": { - "target": "com.amazonaws.rekognition#FaceModelVersionList", + "target": "com.amazonaws.rekognition#ExtendedPaginationToken", "traits": { - "smithy.api#documentation": "

    Version numbers of the face detection models associated with the collections in the array CollectionIds.\n For example, the value of FaceModelVersions[2] is the version number for the face detection model used\n by the collection in CollectionId[2].

    " + "smithy.api#documentation": "

    If the previous response was incomplete (because there is more\n results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination \n token to retrieve the next set of results.

    " } } } @@ -5364,10 +6200,16 @@ "traits": { "smithy.api#documentation": "

    The current status of the project.

    " } + }, + "Datasets": { + "target": "com.amazonaws.rekognition#DatasetMetadataList", + "traits": { + "smithy.api#documentation": "

    \n Information about the training and test datasets in the project.\n

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

    A description of a Amazon Rekognition Custom Labels project.

    " + "smithy.api#documentation": "

    A description of an Amazon Rekognition Custom Labels project. For more information, see DescribeProjects.

    " } }, "com.amazonaws.rekognition#ProjectDescriptions": { @@ -5386,6 +6228,18 @@ "smithy.api#pattern": "^[a-zA-Z0-9_.\\-]+$" } }, + "com.amazonaws.rekognition#ProjectNames": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#ProjectName" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, "com.amazonaws.rekognition#ProjectStatus": { "type": "string", "traits": { @@ -5451,7 +6305,7 @@ "BillableTrainingTimeInSeconds": { "target": "com.amazonaws.rekognition#ULong", "traits": { - "smithy.api#documentation": "

    The duration, in seconds, that the model version has been billed for training. \n This value is only returned if the model version has been successfully trained.

    " + "smithy.api#documentation": "

    The duration, in seconds, that you were billed for a successful training of the model version. \n This value is only returned if the model version has been successfully trained.

    " } }, "TrainingEndTimestamp": { @@ -5493,12 +6347,12 @@ "KmsKeyId": { "target": "com.amazonaws.rekognition#KmsKeyId", "traits": { - "smithy.api#documentation": "

    The identifer for the AWS Key Management Service (AWS KMS) customer master key that was used to encrypt the model during training.

    " + "smithy.api#documentation": "

    The identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model during training.

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

    The description of a version of a model.

    " + "smithy.api#documentation": "

    A description of a version of an Amazon Rekognition Custom Labels model.

    " } }, "com.amazonaws.rekognition#ProjectVersionDescriptions": { @@ -5761,6 +6615,16 @@ ] } }, + "com.amazonaws.rekognition#QueryString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "\\S" + } + }, "com.amazonaws.rekognition#Reason": { "type": "string", "traits": { @@ -5837,7 +6701,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Returns an array of celebrities recognized in the input image. For more information, see Recognizing Celebrities\n in the Amazon Rekognition Developer Guide.

    \n

    \n RecognizeCelebrities returns the 64 largest faces in the image. It lists\n recognized celebrities in the CelebrityFaces array and unrecognized faces in the\n UnrecognizedFaces array. RecognizeCelebrities doesn't return\n celebrities whose faces aren't among the largest 64 faces in the image.

    \n\n

    For each celebrity recognized, RecognizeCelebrities returns a\n Celebrity object. The Celebrity object contains the celebrity\n name, ID, URL links to additional information, match confidence, and a\n ComparedFace object that you can use to locate the celebrity's face on the\n image.

    \n

    Amazon Rekognition doesn't retain information about which images a celebrity has been recognized\n in. Your application must store this information and use the Celebrity ID\n property as a unique identifier for the celebrity. If you don't store the celebrity name or\n additional information URLs returned by RecognizeCelebrities, you will need the\n ID to identify the celebrity in a call to the GetCelebrityInfo\n operation.

    \n

    You pass the input image either as base64-encoded image bytes or as a reference to an\n image in an Amazon S3 bucket. If you use the\n AWS\n CLI to call Amazon Rekognition operations, passing image bytes is not\n supported. The image must be either a PNG or JPEG formatted file.

    \n\n\n\n \n

    For an example, see Recognizing Celebrities in an Image in the Amazon Rekognition Developer Guide.

    \n

    This operation requires permissions to perform the\n rekognition:RecognizeCelebrities operation.

    " + "smithy.api#documentation": "

    Returns an array of celebrities recognized in the input image. For more information, see Recognizing Celebrities\n in the Amazon Rekognition Developer Guide.

    \n

    \n RecognizeCelebrities returns the 64 largest faces in the image. It lists the\n recognized celebrities in the CelebrityFaces array and any unrecognized faces in\n the UnrecognizedFaces array. RecognizeCelebrities doesn't return\n celebrities whose faces aren't among the largest 64 faces in the image.

    \n\n

    For each celebrity recognized, RecognizeCelebrities returns a\n Celebrity object. The Celebrity object contains the celebrity\n name, ID, URL links to additional information, match confidence, and a\n ComparedFace object that you can use to locate the celebrity's face on the\n image.

    \n

    Amazon Rekognition doesn't retain information about which images a celebrity has been recognized\n in. Your application must store this information and use the Celebrity ID\n property as a unique identifier for the celebrity. If you don't store the celebrity name or\n additional information URLs returned by RecognizeCelebrities, you will need the\n ID to identify the celebrity in a call to the GetCelebrityInfo\n operation.

    \n

    You pass the input image either as base64-encoded image bytes or as a reference to an\n image in an Amazon S3 bucket. If you use the\n AWS\n CLI to call Amazon Rekognition operations, passing image bytes is not\n supported. The image must be either a PNG or JPEG formatted file.

    \n\n\n\n \n

    For an example, see Recognizing Celebrities in an Image in the Amazon Rekognition Developer Guide.

    \n

    This operation requires permissions to perform the\n rekognition:RecognizeCelebrities operation.

    " } }, "com.amazonaws.rekognition#RecognizeCelebritiesRequest": { @@ -5903,6 +6767,21 @@ }, "com.amazonaws.rekognition#RekognitionService": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Rekognition", + "arnNamespace": "rekognition", + "cloudFormationName": "Rekognition", + "cloudTrailEventSource": "rekognition.amazonaws.com", + "endpointPrefix": "rekognition" + }, + "aws.auth#sigv4": { + "name": "rekognition" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "

    This is the Amazon Rekognition API reference.

    ", + "smithy.api#title": "Amazon Rekognition" + }, "version": "2016-06-27", "operations": [ { @@ -5911,6 +6790,9 @@ { "target": "com.amazonaws.rekognition#CreateCollection" }, + { + "target": "com.amazonaws.rekognition#CreateDataset" + }, { "target": "com.amazonaws.rekognition#CreateProject" }, @@ -5923,6 +6805,9 @@ { "target": "com.amazonaws.rekognition#DeleteCollection" }, + { + "target": "com.amazonaws.rekognition#DeleteDataset" + }, { "target": "com.amazonaws.rekognition#DeleteFaces" }, @@ -5938,6 +6823,9 @@ { "target": "com.amazonaws.rekognition#DescribeCollection" }, + { + "target": "com.amazonaws.rekognition#DescribeDataset" + }, { "target": "com.amazonaws.rekognition#DescribeProjects" }, @@ -5965,6 +6853,9 @@ { "target": "com.amazonaws.rekognition#DetectText" }, + { + "target": "com.amazonaws.rekognition#DistributeDatasetEntries" + }, { "target": "com.amazonaws.rekognition#GetCelebrityInfo" }, @@ -5998,6 +6889,12 @@ { "target": "com.amazonaws.rekognition#ListCollections" }, + { + "target": "com.amazonaws.rekognition#ListDatasetEntries" + }, + { + "target": "com.amazonaws.rekognition#ListDatasetLabels" + }, { "target": "com.amazonaws.rekognition#ListFaces" }, @@ -6057,23 +6954,11 @@ }, { "target": "com.amazonaws.rekognition#UntagResource" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "Rekognition", - "arnNamespace": "rekognition", - "cloudFormationName": "Rekognition", - "cloudTrailEventSource": "rekognition.amazonaws.com", - "endpointPrefix": "rekognition" - }, - "aws.auth#sigv4": { - "name": "rekognition" }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "

    This is the Amazon Rekognition API reference.

    ", - "smithy.api#title": "Amazon Rekognition" - } + { + "target": "com.amazonaws.rekognition#UpdateDatasetEntries" + } + ] }, "com.amazonaws.rekognition#RekognitionUniqueId": { "type": "string", @@ -7995,12 +8880,12 @@ "AutoCreate": { "target": "com.amazonaws.rekognition#Boolean", "traits": { - "smithy.api#documentation": "

    If specified, Amazon Rekognition Custom Labels creates a testing dataset with an 80/20 split of the training dataset.

    " + "smithy.api#documentation": "

    If specified, Amazon Rekognition Custom Labels temporarily splits the training dataset (80%) to create a test dataset (20%) for the training job.\n After training completes, the test dataset is not stored and the training dataset reverts to its previous size.

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

    The dataset used for testing. Optionally, if AutoCreate is set, Amazon Rekognition Custom Labels creates a \n testing dataset using an 80/20 split of the training dataset.

    " + "smithy.api#documentation": "

    The dataset used for testing. Optionally, if AutoCreate is set, Amazon Rekognition Custom Labels uses the\n training dataset to create a test dataset with a temporary split of the training dataset.

    " } }, "com.amazonaws.rekognition#TestingDataResult": { @@ -8286,6 +9171,67 @@ "type": "structure", "members": {} }, + "com.amazonaws.rekognition#UpdateDatasetEntries": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#UpdateDatasetEntriesRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#UpdateDatasetEntriesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" + }, + { + "target": "com.amazonaws.rekognition#InternalServerError" + }, + { + "target": "com.amazonaws.rekognition#InvalidParameterException" + }, + { + "target": "com.amazonaws.rekognition#LimitExceededException" + }, + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" + }, + { + "target": "com.amazonaws.rekognition#ResourceInUseException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    Adds or updates one or more entries (images) in a dataset. An entry is a JSON Line which contains the\n information for a single image, including\n the image location, assigned labels, and object location bounding boxes. For more information, \n see Image-Level labels in manifest files and Object localization in manifest files in the Amazon Rekognition Custom Labels Developer Guide.\n

    \n \n \n \n

    If the source-ref field in the JSON line references an existing image, the existing image in the dataset\n is updated. \n If source-ref field doesn't reference an existing image, the image is added as a new image to the dataset.

    \n \n

    You specify the changes that you want to make in the Changes input parameter. \n There isn't a limit to the number JSON Lines that you can change, but the size of Changes must be less\nthan 5MB.

    \n\n \n

    \n UpdateDatasetEntries returns immediatly, but the dataset update might take a while to complete.\n Use DescribeDataset to check the \n current status. The dataset updated successfully if the value of Status is\n UPDATE_COMPLETE.

    \n

    To check if any non-terminal errors occured, call ListDatasetEntries\n and check for the presence of errors lists in the JSON Lines.

    \n

    Dataset update fails if a terminal error occurs (Status = UPDATE_FAILED). \n Currently, you can't access the terminal error information from the Amazon Rekognition Custom Labels SDK.\n

    \n

    This operation requires permissions to perform the rekognition:UpdateDatasetEntries action.

    " + } + }, + "com.amazonaws.rekognition#UpdateDatasetEntriesRequest": { + "type": "structure", + "members": { + "DatasetArn": { + "target": "com.amazonaws.rekognition#DatasetArn", + "traits": { + "smithy.api#documentation": "

    \nThe Amazon Resource Name (ARN) of the dataset that you want to update.\n

    ", + "smithy.api#required": {} + } + }, + "Changes": { + "target": "com.amazonaws.rekognition#DatasetChanges", + "traits": { + "smithy.api#documentation": "

    \n The changes that you want to make to the dataset. \n

    ", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rekognition#UpdateDatasetEntriesResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.rekognition#Url": { "type": "string" }, @@ -8312,7 +9258,7 @@ } }, "traits": { - "smithy.api#documentation": "

    Contains the Amazon S3 bucket location of the validation data for a model training job.

    \n \n

    The validation data includes error information for individual \n JSON lines in the dataset. \n For more information, see Debugging a Failed Model Training in the\n Amazon Rekognition Custom Labels Developer Guide.

    \n

    You get the ValidationData object for the training dataset (TrainingDataResult)\n and the test dataset (TestingDataResult) by calling DescribeProjectVersions.

    \n

    The assets array contains a single Asset object. \n The GroundTruthManifest field of the Asset object contains the S3 bucket location of\n the validation data. \n

    " + "smithy.api#documentation": "

    Contains the Amazon S3 bucket location of the validation data for a model training job.

    \n

    The validation data includes error information for individual JSON Lines in the dataset.\n For more information, see Debugging a Failed Model Training in the\n Amazon Rekognition Custom Labels Developer Guide.

    \n \n

    You get the ValidationData object for the training dataset (TrainingDataResult)\n and the test dataset (TestingDataResult) by calling DescribeProjectVersions.

    \n

    The assets array contains a single Asset object. \n The GroundTruthManifest field of the Asset object contains the S3 bucket location of\n the validation data. \n

    " } }, "com.amazonaws.rekognition#VersionName": { diff --git a/codegen/sdk-codegen/aws-models/resource-groups-tagging-api.json b/codegen/sdk-codegen/aws-models/resource-groups-tagging-api.json index 44eb0008e5fe..51cecf959ff2 100644 --- a/codegen/sdk-codegen/aws-models/resource-groups-tagging-api.json +++ b/codegen/sdk-codegen/aws-models/resource-groups-tagging-api.json @@ -36,7 +36,7 @@ "min": 0, "max": 256 }, - "smithy.api#pattern": "[\\s\\S]*" + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.resourcegroupstaggingapi#ComplianceDetails": { @@ -91,7 +91,7 @@ } }, "traits": { - "smithy.api#documentation": "

    The request was denied because performing this operation violates a constraint.

    \n

    Some of the reasons in the following list might not apply to this specific\n operation.

    \n
      \n
    • \n

      You must meet the prerequisites for using tag policies. For information, see\n Prerequisites and Permissions for Using Tag Policies in the\n AWS Organizations User Guide.\n

      \n
    • \n
    • \n

      You must enable the tag policies service principal\n (tagpolicies.tag.amazonaws.com) to integrate with AWS Organizations For\n information, see EnableAWSServiceAccess.

      \n
    • \n
    • \n

      You must have a tag policy attached to the organization root, an OU, or an\n account.

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

    The request was denied because performing this operation violates a constraint.

    \n

    Some of the reasons in the following list might not apply to this specific\n operation.

    \n
      \n
    • \n

      You must meet the prerequisites for using tag policies. For information, see\n Prerequisites and Permissions for Using Tag Policies in the\n Organizations User Guide.\n

      \n
    • \n
    • \n

      You must enable the tag policies service principal\n (tagpolicies.tag.amazonaws.com) to integrate with Organizations For\n information, see EnableAWSServiceAccess.

      \n
    • \n
    • \n

      You must have a tag policy attached to the organization root, an OU, or an\n account.

      \n
    • \n
    ", "smithy.api#error": "client" } }, @@ -208,7 +208,7 @@ "ErrorCode": { "target": "com.amazonaws.resourcegroupstaggingapi#ErrorCode", "traits": { - "smithy.api#documentation": "

    The code of the common error. Valid values include\n InternalServiceException, InvalidParameterException, and\n any valid error code returned by the AWS service that hosts the resource that you want\n to tag.

    " + "smithy.api#documentation": "

    The code of the common error. Valid values include\n InternalServiceException, InvalidParameterException, and\n any valid error code returned by the Amazon Web Services service that hosts the resource that you want\n to tag.

    " } }, "ErrorMessage": { @@ -219,7 +219,7 @@ } }, "traits": { - "smithy.api#documentation": "

    Information about the errors that are returned for each failed resource. This\n information can include InternalServiceException and\n InvalidParameterException errors. It can also include any valid error\n code returned by the AWS service that hosts the resource that the ARN key\n represents.

    \n

    The following are common error codes that you might receive from other AWS\n services:

    \n
      \n
    • \n

      \n InternalServiceException – This can\n mean that the Resource Groups Tagging API didn't receive a response from another\n AWS service. It can also mean the the resource type in the request is not\n supported by the Resource Groups Tagging API. In these cases, it's safe to retry\n the request and then call GetResources to verify the changes.

      \n
    • \n
    • \n

      \n AccessDeniedException – This can mean\n that you need permission to calling tagging operations in the AWS service that\n contains the resource. For example, to use the Resource Groups Tagging API to\n tag a CloudWatch alarm resource, you need permission to call \n TagResources\n \n and\n \n TagResource\n in the CloudWatch API.

      \n
    • \n
    \n

    For more information on errors that are generated from other AWS services, see the\n documentation for that service.

    " + "smithy.api#documentation": "

    Information about the errors that are returned for each failed resource. This\n information can include InternalServiceException and\n InvalidParameterException errors. It can also include any valid error\n code returned by the Amazon Web Services service that hosts the resource that the ARN key\n represents.

    \n

    The following are common error codes that you might receive from other Amazon Web Services\n services:

    \n
      \n
    • \n

      \n InternalServiceException – This can\n mean that the Resource Groups Tagging API didn't receive a response from another Amazon Web Services service. It\n can also mean that the resource type in the request is not supported by the\n Resource Groups Tagging API. In these cases, it's safe to retry the request and then call GetResources to verify the changes.

      \n
    • \n
    • \n

      \n AccessDeniedException – This can mean\n that you need permission to call the tagging operations in the Amazon Web Services service\n that contains the resource. For example, to use the Resource Groups Tagging API to tag a Amazon CloudWatch\n alarm resource, you need permission to call both \n TagResources\n \n and\n \n TagResource\n in the CloudWatch API.

      \n
    • \n
    \n

    For more information on errors that are generated from other Amazon Web Services services, see the\n documentation for that service.

    " } }, "com.amazonaws.resourcegroupstaggingapi#GetComplianceSummary": { @@ -245,7 +245,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Returns a table that shows counts of resources that are noncompliant with their tag\n policies.

    \n

    For more information on tag policies, see Tag Policies in\n the AWS Organizations User Guide.\n

    \n

    You can call this operation only from the organization's \n management account and from the us-east-1 Region.

    \n

    This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

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

    Returns a table that shows counts of resources that are noncompliant with their tag\n policies.

    \n

    For more information on tag policies, see Tag Policies in\n the Organizations User Guide.\n

    \n

    You can call this operation only from the organization's \n management account and from the us-east-1 Region.

    \n

    This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

    ", "smithy.api#paginated": { "inputToken": "PaginationToken", "outputToken": "PaginationToken", @@ -266,13 +266,13 @@ "RegionFilters": { "target": "com.amazonaws.resourcegroupstaggingapi#RegionFilterList", "traits": { - "smithy.api#documentation": "

    Specifies a list of AWS Regions to limit the output by. If you use this parameter,\n the count of returned noncompliant resources includes only resources in the specified\n Regions.

    " + "smithy.api#documentation": "

    Specifies a list of Amazon Web Services Regions to limit the output to. If you use this parameter,\n the count of returned noncompliant resources includes only resources in the specified\n Regions.

    " } }, "ResourceTypeFilters": { "target": "com.amazonaws.resourcegroupstaggingapi#ResourceTypeFilterList", "traits": { - "smithy.api#documentation": "

    Specifies that you want the response to include information for only resources of the\n specified types. The format of each resource type is\n service[:resourceType]. For example, specifying a resource type of\n ec2 returns all Amazon EC2 resources (which includes EC2 instances).\n Specifying a resource type of ec2:instance returns only EC2 instances.

    \n

    The string for each service name and resource type is the same as that embedded in a\n resource's Amazon Resource Name (ARN). Consult the AWS General\n Reference for the following:

    \n \n

    You can specify multiple resource types by using a comma separated array. The array\n can include up to 100 items. Note that the length constraint requirement applies to each\n resource type filter.

    " + "smithy.api#documentation": "

    Specifies that you want the response to include information for only resources of the\n specified types. The format of each resource type is\n service[:resourceType]. For example, specifying a resource type of\n ec2 returns all Amazon EC2 resources (which includes EC2 instances).\n Specifying a resource type of ec2:instance returns only EC2\n instances.

    \n

    The string for each service name and resource type is the same as that embedded in a\n resource's Amazon Resource Name (ARN). Consult the \n Amazon Web Services General Reference\n \n for the following:

    \n \n

    You can specify multiple resource types by using a comma separated array. The array\n can include up to 100 items. Note that the length constraint requirement applies to each\n resource type filter.

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

    Returns all the tagged or previously tagged resources that are located in the\n specified Region for the AWS account.

    \n

    Depending on what information you want returned, you can also specify the\n following:

    \n
      \n
    • \n

      \n Filters that specify what tags and resource types you\n want returned. The response includes all tags that are associated with the\n requested resources.

      \n
    • \n
    • \n

      Information about compliance with the account's effective tag policy. For more\n information on tag policies, see Tag\n Policies in the AWS Organizations User Guide.\n

      \n
    • \n
    \n

    This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

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

    Returns all the tagged or previously tagged resources that are located in the\n specified Amazon Web Services Region for the account.

    \n

    Depending on what information you want returned, you can also specify the\n following:

    \n
      \n
    • \n

      \n Filters that specify what tags and resource types you\n want returned. The response includes all tags that are associated with the\n requested resources.

      \n
    • \n
    • \n

      Information about compliance with the account's effective tag policy. For more\n information on tag policies, see Tag\n Policies in the Organizations User Guide.\n

      \n
    • \n
    \n

    This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

    ", "smithy.api#paginated": { "inputToken": "PaginationToken", "outputToken": "PaginationToken", @@ -362,7 +362,7 @@ "TagFilters": { "target": "com.amazonaws.resourcegroupstaggingapi#TagFilterList", "traits": { - "smithy.api#documentation": "

    Specifies a list of TagFilters (keys and values) to restrict the output to only those\n resources that have the specified tag and, if included, the specified value. Each\n TagFilter must contain a key with values optional. A request can\n include up to 50 keys, and each key can include up to 20 values.

    \n

    Note the following when deciding how to use TagFilters:

    \n
      \n
    • \n

      If you don't specify a TagFilter, the\n response includes all resources that are currently tagged or ever had a tag.\n Resources that currently don't have tags are shown with an empty tag set, like\n this: \"Tags\": [].

      \n
    • \n
    • \n

      If you specify more than one filter in a single request, the response returns\n only those resources that satisfy all filters.

      \n
    • \n
    • \n

      If you specify a filter that contains more than one value for a key, the\n response returns resources that match any of the specified values for that\n key.

      \n
    • \n
    • \n

      If you don't specify any values for a key, the response returns resources that\n are tagged with that key and any or no value.

      \n

      For example, for the following filters: filter1= {keyA,{value1}},\n filter2={keyB,{value2,value3,value4}}, filter3=\n {keyC}:

      \n
        \n
      • \n

        \n GetResources({filter1}) returns resources tagged with\n key1=value1\n

        \n
      • \n
      • \n

        \n GetResources({filter2}) returns resources tagged with\n key2=value2 or key2=value3 or\n key2=value4\n

        \n
      • \n
      • \n

        \n GetResources({filter3}) returns resources tagged with any\n tag with the key key3, and with any or no value

        \n
      • \n
      • \n

        \n GetResources({filter1,filter2,filter3}) returns resources\n tagged with (key1=value1) and (key2=value2 or key2=value3 or\n key2=value4) and (key3, any or no value)\n

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

    Specifies a list of TagFilters (keys and values) to restrict the output to only those\n resources that have tags with the specified keys and, if included, the specified values.\n Each TagFilter must contain a key with values optional. A request can\n include up to 50 keys, and each key can include up to 20 values.

    \n

    Note the following when deciding how to use TagFilters:

    \n
      \n
    • \n

      If you don't specify a TagFilter, the\n response includes all resources that are currently tagged or ever had a tag.\n Resources that currently don't have tags are shown with an empty tag set, like\n this: \"Tags\": [].

      \n
    • \n
    • \n

      If you specify more than one filter in a single request, the response returns\n only those resources that satisfy all filters.

      \n
    • \n
    • \n

      If you specify a filter that contains more than one value for a key, the\n response returns resources that match any of the specified\n values for that key.

      \n
    • \n
    • \n

      If you don't specify a value for a key, the response returns all resources\n that are tagged with that key, with any or no value.

      \n

      For example, for the following filters: filter1= {keyA,{value1}},\n filter2={keyB,{value2,value3,value4}}, filter3=\n {keyC}:

      \n
        \n
      • \n

        \n GetResources({filter1}) returns resources tagged with\n key1=value1\n

        \n
      • \n
      • \n

        \n GetResources({filter2}) returns resources tagged with\n key2=value2 or key2=value3 or\n key2=value4\n

        \n
      • \n
      • \n

        \n GetResources({filter3}) returns resources tagged with any\n tag with the key key3, and with any or no value

        \n
      • \n
      • \n

        \n GetResources({filter1,filter2,filter3}) returns resources\n tagged with (key1=value1) and (key2=value2 or key2=value3 or\n key2=value4) and (key3, any or no value)\n

        \n
      • \n
      \n
    • \n
    " } }, "ResourcesPerPage": { @@ -374,13 +374,13 @@ "TagsPerPage": { "target": "com.amazonaws.resourcegroupstaggingapi#TagsPerPage", "traits": { - "smithy.api#documentation": "

    AWS recommends using ResourcesPerPage instead of this parameter.

    \n

    A limit that restricts the number of tags (key and value pairs) returned by\n GetResources in paginated output. A resource with no tags is counted as\n having one tag (one key and value pair).

    \n

    \n GetResources does not split a resource and its associated tags across\n pages. If the specified TagsPerPage would cause such a break, a\n PaginationToken is returned in place of the affected resource and its\n tags. Use that token in another request to get the remaining data. For example, if you\n specify a TagsPerPage of 100 and the account has 22 resources\n with 10 tags each (meaning that each resource has 10 key and value pairs), the output\n will consist of three pages. The first page displays the first 10 resources, each with\n its 10 tags. The second page displays the next 10 resources, each with its 10 tags. The\n third page displays the remaining 2 resources, each with its 10 tags.

    \n

    You can set TagsPerPage to a minimum of 100 items up to a maximum of 500\n items.

    " + "smithy.api#documentation": "

    Amazon Web Services recommends using ResourcesPerPage instead of this parameter.

    \n

    A limit that restricts the number of tags (key and value pairs) returned by\n GetResources in paginated output. A resource with no tags is counted as\n having one tag (one key and value pair).

    \n

    \n GetResources does not split a resource and its associated tags across\n pages. If the specified TagsPerPage would cause such a break, a\n PaginationToken is returned in place of the affected resource and its\n tags. Use that token in another request to get the remaining data. For example, if you\n specify a TagsPerPage of 100 and the account has 22 resources\n with 10 tags each (meaning that each resource has 10 key and value pairs), the output\n will consist of three pages. The first page displays the first 10 resources, each with\n its 10 tags. The second page displays the next 10 resources, each with its 10 tags. The\n third page displays the remaining 2 resources, each with its 10 tags.

    \n

    You can set TagsPerPage to a minimum of 100 items up to a maximum of 500\n items.

    " } }, "ResourceTypeFilters": { "target": "com.amazonaws.resourcegroupstaggingapi#ResourceTypeFilterList", "traits": { - "smithy.api#documentation": "

    Specifies the resource types that you want included in the response. The format of\n each resource type is service[:resourceType]. For example, specifying a\n resource type of ec2 returns all Amazon EC2 resources (which includes EC2\n instances). Specifying a resource type of ec2:instance returns only EC2\n instances.

    \n

    The string for each service name and resource type is the same as that embedded in a\n resource's Amazon Resource Name (ARN). Consult the AWS General\n Reference for the following:

    \n

    For more information about ARNs, see Amazon Resource Names (ARNs) and\n AWS Service Namespaces.

    \n

    You can specify multiple resource types by using an array. The array can include up to\n 100 items. Note that the length constraint requirement applies to each resource type\n filter.

    " + "smithy.api#documentation": "

    Specifies the resource types that you want included in the response. The format of\n each resource type is service[:resourceType]. For example, specifying a\n resource type of ec2 returns all Amazon EC2 resources (which includes EC2\n instances). Specifying a resource type of ec2:instance returns only EC2\n instances.

    \n

    The string for each service name and resource type is the same as that embedded in a\n resource's Amazon Resource Name (ARN). For the list of services whose resources you can\n use in this parameter, see Services that support the Resource Groups Tagging API.

    \n

    You can specify multiple resource types by using an array. The array can include up to\n 100 items. Note that the length constraint requirement applies to each resource type\n filter. For example, the following string would limit the response to only Amazon EC2\n instances, Amazon S3 buckets, or any Audit Manager resource:

    \n

    \n ec2:instance,s3:bucket,auditmanager\n

    " } }, "IncludeComplianceDetails": { @@ -398,7 +398,7 @@ "ResourceARNList": { "target": "com.amazonaws.resourcegroupstaggingapi#ResourceARNListForGet", "traits": { - "smithy.api#documentation": "

    Specifies a list of ARNs of resources for which you want to retrieve tag data. You\n can't specify both this parameter and any of the pagination parameters\n (ResourcesPerPage, TagsPerPage,\n PaginationToken) in the same request. If you specify both, you get an\n Invalid Parameter exception.

    \n

    If a resource specified by this parameter doesn't exist, it doesn't generate an error;\n it simply isn't included in the response.

    \n

    An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,\n see Amazon\n Resource Names (ARNs) and AWS Service Namespaces in the AWS\n General Reference.

    " + "smithy.api#documentation": "

    Specifies a list of ARNs of resources for which you want to retrieve tag data. You\n can't specify both this parameter and any of the pagination parameters\n (ResourcesPerPage, TagsPerPage,\n PaginationToken) in the same request. If you specify both, you get an\n Invalid Parameter exception.

    \n

    If a resource specified by this parameter doesn't exist, it doesn't generate an error;\n it simply isn't included in the response.

    \n

    An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,\n see Amazon\n Resource Names (ARNs) and Amazon Web Services Service Namespaces in the\n Amazon Web Services General Reference.

    " } } } @@ -415,7 +415,7 @@ "ResourceTagMappingList": { "target": "com.amazonaws.resourcegroupstaggingapi#ResourceTagMappingList", "traits": { - "smithy.api#documentation": "

    A list of resource ARNs and the tags (keys and values) associated with\n those ARNs.

    " + "smithy.api#documentation": "

    A list of resource ARNs and the tags (keys and values) associated with \n each.

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

    Returns all tag keys currently in use in the specified Region for the calling AWS\n account.

    \n

    This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

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

    Returns all tag keys currently in use in the specified Amazon Web Services Region for the calling\n account.

    \n

    This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

    ", "smithy.api#paginated": { "inputToken": "PaginationToken", "outputToken": "PaginationToken", @@ -474,7 +474,7 @@ "TagKeys": { "target": "com.amazonaws.resourcegroupstaggingapi#TagKeyList", "traits": { - "smithy.api#documentation": "

    A list of all tag keys in the AWS account.

    " + "smithy.api#documentation": "

    A list of all tag keys in the Amazon Web Services account.

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

    Returns all tag values for the specified key that are used in the specified AWS\n Region for the calling AWS account.

    \n

    This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

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

    Returns all tag values for the specified key that are used in the specified Amazon Web Services\n Region for the calling account.

    \n

    This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

    ", "smithy.api#paginated": { "inputToken": "PaginationToken", "outputToken": "PaginationToken", @@ -522,7 +522,7 @@ "Key": { "target": "com.amazonaws.resourcegroupstaggingapi#TagKey", "traits": { - "smithy.api#documentation": "

    Specifies the tag key for which you want to list all existing values that are\n currently used in the specified AWS Region for the calling AWS account.

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

    Specifies the tag key for which you want to list all existing values that are\n currently used in the specified Amazon Web Services Region for the calling account.

    ", "smithy.api#required": {} } } @@ -540,7 +540,7 @@ "TagValues": { "target": "com.amazonaws.resourcegroupstaggingapi#TagValuesOutputList", "traits": { - "smithy.api#documentation": "

    A list of all tag values for the specified key currently used in the specified AWS\n Region for the calling AWS account.

    " + "smithy.api#documentation": "

    A list of all tag values for the specified key currently used in the specified Amazon Web Services\n Region for the calling account.

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

    This error indicates one of the following:

    \n
      \n
    • \n

      A parameter is missing.

      \n
    • \n
    • \n

      A malformed string was supplied for the request parameter.

      \n
    • \n
    • \n

      An out-of-range value was supplied for the request parameter.

      \n
    • \n
    • \n

      The target ID is invalid, unsupported, or doesn't exist.

      \n
    • \n
    • \n

      You can't access the Amazon S3 bucket for report storage. For more information, see\n Additional Requirements for Organization-wide Tag Compliance\n Reports in the AWS Organizations User Guide.\n

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

    This error indicates one of the following:

    \n
      \n
    • \n

      A parameter is missing.

      \n
    • \n
    • \n

      A malformed string was supplied for the request parameter.

      \n
    • \n
    • \n

      An out-of-range value was supplied for the request parameter.

      \n
    • \n
    • \n

      The target ID is invalid, unsupported, or doesn't exist.

      \n
    • \n
    • \n

      You can't access the Amazon S3 bucket for report storage. For more information, see\n Additional Requirements for Organization-wide Tag Compliance\n Reports in the Organizations User Guide.\n

      \n
    • \n
    ", "smithy.api#error": "client" } }, @@ -623,7 +623,7 @@ "min": 0, "max": 2048 }, - "smithy.api#pattern": "[\\s\\S]*" + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.resourcegroupstaggingapi#PaginationTokenExpiredException": { @@ -645,7 +645,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[\\s\\S]*" + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.resourcegroupstaggingapi#RegionFilterList": { @@ -667,7 +667,7 @@ "min": 1, "max": 1011 }, - "smithy.api#pattern": "[\\s\\S]*" + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.resourcegroupstaggingapi#ResourceARNListForGet": { @@ -696,6 +696,21 @@ }, "com.amazonaws.resourcegroupstaggingapi#ResourceGroupsTaggingAPI_20170126": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Resource Groups Tagging API", + "arnNamespace": "tagging", + "cloudFormationName": "ResourceGroupsTaggingAPI", + "cloudTrailEventSource": "resourcegroupstaggingapi.amazonaws.com", + "endpointPrefix": "tagging" + }, + "aws.auth#sigv4": { + "name": "tagging" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "Resource Groups Tagging API", + "smithy.api#title": "AWS Resource Groups Tagging API" + }, "version": "2017-01-26", "operations": [ { @@ -722,22 +737,7 @@ { "target": "com.amazonaws.resourcegroupstaggingapi#UntagResources" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Resource Groups Tagging API", - "arnNamespace": "tagging", - "cloudFormationName": "ResourceGroupsTaggingAPI", - "cloudTrailEventSource": "resourcegroupstaggingapi.amazonaws.com", - "endpointPrefix": "tagging" - }, - "aws.auth#sigv4": { - "name": "tagging" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "Resource Groups Tagging API", - "smithy.api#title": "AWS Resource Groups Tagging API" - } + ] }, "com.amazonaws.resourcegroupstaggingapi#ResourceTagMapping": { "type": "structure", @@ -751,7 +751,7 @@ "Tags": { "target": "com.amazonaws.resourcegroupstaggingapi#TagList", "traits": { - "smithy.api#documentation": "

    The tags that have been applied to one or more AWS resources.

    " + "smithy.api#documentation": "

    The tags that have been applied to one or more Amazon Web Services resources.

    " } }, "ComplianceDetails": { @@ -790,7 +790,7 @@ "min": 3, "max": 63 }, - "smithy.api#pattern": "[a-z0-9.-]*" + "smithy.api#pattern": "^[a-z0-9.-]*$" } }, "com.amazonaws.resourcegroupstaggingapi#S3Location": { @@ -862,7 +862,7 @@ "TargetId": { "target": "com.amazonaws.resourcegroupstaggingapi#TargetId", "traits": { - "smithy.api#documentation": "

    The account identifier or the root identifier of the organization. If you don't know\n the root ID, you can call the AWS Organizations ListRoots API.

    " + "smithy.api#documentation": "

    The account identifier or the root identifier of the organization. If you don't know\n the root ID, you can call the Organizations ListRoots API.

    " } }, "TargetIdType": { @@ -874,13 +874,13 @@ "Region": { "target": "com.amazonaws.resourcegroupstaggingapi#Region", "traits": { - "smithy.api#documentation": "

    The AWS Region that the summary applies to.

    " + "smithy.api#documentation": "

    The Amazon Web Services Region that the summary applies to.

    " } }, "ResourceType": { "target": "com.amazonaws.resourcegroupstaggingapi#AmazonResourceType", "traits": { - "smithy.api#documentation": "

    The AWS resource type.

    " + "smithy.api#documentation": "

    The Amazon Web Services resource type.

    " } }, "NonCompliantResources": { @@ -906,20 +906,20 @@ "Key": { "target": "com.amazonaws.resourcegroupstaggingapi#TagKey", "traits": { - "smithy.api#documentation": "

    One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values.

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

    One part of a key-value pair that makes up a tag. A key is a general label \n that acts like a category for more specific tag values.

    ", "smithy.api#required": {} } }, "Value": { "target": "com.amazonaws.resourcegroupstaggingapi#TagValue", "traits": { - "smithy.api#documentation": "

    One part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key). The value can be empty or null.

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

    One part of a key-value pair that make up a tag. A value acts as a \n descriptor within a tag category (key). The value can be empty or null.

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

    The metadata that you apply to AWS resources to help you categorize and organize\n them. Each tag consists of a key and a value, both of which you define. For more\n information, see Tagging AWS\n Resources in the AWS General Reference.

    " + "smithy.api#documentation": "

    The metadata that you apply to Amazon Web Services resources to help you categorize and organize\n them. Each tag consists of a key and a value, both of which you define. For more\n information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference.

    " } }, "com.amazonaws.resourcegroupstaggingapi#TagFilter": { @@ -928,13 +928,13 @@ "Key": { "target": "com.amazonaws.resourcegroupstaggingapi#TagKey", "traits": { - "smithy.api#documentation": "

    One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values.

    " + "smithy.api#documentation": "

    One part of a key-value pair that makes up a tag. A key is a general label \n that acts like a category for more specific tag values.

    " } }, "Values": { "target": "com.amazonaws.resourcegroupstaggingapi#TagValueList", "traits": { - "smithy.api#documentation": "

    One part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key). The value can be empty or null.

    " + "smithy.api#documentation": "

    One part of a key-value pair that make up a tag. A value acts as a \n descriptor within a tag category (key). The value can be empty or null.

    " } } }, @@ -961,7 +961,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[\\s\\S]*" + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.resourcegroupstaggingapi#TagKeyFilterList": { @@ -1035,7 +1035,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Applies one or more tags to the specified resources. Note the following:

    \n
      \n
    • \n

      Not all resources can have tags. For a list of services with resources that\n support tagging using this operation, see Services that support the\n Resource Groups Tagging API.

      \n
    • \n
    • \n

      Each resource can have up to 50 tags. For other limits, see Tag Naming and Usage Conventions in the AWS General\n Reference.\n

      \n
    • \n
    • \n

      You can only tag resources that are located in the specified AWS Region for\n the AWS account.

      \n
    • \n
    • \n

      To add tags to a resource, you need the necessary permissions for the service\n that the resource belongs to as well as permissions for adding tags. For more\n information, see the documentation for each service.

      \n
    • \n
    \n \n

    Do not store personally identifiable information (PII) or other confidential or\n sensitive information in tags. We use tags to provide you with billing and\n administration services. Tags are not intended to be used for private or sensitive\n data.

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

    Applies one or more tags to the specified resources. Note the following:

    \n
      \n
    • \n

      Not all resources can have tags. For a list of services with resources that\n support tagging using this operation, see Services that support the\n Resource Groups Tagging API. If the resource doesn't yet support\n this operation, the resource's service might support tagging using its own API\n operations. For more information, refer to the documentation for that\n service.

      \n
    • \n
    • \n

      Each resource can have up to 50 tags. For other limits, see Tag Naming and Usage Conventions in the Amazon Web Services General\n Reference.\n

      \n
    • \n
    • \n

      You can only tag resources that are located in the specified Amazon Web Services Region for\n the Amazon Web Services account.

      \n
    • \n
    • \n

      To add tags to a resource, you need the necessary permissions for the service\n that the resource belongs to as well as permissions for adding tags. For more\n information, see the documentation for each service.

      \n
    • \n
    \n \n

    Do not store personally identifiable information (PII) or other confidential or\n sensitive information in tags. We use tags to provide you with billing and\n administration services. Tags are not intended to be used for private or sensitive\n data.

    \n
    \n

    \n Minimum permissions\n

    \n

    In addition to the tag:TagResources permission required by this\n operation, you must also have the tagging permission defined by the service that created\n the resource. For example, to tag an Amazon EC2 instance using the TagResources\n operation, you must have both of the following permissions:

    \n
      \n
    • \n

      \n tag:TagResource\n

      \n
    • \n
    • \n

      \n ec2:CreateTags\n

      \n
    • \n
    " } }, "com.amazonaws.resourcegroupstaggingapi#TagResourcesInput": { @@ -1044,7 +1044,7 @@ "ResourceARNList": { "target": "com.amazonaws.resourcegroupstaggingapi#ResourceARNListForTagUntag", "traits": { - "smithy.api#documentation": "

    Specifies the list of ARNs of the resources that you want to apply tags to.

    \n

    An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,\n see Amazon\n Resource Names (ARNs) and AWS Service Namespaces in the AWS\n General Reference.

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

    Specifies the list of ARNs of the resources that you want to apply tags to.

    \n

    An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,\n see Amazon\n Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services\n General Reference.

    ", "smithy.api#required": {} } }, @@ -1075,7 +1075,7 @@ "min": 0, "max": 256 }, - "smithy.api#pattern": "[\\s\\S]*" + "smithy.api#pattern": "^[\\s\\S]*$" } }, "com.amazonaws.resourcegroupstaggingapi#TagValueList": { @@ -1109,7 +1109,7 @@ "min": 6, "max": 68 }, - "smithy.api#pattern": "[a-zA-Z0-9-]*" + "smithy.api#pattern": "^[a-zA-Z0-9-]*$" } }, "com.amazonaws.resourcegroupstaggingapi#TargetIdFilterList": { @@ -1175,7 +1175,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Removes the specified tags from the specified resources. When you specify a tag key,\n the action removes both that key and its associated value. The operation succeeds even\n if you attempt to remove tags from a resource that were already removed. Note the\n following:

    \n
      \n
    • \n

      To remove tags from a resource, you need the necessary permissions for the\n service that the resource belongs to as well as permissions for removing tags.\n For more information, see the documentation for the service whose resource you\n want to untag.

      \n
    • \n
    • \n

      You can only tag resources that are located in the specified AWS Region for\n the calling AWS account.

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

    Removes the specified tags from the specified resources. When you specify a tag key,\n the action removes both that key and its associated value. The operation succeeds even\n if you attempt to remove tags from a resource that were already removed. Note the\n following:

    \n
      \n
    • \n

      To remove tags from a resource, you need the necessary permissions for the\n service that the resource belongs to as well as permissions for removing tags.\n For more information, see the documentation for the service whose resource you\n want to untag.

      \n
    • \n
    • \n

      You can only tag resources that are located in the specified Amazon Web Services Region for\n the calling Amazon Web Services account.

      \n
    • \n
    \n \n

    \n Minimum permissions\n

    \n

    In addition to the tag:UntagResources permission required by this\n operation, you must also have the remove tags permission defined by the service that\n created the resource. For example, to remove the tags from an Amazon EC2 instance using the\n UntagResources operation, you must have both of the following\n permissions:

    \n
      \n
    • \n

      \n tag:UntagResource\n

      \n
    • \n
    • \n

      \n ec2:DeleteTags\n

      \n
    • \n
    " } }, "com.amazonaws.resourcegroupstaggingapi#UntagResourcesInput": { @@ -1184,7 +1184,7 @@ "ResourceARNList": { "target": "com.amazonaws.resourcegroupstaggingapi#ResourceARNListForTagUntag", "traits": { - "smithy.api#documentation": "

    Specifies a list of ARNs of the resources that you want to remove tags from.

    \n

    An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,\n see Amazon\n Resource Names (ARNs) and AWS Service Namespaces in the AWS\n General Reference.

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

    Specifies a list of ARNs of the resources that you want to remove tags from.

    \n

    An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,\n see Amazon\n Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services\n General Reference.

    ", "smithy.api#required": {} } }, diff --git a/codegen/sdk-codegen/aws-models/sagemaker.json b/codegen/sdk-codegen/aws-models/sagemaker.json index 3099952c9b2a..39b4ff7ee7ff 100644 --- a/codegen/sdk-codegen/aws-models/sagemaker.json +++ b/codegen/sdk-codegen/aws-models/sagemaker.json @@ -10721,6 +10721,12 @@ "traits": { "smithy.api#documentation": "

    The response from the last list when returning a list large enough to need tokening.

    " } + }, + "AgentVersion": { + "target": "com.amazonaws.sagemaker#EdgeVersion", + "traits": { + "smithy.api#documentation": "

    Edge Manager agent version.

    " + } } } }, @@ -15101,6 +15107,12 @@ "traits": { "smithy.api#documentation": "

    Models on the device.

    " } + }, + "AgentVersion": { + "target": "com.amazonaws.sagemaker#EdgeVersion", + "traits": { + "smithy.api#documentation": "

    Edge Manager agent version.

    " + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/transcribe.json b/codegen/sdk-codegen/aws-models/transcribe.json index d4e7628d5857..cea591901d4f 100644 --- a/codegen/sdk-codegen/aws-models/transcribe.json +++ b/codegen/sdk-codegen/aws-models/transcribe.json @@ -188,7 +188,7 @@ "DataAccessRoleArn": { "target": "com.amazonaws.transcribe#DataAccessRoleArn", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Number (ARN) that you use to get access to the analytics job.

    " + "smithy.api#documentation": "

    The Amazon Resource Number (ARN) that you use to access the analytics job. ARNs have the format\n arn:partition:service:region:account-id:resource-type/resource-id.

    " } }, "IdentifiedLanguageScore": { @@ -259,6 +259,12 @@ "traits": { "smithy.api#documentation": "

    When you run a call analytics job, you can specify the language spoken in the audio, or you can have Amazon Transcribe identify\n the language for you.

    \n

    To specify a language, specify an array with one language code. If you don't know the language, you can leave this \n field blank and Amazon Transcribe will use machine learning to identify the language for you. To improve the ability of Amazon Transcribe to \n correctly identify the language, you can provide an array of the languages that can be present in the audio. Refer to \n Supported languages and language-specific\n features for additional information.

    " } + }, + "LanguageIdSettings": { + "target": "com.amazonaws.transcribe#LanguageIdSettingsMap", + "traits": { + "smithy.api#documentation": "

    The language identification settings associated with your call analytics job. These settings include\n VocabularyName, VocabularyFilterName, and \n LanguageModelName.

    " + } } }, "traits": { @@ -1820,7 +1826,7 @@ "DataAccessRoleArn": { "target": "com.amazonaws.transcribe#DataAccessRoleArn", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) that uniquely identifies the permissions you've given Amazon Transcribe to access your \n Amazon S3 buckets containing your media files or text data.

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

    The Amazon Resource Name (ARN) that uniquely identifies the permissions you've given Amazon Transcribe to access your \n Amazon S3 buckets containing your media files or text data. ARNs have the format\n arn:partition:service:region:account-id:resource-type/resource-id.

    ", "smithy.api#required": {} } } @@ -1892,7 +1898,7 @@ "DataAccessRoleArn": { "target": "com.amazonaws.transcribe#DataAccessRoleArn", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of a role that has access to the S3 bucket that contains the input files. Amazon Transcribe\n assumes this role to read queued media files. If you have specified an output S3 bucket for the transcription results,\n this role should have access to the output bucket as well.

    \n

    If you specify the AllowDeferredExecution field, you must specify the\n DataAccessRoleArn field.

    " + "smithy.api#documentation": "

    The Amazon Resource Name (ARN), in the form\n arn:partition:service:region:account-id:resource-type/resource-id, of a role \n that has access to the S3 bucket that contains the input files. Amazon Transcribe assumes this role to read queued\n media files. If you have specified an output S3 bucket for the transcription results, this role should \n have access to the output bucket as well.

    \n

    If you specify the AllowDeferredExecution field, you must specify the\n DataAccessRoleArn field.

    " } } }, @@ -2092,6 +2098,47 @@ ] } }, + "com.amazonaws.transcribe#LanguageIdSettings": { + "type": "structure", + "members": { + "VocabularyName": { + "target": "com.amazonaws.transcribe#VocabularyName", + "traits": { + "smithy.api#documentation": "

    The name of the vocabulary you want to use when processing your transcription job. The \n vocabulary you specify must have the same language code as the transcription job; if the languages don't \n match, the vocabulary won't be applied.

    " + } + }, + "VocabularyFilterName": { + "target": "com.amazonaws.transcribe#VocabularyFilterName", + "traits": { + "smithy.api#documentation": "

    The name of the vocabulary filter you want to use when transcribing your audio. The filter you specify \n must have the same language code as the transcription job; if the languages don't match, the vocabulary \n filter won't be applied.

    " + } + }, + "LanguageModelName": { + "target": "com.amazonaws.transcribe#ModelName", + "traits": { + "smithy.api#documentation": "

    The name of the language model you want to use when transcribing your audio. The model you specify\n must have the same language code as the transcription job; if the languages don't match, the language model \n won't be applied.

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

    Language-specific settings that can be specified when language identification is enabled.

    " + } + }, + "com.amazonaws.transcribe#LanguageIdSettingsMap": { + "type": "map", + "key": { + "target": "com.amazonaws.transcribe#LanguageCode" + }, + "value": { + "target": "com.amazonaws.transcribe#LanguageIdSettings" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + } + } + }, "com.amazonaws.transcribe#LanguageModel": { "type": "structure", "members": { @@ -2634,7 +2681,7 @@ "ResourceArn": { "target": "com.amazonaws.transcribe#TranscribeArn", "traits": { - "smithy.api#documentation": "

    Lists all tags associated with a given Amazon Resource Name (ARN).

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

    Lists all tags associated with a given Amazon Resource Name (ARN). ARNs have the format\n arn:partition:service:region:account-id:resource-type/resource-id (for example,\n arn:aws:transcribe:us-east-1:account-id:transcription-job/your-job-name). Valid \n values for resource-type are: transcription-job,\n medical-transcription-job, vocabulary, \n medical-vocabulary, vocabulary-filter, and \n language-model.

    ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2647,7 +2694,7 @@ "ResourceArn": { "target": "com.amazonaws.transcribe#TranscribeArn", "traits": { - "smithy.api#documentation": "

    Lists all tags associated with the given Amazon Resource Name (ARN).

    " + "smithy.api#documentation": "

    Lists all tags associated with the given Amazon Resource Name (ARN).

    " } }, "Tags": { @@ -3864,7 +3911,7 @@ "OutputEncryptionKMSKeyId": { "target": "com.amazonaws.transcribe#KMSKeyId", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the Amazon Web Services Key Management Service (KMS) key used to \n encrypt the output of the transcription job. The user calling the StartMedicalTranscriptionJob \n operation must have permission to use the specified KMS key.

    \n

    You use either of the following to identify a KMS key in the current account:

    \n
      \n
    • \n

      KMS Key ID: \"1234abcd-12ab-34cd-56ef-1234567890ab\"

      \n
    • \n
    • \n

      KMS Key Alias: \"alias/ExampleAlias\"

      \n
    • \n
    \n

    You can use either of the following to identify a KMS key in the current account or another account:

    \n
      \n
    • \n

      Amazon Resource Name (ARN) of a KMS key in the current account or another\n account: \"arn:aws:kms:region:account ID:key/1234abcd-12ab-34cd-56ef-1234567890ab\"

      \n
    • \n
    • \n

      ARN of a KMS Key Alias: \"arn:aws:kms:region:account ID:alias/ExampleAlias\"

      \n
    • \n
    \n

    If you don't specify an encryption key, the output of the medical transcription job is encrypted with the default Amazon S3 \n key (SSE-S3).

    \n

    If you specify a KMS key to encrypt your output, you must also specify an output location in the \n OutputBucketName parameter.

    " + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the Amazon Web Services Key Management Service (KMS) key used to \n encrypt the output of the transcription job. The user calling the StartMedicalTranscriptionJob \n operation must have permission to use the specified KMS key.

    \n

    You use either of the following to identify a KMS key in the current account:

    \n
      \n
    • \n

      KMS Key ID: \"1234abcd-12ab-34cd-56ef-1234567890ab\"

      \n
    • \n
    • \n

      KMS Key Alias: \"alias/ExampleAlias\"

      \n
    • \n
    \n

    You can use either of the following to identify a KMS key in the current account or another account:

    \n
      \n
    • \n

      Amazon Resource Name (ARN) of a KMS key in the current account or another\n account: \"arn:aws:kms:region:account-ID:key/1234abcd-12ab-34cd-56ef-1234567890ab\"

      \n
    • \n
    • \n

      ARN of a KMS Key Alias: \"arn:aws:kms:region:account ID:alias/ExampleAlias\"

      \n
    • \n
    \n

    If you don't specify an encryption key, the output of the medical transcription job is encrypted with the default Amazon S3 \n key (SSE-S3).

    \n

    If you specify a KMS key to encrypt your output, you must also specify an output location in the \n OutputBucketName parameter.

    " } }, "KMSEncryptionContext": { @@ -4000,7 +4047,7 @@ "OutputEncryptionKMSKeyId": { "target": "com.amazonaws.transcribe#KMSKeyId", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the Amazon Web Services Key Management Service (KMS) key used to \n encrypt the output of the transcription job. The user calling the StartTranscriptionJob \n operation must have permission to use the specified KMS key.

    \n

    You can use either of the following to identify a KMS key in the current account:

    \n
      \n
    • \n

      KMS Key ID: \"1234abcd-12ab-34cd-56ef-1234567890ab\"

      \n
    • \n
    • \n

      KMS Key Alias: \"alias/ExampleAlias\"

      \n
    • \n
    \n

    You can use either of the following to identify a KMS key in the current account or another account:

    \n
      \n
    • \n

      Amazon Resource Name (ARN) of a KMS Key: \"arn:aws:kms:region:account\n ID:key/1234abcd-12ab-34cd-56ef-1234567890ab\"

      \n
    • \n
    • \n

      ARN of a KMS Key Alias: \"arn:aws:kms:region:account ID:alias/ExampleAlias\"

      \n
    • \n
    \n

    If you don't specify an encryption key, the output of the transcription job is encrypted with the default \n Amazon S3 key (SSE-S3).

    \n

    If you specify a KMS key to encrypt your output, you must also specify an output location in the \n OutputBucketName parameter.

    " + "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the Amazon Web Services Key Management Service (KMS) key used to \n encrypt the output of the transcription job. The user calling the StartTranscriptionJob \n operation must have permission to use the specified KMS key.

    \n

    You can use either of the following to identify a KMS key in the current account:

    \n
      \n
    • \n

      KMS Key ID: \"1234abcd-12ab-34cd-56ef-1234567890ab\"

      \n
    • \n
    • \n

      KMS Key Alias: \"alias/ExampleAlias\"

      \n
    • \n
    \n

    You can use either of the following to identify a KMS key in the current account or another account:

    \n
      \n
    • \n

      Amazon Resource Name (ARN) of a KMS Key: \"arn:aws:kms:region:account\n ID:key/1234abcd-12ab-34cd-56ef-1234567890ab\"

      \n
    • \n
    • \n

      ARN of a KMS Key Alias: \"arn:aws:kms:region:account-ID:alias/ExampleAlias\"

      \n
    • \n
    \n

    If you don't specify an encryption key, the output of the transcription job is encrypted with the default \n Amazon S3 key (SSE-S3).

    \n

    If you specify a KMS key to encrypt your output, you must also specify an output location in the \n OutputBucketName parameter.

    " } }, "KMSEncryptionContext": { @@ -4056,6 +4103,12 @@ "traits": { "smithy.api#documentation": "

    Add tags to an Amazon Transcribe transcription job.

    " } + }, + "LanguageIdSettings": { + "target": "com.amazonaws.transcribe#LanguageIdSettingsMap", + "traits": { + "smithy.api#documentation": "

    The language identification settings associated with your transcription job. These settings include\n VocabularyName, VocabularyFilterName, and \n LanguageModelName.

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

    Tags a Amazon Transcribe resource with the given list of tags.

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

    Tags an Amazon Transcribe resource with the given list of tags.

    ", "smithy.api#http": { "method": "PUT", "uri": "/tags/{ResourceArn}", @@ -4240,7 +4293,7 @@ "ResourceArn": { "target": "com.amazonaws.transcribe#TranscribeArn", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the Amazon Transcribe resource you want to tag.

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

    The Amazon Resource Name (ARN) of the Amazon Transcribe resource you want to tag. ARNs have the format\n arn:partition:service:region:account-id:resource-type/resource-id (for example,\n arn:aws:transcribe:us-east-1:account-id:transcription-job/your-job-name). Valid \n values for resource-type are: transcription-job,\n medical-transcription-job, vocabulary, \n medical-vocabulary, vocabulary-filter, and \n language-model.

    ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -4279,6 +4332,21 @@ }, "com.amazonaws.transcribe#Transcribe": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "Transcribe", + "arnNamespace": "transcribe", + "cloudFormationName": "Transcribe", + "cloudTrailEventSource": "transcribe.amazonaws.com", + "endpointPrefix": "transcribe" + }, + "aws.auth#sigv4": { + "name": "transcribe" + }, + "aws.protocols#awsJson1_1": {}, + "smithy.api#documentation": "

    Operations and objects for transcribing speech to text.

    ", + "smithy.api#title": "Amazon Transcribe Service" + }, "version": "2017-10-26", "operations": [ { @@ -4398,22 +4466,7 @@ { "target": "com.amazonaws.transcribe#UpdateVocabularyFilter" } - ], - "traits": { - "aws.api#service": { - "sdkId": "Transcribe", - "arnNamespace": "transcribe", - "cloudFormationName": "Transcribe", - "cloudTrailEventSource": "transcribe.amazonaws.com", - "endpointPrefix": "transcribe" - }, - "aws.auth#sigv4": { - "name": "transcribe" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "

    Operations and objects for transcribing speech to text.

    ", - "smithy.api#title": "Amazon Transcribe Service" - } + ] }, "com.amazonaws.transcribe#TranscribeArn": { "type": "string", @@ -4624,6 +4677,12 @@ "traits": { "smithy.api#documentation": "

    Generate subtitles for your batch transcription job.

    " } + }, + "LanguageIdSettings": { + "target": "com.amazonaws.transcribe#LanguageIdSettingsMap", + "traits": { + "smithy.api#documentation": "

    Language-specific settings that can be specified when language identification is enabled for your transcription \n job. These settings include VocabularyName, VocabularyFilterName, and \n LanguageModelNameLanguageModelName.

    " + } } }, "traits": { @@ -4801,7 +4860,7 @@ "ResourceArn": { "target": "com.amazonaws.transcribe#TranscribeArn", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the Amazon Transcribe resource you want to remove tags from.

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

    The Amazon Resource Name (ARN) of the Amazon Transcribe resource you want to remove tags from. \n ARNs have the format\n arn:partition:service:region:account-id:resource-type/resource-id (for example,\n arn:aws:transcribe:us-east-1:account-id:transcription-job/your-job-name). Valid \n values for resource-type are: transcription-job,\n medical-transcription-job, vocabulary, \n medical-vocabulary, vocabulary-filter, and \n language-model.

    ", "smithy.api#httpLabel": {}, "smithy.api#required": {} } diff --git a/codegen/sdk-codegen/aws-models/translate.json b/codegen/sdk-codegen/aws-models/translate.json index 44282ce20ed6..f4208606bcc9 100644 --- a/codegen/sdk-codegen/aws-models/translate.json +++ b/codegen/sdk-codegen/aws-models/translate.json @@ -125,7 +125,7 @@ "min": 1, "max": 5000 }, - "smithy.api#pattern": "[\\P{M}\\p{M}]{1,5000}" + "smithy.api#pattern": "^[\\P{M}\\p{M}]{1,5000}$" } }, "com.amazonaws.translate#ClientTokenString": { @@ -203,7 +203,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Creates a parallel data resource in Amazon Translate by importing an input file from\n Amazon S3. Parallel data files contain examples of source phrases and their translations from\n your translation memory. By adding parallel data, you can influence the style, tone, and word\n choice in your translation output.

    " + "smithy.api#documentation": "

    Creates a parallel data resource in Amazon Translate by importing an input file from\n Amazon S3. Parallel data files contain examples that show how you want segments of text to be\n translated. By adding parallel data, you can influence the style, tone, and word choice in\n your translation output.

    " } }, "com.amazonaws.translate#CreateParallelDataRequest": { @@ -369,7 +369,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Gets the properties associated with an asycnhronous batch translation job including name,\n ID, status, source and target languages, input/output S3 buckets, and so on.

    " + "smithy.api#documentation": "

    Gets the properties associated with an asynchronous batch translation job including name,\n ID, status, source and target languages, input/output S3 buckets, and so on.

    " } }, "com.amazonaws.translate#DescribeTextTranslationJobRequest": { @@ -402,7 +402,7 @@ "min": 0, "max": 256 }, - "smithy.api#pattern": "[\\P{M}\\p{M}]{0,256}" + "smithy.api#pattern": "^[\\P{M}\\p{M}]{0,256}$" } }, "com.amazonaws.translate#DetectedLanguageLowConfidenceException": { @@ -453,7 +453,7 @@ "min": 1, "max": 400 }, - "smithy.api#pattern": "(arn:aws((-us-gov)|(-iso)|(-iso-b)|(-cn))?:kms:)?([a-z]{2}-[a-z]+(-[a-z]+)?-\\d:)?(\\d{12}:)?(((key/)?[a-zA-Z0-9-_]+)|(alias/[a-zA-Z0-9:/_-]+))" + "smithy.api#pattern": "^(arn:aws((-us-gov)|(-iso)|(-iso-b)|(-cn))?:kms:)?([a-z]{2}-[a-z]+(-[a-z]+)?-\\d:)?(\\d{12}:)?(((key/)?[a-zA-Z0-9-_]+)|(alias/[a-zA-Z0-9:/_-]+))$" } }, "com.amazonaws.translate#EncryptionKeyType": { @@ -517,7 +517,7 @@ "DataLocation": { "target": "com.amazonaws.translate#ParallelDataDataLocation", "traits": { - "smithy.api#documentation": "

    The location of the most recent parallel data input file that was successfully imported\n into Amazon Translate. The location is returned as a presigned URL that has a 30 minute\n expiration.

    " + "smithy.api#documentation": "

    The Amazon S3 location of the most recent parallel data input file that was successfully\n imported into Amazon Translate. The location is returned as a presigned URL that has a 30\n minute expiration.

    \n \n \n

    Amazon Translate doesn't scan parallel data input files for the risk of CSV injection\n attacks.

    \n

    CSV injection occurs when a .csv or .tsv file is altered so that a record contains\n malicious code. The record begins with a special character, such as =, +, -, or @. When the\n file is opened in a spreadsheet program, the program might interpret the record as a formula\n and run the code within it.

    \n

    Before you download a parallel data input file from Amazon S3, ensure that you recognize the file and trust its creator.

    \n
    " } }, "AuxiliaryDataLocation": { @@ -603,7 +603,7 @@ "min": 20, "max": 2048 }, - "smithy.api#pattern": "arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+" + "smithy.api#pattern": "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$" } }, "com.amazonaws.translate#ImportTerminology": { @@ -694,7 +694,7 @@ "ContentType": { "target": "com.amazonaws.translate#ContentType", "traits": { - "smithy.api#documentation": "

    Describes the format of the data that you submit to Amazon Translate as input. You can\n specify one of the following multipurpose internet mail extension (MIME) types:

    \n
      \n
    • \n

      \n text/html: The input data consists of one or more HTML files. Amazon\n Translate translates only the text that resides in the html element in each\n file.

      \n
    • \n
    • \n

      \n text/plain: The input data consists of one or more unformatted text\n files. Amazon Translate translates every character in this type of input.

      \n
    • \n
    • \n

      \n application/vnd.openxmlformats-officedocument.wordprocessingml.document:\n The input data consists of one or more Word documents (.docx).

      \n
    • \n
    • \n

      \n application/vnd.openxmlformats-officedocument.presentationml.presentation:\n The input data consists of one or more PowerPoint Presentation files (.pptx).

      \n
    • \n
    • \n

      \n application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: The\n input data consists of one or more Excel Workbook files (.xlsx).

      \n
    • \n
    \n \n

    If you structure your input data as HTML, ensure that you set this parameter to\n text/html. By doing so, you cut costs by limiting the translation to the\n contents of the html element in each file. Otherwise, if you set this parameter\n to text/plain, your costs will cover the translation of every character.

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

    Describes the format of the data that you submit to Amazon Translate as input. You can\n specify one of the following multipurpose internet mail extension (MIME) types:

    \n
      \n
    • \n

      \n text/html: The input data consists of one or more HTML files. Amazon\n Translate translates only the text that resides in the html element in each\n file.

      \n
    • \n
    • \n

      \n text/plain: The input data consists of one or more unformatted text\n files. Amazon Translate translates every character in this type of input.

      \n
    • \n
    • \n

      \n application/vnd.openxmlformats-officedocument.wordprocessingml.document:\n The input data consists of one or more Word documents (.docx).

      \n
    • \n
    • \n

      \n application/vnd.openxmlformats-officedocument.presentationml.presentation:\n The input data consists of one or more PowerPoint Presentation files (.pptx).

      \n
    • \n
    • \n

      \n application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: The\n input data consists of one or more Excel Workbook files (.xlsx).

      \n
    • \n
    • \n

      \n application/x-xliff+xml: The input data consists of one or more XML\n Localization Interchange File Format (XLIFF) files (.xlf). Amazon Translate supports only XLIFF version 1.2.

      \n
    • \n
    \n \n

    If you structure your input data as HTML, ensure that you set this parameter to\n text/html. By doing so, you cut costs by limiting the translation to the\n contents of the html element in each file. Otherwise, if you set this parameter\n to text/plain, your costs will cover the translation of every character.

    \n
    ", "smithy.api#required": {} } } @@ -1060,7 +1060,7 @@ "NextToken": { "target": "com.amazonaws.translate#NextToken", "traits": { - "smithy.api#documentation": "

    The token to use to retreive the next page of results. This value is null\n when there are no more results to return.

    " + "smithy.api#documentation": "

    The token to use to retrieve the next page of results. This value is null\n when there are no more results to return.

    " } } } @@ -1099,7 +1099,7 @@ "min": 0, "max": 8192 }, - "smithy.api#pattern": "\\p{ASCII}{0,8192}" + "smithy.api#pattern": "^\\p{ASCII}{0,8192}$" } }, "com.amazonaws.translate#OutputDataConfig": { @@ -1111,6 +1111,9 @@ "smithy.api#documentation": "

    The URI of the S3 folder that contains a translation job's output file. The folder must\n be in the same Region as the API endpoint that you are calling.

    ", "smithy.api#required": {} } + }, + "EncryptionKey": { + "target": "com.amazonaws.translate#EncryptionKey" } }, "traits": { @@ -1161,7 +1164,7 @@ "Location": { "target": "com.amazonaws.translate#String", "traits": { - "smithy.api#documentation": "

    The Amazon S3 location of the parallel data input file. The location is returned as a\n presigned URL to that has a 30 minute expiration.

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

    The Amazon S3 location of the parallel data input file. The location is returned as a\n presigned URL to that has a 30 minute expiration.

    \n \n \n

    Amazon Translate doesn't scan parallel data input files for the risk of CSV injection\n attacks.

    \n

    CSV injection occurs when a .csv or .tsv file is altered so that a record contains\n malicious code. The record begins with a special character, such as =, +, -, or @. When the\n file is opened in a spreadsheet program, the program might interpret the record as a formula\n and run the code within it.

    \n

    Before you download a parallel data input file from Amazon S3, ensure that you recognize the file and trust its creator.

    \n
    ", "smithy.api#required": {} } } @@ -1365,7 +1368,7 @@ "min": 0, "max": 1024 }, - "smithy.api#pattern": "s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?" + "smithy.api#pattern": "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$" } }, "com.amazonaws.translate#ServiceUnavailableException": { @@ -1393,6 +1396,9 @@ { "target": "com.amazonaws.translate#InternalServerException" }, + { + "target": "com.amazonaws.translate#InvalidParameterValueException" + }, { "target": "com.amazonaws.translate#InvalidRequestException" }, @@ -1436,7 +1442,7 @@ "DataAccessRoleArn": { "target": "com.amazonaws.translate#IamRoleArn", "traits": { - "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role\n that grants Amazon Translate read access to your input data. For more nformation, see identity-and-access-management.

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

    The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role\n that grants Amazon Translate read access to your input data. For more information, see identity-and-access-management.

    ", "smithy.api#required": {} } }, @@ -1457,13 +1463,13 @@ "TerminologyNames": { "target": "com.amazonaws.translate#ResourceNameList", "traits": { - "smithy.api#documentation": "

    The name of the terminology to use in the batch translation job. For a list of available\n terminologies, use the ListTerminologies operation.

    " + "smithy.api#documentation": "

    The name of a custom terminology resource to add to the translation job. This resource\n lists examples source terms and the desired translation for each term.

    \n

    This parameter accepts only one custom terminology resource.

    \n

    For a list of available custom terminology resources, use the ListTerminologies operation.

    \n

    For more information, see how-custom-terminology.

    " } }, "ParallelDataNames": { "target": "com.amazonaws.translate#ResourceNameList", "traits": { - "smithy.api#documentation": "

    The names of the parallel data resources to use in the batch translation job. For a list\n of available parallel data resources, use the ListParallelData\n operation.

    " + "smithy.api#documentation": "

    The name of a parallel data resource to add to the translation job. This resource consists\n of examples that show how you want segments of text to be translated. When you add parallel\n data to a translation job, you create an Active Custom Translation job.

    \n

    This parameter accepts only one parallel data resource.

    \n \n

    Active Custom Translation jobs are priced at a higher rate than other jobs that don't\n use parallel data. For more information, see Amazon Translate pricing.

    \n
    \n

    For a list of available parallel data resources, use the ListParallelData operation.

    \n

    For more information, see customizing-translations-parallel-data.

    " } }, "ClientToken": { @@ -1552,7 +1558,7 @@ "min": 0, "max": 10000 }, - "smithy.api#pattern": "[\\P{M}\\p{M}]{0,10000}" + "smithy.api#pattern": "^[\\P{M}\\p{M}]{0,10000}$" } }, "com.amazonaws.translate#TargetLanguageCodeStringList": { @@ -1844,7 +1850,7 @@ "Message": { "target": "com.amazonaws.translate#UnboundedLengthString", "traits": { - "smithy.api#documentation": "

    An explanation of any errors that may have occured during the translation job.

    " + "smithy.api#documentation": "

    An explanation of any errors that may have occurred during the translation job.

    " } }, "SubmittedTime": {