@aws-sdk/client-backup 3.42.0 → 3.47.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.
- package/CHANGELOG.md +50 -0
- package/dist-cjs/endpoints.js +1 -0
- package/dist-cjs/models/models_0.js +4 -64
- package/dist-cjs/protocols/Aws_restJson1.js +38 -0
- package/dist-cjs/runtimeConfig.browser.js +7 -2
- package/dist-cjs/runtimeConfig.js +9 -3
- package/dist-es/endpoints.js +1 -0
- package/dist-es/models/models_0.js +0 -40
- package/dist-es/protocols/Aws_restJson1.js +62 -27
- package/dist-es/runtimeConfig.browser.js +12 -3
- package/dist-es/runtimeConfig.js +13 -6
- package/dist-types/Backup.d.ts +6 -40
- package/dist-types/BackupClient.d.ts +5 -1
- package/dist-types/commands/CreateBackupSelectionCommand.d.ts +2 -40
- package/dist-types/commands/PutBackupVaultLockConfigurationCommand.d.ts +4 -0
- package/dist-types/models/models_0.d.ts +173 -106
- package/dist-types/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/runtimeConfig.d.ts +4 -3
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/BackupClient.d.ts +3 -1
- package/dist-types/ts3.4/models/models_0.d.ts +18 -40
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +38 -45
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import packageInfo from "../package.json";
|
|
3
3
|
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
4
4
|
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
|
|
5
5
|
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
6
6
|
import { Hash } from "@aws-sdk/hash-node";
|
|
7
|
-
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
|
|
7
|
+
import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
|
|
8
8
|
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
|
|
9
|
-
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
10
10
|
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
|
|
11
11
|
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
|
|
12
12
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
13
13
|
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
|
|
14
14
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
15
|
-
import {
|
|
15
|
+
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
16
|
+
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
|
|
16
17
|
export var getRuntimeConfig = function (config) {
|
|
17
18
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
18
|
-
|
|
19
|
+
var defaultsMode = resolveDefaultsModeConfig(config);
|
|
20
|
+
var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
|
|
19
21
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
20
|
-
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new
|
|
22
|
+
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
23
|
+
switch (_a.label) {
|
|
24
|
+
case 0: return [4, defaultConfigProvider()];
|
|
25
|
+
case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
|
|
26
|
+
}
|
|
27
|
+
}); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
|
|
21
28
|
};
|
package/dist-types/Backup.d.ts
CHANGED
|
@@ -86,46 +86,8 @@ export declare class Backup extends BackupClient {
|
|
|
86
86
|
createBackupPlan(args: CreateBackupPlanCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateBackupPlanCommandOutput) => void): void;
|
|
87
87
|
/**
|
|
88
88
|
* <p>Creates a JSON document that specifies a set of resources to assign to a backup plan.
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* <p>For example, consider the following patterns:</p>
|
|
92
|
-
* <ul>
|
|
93
|
-
* <li>
|
|
94
|
-
* <p>
|
|
95
|
-
* <code>Resources: "arn:aws:ec2:region:account-id:volume/volume-id"</code>
|
|
96
|
-
* </p>
|
|
97
|
-
* </li>
|
|
98
|
-
* <li>
|
|
99
|
-
* <p>
|
|
100
|
-
* <code>ConditionKey:"department"</code>
|
|
101
|
-
* </p>
|
|
102
|
-
* <p>
|
|
103
|
-
* <code>ConditionValue:"finance"</code>
|
|
104
|
-
* </p>
|
|
105
|
-
* <p>
|
|
106
|
-
* <code>ConditionType:"StringEquals"</code>
|
|
107
|
-
* </p>
|
|
108
|
-
* </li>
|
|
109
|
-
* <li>
|
|
110
|
-
* <p>
|
|
111
|
-
* <code>ConditionKey:"importance"</code>
|
|
112
|
-
* </p>
|
|
113
|
-
* <p>
|
|
114
|
-
* <code>ConditionValue:"critical"</code>
|
|
115
|
-
* </p>
|
|
116
|
-
* <p>
|
|
117
|
-
* <code>ConditionType:"StringEquals"</code>
|
|
118
|
-
* </p>
|
|
119
|
-
* </li>
|
|
120
|
-
* </ul>
|
|
121
|
-
* <p>Using these patterns would back up all Amazon Elastic Block Store (Amazon EBS)
|
|
122
|
-
* volumes that are tagged as <code>"department=finance"</code>,
|
|
123
|
-
* <code>"importance=critical"</code>, in addition to an EBS volume with the specified
|
|
124
|
-
* volume ID.</p>
|
|
125
|
-
* <p>Resources and conditions are additive in that all resources that match the pattern are
|
|
126
|
-
* selected. This shouldn't be confused with a logical AND, where all conditions must match.
|
|
127
|
-
* The matching patterns are logically put together using the OR operator.
|
|
128
|
-
* In other words, all patterns that match are selected for backup.</p>
|
|
89
|
+
* For examples, see <a href="https://docs.aws.amazon.com/assigning-resources.html#assigning-resources-json">Assigning resources
|
|
90
|
+
* programmatically</a>. </p>
|
|
129
91
|
*/
|
|
130
92
|
createBackupSelection(args: CreateBackupSelectionCommandInput, options?: __HttpHandlerOptions): Promise<CreateBackupSelectionCommandOutput>;
|
|
131
93
|
createBackupSelection(args: CreateBackupSelectionCommandInput, cb: (err: any, data?: CreateBackupSelectionCommandOutput) => void): void;
|
|
@@ -494,6 +456,10 @@ export declare class Backup extends BackupClient {
|
|
|
494
456
|
* attempts to update the lifecycle policy that controls the retention period of any recovery
|
|
495
457
|
* point currently stored in a backup vault. If specified, Vault Lock enforces a minimum and
|
|
496
458
|
* maximum retention period for future backup and copy jobs that target a backup vault.</p>
|
|
459
|
+
* <note>
|
|
460
|
+
* <p>Backup Vault Lock has yet to receive a third-party assessment for SEC
|
|
461
|
+
* 17a-4(f) and CFTC.</p>
|
|
462
|
+
* </note>
|
|
497
463
|
*/
|
|
498
464
|
putBackupVaultLockConfiguration(args: PutBackupVaultLockConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<PutBackupVaultLockConfigurationCommandOutput>;
|
|
499
465
|
putBackupVaultLockConfiguration(args: PutBackupVaultLockConfigurationCommandInput, cb: (err: any, data?: PutBackupVaultLockConfigurationCommandOutput) => void): void;
|
|
@@ -4,7 +4,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry
|
|
|
4
4
|
import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
|
|
5
5
|
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
6
6
|
import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
|
|
7
|
-
import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
|
|
7
|
+
import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
|
|
8
8
|
import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
9
9
|
import { CreateBackupPlanCommandInput, CreateBackupPlanCommandOutput } from "./commands/CreateBackupPlanCommand";
|
|
10
10
|
import { CreateBackupSelectionCommandInput, CreateBackupSelectionCommandOutput } from "./commands/CreateBackupSelectionCommand";
|
|
@@ -174,6 +174,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
|
|
|
174
174
|
* @internal
|
|
175
175
|
*/
|
|
176
176
|
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
177
|
+
/**
|
|
178
|
+
* The {@link DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
179
|
+
*/
|
|
180
|
+
defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
|
|
177
181
|
}
|
|
178
182
|
declare type BackupClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig;
|
|
179
183
|
/**
|
|
@@ -8,46 +8,8 @@ export interface CreateBackupSelectionCommandOutput extends CreateBackupSelectio
|
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* <p>Creates a JSON document that specifies a set of resources to assign to a backup plan.
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* <p>For example, consider the following patterns:</p>
|
|
14
|
-
* <ul>
|
|
15
|
-
* <li>
|
|
16
|
-
* <p>
|
|
17
|
-
* <code>Resources: "arn:aws:ec2:region:account-id:volume/volume-id"</code>
|
|
18
|
-
* </p>
|
|
19
|
-
* </li>
|
|
20
|
-
* <li>
|
|
21
|
-
* <p>
|
|
22
|
-
* <code>ConditionKey:"department"</code>
|
|
23
|
-
* </p>
|
|
24
|
-
* <p>
|
|
25
|
-
* <code>ConditionValue:"finance"</code>
|
|
26
|
-
* </p>
|
|
27
|
-
* <p>
|
|
28
|
-
* <code>ConditionType:"StringEquals"</code>
|
|
29
|
-
* </p>
|
|
30
|
-
* </li>
|
|
31
|
-
* <li>
|
|
32
|
-
* <p>
|
|
33
|
-
* <code>ConditionKey:"importance"</code>
|
|
34
|
-
* </p>
|
|
35
|
-
* <p>
|
|
36
|
-
* <code>ConditionValue:"critical"</code>
|
|
37
|
-
* </p>
|
|
38
|
-
* <p>
|
|
39
|
-
* <code>ConditionType:"StringEquals"</code>
|
|
40
|
-
* </p>
|
|
41
|
-
* </li>
|
|
42
|
-
* </ul>
|
|
43
|
-
* <p>Using these patterns would back up all Amazon Elastic Block Store (Amazon EBS)
|
|
44
|
-
* volumes that are tagged as <code>"department=finance"</code>,
|
|
45
|
-
* <code>"importance=critical"</code>, in addition to an EBS volume with the specified
|
|
46
|
-
* volume ID.</p>
|
|
47
|
-
* <p>Resources and conditions are additive in that all resources that match the pattern are
|
|
48
|
-
* selected. This shouldn't be confused with a logical AND, where all conditions must match.
|
|
49
|
-
* The matching patterns are logically put together using the OR operator.
|
|
50
|
-
* In other words, all patterns that match are selected for backup.</p>
|
|
11
|
+
* For examples, see <a href="https://docs.aws.amazon.com/assigning-resources.html#assigning-resources-json">Assigning resources
|
|
12
|
+
* programmatically</a>. </p>
|
|
51
13
|
* @example
|
|
52
14
|
* Use a bare-bones client and the command you need to make an API call.
|
|
53
15
|
* ```javascript
|
|
@@ -12,6 +12,10 @@ export interface PutBackupVaultLockConfigurationCommandOutput extends __Metadata
|
|
|
12
12
|
* attempts to update the lifecycle policy that controls the retention period of any recovery
|
|
13
13
|
* point currently stored in a backup vault. If specified, Vault Lock enforces a minimum and
|
|
14
14
|
* maximum retention period for future backup and copy jobs that target a backup vault.</p>
|
|
15
|
+
* <note>
|
|
16
|
+
* <p>Backup Vault Lock has yet to receive a third-party assessment for SEC
|
|
17
|
+
* 17a-4(f) and CFTC.</p>
|
|
18
|
+
* </note>
|
|
15
19
|
* @example
|
|
16
20
|
* Use a bare-bones client and the command you need to make an API call.
|
|
17
21
|
* ```javascript
|