@aws-sdk/client-efs 3.35.0 → 3.36.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 (221) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist-cjs/EFS.js +0 -1
  3. package/dist-cjs/EFSClient.js +0 -1
  4. package/dist-cjs/commands/CreateAccessPointCommand.js +0 -1
  5. package/dist-cjs/commands/CreateFileSystemCommand.js +0 -1
  6. package/dist-cjs/commands/CreateMountTargetCommand.js +0 -1
  7. package/dist-cjs/commands/CreateTagsCommand.js +0 -1
  8. package/dist-cjs/commands/DeleteAccessPointCommand.js +0 -1
  9. package/dist-cjs/commands/DeleteFileSystemCommand.js +0 -1
  10. package/dist-cjs/commands/DeleteFileSystemPolicyCommand.js +0 -1
  11. package/dist-cjs/commands/DeleteMountTargetCommand.js +0 -1
  12. package/dist-cjs/commands/DeleteTagsCommand.js +0 -1
  13. package/dist-cjs/commands/DescribeAccessPointsCommand.js +0 -1
  14. package/dist-cjs/commands/DescribeAccountPreferencesCommand.js +0 -1
  15. package/dist-cjs/commands/DescribeBackupPolicyCommand.js +0 -1
  16. package/dist-cjs/commands/DescribeFileSystemPolicyCommand.js +0 -1
  17. package/dist-cjs/commands/DescribeFileSystemsCommand.js +0 -1
  18. package/dist-cjs/commands/DescribeLifecycleConfigurationCommand.js +0 -1
  19. package/dist-cjs/commands/DescribeMountTargetSecurityGroupsCommand.js +0 -1
  20. package/dist-cjs/commands/DescribeMountTargetsCommand.js +0 -1
  21. package/dist-cjs/commands/DescribeTagsCommand.js +0 -1
  22. package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -1
  23. package/dist-cjs/commands/ModifyMountTargetSecurityGroupsCommand.js +0 -1
  24. package/dist-cjs/commands/PutAccountPreferencesCommand.js +0 -1
  25. package/dist-cjs/commands/PutBackupPolicyCommand.js +0 -1
  26. package/dist-cjs/commands/PutFileSystemPolicyCommand.js +0 -1
  27. package/dist-cjs/commands/PutLifecycleConfigurationCommand.js +0 -1
  28. package/dist-cjs/commands/TagResourceCommand.js +0 -1
  29. package/dist-cjs/commands/UntagResourceCommand.js +0 -1
  30. package/dist-cjs/commands/UpdateFileSystemCommand.js +0 -1
  31. package/dist-cjs/endpoints.js +0 -1
  32. package/dist-cjs/index.js +0 -1
  33. package/dist-cjs/models/index.js +0 -1
  34. package/dist-cjs/models/models_0.js +0 -1
  35. package/dist-cjs/pagination/DescribeAccessPointsPaginator.js +0 -1
  36. package/dist-cjs/pagination/DescribeFileSystemsPaginator.js +0 -1
  37. package/dist-cjs/pagination/DescribeTagsPaginator.js +0 -1
  38. package/dist-cjs/pagination/Interfaces.js +0 -1
  39. package/dist-cjs/pagination/ListTagsForResourcePaginator.js +0 -1
  40. package/dist-cjs/protocols/Aws_restJson1.js +8 -1
  41. package/dist-cjs/runtimeConfig.browser.js +2 -3
  42. package/dist-cjs/runtimeConfig.js +3 -4
  43. package/dist-cjs/runtimeConfig.native.js +0 -1
  44. package/dist-cjs/runtimeConfig.shared.js +0 -1
  45. package/dist-es/EFS.js +0 -1
  46. package/dist-es/EFSClient.js +0 -1
  47. package/dist-es/commands/CreateAccessPointCommand.js +0 -1
  48. package/dist-es/commands/CreateFileSystemCommand.js +0 -1
  49. package/dist-es/commands/CreateMountTargetCommand.js +0 -1
  50. package/dist-es/commands/CreateTagsCommand.js +0 -1
  51. package/dist-es/commands/DeleteAccessPointCommand.js +0 -1
  52. package/dist-es/commands/DeleteFileSystemCommand.js +0 -1
  53. package/dist-es/commands/DeleteFileSystemPolicyCommand.js +0 -1
  54. package/dist-es/commands/DeleteMountTargetCommand.js +0 -1
  55. package/dist-es/commands/DeleteTagsCommand.js +0 -1
  56. package/dist-es/commands/DescribeAccessPointsCommand.js +0 -1
  57. package/dist-es/commands/DescribeAccountPreferencesCommand.js +0 -1
  58. package/dist-es/commands/DescribeBackupPolicyCommand.js +0 -1
  59. package/dist-es/commands/DescribeFileSystemPolicyCommand.js +0 -1
  60. package/dist-es/commands/DescribeFileSystemsCommand.js +0 -1
  61. package/dist-es/commands/DescribeLifecycleConfigurationCommand.js +0 -1
  62. package/dist-es/commands/DescribeMountTargetSecurityGroupsCommand.js +0 -1
  63. package/dist-es/commands/DescribeMountTargetsCommand.js +0 -1
  64. package/dist-es/commands/DescribeTagsCommand.js +0 -1
  65. package/dist-es/commands/ListTagsForResourceCommand.js +0 -1
  66. package/dist-es/commands/ModifyMountTargetSecurityGroupsCommand.js +0 -1
  67. package/dist-es/commands/PutAccountPreferencesCommand.js +0 -1
  68. package/dist-es/commands/PutBackupPolicyCommand.js +0 -1
  69. package/dist-es/commands/PutFileSystemPolicyCommand.js +0 -1
  70. package/dist-es/commands/PutLifecycleConfigurationCommand.js +0 -1
  71. package/dist-es/commands/TagResourceCommand.js +0 -1
  72. package/dist-es/commands/UntagResourceCommand.js +0 -1
  73. package/dist-es/commands/UpdateFileSystemCommand.js +0 -1
  74. package/dist-es/endpoints.js +0 -1
  75. package/dist-es/index.js +0 -1
  76. package/dist-es/models/index.js +0 -1
  77. package/dist-es/models/models_0.js +0 -1
  78. package/dist-es/pagination/DescribeAccessPointsPaginator.js +0 -1
  79. package/dist-es/pagination/DescribeFileSystemsPaginator.js +0 -1
  80. package/dist-es/pagination/DescribeTagsPaginator.js +0 -1
  81. package/dist-es/pagination/Interfaces.js +0 -1
  82. package/dist-es/pagination/ListTagsForResourcePaginator.js +0 -1
  83. package/dist-es/protocols/Aws_restJson1.js +22 -15
  84. package/dist-es/runtimeConfig.browser.js +1 -2
  85. package/dist-es/runtimeConfig.js +2 -3
  86. package/dist-es/runtimeConfig.native.js +0 -1
  87. package/dist-es/runtimeConfig.shared.js +0 -1
  88. package/package.json +33 -30
  89. package/dist-cjs/EFS.js.map +0 -1
  90. package/dist-cjs/EFSClient.js.map +0 -1
  91. package/dist-cjs/commands/CreateAccessPointCommand.js.map +0 -1
  92. package/dist-cjs/commands/CreateFileSystemCommand.js.map +0 -1
  93. package/dist-cjs/commands/CreateMountTargetCommand.js.map +0 -1
  94. package/dist-cjs/commands/CreateTagsCommand.js.map +0 -1
  95. package/dist-cjs/commands/DeleteAccessPointCommand.js.map +0 -1
  96. package/dist-cjs/commands/DeleteFileSystemCommand.js.map +0 -1
  97. package/dist-cjs/commands/DeleteFileSystemPolicyCommand.js.map +0 -1
  98. package/dist-cjs/commands/DeleteMountTargetCommand.js.map +0 -1
  99. package/dist-cjs/commands/DeleteTagsCommand.js.map +0 -1
  100. package/dist-cjs/commands/DescribeAccessPointsCommand.js.map +0 -1
  101. package/dist-cjs/commands/DescribeAccountPreferencesCommand.js.map +0 -1
  102. package/dist-cjs/commands/DescribeBackupPolicyCommand.js.map +0 -1
  103. package/dist-cjs/commands/DescribeFileSystemPolicyCommand.js.map +0 -1
  104. package/dist-cjs/commands/DescribeFileSystemsCommand.js.map +0 -1
  105. package/dist-cjs/commands/DescribeLifecycleConfigurationCommand.js.map +0 -1
  106. package/dist-cjs/commands/DescribeMountTargetSecurityGroupsCommand.js.map +0 -1
  107. package/dist-cjs/commands/DescribeMountTargetsCommand.js.map +0 -1
  108. package/dist-cjs/commands/DescribeTagsCommand.js.map +0 -1
  109. package/dist-cjs/commands/ListTagsForResourceCommand.js.map +0 -1
  110. package/dist-cjs/commands/ModifyMountTargetSecurityGroupsCommand.js.map +0 -1
  111. package/dist-cjs/commands/PutAccountPreferencesCommand.js.map +0 -1
  112. package/dist-cjs/commands/PutBackupPolicyCommand.js.map +0 -1
  113. package/dist-cjs/commands/PutFileSystemPolicyCommand.js.map +0 -1
  114. package/dist-cjs/commands/PutLifecycleConfigurationCommand.js.map +0 -1
  115. package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
  116. package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
  117. package/dist-cjs/commands/UpdateFileSystemCommand.js.map +0 -1
  118. package/dist-cjs/endpoints.js.map +0 -1
  119. package/dist-cjs/index.js.map +0 -1
  120. package/dist-cjs/models/index.js.map +0 -1
  121. package/dist-cjs/models/models_0.js.map +0 -1
  122. package/dist-cjs/pagination/DescribeAccessPointsPaginator.js.map +0 -1
  123. package/dist-cjs/pagination/DescribeFileSystemsPaginator.js.map +0 -1
  124. package/dist-cjs/pagination/DescribeTagsPaginator.js.map +0 -1
  125. package/dist-cjs/pagination/Interfaces.js.map +0 -1
  126. package/dist-cjs/pagination/ListTagsForResourcePaginator.js.map +0 -1
  127. package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
  128. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  129. package/dist-cjs/runtimeConfig.js.map +0 -1
  130. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  131. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  132. package/dist-es/EFS.js.map +0 -1
  133. package/dist-es/EFSClient.js.map +0 -1
  134. package/dist-es/commands/CreateAccessPointCommand.js.map +0 -1
  135. package/dist-es/commands/CreateFileSystemCommand.js.map +0 -1
  136. package/dist-es/commands/CreateMountTargetCommand.js.map +0 -1
  137. package/dist-es/commands/CreateTagsCommand.js.map +0 -1
  138. package/dist-es/commands/DeleteAccessPointCommand.js.map +0 -1
  139. package/dist-es/commands/DeleteFileSystemCommand.js.map +0 -1
  140. package/dist-es/commands/DeleteFileSystemPolicyCommand.js.map +0 -1
  141. package/dist-es/commands/DeleteMountTargetCommand.js.map +0 -1
  142. package/dist-es/commands/DeleteTagsCommand.js.map +0 -1
  143. package/dist-es/commands/DescribeAccessPointsCommand.js.map +0 -1
  144. package/dist-es/commands/DescribeAccountPreferencesCommand.js.map +0 -1
  145. package/dist-es/commands/DescribeBackupPolicyCommand.js.map +0 -1
  146. package/dist-es/commands/DescribeFileSystemPolicyCommand.js.map +0 -1
  147. package/dist-es/commands/DescribeFileSystemsCommand.js.map +0 -1
  148. package/dist-es/commands/DescribeLifecycleConfigurationCommand.js.map +0 -1
  149. package/dist-es/commands/DescribeMountTargetSecurityGroupsCommand.js.map +0 -1
  150. package/dist-es/commands/DescribeMountTargetsCommand.js.map +0 -1
  151. package/dist-es/commands/DescribeTagsCommand.js.map +0 -1
  152. package/dist-es/commands/ListTagsForResourceCommand.js.map +0 -1
  153. package/dist-es/commands/ModifyMountTargetSecurityGroupsCommand.js.map +0 -1
  154. package/dist-es/commands/PutAccountPreferencesCommand.js.map +0 -1
  155. package/dist-es/commands/PutBackupPolicyCommand.js.map +0 -1
  156. package/dist-es/commands/PutFileSystemPolicyCommand.js.map +0 -1
  157. package/dist-es/commands/PutLifecycleConfigurationCommand.js.map +0 -1
  158. package/dist-es/commands/TagResourceCommand.js.map +0 -1
  159. package/dist-es/commands/UntagResourceCommand.js.map +0 -1
  160. package/dist-es/commands/UpdateFileSystemCommand.js.map +0 -1
  161. package/dist-es/endpoints.js.map +0 -1
  162. package/dist-es/index.js.map +0 -1
  163. package/dist-es/models/index.js.map +0 -1
  164. package/dist-es/models/models_0.js.map +0 -1
  165. package/dist-es/pagination/DescribeAccessPointsPaginator.js.map +0 -1
  166. package/dist-es/pagination/DescribeFileSystemsPaginator.js.map +0 -1
  167. package/dist-es/pagination/DescribeTagsPaginator.js.map +0 -1
  168. package/dist-es/pagination/Interfaces.js.map +0 -1
  169. package/dist-es/pagination/ListTagsForResourcePaginator.js.map +0 -1
  170. package/dist-es/protocols/Aws_restJson1.js.map +0 -1
  171. package/dist-es/runtimeConfig.browser.js.map +0 -1
  172. package/dist-es/runtimeConfig.js.map +0 -1
  173. package/dist-es/runtimeConfig.native.js.map +0 -1
  174. package/dist-es/runtimeConfig.shared.js.map +0 -1
  175. package/jest.config.js +0 -4
  176. package/src/EFS.ts +0 -1386
  177. package/src/EFSClient.ts +0 -363
  178. package/src/commands/CreateAccessPointCommand.ts +0 -102
  179. package/src/commands/CreateFileSystemCommand.ts +0 -148
  180. package/src/commands/CreateMountTargetCommand.ts +0 -236
  181. package/src/commands/CreateTagsCommand.ts +0 -106
  182. package/src/commands/DeleteAccessPointCommand.ts +0 -98
  183. package/src/commands/DeleteFileSystemCommand.ts +0 -109
  184. package/src/commands/DeleteFileSystemPolicyCommand.ts +0 -98
  185. package/src/commands/DeleteMountTargetCommand.ts +0 -128
  186. package/src/commands/DeleteTagsCommand.ts +0 -107
  187. package/src/commands/DescribeAccessPointsCommand.ts +0 -98
  188. package/src/commands/DescribeAccountPreferencesCommand.ts +0 -99
  189. package/src/commands/DescribeBackupPolicyCommand.ts +0 -95
  190. package/src/commands/DescribeFileSystemPolicyCommand.ts +0 -96
  191. package/src/commands/DescribeFileSystemsCommand.ts +0 -117
  192. package/src/commands/DescribeLifecycleConfigurationCommand.ts +0 -110
  193. package/src/commands/DescribeMountTargetSecurityGroupsCommand.ts +0 -121
  194. package/src/commands/DescribeMountTargetsCommand.ts +0 -102
  195. package/src/commands/DescribeTagsCommand.ts +0 -105
  196. package/src/commands/ListTagsForResourceCommand.ts +0 -96
  197. package/src/commands/ModifyMountTargetSecurityGroupsCommand.ts +0 -120
  198. package/src/commands/PutAccountPreferencesCommand.ts +0 -98
  199. package/src/commands/PutBackupPolicyCommand.ts +0 -95
  200. package/src/commands/PutFileSystemPolicyCommand.ts +0 -104
  201. package/src/commands/PutLifecycleConfigurationCommand.ts +0 -128
  202. package/src/commands/TagResourceCommand.ts +0 -96
  203. package/src/commands/UntagResourceCommand.ts +0 -96
  204. package/src/commands/UpdateFileSystemCommand.ts +0 -96
  205. package/src/endpoints.ts +0 -183
  206. package/src/index.ts +0 -35
  207. package/src/models/index.ts +0 -1
  208. package/src/models/models_0.ts +0 -2185
  209. package/src/pagination/DescribeAccessPointsPaginator.ts +0 -59
  210. package/src/pagination/DescribeFileSystemsPaginator.ts +0 -59
  211. package/src/pagination/DescribeTagsPaginator.ts +0 -59
  212. package/src/pagination/Interfaces.ts +0 -8
  213. package/src/pagination/ListTagsForResourcePaginator.ts +0 -59
  214. package/src/protocols/Aws_restJson1.ts +0 -4420
  215. package/src/runtimeConfig.browser.ts +0 -41
  216. package/src/runtimeConfig.native.ts +0 -17
  217. package/src/runtimeConfig.shared.ts +0 -17
  218. package/src/runtimeConfig.ts +0 -46
  219. package/tsconfig.es.json +0 -10
  220. package/tsconfig.json +0 -33
  221. package/tsconfig.types.json +0 -9
