@aws-sdk/client-serverlessapplicationrepository 3.118.1 → 3.128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist-cjs/protocols/Aws_restJson1.js +130 -143
- package/dist-es/protocols/Aws_restJson1.js +96 -109
- package/package.json +26 -26
|
@@ -13,24 +13,21 @@ const serializeAws_restJson1CreateApplicationCommand = async (input, context) =>
|
|
|
13
13
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
|
|
14
14
|
let body;
|
|
15
15
|
body = JSON.stringify({
|
|
16
|
-
...(input.Author
|
|
17
|
-
...(input.Description
|
|
18
|
-
...(input.HomePageUrl
|
|
19
|
-
...(input.Labels
|
|
20
|
-
|
|
21
|
-
...(input.
|
|
22
|
-
...(input.
|
|
23
|
-
...(input.
|
|
24
|
-
...(input.
|
|
25
|
-
...(input.
|
|
26
|
-
...(input.
|
|
27
|
-
|
|
28
|
-
...(input.
|
|
29
|
-
|
|
30
|
-
...(input.
|
|
31
|
-
...(input.SpdxLicenseId !== undefined && input.SpdxLicenseId !== null && { spdxLicenseId: input.SpdxLicenseId }),
|
|
32
|
-
...(input.TemplateBody !== undefined && input.TemplateBody !== null && { templateBody: input.TemplateBody }),
|
|
33
|
-
...(input.TemplateUrl !== undefined && input.TemplateUrl !== null && { templateUrl: input.TemplateUrl }),
|
|
16
|
+
...(input.Author != null && { author: input.Author }),
|
|
17
|
+
...(input.Description != null && { description: input.Description }),
|
|
18
|
+
...(input.HomePageUrl != null && { homePageUrl: input.HomePageUrl }),
|
|
19
|
+
...(input.Labels != null && { labels: serializeAws_restJson1__listOf__string(input.Labels, context) }),
|
|
20
|
+
...(input.LicenseBody != null && { licenseBody: input.LicenseBody }),
|
|
21
|
+
...(input.LicenseUrl != null && { licenseUrl: input.LicenseUrl }),
|
|
22
|
+
...(input.Name != null && { name: input.Name }),
|
|
23
|
+
...(input.ReadmeBody != null && { readmeBody: input.ReadmeBody }),
|
|
24
|
+
...(input.ReadmeUrl != null && { readmeUrl: input.ReadmeUrl }),
|
|
25
|
+
...(input.SemanticVersion != null && { semanticVersion: input.SemanticVersion }),
|
|
26
|
+
...(input.SourceCodeArchiveUrl != null && { sourceCodeArchiveUrl: input.SourceCodeArchiveUrl }),
|
|
27
|
+
...(input.SourceCodeUrl != null && { sourceCodeUrl: input.SourceCodeUrl }),
|
|
28
|
+
...(input.SpdxLicenseId != null && { spdxLicenseId: input.SpdxLicenseId }),
|
|
29
|
+
...(input.TemplateBody != null && { templateBody: input.TemplateBody }),
|
|
30
|
+
...(input.TemplateUrl != null && { templateUrl: input.TemplateUrl }),
|
|
34
31
|
});
|
|
35
32
|
return new protocol_http_1.HttpRequest({
|
|
36
33
|
protocol,
|
|
@@ -72,11 +69,10 @@ const serializeAws_restJson1CreateApplicationVersionCommand = async (input, cont
|
|
|
72
69
|
}
|
|
73
70
|
let body;
|
|
74
71
|
body = JSON.stringify({
|
|
75
|
-
...(input.SourceCodeArchiveUrl
|
|
76
|
-
|
|
77
|
-
...(input.
|
|
78
|
-
...(input.
|
|
79
|
-
...(input.TemplateUrl !== undefined && input.TemplateUrl !== null && { templateUrl: input.TemplateUrl }),
|
|
72
|
+
...(input.SourceCodeArchiveUrl != null && { sourceCodeArchiveUrl: input.SourceCodeArchiveUrl }),
|
|
73
|
+
...(input.SourceCodeUrl != null && { sourceCodeUrl: input.SourceCodeUrl }),
|
|
74
|
+
...(input.TemplateBody != null && { templateBody: input.TemplateBody }),
|
|
75
|
+
...(input.TemplateUrl != null && { templateUrl: input.TemplateUrl }),
|
|
80
76
|
});
|
|
81
77
|
return new protocol_http_1.HttpRequest({
|
|
82
78
|
protocol,
|
|
@@ -107,35 +103,28 @@ const serializeAws_restJson1CreateCloudFormationChangeSetCommand = async (input,
|
|
|
107
103
|
}
|
|
108
104
|
let body;
|
|
109
105
|
body = JSON.stringify({
|
|
110
|
-
...(input.Capabilities
|
|
111
|
-
input.Capabilities !== null && {
|
|
106
|
+
...(input.Capabilities != null && {
|
|
112
107
|
capabilities: serializeAws_restJson1__listOf__string(input.Capabilities, context),
|
|
113
108
|
}),
|
|
114
|
-
...(input.ChangeSetName
|
|
115
|
-
...(input.ClientToken
|
|
116
|
-
...(input.Description
|
|
117
|
-
...(input.NotificationArns
|
|
118
|
-
input.NotificationArns !== null && {
|
|
109
|
+
...(input.ChangeSetName != null && { changeSetName: input.ChangeSetName }),
|
|
110
|
+
...(input.ClientToken != null && { clientToken: input.ClientToken }),
|
|
111
|
+
...(input.Description != null && { description: input.Description }),
|
|
112
|
+
...(input.NotificationArns != null && {
|
|
119
113
|
notificationArns: serializeAws_restJson1__listOf__string(input.NotificationArns, context),
|
|
120
114
|
}),
|
|
121
|
-
...(input.ParameterOverrides
|
|
122
|
-
input.ParameterOverrides !== null && {
|
|
115
|
+
...(input.ParameterOverrides != null && {
|
|
123
116
|
parameterOverrides: serializeAws_restJson1__listOfParameterValue(input.ParameterOverrides, context),
|
|
124
117
|
}),
|
|
125
|
-
...(input.ResourceTypes
|
|
126
|
-
input.ResourceTypes !== null && {
|
|
118
|
+
...(input.ResourceTypes != null && {
|
|
127
119
|
resourceTypes: serializeAws_restJson1__listOf__string(input.ResourceTypes, context),
|
|
128
120
|
}),
|
|
129
|
-
...(input.RollbackConfiguration
|
|
130
|
-
input.RollbackConfiguration !== null && {
|
|
121
|
+
...(input.RollbackConfiguration != null && {
|
|
131
122
|
rollbackConfiguration: serializeAws_restJson1RollbackConfiguration(input.RollbackConfiguration, context),
|
|
132
123
|
}),
|
|
133
|
-
...(input.SemanticVersion
|
|
134
|
-
|
|
135
|
-
...(input.
|
|
136
|
-
...(input.
|
|
137
|
-
input.Tags !== null && { tags: serializeAws_restJson1__listOfTag(input.Tags, context) }),
|
|
138
|
-
...(input.TemplateId !== undefined && input.TemplateId !== null && { templateId: input.TemplateId }),
|
|
124
|
+
...(input.SemanticVersion != null && { semanticVersion: input.SemanticVersion }),
|
|
125
|
+
...(input.StackName != null && { stackName: input.StackName }),
|
|
126
|
+
...(input.Tags != null && { tags: serializeAws_restJson1__listOfTag(input.Tags, context) }),
|
|
127
|
+
...(input.TemplateId != null && { templateId: input.TemplateId }),
|
|
139
128
|
});
|
|
140
129
|
return new protocol_http_1.HttpRequest({
|
|
141
130
|
protocol,
|
|
@@ -166,8 +155,7 @@ const serializeAws_restJson1CreateCloudFormationTemplateCommand = async (input,
|
|
|
166
155
|
}
|
|
167
156
|
let body;
|
|
168
157
|
body = JSON.stringify({
|
|
169
|
-
...(input.SemanticVersion
|
|
170
|
-
input.SemanticVersion !== null && { semanticVersion: input.SemanticVersion }),
|
|
158
|
+
...(input.SemanticVersion != null && { semanticVersion: input.SemanticVersion }),
|
|
171
159
|
});
|
|
172
160
|
return new protocol_http_1.HttpRequest({
|
|
173
161
|
protocol,
|
|
@@ -402,8 +390,7 @@ const serializeAws_restJson1PutApplicationPolicyCommand = async (input, context)
|
|
|
402
390
|
}
|
|
403
391
|
let body;
|
|
404
392
|
body = JSON.stringify({
|
|
405
|
-
...(input.Statements
|
|
406
|
-
input.Statements !== null && {
|
|
393
|
+
...(input.Statements != null && {
|
|
407
394
|
statements: serializeAws_restJson1__listOfApplicationPolicyStatement(input.Statements, context),
|
|
408
395
|
}),
|
|
409
396
|
});
|
|
@@ -436,8 +423,7 @@ const serializeAws_restJson1UnshareApplicationCommand = async (input, context) =
|
|
|
436
423
|
}
|
|
437
424
|
let body;
|
|
438
425
|
body = JSON.stringify({
|
|
439
|
-
...(input.OrganizationId
|
|
440
|
-
input.OrganizationId !== null && { organizationId: input.OrganizationId }),
|
|
426
|
+
...(input.OrganizationId != null && { organizationId: input.OrganizationId }),
|
|
441
427
|
});
|
|
442
428
|
return new protocol_http_1.HttpRequest({
|
|
443
429
|
protocol,
|
|
@@ -468,13 +454,12 @@ const serializeAws_restJson1UpdateApplicationCommand = async (input, context) =>
|
|
|
468
454
|
}
|
|
469
455
|
let body;
|
|
470
456
|
body = JSON.stringify({
|
|
471
|
-
...(input.Author
|
|
472
|
-
...(input.Description
|
|
473
|
-
...(input.HomePageUrl
|
|
474
|
-
...(input.Labels
|
|
475
|
-
|
|
476
|
-
...(input.
|
|
477
|
-
...(input.ReadmeUrl !== undefined && input.ReadmeUrl !== null && { readmeUrl: input.ReadmeUrl }),
|
|
457
|
+
...(input.Author != null && { author: input.Author }),
|
|
458
|
+
...(input.Description != null && { description: input.Description }),
|
|
459
|
+
...(input.HomePageUrl != null && { homePageUrl: input.HomePageUrl }),
|
|
460
|
+
...(input.Labels != null && { labels: serializeAws_restJson1__listOf__string(input.Labels, context) }),
|
|
461
|
+
...(input.ReadmeBody != null && { readmeBody: input.ReadmeBody }),
|
|
462
|
+
...(input.ReadmeUrl != null && { readmeUrl: input.ReadmeUrl }),
|
|
478
463
|
});
|
|
479
464
|
return new protocol_http_1.HttpRequest({
|
|
480
465
|
protocol,
|
|
@@ -556,8 +541,7 @@ const deserializeAws_restJson1CreateApplicationCommandError = async (output, con
|
|
|
556
541
|
body: await parseBody(output.body, context),
|
|
557
542
|
};
|
|
558
543
|
let response;
|
|
559
|
-
|
|
560
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
544
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
561
545
|
switch (errorCode) {
|
|
562
546
|
case "BadRequestException":
|
|
563
547
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -576,10 +560,12 @@ const deserializeAws_restJson1CreateApplicationCommandError = async (output, con
|
|
|
576
560
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
577
561
|
default:
|
|
578
562
|
const parsedBody = parsedOutput.body;
|
|
563
|
+
const $metadata = deserializeMetadata(output);
|
|
564
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
579
565
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
580
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
566
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
581
567
|
$fault: "client",
|
|
582
|
-
$metadata
|
|
568
|
+
$metadata,
|
|
583
569
|
});
|
|
584
570
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
585
571
|
}
|
|
@@ -637,8 +623,7 @@ const deserializeAws_restJson1CreateApplicationVersionCommandError = async (outp
|
|
|
637
623
|
body: await parseBody(output.body, context),
|
|
638
624
|
};
|
|
639
625
|
let response;
|
|
640
|
-
|
|
641
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
626
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
642
627
|
switch (errorCode) {
|
|
643
628
|
case "BadRequestException":
|
|
644
629
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -657,10 +642,12 @@ const deserializeAws_restJson1CreateApplicationVersionCommandError = async (outp
|
|
|
657
642
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
658
643
|
default:
|
|
659
644
|
const parsedBody = parsedOutput.body;
|
|
645
|
+
const $metadata = deserializeMetadata(output);
|
|
646
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
660
647
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
661
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
648
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
662
649
|
$fault: "client",
|
|
663
|
-
$metadata
|
|
650
|
+
$metadata,
|
|
664
651
|
});
|
|
665
652
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
666
653
|
}
|
|
@@ -698,8 +685,7 @@ const deserializeAws_restJson1CreateCloudFormationChangeSetCommandError = async
|
|
|
698
685
|
body: await parseBody(output.body, context),
|
|
699
686
|
};
|
|
700
687
|
let response;
|
|
701
|
-
|
|
702
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
688
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
703
689
|
switch (errorCode) {
|
|
704
690
|
case "BadRequestException":
|
|
705
691
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -715,10 +701,12 @@ const deserializeAws_restJson1CreateCloudFormationChangeSetCommandError = async
|
|
|
715
701
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
716
702
|
default:
|
|
717
703
|
const parsedBody = parsedOutput.body;
|
|
704
|
+
const $metadata = deserializeMetadata(output);
|
|
705
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
718
706
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
719
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
707
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
720
708
|
$fault: "client",
|
|
721
|
-
$metadata
|
|
709
|
+
$metadata,
|
|
722
710
|
});
|
|
723
711
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
724
712
|
}
|
|
@@ -768,8 +756,7 @@ const deserializeAws_restJson1CreateCloudFormationTemplateCommandError = async (
|
|
|
768
756
|
body: await parseBody(output.body, context),
|
|
769
757
|
};
|
|
770
758
|
let response;
|
|
771
|
-
|
|
772
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
759
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
773
760
|
switch (errorCode) {
|
|
774
761
|
case "BadRequestException":
|
|
775
762
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -788,10 +775,12 @@ const deserializeAws_restJson1CreateCloudFormationTemplateCommandError = async (
|
|
|
788
775
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
789
776
|
default:
|
|
790
777
|
const parsedBody = parsedOutput.body;
|
|
778
|
+
const $metadata = deserializeMetadata(output);
|
|
779
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
791
780
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
792
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
781
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
793
782
|
$fault: "client",
|
|
794
|
-
$metadata
|
|
783
|
+
$metadata,
|
|
795
784
|
});
|
|
796
785
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
797
786
|
}
|
|
@@ -813,8 +802,7 @@ const deserializeAws_restJson1DeleteApplicationCommandError = async (output, con
|
|
|
813
802
|
body: await parseBody(output.body, context),
|
|
814
803
|
};
|
|
815
804
|
let response;
|
|
816
|
-
|
|
817
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
805
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
818
806
|
switch (errorCode) {
|
|
819
807
|
case "BadRequestException":
|
|
820
808
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -836,10 +824,12 @@ const deserializeAws_restJson1DeleteApplicationCommandError = async (output, con
|
|
|
836
824
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
837
825
|
default:
|
|
838
826
|
const parsedBody = parsedOutput.body;
|
|
827
|
+
const $metadata = deserializeMetadata(output);
|
|
828
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
839
829
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
840
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
830
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
841
831
|
$fault: "client",
|
|
842
|
-
$metadata
|
|
832
|
+
$metadata,
|
|
843
833
|
});
|
|
844
834
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
845
835
|
}
|
|
@@ -913,8 +903,7 @@ const deserializeAws_restJson1GetApplicationCommandError = async (output, contex
|
|
|
913
903
|
body: await parseBody(output.body, context),
|
|
914
904
|
};
|
|
915
905
|
let response;
|
|
916
|
-
|
|
917
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
906
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
918
907
|
switch (errorCode) {
|
|
919
908
|
case "BadRequestException":
|
|
920
909
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -933,10 +922,12 @@ const deserializeAws_restJson1GetApplicationCommandError = async (output, contex
|
|
|
933
922
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
934
923
|
default:
|
|
935
924
|
const parsedBody = parsedOutput.body;
|
|
925
|
+
const $metadata = deserializeMetadata(output);
|
|
926
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
936
927
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
937
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
928
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
938
929
|
$fault: "client",
|
|
939
|
-
$metadata
|
|
930
|
+
$metadata,
|
|
940
931
|
});
|
|
941
932
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
942
933
|
}
|
|
@@ -962,8 +953,7 @@ const deserializeAws_restJson1GetApplicationPolicyCommandError = async (output,
|
|
|
962
953
|
body: await parseBody(output.body, context),
|
|
963
954
|
};
|
|
964
955
|
let response;
|
|
965
|
-
|
|
966
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
956
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
967
957
|
switch (errorCode) {
|
|
968
958
|
case "BadRequestException":
|
|
969
959
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -982,10 +972,12 @@ const deserializeAws_restJson1GetApplicationPolicyCommandError = async (output,
|
|
|
982
972
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
983
973
|
default:
|
|
984
974
|
const parsedBody = parsedOutput.body;
|
|
975
|
+
const $metadata = deserializeMetadata(output);
|
|
976
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
985
977
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
986
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
978
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
987
979
|
$fault: "client",
|
|
988
|
-
$metadata
|
|
980
|
+
$metadata,
|
|
989
981
|
});
|
|
990
982
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
991
983
|
}
|
|
@@ -1035,8 +1027,7 @@ const deserializeAws_restJson1GetCloudFormationTemplateCommandError = async (out
|
|
|
1035
1027
|
body: await parseBody(output.body, context),
|
|
1036
1028
|
};
|
|
1037
1029
|
let response;
|
|
1038
|
-
|
|
1039
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1030
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1040
1031
|
switch (errorCode) {
|
|
1041
1032
|
case "BadRequestException":
|
|
1042
1033
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -1055,10 +1046,12 @@ const deserializeAws_restJson1GetCloudFormationTemplateCommandError = async (out
|
|
|
1055
1046
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1056
1047
|
default:
|
|
1057
1048
|
const parsedBody = parsedOutput.body;
|
|
1049
|
+
const $metadata = deserializeMetadata(output);
|
|
1050
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1058
1051
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
1059
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1052
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1060
1053
|
$fault: "client",
|
|
1061
|
-
$metadata
|
|
1054
|
+
$metadata,
|
|
1062
1055
|
});
|
|
1063
1056
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1064
1057
|
}
|
|
@@ -1088,8 +1081,7 @@ const deserializeAws_restJson1ListApplicationDependenciesCommandError = async (o
|
|
|
1088
1081
|
body: await parseBody(output.body, context),
|
|
1089
1082
|
};
|
|
1090
1083
|
let response;
|
|
1091
|
-
|
|
1092
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1084
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1093
1085
|
switch (errorCode) {
|
|
1094
1086
|
case "BadRequestException":
|
|
1095
1087
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -1108,10 +1100,12 @@ const deserializeAws_restJson1ListApplicationDependenciesCommandError = async (o
|
|
|
1108
1100
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1109
1101
|
default:
|
|
1110
1102
|
const parsedBody = parsedOutput.body;
|
|
1103
|
+
const $metadata = deserializeMetadata(output);
|
|
1104
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1111
1105
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
1112
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1106
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1113
1107
|
$fault: "client",
|
|
1114
|
-
$metadata
|
|
1108
|
+
$metadata,
|
|
1115
1109
|
});
|
|
1116
1110
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1117
1111
|
}
|
|
@@ -1141,8 +1135,7 @@ const deserializeAws_restJson1ListApplicationsCommandError = async (output, cont
|
|
|
1141
1135
|
body: await parseBody(output.body, context),
|
|
1142
1136
|
};
|
|
1143
1137
|
let response;
|
|
1144
|
-
|
|
1145
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1138
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1146
1139
|
switch (errorCode) {
|
|
1147
1140
|
case "BadRequestException":
|
|
1148
1141
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -1158,10 +1151,12 @@ const deserializeAws_restJson1ListApplicationsCommandError = async (output, cont
|
|
|
1158
1151
|
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1159
1152
|
default:
|
|
1160
1153
|
const parsedBody = parsedOutput.body;
|
|
1154
|
+
const $metadata = deserializeMetadata(output);
|
|
1155
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1161
1156
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
1162
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1157
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1163
1158
|
$fault: "client",
|
|
1164
|
-
$metadata
|
|
1159
|
+
$metadata,
|
|
1165
1160
|
});
|
|
1166
1161
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1167
1162
|
}
|
|
@@ -1191,8 +1186,7 @@ const deserializeAws_restJson1ListApplicationVersionsCommandError = async (outpu
|
|
|
1191
1186
|
body: await parseBody(output.body, context),
|
|
1192
1187
|
};
|
|
1193
1188
|
let response;
|
|
1194
|
-
|
|
1195
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1189
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1196
1190
|
switch (errorCode) {
|
|
1197
1191
|
case "BadRequestException":
|
|
1198
1192
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -1211,10 +1205,12 @@ const deserializeAws_restJson1ListApplicationVersionsCommandError = async (outpu
|
|
|
1211
1205
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1212
1206
|
default:
|
|
1213
1207
|
const parsedBody = parsedOutput.body;
|
|
1208
|
+
const $metadata = deserializeMetadata(output);
|
|
1209
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1214
1210
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
1215
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1211
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1216
1212
|
$fault: "client",
|
|
1217
|
-
$metadata
|
|
1213
|
+
$metadata,
|
|
1218
1214
|
});
|
|
1219
1215
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1220
1216
|
}
|
|
@@ -1240,8 +1236,7 @@ const deserializeAws_restJson1PutApplicationPolicyCommandError = async (output,
|
|
|
1240
1236
|
body: await parseBody(output.body, context),
|
|
1241
1237
|
};
|
|
1242
1238
|
let response;
|
|
1243
|
-
|
|
1244
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1239
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1245
1240
|
switch (errorCode) {
|
|
1246
1241
|
case "BadRequestException":
|
|
1247
1242
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -1260,10 +1255,12 @@ const deserializeAws_restJson1PutApplicationPolicyCommandError = async (output,
|
|
|
1260
1255
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1261
1256
|
default:
|
|
1262
1257
|
const parsedBody = parsedOutput.body;
|
|
1258
|
+
const $metadata = deserializeMetadata(output);
|
|
1259
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1263
1260
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
1264
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1261
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1265
1262
|
$fault: "client",
|
|
1266
|
-
$metadata
|
|
1263
|
+
$metadata,
|
|
1267
1264
|
});
|
|
1268
1265
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1269
1266
|
}
|
|
@@ -1285,8 +1282,7 @@ const deserializeAws_restJson1UnshareApplicationCommandError = async (output, co
|
|
|
1285
1282
|
body: await parseBody(output.body, context),
|
|
1286
1283
|
};
|
|
1287
1284
|
let response;
|
|
1288
|
-
|
|
1289
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1285
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1290
1286
|
switch (errorCode) {
|
|
1291
1287
|
case "BadRequestException":
|
|
1292
1288
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -1305,10 +1301,12 @@ const deserializeAws_restJson1UnshareApplicationCommandError = async (output, co
|
|
|
1305
1301
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1306
1302
|
default:
|
|
1307
1303
|
const parsedBody = parsedOutput.body;
|
|
1304
|
+
const $metadata = deserializeMetadata(output);
|
|
1305
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1308
1306
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
1309
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1307
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1310
1308
|
$fault: "client",
|
|
1311
|
-
$metadata
|
|
1309
|
+
$metadata,
|
|
1312
1310
|
});
|
|
1313
1311
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1314
1312
|
}
|
|
@@ -1382,8 +1380,7 @@ const deserializeAws_restJson1UpdateApplicationCommandError = async (output, con
|
|
|
1382
1380
|
body: await parseBody(output.body, context),
|
|
1383
1381
|
};
|
|
1384
1382
|
let response;
|
|
1385
|
-
|
|
1386
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1383
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1387
1384
|
switch (errorCode) {
|
|
1388
1385
|
case "BadRequestException":
|
|
1389
1386
|
case "com.amazonaws.serverlessapplicationrepository#BadRequestException":
|
|
@@ -1405,10 +1402,12 @@ const deserializeAws_restJson1UpdateApplicationCommandError = async (output, con
|
|
|
1405
1402
|
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
1406
1403
|
default:
|
|
1407
1404
|
const parsedBody = parsedOutput.body;
|
|
1405
|
+
const $metadata = deserializeMetadata(output);
|
|
1406
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1408
1407
|
response = new ServerlessApplicationRepositoryServiceException_1.ServerlessApplicationRepositoryServiceException({
|
|
1409
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1408
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1410
1409
|
$fault: "client",
|
|
1411
|
-
$metadata
|
|
1410
|
+
$metadata,
|
|
1412
1411
|
});
|
|
1413
1412
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1414
1413
|
}
|
|
@@ -1555,43 +1554,38 @@ const serializeAws_restJson1__listOfTag = (input, context) => {
|
|
|
1555
1554
|
};
|
|
1556
1555
|
const serializeAws_restJson1ApplicationPolicyStatement = (input, context) => {
|
|
1557
1556
|
return {
|
|
1558
|
-
...(input.Actions
|
|
1559
|
-
|
|
1560
|
-
...(input.PrincipalOrgIDs !== undefined &&
|
|
1561
|
-
input.PrincipalOrgIDs !== null && {
|
|
1557
|
+
...(input.Actions != null && { actions: serializeAws_restJson1__listOf__string(input.Actions, context) }),
|
|
1558
|
+
...(input.PrincipalOrgIDs != null && {
|
|
1562
1559
|
principalOrgIDs: serializeAws_restJson1__listOf__string(input.PrincipalOrgIDs, context),
|
|
1563
1560
|
}),
|
|
1564
|
-
...(input.Principals
|
|
1565
|
-
|
|
1566
|
-
...(input.StatementId !== undefined && input.StatementId !== null && { statementId: input.StatementId }),
|
|
1561
|
+
...(input.Principals != null && { principals: serializeAws_restJson1__listOf__string(input.Principals, context) }),
|
|
1562
|
+
...(input.StatementId != null && { statementId: input.StatementId }),
|
|
1567
1563
|
};
|
|
1568
1564
|
};
|
|
1569
1565
|
const serializeAws_restJson1ParameterValue = (input, context) => {
|
|
1570
1566
|
return {
|
|
1571
|
-
...(input.Name
|
|
1572
|
-
...(input.Value
|
|
1567
|
+
...(input.Name != null && { name: input.Name }),
|
|
1568
|
+
...(input.Value != null && { value: input.Value }),
|
|
1573
1569
|
};
|
|
1574
1570
|
};
|
|
1575
1571
|
const serializeAws_restJson1RollbackConfiguration = (input, context) => {
|
|
1576
1572
|
return {
|
|
1577
|
-
...(input.MonitoringTimeInMinutes
|
|
1578
|
-
|
|
1579
|
-
...(input.RollbackTriggers !== undefined &&
|
|
1580
|
-
input.RollbackTriggers !== null && {
|
|
1573
|
+
...(input.MonitoringTimeInMinutes != null && { monitoringTimeInMinutes: input.MonitoringTimeInMinutes }),
|
|
1574
|
+
...(input.RollbackTriggers != null && {
|
|
1581
1575
|
rollbackTriggers: serializeAws_restJson1__listOfRollbackTrigger(input.RollbackTriggers, context),
|
|
1582
1576
|
}),
|
|
1583
1577
|
};
|
|
1584
1578
|
};
|
|
1585
1579
|
const serializeAws_restJson1RollbackTrigger = (input, context) => {
|
|
1586
1580
|
return {
|
|
1587
|
-
...(input.Arn
|
|
1588
|
-
...(input.Type
|
|
1581
|
+
...(input.Arn != null && { arn: input.Arn }),
|
|
1582
|
+
...(input.Type != null && { type: input.Type }),
|
|
1589
1583
|
};
|
|
1590
1584
|
};
|
|
1591
1585
|
const serializeAws_restJson1Tag = (input, context) => {
|
|
1592
1586
|
return {
|
|
1593
|
-
...(input.Key
|
|
1594
|
-
...(input.Value
|
|
1587
|
+
...(input.Key != null && { key: input.Key }),
|
|
1588
|
+
...(input.Value != null && { value: input.Value }),
|
|
1595
1589
|
};
|
|
1596
1590
|
};
|
|
1597
1591
|
const deserializeAws_restJson1__listOf__string = (output, context) => {
|
|
@@ -1679,15 +1673,11 @@ const deserializeAws_restJson1ApplicationDependencySummary = (output, context) =
|
|
|
1679
1673
|
};
|
|
1680
1674
|
const deserializeAws_restJson1ApplicationPolicyStatement = (output, context) => {
|
|
1681
1675
|
return {
|
|
1682
|
-
Actions: output.actions
|
|
1683
|
-
|
|
1684
|
-
: undefined,
|
|
1685
|
-
PrincipalOrgIDs: output.principalOrgIDs !== undefined && output.principalOrgIDs !== null
|
|
1676
|
+
Actions: output.actions != null ? deserializeAws_restJson1__listOf__string(output.actions, context) : undefined,
|
|
1677
|
+
PrincipalOrgIDs: output.principalOrgIDs != null
|
|
1686
1678
|
? deserializeAws_restJson1__listOf__string(output.principalOrgIDs, context)
|
|
1687
1679
|
: undefined,
|
|
1688
|
-
Principals: output.principals
|
|
1689
|
-
? deserializeAws_restJson1__listOf__string(output.principals, context)
|
|
1690
|
-
: undefined,
|
|
1680
|
+
Principals: output.principals != null ? deserializeAws_restJson1__listOf__string(output.principals, context) : undefined,
|
|
1691
1681
|
StatementId: (0, smithy_client_1.expectString)(output.statementId),
|
|
1692
1682
|
};
|
|
1693
1683
|
};
|
|
@@ -1698,9 +1688,7 @@ const deserializeAws_restJson1ApplicationSummary = (output, context) => {
|
|
|
1698
1688
|
CreationTime: (0, smithy_client_1.expectString)(output.creationTime),
|
|
1699
1689
|
Description: (0, smithy_client_1.expectString)(output.description),
|
|
1700
1690
|
HomePageUrl: (0, smithy_client_1.expectString)(output.homePageUrl),
|
|
1701
|
-
Labels: output.labels
|
|
1702
|
-
? deserializeAws_restJson1__listOf__string(output.labels, context)
|
|
1703
|
-
: undefined,
|
|
1691
|
+
Labels: output.labels != null ? deserializeAws_restJson1__listOf__string(output.labels, context) : undefined,
|
|
1704
1692
|
Name: (0, smithy_client_1.expectString)(output.name),
|
|
1705
1693
|
SpdxLicenseId: (0, smithy_client_1.expectString)(output.spdxLicenseId),
|
|
1706
1694
|
};
|
|
@@ -1708,7 +1696,7 @@ const deserializeAws_restJson1ApplicationSummary = (output, context) => {
|
|
|
1708
1696
|
const deserializeAws_restJson1ParameterDefinition = (output, context) => {
|
|
1709
1697
|
return {
|
|
1710
1698
|
AllowedPattern: (0, smithy_client_1.expectString)(output.allowedPattern),
|
|
1711
|
-
AllowedValues: output.allowedValues
|
|
1699
|
+
AllowedValues: output.allowedValues != null
|
|
1712
1700
|
? deserializeAws_restJson1__listOf__string(output.allowedValues, context)
|
|
1713
1701
|
: undefined,
|
|
1714
1702
|
ConstraintDescription: (0, smithy_client_1.expectString)(output.constraintDescription),
|
|
@@ -1720,7 +1708,7 @@ const deserializeAws_restJson1ParameterDefinition = (output, context) => {
|
|
|
1720
1708
|
MinValue: (0, smithy_client_1.expectInt32)(output.minValue),
|
|
1721
1709
|
Name: (0, smithy_client_1.expectString)(output.name),
|
|
1722
1710
|
NoEcho: (0, smithy_client_1.expectBoolean)(output.noEcho),
|
|
1723
|
-
ReferencedByResources: output.referencedByResources
|
|
1711
|
+
ReferencedByResources: output.referencedByResources != null
|
|
1724
1712
|
? deserializeAws_restJson1__listOf__string(output.referencedByResources, context)
|
|
1725
1713
|
: undefined,
|
|
1726
1714
|
Type: (0, smithy_client_1.expectString)(output.type),
|
|
@@ -1730,10 +1718,10 @@ const deserializeAws_restJson1Version = (output, context) => {
|
|
|
1730
1718
|
return {
|
|
1731
1719
|
ApplicationId: (0, smithy_client_1.expectString)(output.applicationId),
|
|
1732
1720
|
CreationTime: (0, smithy_client_1.expectString)(output.creationTime),
|
|
1733
|
-
ParameterDefinitions: output.parameterDefinitions
|
|
1721
|
+
ParameterDefinitions: output.parameterDefinitions != null
|
|
1734
1722
|
? deserializeAws_restJson1__listOfParameterDefinition(output.parameterDefinitions, context)
|
|
1735
1723
|
: undefined,
|
|
1736
|
-
RequiredCapabilities: output.requiredCapabilities
|
|
1724
|
+
RequiredCapabilities: output.requiredCapabilities != null
|
|
1737
1725
|
? deserializeAws_restJson1__listOfCapability(output.requiredCapabilities, context)
|
|
1738
1726
|
: undefined,
|
|
1739
1727
|
ResourcesSupported: (0, smithy_client_1.expectBoolean)(output.resourcesSupported),
|
|
@@ -1800,5 +1788,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1800
1788
|
if (data["__type"] !== undefined) {
|
|
1801
1789
|
return sanitizeErrorCode(data["__type"]);
|
|
1802
1790
|
}
|
|
1803
|
-
return "";
|
|
1804
1791
|
};
|