@aws-sdk/client-marketplace-catalog 3.204.0 → 3.209.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.
Files changed (38) hide show
  1. package/README.md +2 -3
  2. package/dist-cjs/MarketplaceCatalog.js +45 -0
  3. package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
  4. package/dist-cjs/commands/TagResourceCommand.js +46 -0
  5. package/dist-cjs/commands/UntagResourceCommand.js +46 -0
  6. package/dist-cjs/commands/index.js +3 -0
  7. package/dist-cjs/models/models_0.js +29 -1
  8. package/dist-cjs/protocols/Aws_restJson1.js +240 -1
  9. package/dist-cjs/runtimeConfig.shared.js +2 -1
  10. package/dist-es/MarketplaceCatalog.js +45 -0
  11. package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
  12. package/dist-es/commands/TagResourceCommand.js +42 -0
  13. package/dist-es/commands/UntagResourceCommand.js +42 -0
  14. package/dist-es/commands/index.js +3 -0
  15. package/dist-es/models/models_0.js +21 -0
  16. package/dist-es/protocols/Aws_restJson1.js +233 -0
  17. package/dist-es/runtimeConfig.shared.js +2 -1
  18. package/dist-types/MarketplaceCatalog.d.ts +34 -17
  19. package/dist-types/MarketplaceCatalogClient.d.ts +7 -5
  20. package/dist-types/commands/ListChangeSetsCommand.d.ts +0 -1
  21. package/dist-types/commands/ListTagsForResourceCommand.d.ts +37 -0
  22. package/dist-types/commands/StartChangeSetCommand.d.ts +11 -13
  23. package/dist-types/commands/TagResourceCommand.d.ts +37 -0
  24. package/dist-types/commands/UntagResourceCommand.d.ts +37 -0
  25. package/dist-types/commands/index.d.ts +3 -0
  26. package/dist-types/models/models_0.d.ts +110 -20
  27. package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
  28. package/dist-types/runtimeConfig.shared.d.ts +2 -3
  29. package/dist-types/ts3.4/MarketplaceCatalog.d.ts +51 -0
  30. package/dist-types/ts3.4/MarketplaceCatalogClient.d.ts +20 -2
  31. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +38 -0
  32. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +34 -0
  33. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +37 -0
  34. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  35. package/dist-types/ts3.4/models/models_0.d.ts +42 -0
  36. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
  37. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -3
  38. package/package.json +33 -35
package/README.md CHANGED
@@ -9,9 +9,8 @@
9
9
 
10
10
  AWS SDK for JavaScript MarketplaceCatalog Client for Node.js, Browser and React Native.
11
11
 
12
- <p>Catalog API actions allow you to manage your entities through list, describe, and update
13
- capabilities. An entity can be a product or an offer on AWS Marketplace. </p>
14
-
12
+ <p>Catalog API actions allow you to manage your entities through list, describe, and
13
+ update capabilities. An entity can be a product or an offer on AWS Marketplace. </p>
15
14
  <p>You can automate your entity update process by integrating the AWS Marketplace Catalog
16
15
  API with your AWS Marketplace product build or deployment pipelines. You can also create
17
16
  your own applications on top of the Catalog API to manage your products on AWS
