@aws-sdk/client-license-manager-linux-subscriptions 3.476.0 → 3.478.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.
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListLinuxSubscriptionInstances = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListLinuxSubscriptionInstancesCommand_1 = require("../commands/ListLinuxSubscriptionInstancesCommand");
5
6
  const LicenseManagerLinuxSubscriptionsClient_1 = require("../LicenseManagerLinuxSubscriptionsClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListLinuxSubscriptionInstancesCommand_1.ListLinuxSubscriptionInstancesCommand(input), ...args);
8
- };
9
- async function* paginateListLinuxSubscriptionInstances(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof LicenseManagerLinuxSubscriptionsClient_1.LicenseManagerLinuxSubscriptionsClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected LicenseManagerLinuxSubscriptions | LicenseManagerLinuxSubscriptionsClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListLinuxSubscriptionInstances = paginateListLinuxSubscriptionInstances;
7
+ exports.paginateListLinuxSubscriptionInstances = (0, core_1.createPaginator)(LicenseManagerLinuxSubscriptionsClient_1.LicenseManagerLinuxSubscriptionsClient, ListLinuxSubscriptionInstancesCommand_1.ListLinuxSubscriptionInstancesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListLinuxSubscriptions = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListLinuxSubscriptionsCommand_1 = require("../commands/ListLinuxSubscriptionsCommand");
5
6
  const LicenseManagerLinuxSubscriptionsClient_1 = require("../LicenseManagerLinuxSubscriptionsClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListLinuxSubscriptionsCommand_1.ListLinuxSubscriptionsCommand(input), ...args);
8
- };
9
- async function* paginateListLinuxSubscriptions(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof LicenseManagerLinuxSubscriptionsClient_1.LicenseManagerLinuxSubscriptionsClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected LicenseManagerLinuxSubscriptions | LicenseManagerLinuxSubscriptionsClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListLinuxSubscriptions = paginateListLinuxSubscriptions;
7
+ exports.paginateListLinuxSubscriptions = (0, core_1.createPaginator)(LicenseManagerLinuxSubscriptionsClient_1.LicenseManagerLinuxSubscriptionsClient, ListLinuxSubscriptionsCommand_1.ListLinuxSubscriptionsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,97 +1,68 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateServiceSettingsCommand = exports.de_ListLinuxSubscriptionsCommand = exports.de_ListLinuxSubscriptionInstancesCommand = exports.de_GetServiceSettingsCommand = exports.se_UpdateServiceSettingsCommand = exports.se_ListLinuxSubscriptionsCommand = exports.se_ListLinuxSubscriptionInstancesCommand = exports.se_GetServiceSettingsCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const LicenseManagerLinuxSubscriptionsServiceException_1 = require("../models/LicenseManagerLinuxSubscriptionsServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_GetServiceSettingsCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {
11
11
  "content-type": "application/json",
12
12
  };
13
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscription/GetServiceSettings";
13
+ b.bp("/subscription/GetServiceSettings");
14
14
  let body;
15
15
  body = "";
16
- return new protocol_http_1.HttpRequest({
17
- protocol,
18
- hostname,
19
- port,
20
- method: "POST",
21
- headers,
22
- path: resolvedPath,
23
- body,
24
- });
16
+ b.m("POST").h(headers).b(body);
17
+ return b.build();
25
18
  };
26
19
  exports.se_GetServiceSettingsCommand = se_GetServiceSettingsCommand;
27
20
  const se_ListLinuxSubscriptionInstancesCommand = async (input, context) => {
28
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
21
+ const b = (0, core_1.requestBuilder)(input, context);
29
22
  const headers = {
30
23
  "content-type": "application/json",
31
24
  };
32
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
33
- "/subscription/ListLinuxSubscriptionInstances";
25
+ b.bp("/subscription/ListLinuxSubscriptionInstances");
34
26
  let body;
35
27
  body = JSON.stringify((0, smithy_client_1.take)(input, {
36
28
  Filters: (_) => (0, smithy_client_1._json)(_),
37
29
  MaxResults: [],
38
30
  NextToken: [],
39
31
  }));
40
- return new protocol_http_1.HttpRequest({
41
- protocol,
42
- hostname,
43
- port,
44
- method: "POST",
45
- headers,
46
- path: resolvedPath,
47
- body,
48
- });
32
+ b.m("POST").h(headers).b(body);
33
+ return b.build();
49
34
  };
50
35
  exports.se_ListLinuxSubscriptionInstancesCommand = se_ListLinuxSubscriptionInstancesCommand;
51
36
  const se_ListLinuxSubscriptionsCommand = async (input, context) => {
52
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
37
+ const b = (0, core_1.requestBuilder)(input, context);
53
38
  const headers = {
54
39
  "content-type": "application/json",
55
40
  };
56
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscription/ListLinuxSubscriptions";
41
+ b.bp("/subscription/ListLinuxSubscriptions");
57
42
  let body;
58
43
  body = JSON.stringify((0, smithy_client_1.take)(input, {
59
44
  Filters: (_) => (0, smithy_client_1._json)(_),
60
45
  MaxResults: [],
61
46
  NextToken: [],
62
47
  }));
63
- return new protocol_http_1.HttpRequest({
64
- protocol,
65
- hostname,
66
- port,
67
- method: "POST",
68
- headers,
69
- path: resolvedPath,
70
- body,
71
- });
48
+ b.m("POST").h(headers).b(body);
49
+ return b.build();
72
50
  };
73
51
  exports.se_ListLinuxSubscriptionsCommand = se_ListLinuxSubscriptionsCommand;
74
52
  const se_UpdateServiceSettingsCommand = async (input, context) => {
75
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
53
+ const b = (0, core_1.requestBuilder)(input, context);
76
54
  const headers = {
77
55
  "content-type": "application/json",
78
56
  };
79
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscription/UpdateServiceSettings";
57
+ b.bp("/subscription/UpdateServiceSettings");
80
58
  let body;
81
59
  body = JSON.stringify((0, smithy_client_1.take)(input, {
82
60
  AllowUpdate: [],
83
61
  LinuxSubscriptionsDiscovery: [],
84
62
  LinuxSubscriptionsDiscoverySettings: (_) => (0, smithy_client_1._json)(_),
85
63
  }));
86
- return new protocol_http_1.HttpRequest({
87
- protocol,
88
- hostname,
89
- port,
90
- method: "POST",
91
- headers,
92
- path: resolvedPath,
93
- body,
94
- });
64
+ b.m("POST").h(headers).b(body);
65
+ return b.build();
95
66
  };
96
67
  exports.se_UpdateServiceSettingsCommand = se_UpdateServiceSettingsCommand;
97
68
  const de_GetServiceSettingsCommand = async (output, context) => {
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListLinuxSubscriptionInstancesCommand, } from "../commands/ListLinuxSubscriptionInstancesCommand";
2
3
  import { LicenseManagerLinuxSubscriptionsClient } from "../LicenseManagerLinuxSubscriptionsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListLinuxSubscriptionInstancesCommand(input), ...args);
5
- };
6
- export async function* paginateListLinuxSubscriptionInstances(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof LicenseManagerLinuxSubscriptionsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected LicenseManagerLinuxSubscriptions | LicenseManagerLinuxSubscriptionsClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListLinuxSubscriptionInstances = createPaginator(LicenseManagerLinuxSubscriptionsClient, ListLinuxSubscriptionInstancesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListLinuxSubscriptionsCommand, } from "../commands/ListLinuxSubscriptionsCommand";
2
3
  import { LicenseManagerLinuxSubscriptionsClient } from "../LicenseManagerLinuxSubscriptionsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListLinuxSubscriptionsCommand(input), ...args);
5
- };
6
- export async function* paginateListLinuxSubscriptions(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof LicenseManagerLinuxSubscriptionsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected LicenseManagerLinuxSubscriptions | LicenseManagerLinuxSubscriptionsClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListLinuxSubscriptions = createPaginator(LicenseManagerLinuxSubscriptionsClient, ListLinuxSubscriptionsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,91 +1,62 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
2
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { LicenseManagerLinuxSubscriptionsServiceException as __BaseException } from "../models/LicenseManagerLinuxSubscriptionsServiceException";
4
4
  import { InternalServerException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  export const se_GetServiceSettingsCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {
8
8
  "content-type": "application/json",
9
9
  };
10
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscription/GetServiceSettings";
10
+ b.bp("/subscription/GetServiceSettings");
11
11
  let body;
12
12
  body = "";
13
- return new __HttpRequest({
14
- protocol,
15
- hostname,
16
- port,
17
- method: "POST",
18
- headers,
19
- path: resolvedPath,
20
- body,
21
- });
13
+ b.m("POST").h(headers).b(body);
14
+ return b.build();
22
15
  };
23
16
  export const se_ListLinuxSubscriptionInstancesCommand = async (input, context) => {
24
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
17
+ const b = rb(input, context);
25
18
  const headers = {
26
19
  "content-type": "application/json",
27
20
  };
28
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
29
- "/subscription/ListLinuxSubscriptionInstances";
21
+ b.bp("/subscription/ListLinuxSubscriptionInstances");
30
22
  let body;
31
23
  body = JSON.stringify(take(input, {
32
24
  Filters: (_) => _json(_),
33
25
  MaxResults: [],
34
26
  NextToken: [],
35
27
  }));
36
- return new __HttpRequest({
37
- protocol,
38
- hostname,
39
- port,
40
- method: "POST",
41
- headers,
42
- path: resolvedPath,
43
- body,
44
- });
28
+ b.m("POST").h(headers).b(body);
29
+ return b.build();
45
30
  };
46
31
  export const se_ListLinuxSubscriptionsCommand = async (input, context) => {
47
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
32
+ const b = rb(input, context);
48
33
  const headers = {
49
34
  "content-type": "application/json",
50
35
  };
51
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscription/ListLinuxSubscriptions";
36
+ b.bp("/subscription/ListLinuxSubscriptions");
52
37
  let body;
53
38
  body = JSON.stringify(take(input, {
54
39
  Filters: (_) => _json(_),
55
40
  MaxResults: [],
56
41
  NextToken: [],
57
42
  }));
58
- return new __HttpRequest({
59
- protocol,
60
- hostname,
61
- port,
62
- method: "POST",
63
- headers,
64
- path: resolvedPath,
65
- body,
66
- });
43
+ b.m("POST").h(headers).b(body);
44
+ return b.build();
67
45
  };
68
46
  export const se_UpdateServiceSettingsCommand = async (input, context) => {
69
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
47
+ const b = rb(input, context);
70
48
  const headers = {
71
49
  "content-type": "application/json",
72
50
  };
73
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscription/UpdateServiceSettings";
51
+ b.bp("/subscription/UpdateServiceSettings");
74
52
  let body;
75
53
  body = JSON.stringify(take(input, {
76
54
  AllowUpdate: [],
77
55
  LinuxSubscriptionsDiscovery: [],
78
56
  LinuxSubscriptionsDiscoverySettings: (_) => _json(_),
79
57
  }));
80
- return new __HttpRequest({
81
- protocol,
82
- hostname,
83
- port,
84
- method: "POST",
85
- headers,
86
- path: resolvedPath,
87
- body,
88
- });
58
+ b.m("POST").h(headers).b(body);
59
+ return b.build();
89
60
  };
90
61
  export const de_GetServiceSettingsCommand = async (output, context) => {
91
62
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -4,4 +4,4 @@ import { LicenseManagerLinuxSubscriptionsPaginationConfiguration } from "./Inter
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListLinuxSubscriptionInstances(config: LicenseManagerLinuxSubscriptionsPaginationConfiguration, input: ListLinuxSubscriptionInstancesCommandInput, ...additionalArguments: any): Paginator<ListLinuxSubscriptionInstancesCommandOutput>;
7
+ export declare const paginateListLinuxSubscriptionInstances: (config: LicenseManagerLinuxSubscriptionsPaginationConfiguration, input: ListLinuxSubscriptionInstancesCommandInput, ...rest: any[]) => Paginator<ListLinuxSubscriptionInstancesCommandOutput>;
@@ -4,4 +4,4 @@ import { LicenseManagerLinuxSubscriptionsPaginationConfiguration } from "./Inter
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListLinuxSubscriptions(config: LicenseManagerLinuxSubscriptionsPaginationConfiguration, input: ListLinuxSubscriptionsCommandInput, ...additionalArguments: any): Paginator<ListLinuxSubscriptionsCommandOutput>;
7
+ export declare const paginateListLinuxSubscriptions: (config: LicenseManagerLinuxSubscriptionsPaginationConfiguration, input: ListLinuxSubscriptionsCommandInput, ...rest: any[]) => Paginator<ListLinuxSubscriptionsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListLinuxSubscriptionInstancesCommandOutput,
5
5
  } from "../commands/ListLinuxSubscriptionInstancesCommand";
6
6
  import { LicenseManagerLinuxSubscriptionsPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListLinuxSubscriptionInstances(
7
+ export declare const paginateListLinuxSubscriptionInstances: (
8
8
  config: LicenseManagerLinuxSubscriptionsPaginationConfiguration,
9
9
  input: ListLinuxSubscriptionInstancesCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListLinuxSubscriptionInstancesCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListLinuxSubscriptionInstancesCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListLinuxSubscriptionsCommandOutput,
5
5
  } from "../commands/ListLinuxSubscriptionsCommand";
6
6
  import { LicenseManagerLinuxSubscriptionsPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListLinuxSubscriptions(
7
+ export declare const paginateListLinuxSubscriptions: (
8
8
  config: LicenseManagerLinuxSubscriptionsPaginationConfiguration,
9
9
  input: ListLinuxSubscriptionsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListLinuxSubscriptionsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListLinuxSubscriptionsCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-license-manager-linux-subscriptions",
3
3
  "description": "AWS SDK for JavaScript License Manager Linux Subscriptions Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
4
+ "version": "3.478.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,20 +20,21 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.476.0",
24
- "@aws-sdk/core": "3.476.0",
25
- "@aws-sdk/credential-provider-node": "3.476.0",
23
+ "@aws-sdk/client-sts": "3.478.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.478.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
29
29
  "@aws-sdk/middleware-signing": "3.468.0",
30
- "@aws-sdk/middleware-user-agent": "3.470.0",
30
+ "@aws-sdk/middleware-user-agent": "3.478.0",
31
31
  "@aws-sdk/region-config-resolver": "3.470.0",
32
32
  "@aws-sdk/types": "3.468.0",
33
- "@aws-sdk/util-endpoints": "3.470.0",
33
+ "@aws-sdk/util-endpoints": "3.478.0",
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",