@aws-sdk/client-cloudfront-keyvaluestore 3.456.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 (107) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +253 -0
  3. package/dist-cjs/CloudFrontKeyValueStore.js +23 -0
  4. package/dist-cjs/CloudFrontKeyValueStoreClient.js +43 -0
  5. package/dist-cjs/commands/DeleteKeyCommand.js +51 -0
  6. package/dist-cjs/commands/DescribeKeyValueStoreCommand.js +51 -0
  7. package/dist-cjs/commands/GetKeyCommand.js +52 -0
  8. package/dist-cjs/commands/ListKeysCommand.js +52 -0
  9. package/dist-cjs/commands/PutKeyCommand.js +52 -0
  10. package/dist-cjs/commands/UpdateKeysCommand.js +52 -0
  11. package/dist-cjs/commands/index.js +9 -0
  12. package/dist-cjs/endpoint/EndpointParameters.js +11 -0
  13. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  14. package/dist-cjs/endpoint/ruleset.js +7 -0
  15. package/dist-cjs/extensionConfiguration.js +2 -0
  16. package/dist-cjs/index.js +12 -0
  17. package/dist-cjs/models/CloudFrontKeyValueStoreServiceException.js +12 -0
  18. package/dist-cjs/models/index.js +4 -0
  19. package/dist-cjs/models/models_0.js +119 -0
  20. package/dist-cjs/pagination/Interfaces.js +2 -0
  21. package/dist-cjs/pagination/ListKeysPaginator.js +29 -0
  22. package/dist-cjs/pagination/index.js +5 -0
  23. package/dist-cjs/protocols/Aws_restJson1.js +557 -0
  24. package/dist-cjs/runtimeConfig.browser.js +39 -0
  25. package/dist-cjs/runtimeConfig.js +50 -0
  26. package/dist-cjs/runtimeConfig.native.js +15 -0
  27. package/dist-cjs/runtimeConfig.shared.js +24 -0
  28. package/dist-cjs/runtimeExtensions.js +22 -0
  29. package/dist-es/CloudFrontKeyValueStore.js +19 -0
  30. package/dist-es/CloudFrontKeyValueStoreClient.js +39 -0
  31. package/dist-es/commands/DeleteKeyCommand.js +47 -0
  32. package/dist-es/commands/DescribeKeyValueStoreCommand.js +47 -0
  33. package/dist-es/commands/GetKeyCommand.js +48 -0
  34. package/dist-es/commands/ListKeysCommand.js +48 -0
  35. package/dist-es/commands/PutKeyCommand.js +48 -0
  36. package/dist-es/commands/UpdateKeysCommand.js +48 -0
  37. package/dist-es/commands/index.js +6 -0
  38. package/dist-es/endpoint/EndpointParameters.js +7 -0
  39. package/dist-es/endpoint/endpointResolver.js +8 -0
  40. package/dist-es/endpoint/ruleset.js +4 -0
  41. package/dist-es/extensionConfiguration.js +1 -0
  42. package/dist-es/index.js +7 -0
  43. package/dist-es/models/CloudFrontKeyValueStoreServiceException.js +8 -0
  44. package/dist-es/models/index.js +1 -0
  45. package/dist-es/models/models_0.js +104 -0
  46. package/dist-es/pagination/Interfaces.js +1 -0
  47. package/dist-es/pagination/ListKeysPaginator.js +25 -0
  48. package/dist-es/pagination/index.js +2 -0
  49. package/dist-es/protocols/Aws_restJson1.js +542 -0
  50. package/dist-es/runtimeConfig.browser.js +34 -0
  51. package/dist-es/runtimeConfig.js +45 -0
  52. package/dist-es/runtimeConfig.native.js +11 -0
  53. package/dist-es/runtimeConfig.shared.js +20 -0
  54. package/dist-es/runtimeExtensions.js +18 -0
  55. package/dist-types/CloudFrontKeyValueStore.d.ts +52 -0
  56. package/dist-types/CloudFrontKeyValueStoreClient.d.ts +175 -0
  57. package/dist-types/commands/DeleteKeyCommand.d.ts +95 -0
  58. package/dist-types/commands/DescribeKeyValueStoreCommand.d.ts +90 -0
  59. package/dist-types/commands/GetKeyCommand.d.ts +89 -0
  60. package/dist-types/commands/ListKeysCommand.d.ts +96 -0
  61. package/dist-types/commands/PutKeyCommand.d.ts +96 -0
  62. package/dist-types/commands/UpdateKeysCommand.d.ts +105 -0
  63. package/dist-types/commands/index.d.ts +6 -0
  64. package/dist-types/endpoint/EndpointParameters.d.ts +21 -0
  65. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  66. package/dist-types/endpoint/ruleset.d.ts +2 -0
  67. package/dist-types/extensionConfiguration.d.ts +8 -0
  68. package/dist-types/index.d.ts +15 -0
  69. package/dist-types/models/CloudFrontKeyValueStoreServiceException.d.ts +13 -0
  70. package/dist-types/models/index.d.ts +1 -0
  71. package/dist-types/models/models_0.d.ts +403 -0
  72. package/dist-types/pagination/Interfaces.d.ts +8 -0
  73. package/dist-types/pagination/ListKeysPaginator.d.ts +7 -0
  74. package/dist-types/pagination/index.d.ts +2 -0
  75. package/dist-types/protocols/Aws_restJson1.d.ts +56 -0
  76. package/dist-types/runtimeConfig.browser.d.ts +46 -0
  77. package/dist-types/runtimeConfig.d.ts +46 -0
  78. package/dist-types/runtimeConfig.native.d.ts +45 -0
  79. package/dist-types/runtimeConfig.shared.d.ts +19 -0
  80. package/dist-types/runtimeExtensions.d.ts +17 -0
  81. package/dist-types/ts3.4/CloudFrontKeyValueStore.d.ts +109 -0
  82. package/dist-types/ts3.4/CloudFrontKeyValueStoreClient.d.ts +157 -0
  83. package/dist-types/ts3.4/commands/DeleteKeyCommand.d.ts +35 -0
  84. package/dist-types/ts3.4/commands/DescribeKeyValueStoreCommand.d.ts +42 -0
  85. package/dist-types/ts3.4/commands/GetKeyCommand.d.ts +33 -0
  86. package/dist-types/ts3.4/commands/ListKeysCommand.d.ts +35 -0
  87. package/dist-types/ts3.4/commands/PutKeyCommand.d.ts +33 -0
  88. package/dist-types/ts3.4/commands/UpdateKeysCommand.d.ts +35 -0
  89. package/dist-types/ts3.4/commands/index.d.ts +6 -0
  90. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +32 -0
  91. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  92. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  93. package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -0
  94. package/dist-types/ts3.4/index.d.ts +10 -0
  95. package/dist-types/ts3.4/models/CloudFrontKeyValueStoreServiceException.d.ts +8 -0
  96. package/dist-types/ts3.4/models/index.d.ts +1 -0
  97. package/dist-types/ts3.4/models/models_0.d.ts +139 -0
  98. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  99. package/dist-types/ts3.4/pagination/ListKeysPaginator.d.ts +11 -0
  100. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  101. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +77 -0
  102. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +99 -0
  103. package/dist-types/ts3.4/runtimeConfig.d.ts +99 -0
  104. package/dist-types/ts3.4/runtimeConfig.native.d.ts +90 -0
  105. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
  106. package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
  107. package/package.json +102 -0
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
5
+ const url_parser_1 = require("@smithy/url-parser");
6
+ const util_base64_1 = require("@smithy/util-base64");
7
+ const util_utf8_1 = require("@smithy/util-utf8");
8
+ const endpointResolver_1 = require("./endpoint/endpointResolver");
9
+ const getRuntimeConfig = (config) => {
10
+ return {
11
+ apiVersion: "2022-07-26",
12
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
13
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
14
+ disableHostPrefix: config?.disableHostPrefix ?? false,
15
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
16
+ extensions: config?.extensions ?? [],
17
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
18
+ serviceId: config?.serviceId ?? "CloudFront KeyValueStore",
19
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
20
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
21
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
22
+ };
23
+ };
24
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveRuntimeExtensions = void 0;
4
+ const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
5
+ const protocol_http_1 = require("@smithy/protocol-http");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ const asPartial = (t) => t;
8
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
9
+ const extensionConfiguration = {
10
+ ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
11
+ ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
12
+ ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
13
+ };
14
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
15
+ return {
16
+ ...runtimeConfig,
17
+ ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
18
+ ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
19
+ ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
20
+ };
21
+ };
22
+ exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
@@ -0,0 +1,19 @@
1
+ import { createAggregatedClient } from "@smithy/smithy-client";
2
+ import { CloudFrontKeyValueStoreClient } from "./CloudFrontKeyValueStoreClient";
3
+ import { DeleteKeyCommand } from "./commands/DeleteKeyCommand";
4
+ import { DescribeKeyValueStoreCommand, } from "./commands/DescribeKeyValueStoreCommand";
5
+ import { GetKeyCommand } from "./commands/GetKeyCommand";
6
+ import { ListKeysCommand } from "./commands/ListKeysCommand";
7
+ import { PutKeyCommand } from "./commands/PutKeyCommand";
8
+ import { UpdateKeysCommand } from "./commands/UpdateKeysCommand";
9
+ const commands = {
10
+ DeleteKeyCommand,
11
+ DescribeKeyValueStoreCommand,
12
+ GetKeyCommand,
13
+ ListKeysCommand,
14
+ PutKeyCommand,
15
+ UpdateKeysCommand,
16
+ };
17
+ export class CloudFrontKeyValueStore extends CloudFrontKeyValueStoreClient {
18
+ }
19
+ createAggregatedClient(commands, CloudFrontKeyValueStore);
@@ -0,0 +1,39 @@
1
+ import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
2
+ import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
3
+ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
4
+ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
5
+ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
6
+ import { resolveRegionConfig } from "@smithy/config-resolver";
7
+ import { getContentLengthPlugin } from "@smithy/middleware-content-length";
8
+ import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
9
+ import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
10
+ import { Client as __Client, } from "@smithy/smithy-client";
11
+ import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
12
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
13
+ import { resolveRuntimeExtensions } from "./runtimeExtensions";
14
+ export { __Client };
15
+ export class CloudFrontKeyValueStoreClient extends __Client {
16
+ constructor(...[configuration]) {
17
+ const _config_0 = __getRuntimeConfig(configuration || {});
18
+ const _config_1 = resolveClientEndpointParameters(_config_0);
19
+ const _config_2 = resolveRegionConfig(_config_1);
20
+ const _config_3 = resolveEndpointConfig(_config_2);
21
+ const _config_4 = resolveRetryConfig(_config_3);
22
+ const _config_5 = resolveHostHeaderConfig(_config_4);
23
+ const _config_6 = resolveAwsAuthConfig(_config_5);
24
+ const _config_7 = resolveUserAgentConfig(_config_6);
25
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
26
+ super(_config_8);
27
+ this.config = _config_8;
28
+ this.middlewareStack.use(getRetryPlugin(this.config));
29
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
30
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
31
+ this.middlewareStack.use(getLoggerPlugin(this.config));
32
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
33
+ this.middlewareStack.use(getAwsAuthPlugin(this.config));
34
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
35
+ }
36
+ destroy() {
37
+ super.destroy();
38
+ }
39
+ }
@@ -0,0 +1,47 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_DeleteKeyCommand, se_DeleteKeyCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class DeleteKeyCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ KvsARN: { type: "contextParams", name: "KvsARN" },
11
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
+ Endpoint: { type: "builtInParams", name: "endpoint" },
13
+ Region: { type: "builtInParams", name: "region" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, DeleteKeyCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "CloudFrontKeyValueStoreClient";
26
+ const commandName = "DeleteKeyCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "CloudFrontKeyValueStore",
35
+ operation: "DeleteKey",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_DeleteKeyCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_DeleteKeyCommand(output, context);
46
+ }
47
+ }
@@ -0,0 +1,47 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_DescribeKeyValueStoreCommand, se_DescribeKeyValueStoreCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class DescribeKeyValueStoreCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ KvsARN: { type: "contextParams", name: "KvsARN" },
11
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
+ Endpoint: { type: "builtInParams", name: "endpoint" },
13
+ Region: { type: "builtInParams", name: "region" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, DescribeKeyValueStoreCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "CloudFrontKeyValueStoreClient";
26
+ const commandName = "DescribeKeyValueStoreCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "CloudFrontKeyValueStore",
35
+ operation: "DescribeKeyValueStore",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_DescribeKeyValueStoreCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_DescribeKeyValueStoreCommand(output, context);
46
+ }
47
+ }
@@ -0,0 +1,48 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { GetKeyResponseFilterSensitiveLog } from "../models/models_0";
6
+ import { de_GetKeyCommand, se_GetKeyCommand } from "../protocols/Aws_restJson1";
7
+ export { $Command };
8
+ export class GetKeyCommand extends $Command {
9
+ static getEndpointParameterInstructions() {
10
+ return {
11
+ KvsARN: { type: "contextParams", name: "KvsARN" },
12
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
13
+ Endpoint: { type: "builtInParams", name: "endpoint" },
14
+ Region: { type: "builtInParams", name: "region" },
15
+ };
16
+ }
17
+ constructor(input) {
18
+ super();
19
+ this.input = input;
20
+ }
21
+ resolveMiddleware(clientStack, configuration, options) {
22
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
+ this.middlewareStack.use(getEndpointPlugin(configuration, GetKeyCommand.getEndpointParameterInstructions()));
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const { logger } = configuration;
26
+ const clientName = "CloudFrontKeyValueStoreClient";
27
+ const commandName = "GetKeyCommand";
28
+ const handlerExecutionContext = {
29
+ logger,
30
+ clientName,
31
+ commandName,
32
+ inputFilterSensitiveLog: (_) => _,
33
+ outputFilterSensitiveLog: GetKeyResponseFilterSensitiveLog,
34
+ [SMITHY_CONTEXT_KEY]: {
35
+ service: "CloudFrontKeyValueStore",
36
+ operation: "GetKey",
37
+ },
38
+ };
39
+ const { requestHandler } = configuration;
40
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
41
+ }
42
+ serialize(input, context) {
43
+ return se_GetKeyCommand(input, context);
44
+ }
45
+ deserialize(output, context) {
46
+ return de_GetKeyCommand(output, context);
47
+ }
48
+ }
@@ -0,0 +1,48 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { ListKeysResponseFilterSensitiveLog } from "../models/models_0";
6
+ import { de_ListKeysCommand, se_ListKeysCommand } from "../protocols/Aws_restJson1";
7
+ export { $Command };
8
+ export class ListKeysCommand extends $Command {
9
+ static getEndpointParameterInstructions() {
10
+ return {
11
+ KvsARN: { type: "contextParams", name: "KvsARN" },
12
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
13
+ Endpoint: { type: "builtInParams", name: "endpoint" },
14
+ Region: { type: "builtInParams", name: "region" },
15
+ };
16
+ }
17
+ constructor(input) {
18
+ super();
19
+ this.input = input;
20
+ }
21
+ resolveMiddleware(clientStack, configuration, options) {
22
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListKeysCommand.getEndpointParameterInstructions()));
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const { logger } = configuration;
26
+ const clientName = "CloudFrontKeyValueStoreClient";
27
+ const commandName = "ListKeysCommand";
28
+ const handlerExecutionContext = {
29
+ logger,
30
+ clientName,
31
+ commandName,
32
+ inputFilterSensitiveLog: (_) => _,
33
+ outputFilterSensitiveLog: ListKeysResponseFilterSensitiveLog,
34
+ [SMITHY_CONTEXT_KEY]: {
35
+ service: "CloudFrontKeyValueStore",
36
+ operation: "ListKeys",
37
+ },
38
+ };
39
+ const { requestHandler } = configuration;
40
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
41
+ }
42
+ serialize(input, context) {
43
+ return se_ListKeysCommand(input, context);
44
+ }
45
+ deserialize(output, context) {
46
+ return de_ListKeysCommand(output, context);
47
+ }
48
+ }
@@ -0,0 +1,48 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { PutKeyRequestFilterSensitiveLog } from "../models/models_0";
6
+ import { de_PutKeyCommand, se_PutKeyCommand } from "../protocols/Aws_restJson1";
7
+ export { $Command };
8
+ export class PutKeyCommand extends $Command {
9
+ static getEndpointParameterInstructions() {
10
+ return {
11
+ KvsARN: { type: "contextParams", name: "KvsARN" },
12
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
13
+ Endpoint: { type: "builtInParams", name: "endpoint" },
14
+ Region: { type: "builtInParams", name: "region" },
15
+ };
16
+ }
17
+ constructor(input) {
18
+ super();
19
+ this.input = input;
20
+ }
21
+ resolveMiddleware(clientStack, configuration, options) {
22
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
+ this.middlewareStack.use(getEndpointPlugin(configuration, PutKeyCommand.getEndpointParameterInstructions()));
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const { logger } = configuration;
26
+ const clientName = "CloudFrontKeyValueStoreClient";
27
+ const commandName = "PutKeyCommand";
28
+ const handlerExecutionContext = {
29
+ logger,
30
+ clientName,
31
+ commandName,
32
+ inputFilterSensitiveLog: PutKeyRequestFilterSensitiveLog,
33
+ outputFilterSensitiveLog: (_) => _,
34
+ [SMITHY_CONTEXT_KEY]: {
35
+ service: "CloudFrontKeyValueStore",
36
+ operation: "PutKey",
37
+ },
38
+ };
39
+ const { requestHandler } = configuration;
40
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
41
+ }
42
+ serialize(input, context) {
43
+ return se_PutKeyCommand(input, context);
44
+ }
45
+ deserialize(output, context) {
46
+ return de_PutKeyCommand(output, context);
47
+ }
48
+ }
@@ -0,0 +1,48 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { UpdateKeysRequestFilterSensitiveLog } from "../models/models_0";
6
+ import { de_UpdateKeysCommand, se_UpdateKeysCommand } from "../protocols/Aws_restJson1";
7
+ export { $Command };
8
+ export class UpdateKeysCommand extends $Command {
9
+ static getEndpointParameterInstructions() {
10
+ return {
11
+ KvsARN: { type: "contextParams", name: "KvsARN" },
12
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
13
+ Endpoint: { type: "builtInParams", name: "endpoint" },
14
+ Region: { type: "builtInParams", name: "region" },
15
+ };
16
+ }
17
+ constructor(input) {
18
+ super();
19
+ this.input = input;
20
+ }
21
+ resolveMiddleware(clientStack, configuration, options) {
22
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
+ this.middlewareStack.use(getEndpointPlugin(configuration, UpdateKeysCommand.getEndpointParameterInstructions()));
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const { logger } = configuration;
26
+ const clientName = "CloudFrontKeyValueStoreClient";
27
+ const commandName = "UpdateKeysCommand";
28
+ const handlerExecutionContext = {
29
+ logger,
30
+ clientName,
31
+ commandName,
32
+ inputFilterSensitiveLog: UpdateKeysRequestFilterSensitiveLog,
33
+ outputFilterSensitiveLog: (_) => _,
34
+ [SMITHY_CONTEXT_KEY]: {
35
+ service: "CloudFrontKeyValueStore",
36
+ operation: "UpdateKeys",
37
+ },
38
+ };
39
+ const { requestHandler } = configuration;
40
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
41
+ }
42
+ serialize(input, context) {
43
+ return se_UpdateKeysCommand(input, context);
44
+ }
45
+ deserialize(output, context) {
46
+ return de_UpdateKeysCommand(output, context);
47
+ }
48
+ }
@@ -0,0 +1,6 @@
1
+ export * from "./DeleteKeyCommand";
2
+ export * from "./DescribeKeyValueStoreCommand";
3
+ export * from "./GetKeyCommand";
4
+ export * from "./ListKeysCommand";
5
+ export * from "./PutKeyCommand";
6
+ export * from "./UpdateKeysCommand";
@@ -0,0 +1,7 @@
1
+ export const resolveClientEndpointParameters = (options) => {
2
+ return {
3
+ ...options,
4
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
5
+ defaultSigningName: "cloudfront-keyvaluestore",
6
+ };
7
+ };
@@ -0,0 +1,8 @@
1
+ import { resolveEndpoint } from "@smithy/util-endpoints";
2
+ import { ruleSet } from "./ruleset";
3
+ export const defaultEndpointResolver = (endpointParams, context = {}) => {
4
+ return resolveEndpoint(ruleSet, {
5
+ endpointParams: endpointParams,
6
+ logger: context.logger,
7
+ });
8
+ };
@@ -0,0 +1,4 @@
1
+ const r = "type", s = "rules", t = "conditions", u = "ref", v = "endpoint", w = "properties", x = "authSchemes", y = "signingName", z = "signingRegionSet", A = "headers";
2
+ const a = false, b = "isSet", c = "parsedArn", d = "stringEquals", e = "getAttr", f = "arnType", g = "partitionResult", h = "tree", i = "error", j = { "required": false, [r]: "String" }, k = { [u]: c }, l = { [u]: f }, m = { [t]: [{ "fn": b, "argv": [{ [u]: "Endpoint" }] }], [s]: [{ [t]: [{ "fn": "parseURL", "argv": [{ [u]: "Endpoint" }], "assign": "url" }], [s]: [{ [v]: { "url": "{url#scheme}://{parsedArn#accountId}.{url#authority}{url#path}", [w]: { [x]: [{ "name": "sigv4a", [y]: "cloudfront-keyvaluestore", [z]: ["*"] }] }, [A]: {} }, [r]: "endpoint" }], [r]: h }, { [i]: "Provided endpoint is not a valid URL", [r]: i }], [r]: h }, n = { [v]: { "url": "https://{parsedArn#accountId}.cloudfront-kvs.global.api.aws", [w]: { [x]: [{ "name": "sigv4a", [y]: "cloudfront-keyvaluestore", [z]: ["*"] }] }, [A]: {} }, [r]: "endpoint" }, o = { [i]: "No resource type found in the KVS ARN. Resource type must be `key-value-store`.", [r]: i }, p = [{ [u]: "KvsARN" }], q = [{ [u]: "Region" }];
3
+ const _data = { version: "1.0", parameters: { KvsARN: j, Region: j, UseFIPS: { required: true, default: a, [r]: "Boolean" }, Endpoint: j }, [s]: [{ [t]: [{ fn: "booleanEquals", argv: [{ [u]: "UseFIPS" }, a] }], [s]: [{ [t]: [{ fn: b, argv: p }], [s]: [{ [t]: [{ fn: "aws.parseArn", argv: p, assign: c }], [s]: [{ [t]: [{ fn: d, argv: [{ fn: e, argv: [k, "service"] }, "cloudfront"] }], [s]: [{ [t]: [{ fn: d, argv: [{ fn: e, argv: [k, "region"] }, ""] }], [s]: [{ [t]: [{ fn: e, argv: [k, "resourceId[0]"], assign: f }], [s]: [{ [t]: [{ fn: "not", argv: [{ fn: d, argv: [l, ""] }] }], [s]: [{ [t]: [{ fn: d, argv: [l, "key-value-store"] }], [s]: [{ [t]: [{ fn: d, argv: [{ fn: e, argv: [k, "partition"] }, "aws"] }], [s]: [{ [t]: [{ fn: b, argv: q }], [s]: [{ [t]: [{ fn: "aws.partition", argv: q, assign: g }], [s]: [{ [t]: [{ fn: d, argv: [{ fn: e, argv: [{ [u]: g }, "name"] }, "{parsedArn#partition}"] }], [s]: [m, n], [r]: h }, { error: "Client was configured for partition `{partitionResult#name}` but Kvs ARN has `{parsedArn#partition}`", [r]: i }], [r]: h }], [r]: h }, m, n], [r]: h }, { error: "CloudFront-KeyValueStore is not supported in partition `{parsedArn#partition}`", [r]: i }], [r]: h }, { error: "ARN resource type is invalid. Expected `key-value-store`, found: `{arnType}`", [r]: i }], [r]: h }, o], [r]: h }, o], [r]: h }, { error: "Provided ARN must be a global resource ARN. Found: `{parsedArn#region}`", [r]: i }], [r]: h }, { error: "Provided ARN is not a valid CloudFront Service ARN. Found: `{parsedArn#service}`", [r]: i }], [r]: h }, { error: "KVS ARN must be a valid ARN", [r]: i }], [r]: h }, { error: "KVS ARN must be provided to use this service", [r]: i }], [r]: h }, { error: "Invalid Configuration: FIPS is not supported with CloudFront-KeyValueStore.", [r]: i }] };
4
+ export const ruleSet = _data;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export * from "./CloudFrontKeyValueStoreClient";
2
+ export * from "./CloudFrontKeyValueStore";
3
+ export * from "./commands";
4
+ export * from "./pagination";
5
+ export * from "./models";
6
+ import "@aws-sdk/util-endpoints";
7
+ export { CloudFrontKeyValueStoreServiceException } from "./models/CloudFrontKeyValueStoreServiceException";
@@ -0,0 +1,8 @@
1
+ import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
2
+ export { __ServiceException };
3
+ export class CloudFrontKeyValueStoreServiceException extends __ServiceException {
4
+ constructor(options) {
5
+ super(options);
6
+ Object.setPrototypeOf(this, CloudFrontKeyValueStoreServiceException.prototype);
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export * from "./models_0";
@@ -0,0 +1,104 @@
1
+ import { SENSITIVE_STRING } from "@smithy/smithy-client";
2
+ import { CloudFrontKeyValueStoreServiceException as __BaseException } from "./CloudFrontKeyValueStoreServiceException";
3
+ export class AccessDeniedException extends __BaseException {
4
+ constructor(opts) {
5
+ super({
6
+ name: "AccessDeniedException",
7
+ $fault: "client",
8
+ ...opts,
9
+ });
10
+ this.name = "AccessDeniedException";
11
+ this.$fault = "client";
12
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
13
+ this.Message = opts.Message;
14
+ }
15
+ }
16
+ export class ConflictException extends __BaseException {
17
+ constructor(opts) {
18
+ super({
19
+ name: "ConflictException",
20
+ $fault: "client",
21
+ ...opts,
22
+ });
23
+ this.name = "ConflictException";
24
+ this.$fault = "client";
25
+ Object.setPrototypeOf(this, ConflictException.prototype);
26
+ this.Message = opts.Message;
27
+ }
28
+ }
29
+ export class InternalServerException extends __BaseException {
30
+ constructor(opts) {
31
+ super({
32
+ name: "InternalServerException",
33
+ $fault: "server",
34
+ ...opts,
35
+ });
36
+ this.name = "InternalServerException";
37
+ this.$fault = "server";
38
+ Object.setPrototypeOf(this, InternalServerException.prototype);
39
+ this.Message = opts.Message;
40
+ }
41
+ }
42
+ export class ResourceNotFoundException extends __BaseException {
43
+ constructor(opts) {
44
+ super({
45
+ name: "ResourceNotFoundException",
46
+ $fault: "client",
47
+ ...opts,
48
+ });
49
+ this.name = "ResourceNotFoundException";
50
+ this.$fault = "client";
51
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
52
+ this.Message = opts.Message;
53
+ }
54
+ }
55
+ export class ServiceQuotaExceededException extends __BaseException {
56
+ constructor(opts) {
57
+ super({
58
+ name: "ServiceQuotaExceededException",
59
+ $fault: "client",
60
+ ...opts,
61
+ });
62
+ this.name = "ServiceQuotaExceededException";
63
+ this.$fault = "client";
64
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
65
+ this.Message = opts.Message;
66
+ }
67
+ }
68
+ export class ValidationException extends __BaseException {
69
+ constructor(opts) {
70
+ super({
71
+ name: "ValidationException",
72
+ $fault: "client",
73
+ ...opts,
74
+ });
75
+ this.name = "ValidationException";
76
+ this.$fault = "client";
77
+ Object.setPrototypeOf(this, ValidationException.prototype);
78
+ this.Message = opts.Message;
79
+ }
80
+ }
81
+ export const GetKeyResponseFilterSensitiveLog = (obj) => ({
82
+ ...obj,
83
+ ...(obj.Value && { Value: SENSITIVE_STRING }),
84
+ });
85
+ export const ListKeysResponseListItemFilterSensitiveLog = (obj) => ({
86
+ ...obj,
87
+ ...(obj.Value && { Value: SENSITIVE_STRING }),
88
+ });
89
+ export const ListKeysResponseFilterSensitiveLog = (obj) => ({
90
+ ...obj,
91
+ ...(obj.Items && { Items: obj.Items.map((item) => ListKeysResponseListItemFilterSensitiveLog(item)) }),
92
+ });
93
+ export const PutKeyRequestFilterSensitiveLog = (obj) => ({
94
+ ...obj,
95
+ ...(obj.Value && { Value: SENSITIVE_STRING }),
96
+ });
97
+ export const PutKeyRequestListItemFilterSensitiveLog = (obj) => ({
98
+ ...obj,
99
+ ...(obj.Value && { Value: SENSITIVE_STRING }),
100
+ });
101
+ export const UpdateKeysRequestFilterSensitiveLog = (obj) => ({
102
+ ...obj,
103
+ ...(obj.Puts && { Puts: obj.Puts.map((item) => PutKeyRequestListItemFilterSensitiveLog(item)) }),
104
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import { CloudFrontKeyValueStoreClient } from "../CloudFrontKeyValueStoreClient";
2
+ import { ListKeysCommand } from "../commands/ListKeysCommand";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new ListKeysCommand(input), ...args);
5
+ };
6
+ export async function* paginateListKeys(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 CloudFrontKeyValueStoreClient) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected CloudFrontKeyValueStore | CloudFrontKeyValueStoreClient");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.NextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./Interfaces";
2
+ export * from "./ListKeysPaginator";