@@ -6,7 +6,10 @@ const DescribeChangeSetCommand_1 = require("./commands/DescribeChangeSetCommand"
6
6
  const DescribeEntityCommand_1 = require("./commands/DescribeEntityCommand");
7
7
  const ListChangeSetsCommand_1 = require("./commands/ListChangeSetsCommand");
8
8
  const ListEntitiesCommand_1 = require("./commands/ListEntitiesCommand");
9
+ const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceCommand");
9
10
  const StartChangeSetCommand_1 = require("./commands/StartChangeSetCommand");
11
+ const TagResourceCommand_1 = require("./commands/TagResourceCommand");
12
+ const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
10
13
  const MarketplaceCatalogClient_1 = require("./MarketplaceCatalogClient");
11
14
  class MarketplaceCatalog extends MarketplaceCatalogClient_1.MarketplaceCatalogClient {
12
15
  cancelChangeSet(args, optionsOrCb, cb) {
@@ -79,6 +82,20 @@ class MarketplaceCatalog extends MarketplaceCatalogClient_1.MarketplaceCatalogCl
79
82
  return this.send(command, optionsOrCb);
80
83
  }
81
84
  }
85
+ listTagsForResource(args, optionsOrCb, cb) {
86
+ const command = new ListTagsForResourceCommand_1.ListTagsForResourceCommand(args);
87
+ if (typeof optionsOrCb === "function") {
88
+ this.send(command, optionsOrCb);
89
+ }
90
+ else if (typeof cb === "function") {
91
+ if (typeof optionsOrCb !== "object")
92
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
93
+ this.send(command, optionsOrCb || {}, cb);
94
+ }
95
+ else {
96
+ return this.send(command, optionsOrCb);
97
+ }
98
+ }
82
99
  startChangeSet(args, optionsOrCb, cb) {
83
100
  const command = new StartChangeSetCommand_1.StartChangeSetCommand(args);
84
101
  if (typeof optionsOrCb === "function") {
@@ -93,5 +110,33 @@ class MarketplaceCatalog extends MarketplaceCatalogClient_1.MarketplaceCatalogCl
93
110
  return this.send(command, optionsOrCb);
94
111
  }
95
112
  }
113
+ tagResource(args, optionsOrCb, cb) {
114
+ const command = new TagResourceCommand_1.TagResourceCommand(args);
115
+ if (typeof optionsOrCb === "function") {
116
+ this.send(command, optionsOrCb);
117
+ }
118
+ else if (typeof cb === "function") {
119
+ if (typeof optionsOrCb !== "object")
120
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
121
+ this.send(command, optionsOrCb || {}, cb);
122
+ }
123
+ else {
124
+ return this.send(command, optionsOrCb);
125
+ }
126
+ }
127
+ untagResource(args, optionsOrCb, cb) {
128
+ const command = new UntagResourceCommand_1.UntagResourceCommand(args);
129
+ if (typeof optionsOrCb === "function") {
130
+ this.send(command, optionsOrCb);
131
+ }
132
+ else if (typeof cb === "function") {
133
+ if (typeof optionsOrCb !== "object")
134
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
135
+ this.send(command, optionsOrCb || {}, cb);
136
+ }
137
+ else {
138
+ return this.send(command, optionsOrCb);
139
+ }
140
+ }
96
141
  }
97
142
  exports.MarketplaceCatalog = MarketplaceCatalog;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListTagsForResourceCommand = void 0;
