@aws-sdk/client-marketplace-catalog 3.309.0 → 3.312.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 (43) hide show
  1. package/README.md +24 -0
  2. package/dist-cjs/MarketplaceCatalog.js +45 -0
  3. package/dist-cjs/commands/DeleteResourcePolicyCommand.js +45 -0
  4. package/dist-cjs/commands/GetResourcePolicyCommand.js +45 -0
  5. package/dist-cjs/commands/PutResourcePolicyCommand.js +45 -0
  6. package/dist-cjs/commands/index.js +3 -0
  7. package/dist-cjs/endpoint/ruleset.js +3 -3
  8. package/dist-cjs/models/models_0.js +5 -1
  9. package/dist-cjs/protocols/Aws_restJson1.js +196 -1
  10. package/dist-es/MarketplaceCatalog.js +45 -0
  11. package/dist-es/commands/DeleteResourcePolicyCommand.js +41 -0
  12. package/dist-es/commands/GetResourcePolicyCommand.js +41 -0
  13. package/dist-es/commands/PutResourcePolicyCommand.js +41 -0
  14. package/dist-es/commands/index.js +3 -0
  15. package/dist-es/endpoint/ruleset.js +3 -3
  16. package/dist-es/models/models_0.js +4 -0
  17. package/dist-es/protocols/Aws_restJson1.js +189 -0
  18. package/dist-types/MarketplaceCatalog.d.ts +33 -4
  19. package/dist-types/MarketplaceCatalogClient.d.ts +6 -3
  20. package/dist-types/commands/CancelChangeSetCommand.d.ts +5 -0
  21. package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +84 -0
  22. package/dist-types/commands/DescribeChangeSetCommand.d.ts +5 -0
  23. package/dist-types/commands/DescribeEntityCommand.d.ts +5 -0
  24. package/dist-types/commands/GetResourcePolicyCommand.d.ts +84 -0
  25. package/dist-types/commands/ListChangeSetsCommand.d.ts +5 -1
  26. package/dist-types/commands/ListEntitiesCommand.d.ts +6 -0
  27. package/dist-types/commands/ListTagsForResourceCommand.d.ts +5 -0
  28. package/dist-types/commands/PutResourcePolicyCommand.d.ts +85 -0
  29. package/dist-types/commands/StartChangeSetCommand.d.ts +9 -2
  30. package/dist-types/commands/TagResourceCommand.d.ts +5 -0
  31. package/dist-types/commands/UntagResourceCommand.d.ts +5 -0
  32. package/dist-types/commands/index.d.ts +3 -0
  33. package/dist-types/models/models_0.d.ts +88 -13
  34. package/dist-types/protocols/Aws_restJson1.d.ts +27 -0
  35. package/dist-types/ts3.4/MarketplaceCatalog.d.ts +51 -0
  36. package/dist-types/ts3.4/MarketplaceCatalogClient.d.ts +18 -0
  37. package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +41 -0
  38. package/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts +38 -0
  39. package/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +38 -0
  40. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  41. package/dist-types/ts3.4/models/models_0.d.ts +21 -0
  42. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
  43. package/package.json +35 -35
package/README.md CHANGED
@@ -218,6 +218,14 @@ CancelChangeSet
218
218
 
219
219
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/classes/cancelchangesetcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/interfaces/cancelchangesetcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/interfaces/cancelchangesetcommandoutput.html)
220
220
 
221
+ </details>
222
+ <details>
223
+ <summary>
224
+ DeleteResourcePolicy
225
+ </summary>
226
+
227
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/classes/deleteresourcepolicycommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/interfaces/deleteresourcepolicycommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/interfaces/deleteresourcepolicycommandoutput.html)
228
+
221
229
  </details>
222
230
  <details>
223
231
  <summary>
@@ -234,6 +242,14 @@ DescribeEntity
234
242
 
235
243
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/classes/describeentitycommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/interfaces/describeentitycommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/interfaces/describeentitycommandoutput.html)
236
244
 
