@aws-sdk/client-outposts 3.81.0 → 3.82.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 (41) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/Outposts.js +15 -0
  3. package/dist-cjs/commands/ListAssetsCommand.js +36 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/models/models_0.js +30 -2
  6. package/dist-cjs/pagination/GetOutpostInstanceTypesPaginator.js +36 -0
  7. package/dist-cjs/pagination/ListAssetsPaginator.js +36 -0
  8. package/dist-cjs/pagination/index.js +2 -0
  9. package/dist-cjs/protocols/Aws_restJson1.js +111 -1
  10. package/dist-es/Outposts.js +15 -0
  11. package/dist-es/commands/ListAssetsCommand.js +39 -0
  12. package/dist-es/commands/index.js +1 -0
  13. package/dist-es/models/models_0.js +20 -0
  14. package/dist-es/pagination/GetOutpostInstanceTypesPaginator.js +75 -0
  15. package/dist-es/pagination/ListAssetsPaginator.js +75 -0
  16. package/dist-es/pagination/index.js +2 -0
  17. package/dist-es/protocols/Aws_restJson1.js +133 -0
  18. package/dist-types/Outposts.d.ts +16 -5
  19. package/dist-types/OutpostsClient.d.ts +3 -2
  20. package/dist-types/commands/GetOutpostInstanceTypesCommand.d.ts +1 -1
  21. package/dist-types/commands/ListAssetsCommand.d.ts +39 -0
  22. package/dist-types/commands/ListCatalogItemsCommand.d.ts +1 -1
  23. package/dist-types/commands/ListOrdersCommand.d.ts +1 -1
  24. package/dist-types/commands/ListOutpostsCommand.d.ts +1 -1
  25. package/dist-types/commands/ListSitesCommand.d.ts +1 -1
  26. package/dist-types/commands/index.d.ts +1 -0
  27. package/dist-types/models/models_0.d.ts +108 -0
  28. package/dist-types/pagination/GetOutpostInstanceTypesPaginator.d.ts +4 -0
  29. package/dist-types/pagination/ListAssetsPaginator.d.ts +4 -0
  30. package/dist-types/pagination/index.d.ts +2 -0
  31. package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
  32. package/dist-types/ts3.4/Outposts.d.ts +5 -0
  33. package/dist-types/ts3.4/OutpostsClient.d.ts +3 -2
  34. package/dist-types/ts3.4/commands/ListAssetsCommand.d.ts +17 -0
  35. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  36. package/dist-types/ts3.4/models/models_0.d.ts +51 -0
  37. package/dist-types/ts3.4/pagination/GetOutpostInstanceTypesPaginator.d.ts +4 -0
  38. package/dist-types/ts3.4/pagination/ListAssetsPaginator.d.ts +4 -0
  39. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  40. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
  41. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.82.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.81.0...v3.82.0) (2022-05-02)