4
+ const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
5
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ const models_0_1 = require("../models/models_0");
8
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
9
+ class ListTagsForResourceCommand extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ static getEndpointParameterInstructions() {
15
+ return {
16
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
17
+ Endpoint: { type: "builtInParams", name: "endpoint" },
18
+ Region: { type: "builtInParams", name: "region" },
19
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
20
+ };
21
+ }
22
+ resolveMiddleware(clientStack, configuration, options) {
23
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
24
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListTagsForResourceCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "MarketplaceCatalogClient";
28
+ const commandName = "ListTagsForResourceCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: models_0_1.ListTagsForResourceRequestFilterSensitiveLog,
34
+ outputFilterSensitiveLog: models_0_1.ListTagsForResourceResponseFilterSensitiveLog,
35
+ };
36
+ const { requestHandler } = configuration;
37
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
+ }
39
+ serialize(input, context) {
40
+ return (0, Aws_restJson1_1.serializeAws_restJson1ListTagsForResourceCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_restJson1_1.deserializeAws_restJson1ListTagsForResourceCommand)(output, context);
44
+ }
45
+ }
46
+ exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TagResourceCommand = void 0;
4
+ const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
5
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ const models_0_1 = require("../models/models_0");
8
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
9
+ class TagResourceCommand extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ static getEndpointParameterInstructions() {
15
+ return {
16
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
17
+ Endpoint: { type: "builtInParams", name: "endpoint" },
18
+ Region: { type: "builtInParams", name: "region" },
19
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
20
+ };
21
+ }
22
+ resolveMiddleware(clientStack, configuration, options) {
23
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
24
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, TagResourceCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "MarketplaceCatalogClient";
28
+ const commandName = "TagResourceCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: models_0_1.TagResourceRequestFilterSensitiveLog,
34
+ outputFilterSensitiveLog: models_0_1.TagResourceResponseFilterSensitiveLog,
35
+ };
36
+ const { requestHandler } = configuration;
37
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
+ }
39
+ serialize(input, context) {
40
+ return (0, Aws_restJson1_1.serializeAws_restJson1TagResourceCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_restJson1_1.deserializeAws_restJson1TagResourceCommand)(output, context);
44
+ }
45
+ }
46
+ exports.TagResourceCommand = TagResourceCommand;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UntagResourceCommand = void 0;
4
+ const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
5
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ const models_0_1 = require("../models/models_0");
8
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
9
+ class UntagResourceCommand extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ static getEndpointParameterInstructions() {
15
+ return {
16
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
17
+ Endpoint: { type: "builtInParams", name: "endpoint" },
18
+ Region: { type: "builtInParams", name: "region" },
19
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
20
+ };
21
+ }
22
+ resolveMiddleware(clientStack, configuration, options) {
23
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
24
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UntagResourceCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "MarketplaceCatalogClient";
28
+ const commandName = "UntagResourceCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: models_0_1.UntagResourceRequestFilterSensitiveLog,
34
+ outputFilterSensitiveLog: models_0_1.UntagResourceResponseFilterSensitiveLog,
35
+ };
36
+ const { requestHandler } = configuration;
37
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
+ }
39
+ serialize(input, context) {
40
+ return (0, Aws_restJson1_1.serializeAws_restJson1UntagResourceCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_restJson1_1.deserializeAws_restJson1UntagResourceCommand)(output, context);
44
+ }
45
+ }
46
+ exports.UntagResourceCommand = UntagResourceCommand;
@@ -6,4 +6,7 @@ tslib_1.__exportStar(require("./DescribeChangeSetCommand"), exports);
6
6
  tslib_1.__exportStar(require("./DescribeEntityCommand"), exports);
7
7
  tslib_1.__exportStar(require("./ListChangeSetsCommand"), exports);
8
8
  tslib_1.__exportStar(require("./ListEntitiesCommand"), exports);
9
+ tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
9
10
  tslib_1.__exportStar(require("./StartChangeSetCommand"), exports);