245
+ </details>
246
+ <details>
247
+ <summary>
248
+ GetResourcePolicy
249
+ </summary>
250
+
251
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/classes/getresourcepolicycommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/interfaces/getresourcepolicycommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/interfaces/getresourcepolicycommandoutput.html)
252
+
237
253
  </details>
238
254
  <details>
239
255
  <summary>
@@ -258,6 +274,14 @@ ListTagsForResource
258
274
 
259
275
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/classes/listtagsforresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/interfaces/listtagsforresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/interfaces/listtagsforresourcecommandoutput.html)
260
276
 
277
+ </details>
278
+ <details>
279
+ <summary>
280
+ PutResourcePolicy
281
+ </summary>
282
+
283
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/classes/putresourcepolicycommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/interfaces/putresourcepolicycommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-marketplace-catalog/interfaces/putresourcepolicycommandoutput.html)
284
+
261
285
  </details>
262
286
  <details>
263
287
  <summary>
@@ -2,11 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MarketplaceCatalog = void 0;
4
4
  const CancelChangeSetCommand_1 = require("./commands/CancelChangeSetCommand");
5
+ const DeleteResourcePolicyCommand_1 = require("./commands/DeleteResourcePolicyCommand");
5
6
  const DescribeChangeSetCommand_1 = require("./commands/DescribeChangeSetCommand");
6
7
  const DescribeEntityCommand_1 = require("./commands/DescribeEntityCommand");
8
+ const GetResourcePolicyCommand_1 = require("./commands/GetResourcePolicyCommand");
7
9
  const ListChangeSetsCommand_1 = require("./commands/ListChangeSetsCommand");
8
10
  const ListEntitiesCommand_1 = require("./commands/ListEntitiesCommand");
9
11
  const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceCommand");
12
+ const PutResourcePolicyCommand_1 = require("./commands/PutResourcePolicyCommand");
10
13
  const StartChangeSetCommand_1 = require("./commands/StartChangeSetCommand");
11
14
  const TagResourceCommand_1 = require("./commands/TagResourceCommand");
12
15
  const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
@@ -26,6 +29,20 @@ class MarketplaceCatalog extends MarketplaceCatalogClient_1.MarketplaceCatalogCl
26
29
  return this.send(command, optionsOrCb);
27
30
  }
28
31
  }
32
+ deleteResourcePolicy(args, optionsOrCb, cb) {
33
+ const command = new DeleteResourcePolicyCommand_1.DeleteResourcePolicyCommand(args);
34
+ if (typeof optionsOrCb === "function") {
35
+ this.send(command, optionsOrCb);
36
+ }
37
+ else if (typeof cb === "function") {
38
+ if (typeof optionsOrCb !== "object")
39
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
40
+ this.send(command, optionsOrCb || {}, cb);
41
+ }
42
+ else {
43
+ return this.send(command, optionsOrCb);
44
+ }
45
+ }
29
46
  describeChangeSet(args, optionsOrCb, cb) {
30
47
  const command = new DescribeChangeSetCommand_1.DescribeChangeSetCommand(args);
31
48
  if (typeof optionsOrCb === "function") {
@@ -54,6 +71,20 @@ class MarketplaceCatalog extends MarketplaceCatalogClient_1.MarketplaceCatalogCl
54
71
  return this.send(command, optionsOrCb);
55
72
  }
56
73
  }
74
+ getResourcePolicy(args, optionsOrCb, cb) {
75
+ const command = new GetResourcePolicyCommand_1.GetResourcePolicyCommand(args);
76
+ if (typeof optionsOrCb === "function") {
77
+ this.send(command, optionsOrCb);
78
+ }
79
+ else if (typeof cb === "function") {
80
+ if (typeof optionsOrCb !== "object")
81
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
82
+ this.send(command, optionsOrCb || {}, cb);
83
+ }
84
+ else {
85
+ return this.send(command, optionsOrCb);
86
+ }
87
+ }
57
88
  listChangeSets(args, optionsOrCb, cb) {
58
89
  const command = new ListChangeSetsCommand_1.ListChangeSetsCommand(args);
59
90
  if (typeof optionsOrCb === "function") {
@@ -96,6 +127,20 @@ class MarketplaceCatalog extends MarketplaceCatalogClient_1.MarketplaceCatalogCl
96
127
  return this.send(command, optionsOrCb);
97
128
  }
98
129
  }