@@ -1,59 +0,0 @@
1
- import { Paginator } from "@aws-sdk/types";
2
-
3
- import {
4
- DescribeAccessPointsCommand,
5
- DescribeAccessPointsCommandInput,
6
- DescribeAccessPointsCommandOutput,
7
- } from "../commands/DescribeAccessPointsCommand";
8
- import { EFS } from "../EFS";
9
- import { EFSClient } from "../EFSClient";
10
- import { EFSPaginationConfiguration } from "./Interfaces";
11
-
12
- /**
13
- * @private
14
- */
15
- const makePagedClientRequest = async (
16
- client: EFSClient,
17
- input: DescribeAccessPointsCommandInput,
18
- ...args: any
19
- ): Promise<DescribeAccessPointsCommandOutput> => {
20
- // @ts-ignore
21
- return await client.send(new DescribeAccessPointsCommand(input), ...args);
22
- };
23
- /**
24
- * @private
25
- */
26
- const makePagedRequest = async (
27
- client: EFS,
28
- input: DescribeAccessPointsCommandInput,
29
- ...args: any
30
- ): Promise<DescribeAccessPointsCommandOutput> => {
31
- // @ts-ignore
32
- return await client.describeAccessPoints(input, ...args);
33
- };
34
- export async function* paginateDescribeAccessPoints(
35
- config: EFSPaginationConfiguration,
36
- input: DescribeAccessPointsCommandInput,
37
- ...additionalArguments: any
38
- ): Paginator<DescribeAccessPointsCommandOutput> {
39
- // ToDo: replace with actual type instead of typeof input.NextToken
40
- let token: typeof input.NextToken | undefined = config.startingToken || undefined;
41
- let hasNext = true;
42
- let page: DescribeAccessPointsCommandOutput;
43
- while (hasNext) {
44
- input.NextToken = token;
45
- input["MaxResults"] = config.pageSize;
46
- if (config.client instanceof EFS) {
47
- page = await makePagedRequest(config.client, input, ...additionalArguments);
48
- } else if (config.client instanceof EFSClient) {
49
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
50
- } else {
51
- throw new Error("Invalid client, expected EFS | EFSClient");
52
- }
53
- yield page;
54
- token = page.NextToken;
55
- hasNext = !!token;
56
- }
57
- // @ts-ignore
58
- return undefined;
59
- }
@@ -1,59 +0,0 @@
1
- import { Paginator } from "@aws-sdk/types";
2
-
3
- import {
4
- DescribeFileSystemsCommand,
5
- DescribeFileSystemsCommandInput,
6
- DescribeFileSystemsCommandOutput,
7
- } from "../commands/DescribeFileSystemsCommand";
8
- import { EFS } from "../EFS";
9
- import { EFSClient } from "../EFSClient";
10
- import { EFSPaginationConfiguration } from "./Interfaces";
11
-
12
- /**
13
- * @private
14
- */
15
- const makePagedClientRequest = async (
16
- client: EFSClient,
17
- input: DescribeFileSystemsCommandInput,
18
- ...args: any
19
- ): Promise<DescribeFileSystemsCommandOutput> => {
20
- // @ts-ignore
21
- return await client.send(new DescribeFileSystemsCommand(input), ...args);
22
- };
23
- /**
24
- * @private
25
- */
26
- const makePagedRequest = async (
27
- client: EFS,
28
- input: DescribeFileSystemsCommandInput,
29
- ...args: any
30
- ): Promise<DescribeFileSystemsCommandOutput> => {
31
- // @ts-ignore
32
- return await client.describeFileSystems(input, ...args);
33
- };
34
- export async function* paginateDescribeFileSystems(
35
- config: EFSPaginationConfiguration,
36
- input: DescribeFileSystemsCommandInput,
37
- ...additionalArguments: any
38
- ): Paginator<DescribeFileSystemsCommandOutput> {
39
- // ToDo: replace with actual type instead of typeof input.Marker
40
- let token: typeof input.Marker | undefined = config.startingToken || undefined;
41
- let hasNext = true;
42
- let page: DescribeFileSystemsCommandOutput;
43
- while (hasNext) {
44
- input.Marker = token;
45
- input["MaxItems"] = config.pageSize;
46
- if (config.client instanceof EFS) {
47
- page = await makePagedRequest(config.client, input, ...additionalArguments);
48
- } else if (config.client instanceof EFSClient) {
49
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
50
- } else {
51
- throw new Error("Invalid client, expected EFS | EFSClient");
52
- }
53
- yield page;
54
- token = page.NextMarker;
55
- hasNext = !!token;
56
- }
57
- // @ts-ignore
58
- return undefined;
59
- }
@@ -1,59 +0,0 @@
1
- import { Paginator } from "@aws-sdk/types";
2
-
3
- import {
4
- DescribeTagsCommand,
5
- DescribeTagsCommandInput,
6
- DescribeTagsCommandOutput,
7
- } from "../commands/DescribeTagsCommand";
8
- import { EFS } from "../EFS";
9
- import { EFSClient } from "../EFSClient";
10
- import { EFSPaginationConfiguration } from "./Interfaces";
11
-
12
- /**
13
- * @private
14
- */
15
- const makePagedClientRequest = async (
16
- client: EFSClient,
17
- input: DescribeTagsCommandInput,
18
- ...args: any
19
- ): Promise<DescribeTagsCommandOutput> => {
20
- // @ts-ignore
21
- return await client.send(new DescribeTagsCommand(input), ...args);
22
- };
23
- /**
24
- * @private
25
- */
26
- const makePagedRequest = async (
27
- client: EFS,
28
- input: DescribeTagsCommandInput,
29
- ...args: any
30
- ): Promise<DescribeTagsCommandOutput> => {
31
- // @ts-ignore
32
- return await client.describeTags(input, ...args);
33
- };
34
- export async function* paginateDescribeTags(
35
- config: EFSPaginationConfiguration,
36
- input: DescribeTagsCommandInput,
37
- ...additionalArguments: any
38
- ): Paginator<DescribeTagsCommandOutput> {
39
- // ToDo: replace with actual type instead of typeof input.Marker
40
- let token: typeof input.Marker | undefined = config.startingToken || undefined;
41
- let hasNext = true;
42
- let page: DescribeTagsCommandOutput;
43
- while (hasNext) {
44
- input.Marker = token;
45
- input["MaxItems"] = config.pageSize;
46
- if (config.client instanceof EFS) {
47
- page = await makePagedRequest(config.client, input, ...additionalArguments);
48
- } else if (config.client instanceof EFSClient) {
49
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
50
- } else {
51
- throw new Error("Invalid client, expected EFS | EFSClient");
52
- }
53
- yield page;
54
- token = page.NextMarker;
55
- hasNext = !!token;
56
- }
57
- // @ts-ignore
58
- return undefined;
59
- }
@@ -1,8 +0,0 @@
1
- import { PaginationConfiguration } from "@aws-sdk/types";
2
-
3
- import { EFS } from "../EFS";
4
- import { EFSClient } from "../EFSClient";
5
-
6
- export interface EFSPaginationConfiguration extends PaginationConfiguration {
7
- client: EFS | EFSClient;
8
- }
@@ -1,59 +0,0 @@
1
- import { Paginator } from "@aws-sdk/types";
2
-
3
- import {
4
- ListTagsForResourceCommand,
5
- ListTagsForResourceCommandInput,
6
- ListTagsForResourceCommandOutput,
7
- } from "../commands/ListTagsForResourceCommand";
8
- import { EFS } from "../EFS";
9
- import { EFSClient } from "../EFSClient";
10
- import { EFSPaginationConfiguration } from "./Interfaces";
11
-
12
- /**
13
- * @private
14
- */
15
- const makePagedClientRequest = async (
16
- client: EFSClient,
17
- input: ListTagsForResourceCommandInput,
18
- ...args: any
19
- ): Promise<ListTagsForResourceCommandOutput> => {
20
- // @ts-ignore
21
- return await client.send(new ListTagsForResourceCommand(input), ...args);
22
- };
23
- /**
24
- * @private
25
- */
26
- const makePagedRequest = async (
27
- client: EFS,
28
- input: ListTagsForResourceCommandInput,
29
- ...args: any
30
- ): Promise<ListTagsForResourceCommandOutput> => {
31
- // @ts-ignore
32
- return await client.listTagsForResource(input, ...args);
33
- };
34
- export async function* paginateListTagsForResource(
35
- config: EFSPaginationConfiguration,
36
- input: ListTagsForResourceCommandInput,
37
- ...additionalArguments: any
38
- ): Paginator<ListTagsForResourceCommandOutput> {
39
- // ToDo: replace with actual type instead of typeof input.NextToken
40
- let token: typeof input.NextToken | undefined = config.startingToken || undefined;
41
- let hasNext = true;
42
- let page: ListTagsForResourceCommandOutput;
43
- while (hasNext) {
44
- input.NextToken = token;
45
- input["MaxResults"] = config.pageSize;
46
- if (config.client instanceof EFS) {
47
- page = await makePagedRequest(config.client, input, ...additionalArguments);
48
- } else if (config.client instanceof EFSClient) {
49
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
50
- } else {
51
- throw new Error("Invalid client, expected EFS | EFSClient");
52
- }
53
- yield page;
54
- token = page.NextToken;
55
- hasNext = !!token;
56
- }
57
- // @ts-ignore
58
- return undefined;
59
- }