11
+ tslib_1.__exportStar(require("./TagResourceCommand"), exports);
12
+ tslib_1.__exportStar(require("./UntagResourceCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StartChangeSetResponseFilterSensitiveLog = exports.StartChangeSetRequestFilterSensitiveLog = exports.ChangeFilterSensitiveLog = exports.ListEntitiesResponseFilterSensitiveLog = exports.EntitySummaryFilterSensitiveLog = exports.ListEntitiesRequestFilterSensitiveLog = exports.ListChangeSetsResponseFilterSensitiveLog = exports.ChangeSetSummaryListItemFilterSensitiveLog = exports.ListChangeSetsRequestFilterSensitiveLog = exports.SortFilterSensitiveLog = exports.FilterFilterSensitiveLog = exports.DescribeEntityResponseFilterSensitiveLog = exports.DescribeEntityRequestFilterSensitiveLog = exports.DescribeChangeSetResponseFilterSensitiveLog = exports.ChangeSummaryFilterSensitiveLog = exports.ErrorDetailFilterSensitiveLog = exports.EntityFilterSensitiveLog = exports.DescribeChangeSetRequestFilterSensitiveLog = exports.CancelChangeSetResponseFilterSensitiveLog = exports.CancelChangeSetRequestFilterSensitiveLog = exports.ServiceQuotaExceededException = exports.SortOrder = exports.ResourceNotSupportedException = exports.ChangeStatus = exports.FailureCode = exports.ValidationException = exports.ThrottlingException = exports.ResourceNotFoundException = exports.ResourceInUseException = exports.InternalServiceException = exports.AccessDeniedException = void 0;
3
+ exports.UntagResourceResponseFilterSensitiveLog = exports.UntagResourceRequestFilterSensitiveLog = exports.TagResourceResponseFilterSensitiveLog = exports.TagResourceRequestFilterSensitiveLog = exports.StartChangeSetResponseFilterSensitiveLog = exports.StartChangeSetRequestFilterSensitiveLog = exports.ChangeFilterSensitiveLog = exports.ListTagsForResourceResponseFilterSensitiveLog = exports.TagFilterSensitiveLog = exports.ListTagsForResourceRequestFilterSensitiveLog = exports.ListEntitiesResponseFilterSensitiveLog = exports.EntitySummaryFilterSensitiveLog = exports.ListEntitiesRequestFilterSensitiveLog = exports.ListChangeSetsResponseFilterSensitiveLog = exports.ChangeSetSummaryListItemFilterSensitiveLog = exports.ListChangeSetsRequestFilterSensitiveLog = exports.SortFilterSensitiveLog = exports.FilterFilterSensitiveLog = exports.DescribeEntityResponseFilterSensitiveLog = exports.DescribeEntityRequestFilterSensitiveLog = exports.DescribeChangeSetResponseFilterSensitiveLog = exports.ChangeSummaryFilterSensitiveLog = exports.ErrorDetailFilterSensitiveLog = exports.EntityFilterSensitiveLog = exports.DescribeChangeSetRequestFilterSensitiveLog = exports.CancelChangeSetResponseFilterSensitiveLog = exports.CancelChangeSetRequestFilterSensitiveLog = exports.ServiceQuotaExceededException = exports.SortOrder = exports.ResourceNotSupportedException = exports.ChangeStatus = exports.FailureCode = exports.ValidationException = exports.ThrottlingException = exports.ResourceNotFoundException = exports.ResourceInUseException = exports.InternalServiceException = exports.AccessDeniedException = void 0;
4
4
  const MarketplaceCatalogServiceException_1 = require("./MarketplaceCatalogServiceException");
5
5
  class AccessDeniedException extends MarketplaceCatalogServiceException_1.MarketplaceCatalogServiceException {
6
6
  constructor(opts) {
@@ -200,6 +200,18 @@ const ListEntitiesResponseFilterSensitiveLog = (obj) => ({
200
200
  ...obj,
201
201
  });
202
202
  exports.ListEntitiesResponseFilterSensitiveLog = ListEntitiesResponseFilterSensitiveLog;
203
+ const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
204
+ ...obj,
205
+ });
206
+ exports.ListTagsForResourceRequestFilterSensitiveLog = ListTagsForResourceRequestFilterSensitiveLog;
207
+ const TagFilterSensitiveLog = (obj) => ({
208
+ ...obj,
209
+ });
210
+ exports.TagFilterSensitiveLog = TagFilterSensitiveLog;
211
+ const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
212
+ ...obj,
213
+ });
214
+ exports.ListTagsForResourceResponseFilterSensitiveLog = ListTagsForResourceResponseFilterSensitiveLog;
203
215
  const ChangeFilterSensitiveLog = (obj) => ({
204
216
  ...obj,
205
217
  });
@@ -212,3 +224,19 @@ const StartChangeSetResponseFilterSensitiveLog = (obj) => ({
212
224
  ...obj,
213
225
  });
214
226
  exports.StartChangeSetResponseFilterSensitiveLog = StartChangeSetResponseFilterSensitiveLog;