130
+ putResourcePolicy(args, optionsOrCb, cb) {
131
+ const command = new PutResourcePolicyCommand_1.PutResourcePolicyCommand(args);
132
+ if (typeof optionsOrCb === "function") {
133
+ this.send(command, optionsOrCb);
134
+ }
135
+ else if (typeof cb === "function") {
136
+ if (typeof optionsOrCb !== "object")
137
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
138
+ this.send(command, optionsOrCb || {}, cb);
139
+ }
140
+ else {
141
+ return this.send(command, optionsOrCb);
142
+ }
143
+ }
99
144
  startChangeSet(args, optionsOrCb, cb) {
100
145
  const command = new StartChangeSetCommand_1.StartChangeSetCommand(args);
101
146
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteResourcePolicyCommand = 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 Aws_restJson1_1 = require("../protocols/Aws_restJson1");
8
+ class DeleteResourcePolicyCommand extends smithy_client_1.Command {
9
+ static getEndpointParameterInstructions() {
10
+ return {
11
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
+ Endpoint: { type: "builtInParams", name: "endpoint" },
13
+ Region: { type: "builtInParams", name: "region" },
14
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
+ };
16
+ }
17
+ constructor(input) {
18
+ super();
19
+ this.input = input;
20
+ }
21
+ resolveMiddleware(clientStack, configuration, options) {
22
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
23
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteResourcePolicyCommand.getEndpointParameterInstructions()));
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const { logger } = configuration;
26
+ const clientName = "MarketplaceCatalogClient";
27
+ const commandName = "DeleteResourcePolicyCommand";
28
+ const handlerExecutionContext = {
29
+ logger,
30
+ clientName,
31
+ commandName,
32
+ inputFilterSensitiveLog: (_) => _,
33
+ outputFilterSensitiveLog: (_) => _,
34
+ };
35
+ const { requestHandler } = configuration;
36
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
37
+ }
38
+ serialize(input, context) {
39
+ return (0, Aws_restJson1_1.se_DeleteResourcePolicyCommand)(input, context);
40
+ }
41
+ deserialize(output, context) {
42
+ return (0, Aws_restJson1_1.de_DeleteResourcePolicyCommand)(output, context);
43
+ }
44
+ }
45
+ exports.DeleteResourcePolicyCommand = DeleteResourcePolicyCommand;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetResourcePolicyCommand = 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 Aws_restJson1_1 = require("../protocols/Aws_restJson1");
8
+ class GetResourcePolicyCommand extends smithy_client_1.Command {
9
+ static getEndpointParameterInstructions() {
10
+ return {
11
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
+ Endpoint: { type: "builtInParams", name: "endpoint" },
13
+ Region: { type: "builtInParams", name: "region" },
14
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
+ };
16
+ }
17
+ constructor(input) {
18
+ super();
19
+ this.input = input;
20
+ }
21
+ resolveMiddleware(clientStack, configuration, options) {
22
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
23
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetResourcePolicyCommand.getEndpointParameterInstructions()));
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const { logger } = configuration;
26
+ const clientName = "MarketplaceCatalogClient";
27
+ const commandName = "GetResourcePolicyCommand";
28
+ const handlerExecutionContext = {
29
+ logger,
30
+ clientName,
31
+ commandName,
32
+ inputFilterSensitiveLog: (_) => _,
33
+ outputFilterSensitiveLog: (_) => _,
34
+ };
35
+ const { requestHandler } = configuration;
36
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
37
+ }
38
+ serialize(input, context) {
39
+ return (0, Aws_restJson1_1.se_GetResourcePolicyCommand)(input, context);
40
+ }
41
+ deserialize(output, context) {
42
+ return (0, Aws_restJson1_1.de_GetResourcePolicyCommand)(output, context);
43
+ }
44
+ }
45
+ exports.GetResourcePolicyCommand = GetResourcePolicyCommand;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PutResourcePolicyCommand = 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 Aws_restJson1_1 = require("../protocols/Aws_restJson1");
8
+ class PutResourcePolicyCommand extends smithy_client_1.Command {
9
+ static getEndpointParameterInstructions() {
10
+ return {
11
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
+ Endpoint: { type: "builtInParams", name: "endpoint" },
13
+ Region: { type: "builtInParams", name: "region" },
14
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
+ };
16
+ }
17
+ constructor(input) {
18
+ super();
19
+ this.input = input;
20
+ }
21
+ resolveMiddleware(clientStack, configuration, options) {
22
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
23
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutResourcePolicyCommand.getEndpointParameterInstructions()));
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const { logger } = configuration;
26
+ const clientName = "MarketplaceCatalogClient";
27
+ const commandName = "PutResourcePolicyCommand";
28
+ const handlerExecutionContext = {
29
+ logger,
30
+ clientName,
31
+ commandName,
32
+ inputFilterSensitiveLog: (_) => _,
33
+ outputFilterSensitiveLog: (_) => _,
34
+ };
35
+ const { requestHandler } = configuration;
36
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
37
+ }
38
+ serialize(input, context) {
39
+ return (0, Aws_restJson1_1.se_PutResourcePolicyCommand)(input, context);
40
+ }
41
+ deserialize(output, context) {
42
+ return (0, Aws_restJson1_1.de_PutResourcePolicyCommand)(output, context);
43
+ }
44
+ }
45
+ exports.PutResourcePolicyCommand = PutResourcePolicyCommand;
@@ -2,11 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./CancelChangeSetCommand"), exports);
5
+ tslib_1.__exportStar(require("./DeleteResourcePolicyCommand"), exports);
5
6
  tslib_1.__exportStar(require("./DescribeChangeSetCommand"), exports);