7
+
8
+
9
+ ### Features
10
+
11
+ * **client-outposts:** This release adds a new API called ListAssets to the Outposts SDK, which lists the hardware assets in an Outpost. ([e04ca4d](https://github.com/aws/aws-sdk-js-v3/commit/e04ca4d26cbef61789ec754bf86e2b0dfc97d56b))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.81.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.80.0...v3.81.0) (2022-04-29)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-outposts
@@ -13,6 +13,7 @@ const GetOutpostCommand_1 = require("./commands/GetOutpostCommand");
13
13
  const GetOutpostInstanceTypesCommand_1 = require("./commands/GetOutpostInstanceTypesCommand");
14
14
  const GetSiteAddressCommand_1 = require("./commands/GetSiteAddressCommand");
15
15
  const GetSiteCommand_1 = require("./commands/GetSiteCommand");
16
+ const ListAssetsCommand_1 = require("./commands/ListAssetsCommand");
16
17
  const ListCatalogItemsCommand_1 = require("./commands/ListCatalogItemsCommand");
17
18
  const ListOrdersCommand_1 = require("./commands/ListOrdersCommand");
18
19
  const ListOutpostsCommand_1 = require("./commands/ListOutpostsCommand");
@@ -194,6 +195,20 @@ class Outposts extends OutpostsClient_1.OutpostsClient {
194
195
  return this.send(command, optionsOrCb);
195
196
  }
196
197
  }
198
+ listAssets(args, optionsOrCb, cb) {
199
+ const command = new ListAssetsCommand_1.ListAssetsCommand(args);
200
+ if (typeof optionsOrCb === "function") {
201
+ this.send(command, optionsOrCb);
202
+ }
203
+ else if (typeof cb === "function") {
204
+ if (typeof optionsOrCb !== "object")
205
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
206
+ this.send(command, optionsOrCb || {}, cb);
207
+ }
208
+ else {
209
+ return this.send(command, optionsOrCb);
210
+ }
211
+ }
197
212
  listCatalogItems(args, optionsOrCb, cb) {
198
213
  const command = new ListCatalogItemsCommand_1.ListCatalogItemsCommand(args);
199
214
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListAssetsCommand = void 0;
4
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const models_0_1 = require("../models/models_0");
7
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
8
+ class ListAssetsCommand extends smithy_client_1.Command {
9
+ constructor(input) {
10
+ super();
11
+ this.input = input;
12
+ }
13
+ resolveMiddleware(clientStack, configuration, options) {
14
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
15
+ const stack = clientStack.concat(this.middlewareStack);
16
+ const { logger } = configuration;
17
+ const clientName = "OutpostsClient";
18
+ const commandName = "ListAssetsCommand";
19
+ const handlerExecutionContext = {
20
+ logger,
21
+ clientName,
22
+ commandName,
23
+ inputFilterSensitiveLog: models_0_1.ListAssetsInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.ListAssetsOutput.filterSensitiveLog,
25
+ };
26
+ const { requestHandler } = configuration;
27
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
28
+ }
29
+ serialize(input, context) {
30
+ return (0, Aws_restJson1_1.serializeAws_restJson1ListAssetsCommand)(input, context);
31
+ }
32
+ deserialize(output, context) {
33
+ return (0, Aws_restJson1_1.deserializeAws_restJson1ListAssetsCommand)(output, context);
34
+ }
35
+ }
36
+ exports.ListAssetsCommand = ListAssetsCommand;
@@ -13,6 +13,7 @@ tslib_1.__exportStar(require("./GetOutpostCommand"), exports);
13
13
  tslib_1.__exportStar(require("./GetOutpostInstanceTypesCommand"), exports);
14
14
  tslib_1.__exportStar(require("./GetSiteAddressCommand"), exports);
15
15
  tslib_1.__exportStar(require("./GetSiteCommand"), exports);
16
+ tslib_1.__exportStar(require("./ListAssetsCommand"), exports);
16
17
  tslib_1.__exportStar(require("./ListCatalogItemsCommand"), exports);
17
18
  tslib_1.__exportStar(require("./ListOrdersCommand"), exports);
18
19
  tslib_1.__exportStar(require("./ListOutpostsCommand"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetOrderOutput = exports.GetOrderInput = exports.GetCatalogItemOutput = exports.GetCatalogItemInput = exports.DeleteSiteOutput = exports.DeleteSiteInput = exports.DeleteOutpostOutput = exports.DeleteOutpostInput = exports.CreateSiteOutput = exports.Site = exports.CreateSiteInput = exports.RackPhysicalProperties = exports.UplinkGbps = exports.UplinkCount = exports.PowerPhase = exports.PowerFeedDrop = exports.PowerDrawKva = exports.PowerConnector = exports.OpticalStandard = exports.MaximumSupportedWeightLbs = exports.FiberOpticCableType = exports.CreateOutpostOutput = exports.Outpost = exports.CreateOutpostInput = exports.SupportedHardwareType = exports.ServiceQuotaExceededException = exports.CreateOrderOutput = exports.Order = exports.OrderStatus = exports.LineItem = exports.LineItemStatus = exports.CreateOrderInput = exports.PaymentTerm = exports.PaymentOption = exports.LineItemRequest = exports.CatalogItemClass = exports.CatalogItem = exports.SupportedStorageEnum = exports.CatalogItemStatus = exports.EC2Capacity = exports.ValidationException = exports.NotFoundException = exports.InternalServerException = exports.ConflictException = exports.ResourceType = exports.CancelOrderOutput = exports.CancelOrderInput = exports.AddressType = exports.Address = exports.AccessDeniedException = void 0;
4
- exports.UpdateSiteRackPhysicalPropertiesOutput = exports.UpdateSiteRackPhysicalPropertiesInput = exports.UpdateSiteAddressOutput = exports.UpdateSiteAddressInput = exports.UpdateSiteOutput = exports.UpdateSiteInput = exports.UpdateOutpostOutput = exports.UpdateOutpostInput = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListSitesOutput = exports.ListSitesInput = exports.ListOutpostsOutput = exports.ListOutpostsInput = exports.ListOrdersOutput = exports.OrderSummary = exports.OrderType = exports.ListOrdersInput = exports.ListCatalogItemsOutput = exports.ListCatalogItemsInput = exports.GetSiteAddressOutput = exports.GetSiteAddressInput = exports.GetSiteOutput = exports.GetSiteInput = exports.GetOutpostInstanceTypesOutput = exports.InstanceTypeItem = exports.GetOutpostInstanceTypesInput = exports.GetOutpostOutput = exports.GetOutpostInput = void 0;
3
+ exports.GetCatalogItemInput = exports.DeleteSiteOutput = exports.DeleteSiteInput = exports.DeleteOutpostOutput = exports.DeleteOutpostInput = exports.CreateSiteOutput = exports.Site = exports.CreateSiteInput = exports.RackPhysicalProperties = exports.UplinkGbps = exports.UplinkCount = exports.PowerPhase = exports.PowerFeedDrop = exports.PowerDrawKva = exports.PowerConnector = exports.OpticalStandard = exports.MaximumSupportedWeightLbs = exports.FiberOpticCableType = exports.CreateOutpostOutput = exports.Outpost = exports.CreateOutpostInput = exports.SupportedHardwareType = exports.ServiceQuotaExceededException = exports.CreateOrderOutput = exports.Order = exports.OrderStatus = exports.LineItem = exports.LineItemStatus = exports.CreateOrderInput = exports.PaymentTerm = exports.PaymentOption = exports.LineItemRequest = exports.CatalogItemClass = exports.CatalogItem = exports.SupportedStorageEnum = exports.CatalogItemStatus = exports.EC2Capacity = exports.ValidationException = exports.NotFoundException = exports.InternalServerException = exports.ConflictException = exports.ResourceType = exports.CancelOrderOutput = exports.CancelOrderInput = exports.AssetInfo = exports.ComputeAttributes = exports.AssetType = exports.AddressType = exports.Address = exports.AccessDeniedException = void 0;
4
+ exports.UpdateSiteRackPhysicalPropertiesOutput = exports.UpdateSiteRackPhysicalPropertiesInput = exports.UpdateSiteAddressOutput = exports.UpdateSiteAddressInput = exports.UpdateSiteOutput = exports.UpdateSiteInput = exports.UpdateOutpostOutput = exports.UpdateOutpostInput = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListSitesOutput = exports.ListSitesInput = exports.ListOutpostsOutput = exports.ListOutpostsInput = exports.ListOrdersOutput = exports.OrderSummary = exports.OrderType = exports.ListOrdersInput = exports.ListCatalogItemsOutput = exports.ListCatalogItemsInput = exports.ListAssetsOutput = exports.ListAssetsInput = exports.GetSiteAddressOutput = exports.GetSiteAddressInput = exports.GetSiteOutput = exports.GetSiteInput = exports.GetOutpostInstanceTypesOutput = exports.InstanceTypeItem = exports.GetOutpostInstanceTypesInput = exports.GetOutpostOutput = exports.GetOutpostInput = exports.GetOrderOutput = exports.GetOrderInput = exports.GetCatalogItemOutput = void 0;
5
5
  const OutpostsServiceException_1 = require("./OutpostsServiceException");
6
6
  class AccessDeniedException extends OutpostsServiceException_1.OutpostsServiceException {
7
7
  constructor(opts) {
@@ -28,6 +28,22 @@ var AddressType;
28
28
  AddressType["OPERATING_ADDRESS"] = "OPERATING_ADDRESS";
29
29
  AddressType["SHIPPING_ADDRESS"] = "SHIPPING_ADDRESS";
30
30
  })(AddressType = exports.AddressType || (exports.AddressType = {}));
31
+ var AssetType;
32
+ (function (AssetType) {
33
+ AssetType["COMPUTE"] = "COMPUTE";
34
+ })(AssetType = exports.AssetType || (exports.AssetType = {}));
35
+ var ComputeAttributes;
36
+ (function (ComputeAttributes) {
37
+ ComputeAttributes.filterSensitiveLog = (obj) => ({
38
+ ...obj,
39
+ });
40
+ })(ComputeAttributes = exports.ComputeAttributes || (exports.ComputeAttributes = {}));
41
+ var AssetInfo;
42
+ (function (AssetInfo) {
43
+ AssetInfo.filterSensitiveLog = (obj) => ({
44
+ ...obj,
45
+ });
46
+ })(AssetInfo = exports.AssetInfo || (exports.AssetInfo = {}));
31
47
  var CancelOrderInput;
32
48
  (function (CancelOrderInput) {
33
49
  CancelOrderInput.filterSensitiveLog = (obj) => ({
@@ -429,6 +445,18 @@ var GetSiteAddressOutput;
429
445
  ...obj,
430
446
  });
431
447
  })(GetSiteAddressOutput = exports.GetSiteAddressOutput || (exports.GetSiteAddressOutput = {}));
448
+ var ListAssetsInput;
449
+ (function (ListAssetsInput) {
450
+ ListAssetsInput.filterSensitiveLog = (obj) => ({
451
+ ...obj,
452
+ });
453
+ })(ListAssetsInput = exports.ListAssetsInput || (exports.ListAssetsInput = {}));
454
+ var ListAssetsOutput;
455
+ (function (ListAssetsOutput) {
456
+ ListAssetsOutput.filterSensitiveLog = (obj) => ({
457
+ ...obj,
458
+ });
459
+ })(ListAssetsOutput = exports.ListAssetsOutput || (exports.ListAssetsOutput = {}));
432
460
  var ListCatalogItemsInput;
433
461
  (function (ListCatalogItemsInput) {
434
462
  ListCatalogItemsInput.filterSensitiveLog = (obj) => ({
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateGetOutpostInstanceTypes = void 0;
4
+ const GetOutpostInstanceTypesCommand_1 = require("../commands/GetOutpostInstanceTypesCommand");
5
+ const Outposts_1 = require("../Outposts");
6
+ const OutpostsClient_1 = require("../OutpostsClient");
7
+ const makePagedClientRequest = async (client, input, ...args) => {
8
+ return await client.send(new GetOutpostInstanceTypesCommand_1.GetOutpostInstanceTypesCommand(input), ...args);
9
+ };
10
+ const makePagedRequest = async (client, input, ...args) => {
11
+ return await client.getOutpostInstanceTypes(input, ...args);
12
+ };
13
+ async function* paginateGetOutpostInstanceTypes(config, input, ...additionalArguments) {
14
+ let token = config.startingToken || undefined;
15
+ let hasNext = true;
16
+ let page;
17
+ while (hasNext) {
18
+ input.NextToken = token;
19
+ input["MaxResults"] = config.pageSize;
20
+ if (config.client instanceof Outposts_1.Outposts) {
21
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else if (config.client instanceof OutpostsClient_1.OutpostsClient) {
24
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
25
+ }
26
+ else {
27
+ throw new Error("Invalid client, expected Outposts | OutpostsClient");
28
+ }
29
+ yield page;
30
+ const prevToken = token;
31
+ token = page.NextToken;
32
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ }
34
+ return undefined;
35
+ }
36
+ exports.paginateGetOutpostInstanceTypes = paginateGetOutpostInstanceTypes;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListAssets = void 0;
4
+ const ListAssetsCommand_1 = require("../commands/ListAssetsCommand");
5
+ const Outposts_1 = require("../Outposts");
6
+ const OutpostsClient_1 = require("../OutpostsClient");
7
+ const makePagedClientRequest = async (client, input, ...args) => {
8
+ return await client.send(new ListAssetsCommand_1.ListAssetsCommand(input), ...args);
9
+ };
10
+ const makePagedRequest = async (client, input, ...args) => {
11
+ return await client.listAssets(input, ...args);
12
+ };
13
+ async function* paginateListAssets(config, input, ...additionalArguments) {
14
+ let token = config.startingToken || undefined;
15
+ let hasNext = true;
16
+ let page;
17
+ while (hasNext) {
18
+ input.NextToken = token;
19
+ input["MaxResults"] = config.pageSize;
20
+ if (config.client instanceof Outposts_1.Outposts) {
21
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else if (config.client instanceof OutpostsClient_1.OutpostsClient) {
24
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
25
+ }
26
+ else {
27
+ throw new Error("Invalid client, expected Outposts | OutpostsClient");
28
+ }
29
+ yield page;
30
+ const prevToken = token;
31
+ token = page.NextToken;
32
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ }
34
+ return undefined;
35
+ }
36
+ exports.paginateListAssets = paginateListAssets;
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./GetOutpostInstanceTypesPaginator"), exports);
4
5
  tslib_1.__exportStar(require("./Interfaces"), exports);
6
+ tslib_1.__exportStar(require("./ListAssetsPaginator"), exports);
5
7
  tslib_1.__exportStar(require("./ListCatalogItemsPaginator"), exports);
6
8
  tslib_1.__exportStar(require("./ListOrdersPaginator"), exports);
7
9
  tslib_1.__exportStar(require("./ListOutpostsPaginator"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = exports.deserializeAws_restJson1UpdateSiteAddressCommand = exports.deserializeAws_restJson1UpdateSiteCommand = exports.deserializeAws_restJson1UpdateOutpostCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListSitesCommand = exports.deserializeAws_restJson1ListOutpostsCommand = exports.deserializeAws_restJson1ListOrdersCommand = exports.deserializeAws_restJson1ListCatalogItemsCommand = exports.deserializeAws_restJson1GetSiteAddressCommand = exports.deserializeAws_restJson1GetSiteCommand = exports.deserializeAws_restJson1GetOutpostInstanceTypesCommand = exports.deserializeAws_restJson1GetOutpostCommand = exports.deserializeAws_restJson1GetOrderCommand = exports.deserializeAws_restJson1GetCatalogItemCommand = exports.deserializeAws_restJson1DeleteSiteCommand = exports.deserializeAws_restJson1DeleteOutpostCommand = exports.deserializeAws_restJson1CreateSiteCommand = exports.deserializeAws_restJson1CreateOutpostCommand = exports.deserializeAws_restJson1CreateOrderCommand = exports.deserializeAws_restJson1CancelOrderCommand = exports.serializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = exports.serializeAws_restJson1UpdateSiteAddressCommand = exports.serializeAws_restJson1UpdateSiteCommand = exports.serializeAws_restJson1UpdateOutpostCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListSitesCommand = exports.serializeAws_restJson1ListOutpostsCommand = exports.serializeAws_restJson1ListOrdersCommand = exports.serializeAws_restJson1ListCatalogItemsCommand = exports.serializeAws_restJson1GetSiteAddressCommand = exports.serializeAws_restJson1GetSiteCommand = exports.serializeAws_restJson1GetOutpostInstanceTypesCommand = exports.serializeAws_restJson1GetOutpostCommand = exports.serializeAws_restJson1GetOrderCommand = exports.serializeAws_restJson1GetCatalogItemCommand = exports.serializeAws_restJson1DeleteSiteCommand = exports.serializeAws_restJson1DeleteOutpostCommand = exports.serializeAws_restJson1CreateSiteCommand = exports.serializeAws_restJson1CreateOutpostCommand = exports.serializeAws_restJson1CreateOrderCommand = exports.serializeAws_restJson1CancelOrderCommand = void 0;
3
+ exports.deserializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = exports.deserializeAws_restJson1UpdateSiteAddressCommand = exports.deserializeAws_restJson1UpdateSiteCommand = exports.deserializeAws_restJson1UpdateOutpostCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListSitesCommand = exports.deserializeAws_restJson1ListOutpostsCommand = exports.deserializeAws_restJson1ListOrdersCommand = exports.deserializeAws_restJson1ListCatalogItemsCommand = exports.deserializeAws_restJson1ListAssetsCommand = exports.deserializeAws_restJson1GetSiteAddressCommand = exports.deserializeAws_restJson1GetSiteCommand = exports.deserializeAws_restJson1GetOutpostInstanceTypesCommand = exports.deserializeAws_restJson1GetOutpostCommand = exports.deserializeAws_restJson1GetOrderCommand = exports.deserializeAws_restJson1GetCatalogItemCommand = exports.deserializeAws_restJson1DeleteSiteCommand = exports.deserializeAws_restJson1DeleteOutpostCommand = exports.deserializeAws_restJson1CreateSiteCommand = exports.deserializeAws_restJson1CreateOutpostCommand = exports.deserializeAws_restJson1CreateOrderCommand = exports.deserializeAws_restJson1CancelOrderCommand = exports.serializeAws_restJson1UpdateSiteRackPhysicalPropertiesCommand = exports.serializeAws_restJson1UpdateSiteAddressCommand = exports.serializeAws_restJson1UpdateSiteCommand = exports.serializeAws_restJson1UpdateOutpostCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListSitesCommand = exports.serializeAws_restJson1ListOutpostsCommand = exports.serializeAws_restJson1ListOrdersCommand = exports.serializeAws_restJson1ListCatalogItemsCommand = exports.serializeAws_restJson1ListAssetsCommand = exports.serializeAws_restJson1GetSiteAddressCommand = exports.serializeAws_restJson1GetSiteCommand = exports.serializeAws_restJson1GetOutpostInstanceTypesCommand = exports.serializeAws_restJson1GetOutpostCommand = exports.serializeAws_restJson1GetOrderCommand = exports.serializeAws_restJson1GetCatalogItemCommand = exports.serializeAws_restJson1DeleteSiteCommand = exports.serializeAws_restJson1DeleteOutpostCommand = exports.serializeAws_restJson1CreateSiteCommand = exports.serializeAws_restJson1CreateOutpostCommand = exports.serializeAws_restJson1CreateOrderCommand = exports.serializeAws_restJson1CancelOrderCommand = 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 models_0_1 = require("../models/models_0");
@@ -342,6 +342,40 @@ const serializeAws_restJson1GetSiteAddressCommand = async (input, context) => {
342
342
  });
343
343
  };
344
344
  exports.serializeAws_restJson1GetSiteAddressCommand = serializeAws_restJson1GetSiteAddressCommand;
345
+ const serializeAws_restJson1ListAssetsCommand = async (input, context) => {
346
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
347
+ const headers = {};
348
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/outposts/{OutpostIdentifier}/assets";
349
+ if (input.OutpostIdentifier !== undefined) {
350
+ const labelValue = input.OutpostIdentifier;
351
+ if (labelValue.length <= 0) {
352
+ throw new Error("Empty value provided for input HTTP label: OutpostIdentifier.");
353
+ }
354
+ resolvedPath = resolvedPath.replace("{OutpostIdentifier}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
355
+ }
356
+ else {
357
+ throw new Error("No value provided for input HTTP label: OutpostIdentifier.");
358
+ }
359
+ const query = {
360
+ ...(input.HostIdFilter !== undefined && {
361
+ HostIdFilter: (input.HostIdFilter || []).map((_entry) => _entry),
362
+ }),
363
+ ...(input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }),
364
+ ...(input.NextToken !== undefined && { NextToken: input.NextToken }),
365
+ };
366
+ let body;
367
+ return new protocol_http_1.HttpRequest({
368
+ protocol,
369
+ hostname,
370
+ port,
371
+ method: "GET",
372
+ headers,
373
+ path: resolvedPath,
374
+ query,
375
+ body,
376
+ });
377
+ };
378
+ exports.serializeAws_restJson1ListAssetsCommand = serializeAws_restJson1ListAssetsCommand;
345
379
  const serializeAws_restJson1ListCatalogItemsCommand = async (input, context) => {
346
380
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
347
381
  const headers = {};
@@ -1262,6 +1296,56 @@ const deserializeAws_restJson1GetSiteAddressCommandError = async (output, contex
1262
1296
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1263
1297
  }
1264
1298
  };
1299
+ const deserializeAws_restJson1ListAssetsCommand = async (output, context) => {
1300
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1301
+ return deserializeAws_restJson1ListAssetsCommandError(output, context);
1302
+ }
1303
+ const contents = {
1304
+ $metadata: deserializeMetadata(output),
1305
+ Assets: undefined,
1306
+ NextToken: undefined,
1307
+ };
1308
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1309
+ if (data.Assets !== undefined && data.Assets !== null) {
1310
+ contents.Assets = deserializeAws_restJson1AssetListDefinition(data.Assets, context);
1311
+ }
1312
+ if (data.NextToken !== undefined && data.NextToken !== null) {
1313
+ contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
1314
+ }
1315
+ return Promise.resolve(contents);
1316
+ };
1317
+ exports.deserializeAws_restJson1ListAssetsCommand = deserializeAws_restJson1ListAssetsCommand;
1318
+ const deserializeAws_restJson1ListAssetsCommandError = async (output, context) => {
1319
+ const parsedOutput = {
1320
+ ...output,
1321
+ body: await parseBody(output.body, context),
1322
+ };
1323
+ let response;
1324
+ let errorCode = "UnknownError";
1325
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1326
+ switch (errorCode) {
1327
+ case "AccessDeniedException":
1328
+ case "com.amazonaws.outposts#AccessDeniedException":
1329
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
1330
+ case "InternalServerException":
1331
+ case "com.amazonaws.outposts#InternalServerException":
1332
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1333
+ case "NotFoundException":
1334
+ case "com.amazonaws.outposts#NotFoundException":
1335
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1336
+ case "ValidationException":
1337
+ case "com.amazonaws.outposts#ValidationException":
1338
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1339
+ default:
1340
+ const parsedBody = parsedOutput.body;
1341
+ response = new OutpostsServiceException_1.OutpostsServiceException({
1342
+ name: parsedBody.code || parsedBody.Code || errorCode,
1343
+ $fault: "client",
1344
+ $metadata: deserializeMetadata(output),
1345
+ });
1346
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1347
+ }
1348
+ };
1265
1349
  const deserializeAws_restJson1ListCatalogItemsCommand = async (output, context) => {
1266
1350
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1267
1351
  return deserializeAws_restJson1ListCatalogItemsCommandError(output, context);
@@ -1928,6 +2012,27 @@ const deserializeAws_restJson1Address = (output, context) => {
1928
2012
  StateOrRegion: (0, smithy_client_1.expectString)(output.StateOrRegion),
1929
2013
  };
1930
2014
  };
2015
+ const deserializeAws_restJson1AssetInfo = (output, context) => {
2016
+ return {
2017
+ AssetId: (0, smithy_client_1.expectString)(output.AssetId),
2018
+ AssetType: (0, smithy_client_1.expectString)(output.AssetType),
2019
+ ComputeAttributes: output.ComputeAttributes !== undefined && output.ComputeAttributes !== null
2020
+ ? deserializeAws_restJson1ComputeAttributes(output.ComputeAttributes, context)
2021
+ : undefined,
2022
+ RackId: (0, smithy_client_1.expectString)(output.RackId),
2023
+ };
2024
+ };
2025
+ const deserializeAws_restJson1AssetListDefinition = (output, context) => {
2026
+ const retVal = (output || [])
2027
+ .filter((e) => e != null)
2028
+ .map((entry) => {
2029
+ if (entry === null) {
2030
+ return null;
2031
+ }
2032
+ return deserializeAws_restJson1AssetInfo(entry, context);
2033
+ });
2034
+ return retVal;
2035
+ };
1931
2036
  const deserializeAws_restJson1CatalogItem = (output, context) => {
1932
2037
  return {
1933
2038
  CatalogItemId: (0, smithy_client_1.expectString)(output.CatalogItemId),
@@ -1956,6 +2061,11 @@ const deserializeAws_restJson1CatalogItemListDefinition = (output, context) => {
1956
2061
  });
1957
2062
  return retVal;
1958
2063
  };
2064
+ const deserializeAws_restJson1ComputeAttributes = (output, context) => {
2065
+ return {
2066
+ HostId: (0, smithy_client_1.expectString)(output.HostId),
2067
+ };
2068
+ };
1959
2069
  const deserializeAws_restJson1EC2Capacity = (output, context) => {
1960
2070
  return {
1961
2071
  Family: (0, smithy_client_1.expectString)(output.Family),
@@ -11,6 +11,7 @@ import { GetOutpostCommand } from "./commands/GetOutpostCommand";
11
11
  import { GetOutpostInstanceTypesCommand, } from "./commands/GetOutpostInstanceTypesCommand";
12
12
  import { GetSiteAddressCommand, } from "./commands/GetSiteAddressCommand";
13
13
  import { GetSiteCommand } from "./commands/GetSiteCommand";
14
+ import { ListAssetsCommand } from "./commands/ListAssetsCommand";
14
15
  import { ListCatalogItemsCommand, } from "./commands/ListCatalogItemsCommand";
15
16
  import { ListOrdersCommand } from "./commands/ListOrdersCommand";
16
17
  import { ListOutpostsCommand, } from "./commands/ListOutpostsCommand";
@@ -196,6 +197,20 @@ var Outposts = (function (_super) {
196
197
  return this.send(command, optionsOrCb);
197
198
  }
198
199
  };
200
+ Outposts.prototype.listAssets = function (args, optionsOrCb, cb) {
201
+ var command = new ListAssetsCommand(args);
202
+ if (typeof optionsOrCb === "function") {
203
+ this.send(command, optionsOrCb);
204
+ }
205
+ else if (typeof cb === "function") {
206
+ if (typeof optionsOrCb !== "object")
207
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
208
+ this.send(command, optionsOrCb || {}, cb);
209
+ }
210
+ else {
211
+ return this.send(command, optionsOrCb);
212
+ }
213
+ };
199
214
  Outposts.prototype.listCatalogItems = function (args, optionsOrCb, cb) {
200
215
  var command = new ListCatalogItemsCommand(args);
201
216
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { ListAssetsInput, ListAssetsOutput } from "../models/models_0";
5
+ import { deserializeAws_restJson1ListAssetsCommand, serializeAws_restJson1ListAssetsCommand, } from "../protocols/Aws_restJson1";
6
+ var ListAssetsCommand = (function (_super) {
7
+ __extends(ListAssetsCommand, _super);
8
+ function ListAssetsCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ ListAssetsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "OutpostsClient";
18
+ var commandName = "ListAssetsCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: ListAssetsInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: ListAssetsOutput.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ ListAssetsCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1ListAssetsCommand(input, context);
33
+ };
34
+ ListAssetsCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1ListAssetsCommand(output, context);
36
+ };
37
+ return ListAssetsCommand;
38
+ }($Command));
39
+ export { ListAssetsCommand };
@@ -10,6 +10,7 @@ export * from "./GetOutpostCommand";
10
10
  export * from "./GetOutpostInstanceTypesCommand";
11
11
  export * from "./GetSiteAddressCommand";
12
12
  export * from "./GetSiteCommand";
13
+ export * from "./ListAssetsCommand";
13
14
  export * from "./ListCatalogItemsCommand";
14
15
  export * from "./ListOrdersCommand";
15
16
  export * from "./ListOutpostsCommand";
@@ -22,6 +22,18 @@ export var AddressType;
22
22
  AddressType["OPERATING_ADDRESS"] = "OPERATING_ADDRESS";
23
23
  AddressType["SHIPPING_ADDRESS"] = "SHIPPING_ADDRESS";
24
24
  })(AddressType || (AddressType = {}));
25
+ export var AssetType;
26
+ (function (AssetType) {
27
+ AssetType["COMPUTE"] = "COMPUTE";
28
+ })(AssetType || (AssetType = {}));
29
+ export var ComputeAttributes;
30
+ (function (ComputeAttributes) {
31
+ ComputeAttributes.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
32
+ })(ComputeAttributes || (ComputeAttributes = {}));
33
+ export var AssetInfo;
34
+ (function (AssetInfo) {
35
+ AssetInfo.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
36
+ })(AssetInfo || (AssetInfo = {}));
25
37
  export var CancelOrderInput;
26
38
  (function (CancelOrderInput) {
27
39
  CancelOrderInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -352,6 +364,14 @@ export var GetSiteAddressOutput;
352
364
  (function (GetSiteAddressOutput) {
353
365
  GetSiteAddressOutput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
354
366
  })(GetSiteAddressOutput || (GetSiteAddressOutput = {}));
367
+ export var ListAssetsInput;
368
+ (function (ListAssetsInput) {
369
+ ListAssetsInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
370
+ })(ListAssetsInput || (ListAssetsInput = {}));
371
+ export var ListAssetsOutput;
372
+ (function (ListAssetsOutput) {
373
+ ListAssetsOutput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
374
+ })(ListAssetsOutput || (ListAssetsOutput = {}));
355
375
  export var ListCatalogItemsInput;
356
376
  (function (ListCatalogItemsInput) {
357
377
  ListCatalogItemsInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -0,0 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { GetOutpostInstanceTypesCommand, } from "../commands/GetOutpostInstanceTypesCommand";
3
+ import { Outposts } from "../Outposts";
4
+ import { OutpostsClient } from "../OutpostsClient";
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
7
+ for (var _i = 2; _i < arguments.length; _i++) {
8
+ args[_i - 2] = arguments[_i];
9
+ }
10
+ return __awaiter(void 0, void 0, void 0, function () {
11
+ return __generator(this, function (_a) {
12
+ switch (_a.label) {
13
+ case 0: return [4, client.send.apply(client, __spreadArray([new GetOutpostInstanceTypesCommand(input)], __read(args), false))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
18
+ };
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
21
+ for (var _i = 2; _i < arguments.length; _i++) {
22
+ args[_i - 2] = arguments[_i];
23
+ }
24
+ return __awaiter(void 0, void 0, void 0, function () {
25
+ return __generator(this, function (_a) {
26
+ switch (_a.label) {
27
+ case 0: return [4, client.getOutpostInstanceTypes.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
32
+ };
33
+ export function paginateGetOutpostInstanceTypes(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
37
+ }
38
+ return __asyncGenerator(this, arguments, function paginateGetOutpostInstanceTypes_1() {
39
+ var token, hasNext, page, prevToken;
40
+ return __generator(this, function (_a) {
41
+ switch (_a.label) {
42
+ case 0:
43
+ token = config.startingToken || undefined;
44
+ hasNext = true;
45
+ _a.label = 1;
46
+ case 1:
47
+ if (!hasNext) return [3, 9];
48
+ input.NextToken = token;
49
+ input["MaxResults"] = config.pageSize;
50
+ if (!(config.client instanceof Outposts)) return [3, 3];
51
+ return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
+ case 2:
53
+ page = _a.sent();
54
+ return [3, 6];
55
+ case 3:
56
+ if (!(config.client instanceof OutpostsClient)) return [3, 5];
57
+ return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
+ case 4:
59
+ page = _a.sent();
60
+ return [3, 6];
61
+ case 5: throw new Error("Invalid client, expected Outposts | OutpostsClient");
62
+ case 6: return [4, __await(page)];
63
+ case 7: return [4, _a.sent()];
64
+ case 8:
65
+ _a.sent();
66
+ prevToken = token;
67
+ token = page.NextToken;
68
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
+ return [3, 1];
70
+ case 9: return [4, __await(undefined)];
71
+ case 10: return [2, _a.sent()];
72
+ }
73
+ });
74
+ });
75
+ }
@@ -0,0 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { ListAssetsCommand } from "../commands/ListAssetsCommand";
3
+ import { Outposts } from "../Outposts";
4
+ import { OutpostsClient } from "../OutpostsClient";
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
7
+ for (var _i = 2; _i < arguments.length; _i++) {
8
+ args[_i - 2] = arguments[_i];
9
+ }
10
+ return __awaiter(void 0, void 0, void 0, function () {
11
+ return __generator(this, function (_a) {
12
+ switch (_a.label) {
13
+ case 0: return [4, client.send.apply(client, __spreadArray([new ListAssetsCommand(input)], __read(args), false))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
18
+ };
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
21
+ for (var _i = 2; _i < arguments.length; _i++) {
22
+ args[_i - 2] = arguments[_i];
23
+ }
24
+ return __awaiter(void 0, void 0, void 0, function () {
25
+ return __generator(this, function (_a) {
26
+ switch (_a.label) {
27
+ case 0: return [4, client.listAssets.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
32
+ };
33
+ export function paginateListAssets(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
37
+ }
38
+ return __asyncGenerator(this, arguments, function paginateListAssets_1() {
39
+ var token, hasNext, page, prevToken;
40
+ return __generator(this, function (_a) {
41
+ switch (_a.label) {
42
+ case 0:
43
+ token = config.startingToken || undefined;
44
+ hasNext = true;
45
+ _a.label = 1;
46
+ case 1:
47
+ if (!hasNext) return [3, 9];
48
+ input.NextToken = token;
49
+ input["MaxResults"] = config.pageSize;
50
+ if (!(config.client instanceof Outposts)) return [3, 3];
51
+ return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
+ case 2:
53
+ page = _a.sent();
54
+ return [3, 6];
55
+ case 3:
56
+ if (!(config.client instanceof OutpostsClient)) return [3, 5];
57
+ return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
+ case 4:
59
+ page = _a.sent();
60
+ return [3, 6];
61
+ case 5: throw new Error("Invalid client, expected Outposts | OutpostsClient");
62
+ case 6: return [4, __await(page)];
63
+ case 7: return [4, _a.sent()];
64
+ case 8:
65
+ _a.sent();
66
+ prevToken = token;
67
+ token = page.NextToken;
68
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
+ return [3, 1];
70
+ case 9: return [4, __await(undefined)];
71
+ case 10: return [2, _a.sent()];
72
+ }
73
+ });
74
+ });
75
+ }