227
+ const TagResourceRequestFilterSensitiveLog = (obj) => ({
228
+ ...obj,
229
+ });
230
+ exports.TagResourceRequestFilterSensitiveLog = TagResourceRequestFilterSensitiveLog;
231
+ const TagResourceResponseFilterSensitiveLog = (obj) => ({
232
+ ...obj,
233
+ });
234
+ exports.TagResourceResponseFilterSensitiveLog = TagResourceResponseFilterSensitiveLog;
235
+ const UntagResourceRequestFilterSensitiveLog = (obj) => ({
236
+ ...obj,
237
+ });
238
+ exports.UntagResourceRequestFilterSensitiveLog = UntagResourceRequestFilterSensitiveLog;
239
+ const UntagResourceResponseFilterSensitiveLog = (obj) => ({
240
+ ...obj,
241
+ });
242
+ exports.UntagResourceResponseFilterSensitiveLog = UntagResourceResponseFilterSensitiveLog;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1StartChangeSetCommand = exports.deserializeAws_restJson1ListEntitiesCommand = exports.deserializeAws_restJson1ListChangeSetsCommand = exports.deserializeAws_restJson1DescribeEntityCommand = exports.deserializeAws_restJson1DescribeChangeSetCommand = exports.deserializeAws_restJson1CancelChangeSetCommand = exports.serializeAws_restJson1StartChangeSetCommand = exports.serializeAws_restJson1ListEntitiesCommand = exports.serializeAws_restJson1ListChangeSetsCommand = exports.serializeAws_restJson1DescribeEntityCommand = exports.serializeAws_restJson1DescribeChangeSetCommand = exports.serializeAws_restJson1CancelChangeSetCommand = void 0;
3
+ exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartChangeSetCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListEntitiesCommand = exports.deserializeAws_restJson1ListChangeSetsCommand = exports.deserializeAws_restJson1DescribeEntityCommand = exports.deserializeAws_restJson1DescribeChangeSetCommand = exports.deserializeAws_restJson1CancelChangeSetCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StartChangeSetCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListEntitiesCommand = exports.serializeAws_restJson1ListChangeSetsCommand = exports.serializeAws_restJson1DescribeEntityCommand = exports.serializeAws_restJson1DescribeChangeSetCommand = exports.serializeAws_restJson1CancelChangeSetCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const uuid_1 = require("uuid");
@@ -120,6 +120,27 @@ const serializeAws_restJson1ListEntitiesCommand = async (input, context) => {
120
120
  });
121
121
  };
122
122
  exports.serializeAws_restJson1ListEntitiesCommand = serializeAws_restJson1ListEntitiesCommand;
123
+ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
124
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
125
+ const headers = {
126
+ "content-type": "application/json",
127
+ };
128
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListTagsForResource";
129
+ let body;
130
+ body = JSON.stringify({
131
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
132
+ });
133
+ return new protocol_http_1.HttpRequest({
134
+ protocol,
135
+ hostname,
136
+ port,
137
+ method: "POST",
138
+ headers,
139
+ path: resolvedPath,
140
+ body,
141
+ });
142
+ };
143
+ exports.serializeAws_restJson1ListTagsForResourceCommand = serializeAws_restJson1ListTagsForResourceCommand;
123
144
  const serializeAws_restJson1StartChangeSetCommand = async (input, context) => {
124
145
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
125
146
  const headers = {
@@ -131,6 +152,7 @@ const serializeAws_restJson1StartChangeSetCommand = async (input, context) => {
131
152
  ...(input.Catalog != null && { Catalog: input.Catalog }),
132
153
  ...(input.ChangeSet != null && { ChangeSet: serializeAws_restJson1RequestedChangeList(input.ChangeSet, context) }),
133
154
  ...(input.ChangeSetName != null && { ChangeSetName: input.ChangeSetName }),
155
+ ...(input.ChangeSetTags != null && { ChangeSetTags: serializeAws_restJson1TagList(input.ChangeSetTags, context) }),
134
156
  ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
135
157
  });
136
158
  return new protocol_http_1.HttpRequest({
@@ -144,6 +166,50 @@ const serializeAws_restJson1StartChangeSetCommand = async (input, context) => {
144
166
  });
145
167
  };
146
168
  exports.serializeAws_restJson1StartChangeSetCommand = serializeAws_restJson1StartChangeSetCommand;
169
+ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
170
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
171
+ const headers = {
172
+ "content-type": "application/json",
173
+ };
174
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TagResource";
175
+ let body;
176
+ body = JSON.stringify({
177
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
178
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
179
+ });
180
+ return new protocol_http_1.HttpRequest({
181
+ protocol,
182
+ hostname,
183
+ port,
184
+ method: "POST",
185
+ headers,
186
+ path: resolvedPath,
187
+ body,
188
+ });
189
+ };
190
+ exports.serializeAws_restJson1TagResourceCommand = serializeAws_restJson1TagResourceCommand;
191
+ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
192
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
193
+ const headers = {
194
+ "content-type": "application/json",
195
+ };
196
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UntagResource";
197
+ let body;
198
+ body = JSON.stringify({
199
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
200
+ ...(input.TagKeys != null && { TagKeys: serializeAws_restJson1TagKeyList(input.TagKeys, context) }),
201
+ });
202
+ return new protocol_http_1.HttpRequest({
203
+ protocol,
204
+ hostname,
205
+ port,
206
+ method: "POST",
207
+ headers,
208
+ path: resolvedPath,
209
+ body,
210
+ });
211
+ };
212
+ exports.serializeAws_restJson1UntagResourceCommand = serializeAws_restJson1UntagResourceCommand;
147
213
  const deserializeAws_restJson1CancelChangeSetCommand = async (output, context) => {
148
214
  if (output.statusCode !== 200 && output.statusCode >= 300) {
149
215
  return deserializeAws_restJson1CancelChangeSetCommandError(output, context);
@@ -422,6 +488,55 @@ const deserializeAws_restJson1ListEntitiesCommandError = async (output, context)
422
488
  });