6
7
  tslib_1.__exportStar(require("./DescribeEntityCommand"), exports);
8
+ tslib_1.__exportStar(require("./GetResourcePolicyCommand"), exports);
7
9
  tslib_1.__exportStar(require("./ListChangeSetsCommand"), exports);
8
10
  tslib_1.__exportStar(require("./ListEntitiesCommand"), exports);
9
11
  tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
12
+ tslib_1.__exportStar(require("./PutResourcePolicyCommand"), exports);
10
13
  tslib_1.__exportStar(require("./StartChangeSetCommand"), exports);
11
14
  tslib_1.__exportStar(require("./TagResourceCommand"), exports);
12
15
  tslib_1.__exportStar(require("./UntagResourceCommand"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
- const p = "required", q = "fn", r = "argv", s = "ref";
5
- const a = "PartitionResult", b = "tree", c = "error", d = "endpoint", e = { [p]: false, "type": "String" }, f = { [p]: true, "default": false, "type": "Boolean" }, g = { [s]: "Endpoint" }, h = { [q]: "booleanEquals", [r]: [{ [s]: "UseFIPS" }, true] }, i = { [q]: "booleanEquals", [r]: [{ [s]: "UseDualStack" }, true] }, j = {}, k = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsFIPS"] }] }, l = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsDualStack"] }] }, m = [g], n = [h], o = [i];
6
- const _data = { version: "1.0", parameters: { Region: e, UseDualStack: f, UseFIPS: f, Endpoint: e }, rules: [{ conditions: [{ [q]: "aws.partition", [r]: [{ [s]: "Region" }], assign: a }], type: b, rules: [{ conditions: [{ [q]: "isSet", [r]: m }, { [q]: "parseURL", [r]: m, assign: "url" }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: g, properties: j, headers: j }, type: d }] }] }, { conditions: [h, i], type: b, rules: [{ conditions: [k, l], type: b, rules: [{ endpoint: { url: "https://catalog.marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [k], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://catalog.marketplace-fips.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [l], type: b, rules: [{ endpoint: { url: "https://catalog.marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://catalog.marketplace.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] };
4
+ const q = "required", r = "fn", s = "argv", t = "ref";
5
+ const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
6
+ const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://catalog.marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://catalog.marketplace-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://catalog.marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://catalog.marketplace.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
7
7
  exports.ruleSet = _data;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.ServiceQuotaExceededException = exports.OwnershipType = 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) {
@@ -115,6 +115,10 @@ exports.SortOrder = {
115
115
  ASCENDING: "ASCENDING",
116
116
  DESCENDING: "DESCENDING",
117
117
  };
118
+ exports.OwnershipType = {
119
+ SELF: "SELF",
120
+ SHARED: "SHARED",
121
+ };
118
122
  class ServiceQuotaExceededException extends MarketplaceCatalogServiceException_1.MarketplaceCatalogServiceException {
119
123
  constructor(opts) {
120
124
  super({
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartChangeSetCommand = exports.de_ListTagsForResourceCommand = exports.de_ListEntitiesCommand = exports.de_ListChangeSetsCommand = exports.de_DescribeEntityCommand = exports.de_DescribeChangeSetCommand = exports.de_CancelChangeSetCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartChangeSetCommand = exports.se_ListTagsForResourceCommand = exports.se_ListEntitiesCommand = exports.se_ListChangeSetsCommand = exports.se_DescribeEntityCommand = exports.se_DescribeChangeSetCommand = exports.se_CancelChangeSetCommand = void 0;
3
+ exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartChangeSetCommand = exports.de_PutResourcePolicyCommand = exports.de_ListTagsForResourceCommand = exports.de_ListEntitiesCommand = exports.de_ListChangeSetsCommand = exports.de_GetResourcePolicyCommand = exports.de_DescribeEntityCommand = exports.de_DescribeChangeSetCommand = exports.de_DeleteResourcePolicyCommand = exports.de_CancelChangeSetCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartChangeSetCommand = exports.se_PutResourcePolicyCommand = exports.se_ListTagsForResourceCommand = exports.se_ListEntitiesCommand = exports.se_ListChangeSetsCommand = exports.se_GetResourcePolicyCommand = exports.se_DescribeEntityCommand = exports.se_DescribeChangeSetCommand = exports.se_DeleteResourcePolicyCommand = exports.se_CancelChangeSetCommand = 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");
@@ -27,6 +27,26 @@ const se_CancelChangeSetCommand = async (input, context) => {
27
27
  });
28
28
  };
29
29
  exports.se_CancelChangeSetCommand = se_CancelChangeSetCommand;
30
+ const se_DeleteResourcePolicyCommand = async (input, context) => {
31
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
32
+ const headers = {};
33
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteResourcePolicy";
34
+ const query = map({
35
+ resourceArn: [, (0, smithy_client_1.expectNonNull)(input.ResourceArn, `ResourceArn`)],
36
+ });
37
+ let body;
38
+ return new protocol_http_1.HttpRequest({
39
+ protocol,
40
+ hostname,
41
+ port,
42
+ method: "DELETE",
43
+ headers,
44
+ path: resolvedPath,
45
+ query,
46
+ body,
47
+ });
48
+ };
49
+ exports.se_DeleteResourcePolicyCommand = se_DeleteResourcePolicyCommand;
30
50
  const se_DescribeChangeSetCommand = async (input, context) => {
31
51
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
32
52
  const headers = {};
@@ -69,6 +89,26 @@ const se_DescribeEntityCommand = async (input, context) => {
69
89
  });
70
90
  };
71
91
  exports.se_DescribeEntityCommand = se_DescribeEntityCommand;
92
+ const se_GetResourcePolicyCommand = async (input, context) => {
93
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
94
+ const headers = {};
95
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetResourcePolicy";
96
+ const query = map({
97
+ resourceArn: [, (0, smithy_client_1.expectNonNull)(input.ResourceArn, `ResourceArn`)],
98
+ });
99
+ let body;
100
+ return new protocol_http_1.HttpRequest({
101
+ protocol,
102
+ hostname,
103
+ port,
104
+ method: "GET",
105
+ headers,
106
+ path: resolvedPath,
107
+ query,
108
+ body,
109
+ });
110
+ };
111
+ exports.se_GetResourcePolicyCommand = se_GetResourcePolicyCommand;
72
112
  const se_ListChangeSetsCommand = async (input, context) => {
73
113
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
74
114
  const headers = {
@@ -107,6 +147,7 @@ const se_ListEntitiesCommand = async (input, context) => {
107
147
  ...(input.FilterList != null && { FilterList: se_FilterList(input.FilterList, context) }),
108
148
  ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
109
149
  ...(input.NextToken != null && { NextToken: input.NextToken }),
150
+ ...(input.OwnershipType != null && { OwnershipType: input.OwnershipType }),
110
151
  ...(input.Sort != null && { Sort: se_Sort(input.Sort, context) }),
111
152
  });
112
153
  return new protocol_http_1.HttpRequest({
@@ -141,6 +182,28 @@ const se_ListTagsForResourceCommand = async (input, context) => {
141
182
  });
142
183
  };
143
184
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
185
+ const se_PutResourcePolicyCommand = async (input, context) => {
186
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
187
+ const headers = {
188
+ "content-type": "application/json",
189
+ };
190
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutResourcePolicy";
191
+ let body;
192
+ body = JSON.stringify({
193
+ ...(input.Policy != null && { Policy: input.Policy }),
194
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
195
+ });
196
+ return new protocol_http_1.HttpRequest({
197
+ protocol,
198
+ hostname,
199
+ port,
200
+ method: "POST",
201
+ headers,
202
+ path: resolvedPath,
203
+ body,
204
+ });
205
+ };
206
+ exports.se_PutResourcePolicyCommand = se_PutResourcePolicyCommand;
144
207
  const se_StartChangeSetCommand = async (input, context) => {
145
208
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
146
209
  const headers = {
@@ -262,6 +325,49 @@ const de_CancelChangeSetCommandError = async (output, context) => {
262
325
  });
263
326
  }
264
327
  };
328
+ const de_DeleteResourcePolicyCommand = async (output, context) => {
329
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
330
+ return de_DeleteResourcePolicyCommandError(output, context);
331
+ }
332
+ const contents = map({
333
+ $metadata: deserializeMetadata(output),
334
+ });
335
+ await collectBody(output.body, context);
336
+ return contents;
337
+ };
338
+ exports.de_DeleteResourcePolicyCommand = de_DeleteResourcePolicyCommand;
339
+ const de_DeleteResourcePolicyCommandError = async (output, context) => {
340
+ const parsedOutput = {
341
+ ...output,
342
+ body: await parseErrorBody(output.body, context),
343
+ };
344
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
345
+ switch (errorCode) {
346
+ case "AccessDeniedException":
347
+ case "com.amazonaws.marketplacecatalog#AccessDeniedException":
348
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
349
+ case "InternalServiceException":
350
+ case "com.amazonaws.marketplacecatalog#InternalServiceException":
351
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
352
+ case "ResourceNotFoundException":
353
+ case "com.amazonaws.marketplacecatalog#ResourceNotFoundException":
354
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
355
+ case "ThrottlingException":
356
+ case "com.amazonaws.marketplacecatalog#ThrottlingException":
357
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
358
+ case "ValidationException":
359
+ case "com.amazonaws.marketplacecatalog#ValidationException":
360
+ throw await de_ValidationExceptionRes(parsedOutput, context);
361
+ default:
362
+ const parsedBody = parsedOutput.body;
363
+ (0, smithy_client_1.throwDefaultError)({
364
+ output,
365
+ parsedBody,
366
+ exceptionCtor: MarketplaceCatalogServiceException_1.MarketplaceCatalogServiceException,
367
+ errorCode,
368
+ });
369
+ }
370
+ };
265
371
  const de_DescribeChangeSetCommand = async (output, context) => {
266
372
  if (output.statusCode !== 200 && output.statusCode >= 300) {
267
373
  return de_DescribeChangeSetCommandError(output, context);
@@ -393,6 +499,52 @@ const de_DescribeEntityCommandError = async (output, context) => {
393
499
  });
394
500
  }
395
501
  };
502
+ const de_GetResourcePolicyCommand = async (output, context) => {
503
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
504
+ return de_GetResourcePolicyCommandError(output, context);
505
+ }
506
+ const contents = map({
507
+ $metadata: deserializeMetadata(output),
508
+ });
509
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
510
+ if (data.Policy != null) {
511
+ contents.Policy = (0, smithy_client_1.expectString)(data.Policy);
512
+ }
513
+ return contents;
514
+ };
515
+ exports.de_GetResourcePolicyCommand = de_GetResourcePolicyCommand;
516
+ const de_GetResourcePolicyCommandError = async (output, context) => {
517
+ const parsedOutput = {
518
+ ...output,
519
+ body: await parseErrorBody(output.body, context),
520
+ };
521
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
522
+ switch (errorCode) {
523
+ case "AccessDeniedException":
524
+ case "com.amazonaws.marketplacecatalog#AccessDeniedException":
525
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
526
+ case "InternalServiceException":
527
+ case "com.amazonaws.marketplacecatalog#InternalServiceException":
528
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
529
+ case "ResourceNotFoundException":
530
+ case "com.amazonaws.marketplacecatalog#ResourceNotFoundException":
531
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
532
+ case "ThrottlingException":
533
+ case "com.amazonaws.marketplacecatalog#ThrottlingException":
534
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
535
+ case "ValidationException":
536
+ case "com.amazonaws.marketplacecatalog#ValidationException":
537
+ throw await de_ValidationExceptionRes(parsedOutput, context);
538
+ default:
539
+ const parsedBody = parsedOutput.body;
540
+ (0, smithy_client_1.throwDefaultError)({
541
+ output,
542
+ parsedBody,
543
+ exceptionCtor: MarketplaceCatalogServiceException_1.MarketplaceCatalogServiceException,
544
+ errorCode,
545
+ });
546
+ }
547
+ };
396
548
  const de_ListChangeSetsCommand = async (output, context) => {
397
549
  if (output.statusCode !== 200 && output.statusCode >= 300) {
398
550
  return de_ListChangeSetsCommandError(output, context);
@@ -537,6 +689,49 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
537
689
  });
538
690
  }
539
691
  };
692
+ const de_PutResourcePolicyCommand = async (output, context) => {
693
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
694
+ return de_PutResourcePolicyCommandError(output, context);
695
+ }
696
+ const contents = map({
697
+ $metadata: deserializeMetadata(output),
698
+ });
699
+ await collectBody(output.body, context);
700
+ return contents;
701
+ };
702
+ exports.de_PutResourcePolicyCommand = de_PutResourcePolicyCommand;
703
+ const de_PutResourcePolicyCommandError = async (output, context) => {
704
+ const parsedOutput = {
705
+ ...output,
706
+ body: await parseErrorBody(output.body, context),
707
+ };
708
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
709
+ switch (errorCode) {
710
+ case "AccessDeniedException":
711
+ case "com.amazonaws.marketplacecatalog#AccessDeniedException":
712
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
713
+ case "InternalServiceException":
714
+ case "com.amazonaws.marketplacecatalog#InternalServiceException":
715
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
716
+ case "ResourceNotFoundException":
717
+ case "com.amazonaws.marketplacecatalog#ResourceNotFoundException":
718
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
719
+ case "ThrottlingException":
720
+ case "com.amazonaws.marketplacecatalog#ThrottlingException":
721
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
722
+ case "ValidationException":
723
+ case "com.amazonaws.marketplacecatalog#ValidationException":
724
+ throw await de_ValidationExceptionRes(parsedOutput, context);
725
+ default:
726
+ const parsedBody = parsedOutput.body;
727
+ (0, smithy_client_1.throwDefaultError)({
728
+ output,
729
+ parsedBody,
730
+ exceptionCtor: MarketplaceCatalogServiceException_1.MarketplaceCatalogServiceException,
731
+ errorCode,
732
+ });
733
+ }
734
+ };
540
735
  const de_StartChangeSetCommand = async (output, context) => {
541
736
  if (output.statusCode !== 200 && output.statusCode >= 300) {
542
737
  return de_StartChangeSetCommandError(output, context);
@@ -1,9 +1,12 @@
1
1
  import { CancelChangeSetCommand, } from "./commands/CancelChangeSetCommand";
2
+ import { DeleteResourcePolicyCommand, } from "./commands/DeleteResourcePolicyCommand";
2
3
  import { DescribeChangeSetCommand, } from "./commands/DescribeChangeSetCommand";
3
4
  import { DescribeEntityCommand, } from "./commands/DescribeEntityCommand";
5
+ import { GetResourcePolicyCommand, } from "./commands/GetResourcePolicyCommand";
4
6
  import { ListChangeSetsCommand, } from "./commands/ListChangeSetsCommand";
5
7
  import { ListEntitiesCommand, } from "./commands/ListEntitiesCommand";
6
8
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
9
+ import { PutResourcePolicyCommand, } from "./commands/PutResourcePolicyCommand";
7
10
  import { StartChangeSetCommand, } from "./commands/StartChangeSetCommand";
8
11
  import { TagResourceCommand } from "./commands/TagResourceCommand";
9
12
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
@@ -23,6 +26,20 @@ export class MarketplaceCatalog extends MarketplaceCatalogClient {
23
26
  return this.send(command, optionsOrCb);
24
27
  }
25
28
  }
29
+ deleteResourcePolicy(args, optionsOrCb, cb) {
30
+ const command = new DeleteResourcePolicyCommand(args);
31
+ if (typeof optionsOrCb === "function") {
32
+ this.send(command, optionsOrCb);
33
+ }
34
+ else if (typeof cb === "function") {
35
+ if (typeof optionsOrCb !== "object")
36
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
37
+ this.send(command, optionsOrCb || {}, cb);
38
+ }
39
+ else {
40
+ return this.send(command, optionsOrCb);
41
+ }
42
+ }
26
43
  describeChangeSet(args, optionsOrCb, cb) {
27
44
  const command = new DescribeChangeSetCommand(args);
28
45
  if (typeof optionsOrCb === "function") {
@@ -51,6 +68,20 @@ export class MarketplaceCatalog extends MarketplaceCatalogClient {
51
68
  return this.send(command, optionsOrCb);
52
69
  }
53
70
  }
71
+ getResourcePolicy(args, optionsOrCb, cb) {
72
+ const command = new GetResourcePolicyCommand(args);
73
+ if (typeof optionsOrCb === "function") {
74
+ this.send(command, optionsOrCb);
75
+ }
76
+ else if (typeof cb === "function") {
77
+ if (typeof optionsOrCb !== "object")
78
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
79
+ this.send(command, optionsOrCb || {}, cb);
80
+ }
81
+ else {
82
+ return this.send(command, optionsOrCb);
83
+ }
84
+ }
54
85
  listChangeSets(args, optionsOrCb, cb) {
55
86
  const command = new ListChangeSetsCommand(args);
56
87
  if (typeof optionsOrCb === "function") {
@@ -93,6 +124,20 @@ export class MarketplaceCatalog extends MarketplaceCatalogClient {
93
124
  return this.send(command, optionsOrCb);
94
125
  }
95
126
  }
127
+ putResourcePolicy(args, optionsOrCb, cb) {
128
+ const command = new PutResourcePolicyCommand(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
  startChangeSet(args, optionsOrCb, cb) {
97
142
  const command = new StartChangeSetCommand(args);
98
143
  if (typeof optionsOrCb === "function") {