423
489
  }
424
490
  };
491
+ const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
492
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
493
+ return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
494
+ }
495
+ const contents = map({
496
+ $metadata: deserializeMetadata(output),
497
+ });
498
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
499
+ if (data.ResourceArn != null) {
500
+ contents.ResourceArn = (0, smithy_client_1.expectString)(data.ResourceArn);
501
+ }
502
+ if (data.Tags != null) {
503
+ contents.Tags = deserializeAws_restJson1TagList(data.Tags, context);
504
+ }
505
+ return contents;
506
+ };
507
+ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
508
+ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
509
+ const parsedOutput = {
510
+ ...output,
511
+ body: await parseErrorBody(output.body, context),
512
+ };
513
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
514
+ switch (errorCode) {
515
+ case "AccessDeniedException":
516
+ case "com.amazonaws.marketplacecatalog#AccessDeniedException":
517
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
518
+ case "InternalServiceException":
519
+ case "com.amazonaws.marketplacecatalog#InternalServiceException":
520
+ throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
521
+ case "ResourceNotFoundException":
522
+ case "com.amazonaws.marketplacecatalog#ResourceNotFoundException":
523
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
524
+ case "ThrottlingException":
525
+ case "com.amazonaws.marketplacecatalog#ThrottlingException":
526
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
527
+ case "ValidationException":
528
+ case "com.amazonaws.marketplacecatalog#ValidationException":
529
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
530
+ default:
531
+ const parsedBody = parsedOutput.body;
532
+ (0, smithy_client_1.throwDefaultError)({
533
+ output,
534
+ parsedBody,
535
+ exceptionCtor: MarketplaceCatalogServiceException_1.MarketplaceCatalogServiceException,
536
+ errorCode,
537
+ });
538
+ }
539
+ };
425
540
  const deserializeAws_restJson1StartChangeSetCommand = async (output, context) => {
426
541
  if (output.statusCode !== 200 && output.statusCode >= 300) {
427
542
  return deserializeAws_restJson1StartChangeSetCommandError(output, context);
@@ -477,6 +592,92 @@ const deserializeAws_restJson1StartChangeSetCommandError = async (output, contex
477
592
  });
478
593
  }
479
594
  };
595
+ const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
596
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
597
+ return deserializeAws_restJson1TagResourceCommandError(output, context);
598
+ }
599
+ const contents = map({
600
+ $metadata: deserializeMetadata(output),
601
+ });
602
+ await collectBody(output.body, context);
603
+ return contents;
604
+ };
605
+ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
606
+ const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
607
+ const parsedOutput = {
608
+ ...output,
609
+ body: await parseErrorBody(output.body, context),
610
+ };
611
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
612
+ switch (errorCode) {
613
+ case "AccessDeniedException":
614
+ case "com.amazonaws.marketplacecatalog#AccessDeniedException":
615
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
616
+ case "InternalServiceException":
617
+ case "com.amazonaws.marketplacecatalog#InternalServiceException":
618
+ throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
619
+ case "ResourceNotFoundException":
620
+ case "com.amazonaws.marketplacecatalog#ResourceNotFoundException":
621
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
622
+ case "ThrottlingException":
623
+ case "com.amazonaws.marketplacecatalog#ThrottlingException":
624
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
625
+ case "ValidationException":
626
+ case "com.amazonaws.marketplacecatalog#ValidationException":
627
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
628
+ default:
629
+ const parsedBody = parsedOutput.body;
630
+ (0, smithy_client_1.throwDefaultError)({
631
+ output,
632
+ parsedBody,
633
+ exceptionCtor: MarketplaceCatalogServiceException_1.MarketplaceCatalogServiceException,
634
+ errorCode,
635
+ });
636
+ }
637
+ };
638
+ const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
639
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
640
+ return deserializeAws_restJson1UntagResourceCommandError(output, context);
641
+ }
642
+ const contents = map({
643
+ $metadata: deserializeMetadata(output),
644
+ });
645
+ await collectBody(output.body, context);
646
+ return contents;
647
+ };
648
+ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
649
+ const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
650
+ const parsedOutput = {
651
+ ...output,
652
+ body: await parseErrorBody(output.body, context),
653
+ };
654
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
655
+ switch (errorCode) {
656
+ case "AccessDeniedException":
657
+ case "com.amazonaws.marketplacecatalog#AccessDeniedException":
658
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
659
+ case "InternalServiceException":
660
+ case "com.amazonaws.marketplacecatalog#InternalServiceException":
661
+ throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
662
+ case "ResourceNotFoundException":
663
+ case "com.amazonaws.marketplacecatalog#ResourceNotFoundException":
664
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
665
+ case "ThrottlingException":
666
+ case "com.amazonaws.marketplacecatalog#ThrottlingException":
667
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
668
+ case "ValidationException":
669
+ case "com.amazonaws.marketplacecatalog#ValidationException":
670
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
671
+ default:
672
+ const parsedBody = parsedOutput.body;
673
+ (0, smithy_client_1.throwDefaultError)({
674
+ output,
675
+ parsedBody,
676
+ exceptionCtor: MarketplaceCatalogServiceException_1.MarketplaceCatalogServiceException,
677
+ errorCode,
678
+ });
679
+ }
680
+ };
480
681
  const map = smithy_client_1.map;
481
682
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
482
683
  const contents = map({});
@@ -580,6 +781,7 @@ const serializeAws_restJson1Change = (input, context) => {
580
781
  ...(input.ChangeType != null && { ChangeType: input.ChangeType }),
581
782
  ...(input.Details != null && { Details: input.Details }),
582
783
  ...(input.Entity != null && { Entity: serializeAws_restJson1Entity(input.Entity, context) }),
784
+ ...(input.EntityTags != null && { EntityTags: serializeAws_restJson1TagList(input.EntityTags, context) }),
583
785
  };
584
786
  };
585
787
  const serializeAws_restJson1Entity = (input, context) => {
@@ -614,6 +816,26 @@ const serializeAws_restJson1Sort = (input, context) => {
614
816
  ...(input.SortOrder != null && { SortOrder: input.SortOrder }),
615
817
  };
616
818
  };
819
+ const serializeAws_restJson1Tag = (input, context) => {
820
+ return {
821
+ ...(input.Key != null && { Key: input.Key }),
822
+ ...(input.Value != null && { Value: input.Value }),
823
+ };
824
+ };
825
+ const serializeAws_restJson1TagKeyList = (input, context) => {
826
+ return input
827
+ .filter((e) => e != null)
828
+ .map((entry) => {
829
+ return entry;
830
+ });
831
+ };
832
+ const serializeAws_restJson1TagList = (input, context) => {
833
+ return input
834
+ .filter((e) => e != null)
835
+ .map((entry) => {
836
+ return serializeAws_restJson1Tag(entry, context);
837
+ });
838
+ };
617
839
  const serializeAws_restJson1ValueList = (input, context) => {
618
840
  return input
619
841
  .filter((e) => e != null)
@@ -721,6 +943,23 @@ const deserializeAws_restJson1ResourceIdList = (output, context) => {
721
943
  });
722
944
  return retVal;
723
945
  };
946
+ const deserializeAws_restJson1Tag = (output, context) => {
947
+ return {
948
+ Key: (0, smithy_client_1.expectString)(output.Key),
949
+ Value: (0, smithy_client_1.expectString)(output.Value),
950
+ };
951
+ };
952
+ const deserializeAws_restJson1TagList = (output, context) => {
953
+ const retVal = (output || [])
954
+ .filter((e) => e != null)
955
+ .map((entry) => {
956
+ if (entry === null) {
957
+ return null;
958
+ }
959
+ return deserializeAws_restJson1Tag(entry, context);
960
+ });
961
+ return retVal;
962
+ };
724
963
  const deserializeMetadata = (output) => ({
725
964
  httpStatusCode: output.statusCode,
726
965
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
4
5
  const url_parser_1 = require("@aws-sdk/url-parser");
5
6
  const util_base64_1 = require("@aws-sdk/util-base64");
6
7
  const endpointResolver_1 = require("./endpoint/endpointResolver");
@@ -10,7 +11,7 @@ const getRuntimeConfig = (config) => ({
10
11
  base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
11
12
  disableHostPrefix: config?.disableHostPrefix ?? false,
12
13
  endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
13
- logger: config?.logger ?? {},
14
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
14
15
  serviceId: config?.serviceId ?? "Marketplace Catalog",
15
16
  urlParser: config?.urlParser ?? url_parser_1.parseUrl,
16
17
  });
@@ -3,7 +3,10 @@ import { DescribeChangeSetCommand, } from "./commands/DescribeChangeSetCommand";
3
3
  import { DescribeEntityCommand, } from "./commands/DescribeEntityCommand";
4
4
  import { ListChangeSetsCommand, } from "./commands/ListChangeSetsCommand";
5
5
  import { ListEntitiesCommand, } from "./commands/ListEntitiesCommand";
6
+ import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
6
7
  import { StartChangeSetCommand, } from "./commands/StartChangeSetCommand";
8
+ import { TagResourceCommand } from "./commands/TagResourceCommand";
9
+ import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
7
10
  import { MarketplaceCatalogClient } from "./MarketplaceCatalogClient";
8
11
  export class MarketplaceCatalog extends MarketplaceCatalogClient {
9
12
  cancelChangeSet(args, optionsOrCb, cb) {
@@ -76,6 +79,20 @@ export class MarketplaceCatalog extends MarketplaceCatalogClient {
76
79
  return this.send(command, optionsOrCb);
77
80
  }
78
81
  }
82
+ listTagsForResource(args, optionsOrCb, cb) {
83
+ const command = new ListTagsForResourceCommand(args);
84
+ if (typeof optionsOrCb === "function") {
85
+ this.send(command, optionsOrCb);
86
+ }
87
+ else if (typeof cb === "function") {
88
+ if (typeof optionsOrCb !== "object")
89
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
90
+ this.send(command, optionsOrCb || {}, cb);
91
+ }
92
+ else {
93
+ return this.send(command, optionsOrCb);
94
+ }
95
+ }
79
96
  startChangeSet(args, optionsOrCb, cb) {
80
97
  const command = new StartChangeSetCommand(args);
81
98
  if (typeof optionsOrCb === "function") {
@@ -90,4 +107,32 @@ export class MarketplaceCatalog extends MarketplaceCatalogClient {
90
107
  return this.send(command, optionsOrCb);
91
108
  }
92
109
  }
110
+ tagResource(args, optionsOrCb, cb) {
111
+ const command = new TagResourceCommand(args);
112
+ if (typeof optionsOrCb === "function") {
113
+ this.send(command, optionsOrCb);
114
+ }
115
+ else if (typeof cb === "function") {
116
+ if (typeof optionsOrCb !== "object")
117
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
118
+ this.send(command, optionsOrCb || {}, cb);
119
+ }
120
+ else {
121
+ return this.send(command, optionsOrCb);
122
+ }
123
+ }
124
+ untagResource(args, optionsOrCb, cb) {
125
+ const command = new UntagResourceCommand(args);
126
+ if (typeof optionsOrCb === "function") {
127
+ this.send(command, optionsOrCb);
128
+ }
129
+ else if (typeof cb === "function") {
130
+ if (typeof optionsOrCb !== "object")
131
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
132
+ this.send(command, optionsOrCb || {}, cb);
133
+ }
134
+ else {
135
+ return this.send(command, optionsOrCb);
136
+ }
137
+ }
93
138
  }