@aws-sdk/client-s3-control 3.1074.0 → 3.1076.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,165 +0,0 @@
1
- const { S3ControlServiceException: __BaseException } = require("./S3ControlServiceException");
2
- exports.BucketAlreadyExists = class BucketAlreadyExists extends __BaseException {
3
- name = "BucketAlreadyExists";
4
- $fault = "client";
5
- constructor(opts) {
6
- super({
7
- name: "BucketAlreadyExists",
8
- $fault: "client",
9
- ...opts,
10
- });
11
- Object.setPrototypeOf(this, BucketAlreadyExists.prototype);
12
- }
13
- };
14
- exports.BucketAlreadyOwnedByYou = class BucketAlreadyOwnedByYou extends __BaseException {
15
- name = "BucketAlreadyOwnedByYou";
16
- $fault = "client";
17
- constructor(opts) {
18
- super({
19
- name: "BucketAlreadyOwnedByYou",
20
- $fault: "client",
21
- ...opts,
22
- });
23
- Object.setPrototypeOf(this, BucketAlreadyOwnedByYou.prototype);
24
- }
25
- };
26
- exports.BadRequestException = class BadRequestException extends __BaseException {
27
- name = "BadRequestException";
28
- $fault = "client";
29
- Message;
30
- constructor(opts) {
31
- super({
32
- name: "BadRequestException",
33
- $fault: "client",
34
- ...opts,
35
- });
36
- Object.setPrototypeOf(this, BadRequestException.prototype);
37
- this.Message = opts.Message;
38
- }
39
- };
40
- exports.IdempotencyException = class IdempotencyException extends __BaseException {
41
- name = "IdempotencyException";
42
- $fault = "client";
43
- Message;
44
- constructor(opts) {
45
- super({
46
- name: "IdempotencyException",
47
- $fault: "client",
48
- ...opts,
49
- });
50
- Object.setPrototypeOf(this, IdempotencyException.prototype);
51
- this.Message = opts.Message;
52
- }
53
- };
54
- exports.InternalServiceException = class InternalServiceException extends __BaseException {
55
- name = "InternalServiceException";
56
- $fault = "server";
57
- Message;
58
- constructor(opts) {
59
- super({
60
- name: "InternalServiceException",
61
- $fault: "server",
62
- ...opts,
63
- });
64
- Object.setPrototypeOf(this, InternalServiceException.prototype);
65
- this.Message = opts.Message;
66
- }
67
- };
68
- exports.TooManyRequestsException = class TooManyRequestsException extends __BaseException {
69
- name = "TooManyRequestsException";
70
- $fault = "client";
71
- Message;
72
- constructor(opts) {
73
- super({
74
- name: "TooManyRequestsException",
75
- $fault: "client",
76
- ...opts,
77
- });
78
- Object.setPrototypeOf(this, TooManyRequestsException.prototype);
79
- this.Message = opts.Message;
80
- }
81
- };
82
- exports.NotFoundException = class NotFoundException extends __BaseException {
83
- name = "NotFoundException";
84
- $fault = "client";
85
- Message;
86
- constructor(opts) {
87
- super({
88
- name: "NotFoundException",
89
- $fault: "client",
90
- ...opts,
91
- });
92
- Object.setPrototypeOf(this, NotFoundException.prototype);
93
- this.Message = opts.Message;
94
- }
95
- };
96
- exports.NoSuchPublicAccessBlockConfiguration = class NoSuchPublicAccessBlockConfiguration extends __BaseException {
97
- name = "NoSuchPublicAccessBlockConfiguration";
98
- $fault = "client";
99
- Message;
100
- constructor(opts) {
101
- super({
102
- name: "NoSuchPublicAccessBlockConfiguration",
103
- $fault: "client",
104
- ...opts,
105
- });
106
- Object.setPrototypeOf(this, NoSuchPublicAccessBlockConfiguration.prototype);
107
- this.Message = opts.Message;
108
- }
109
- };
110
- exports.InvalidNextTokenException = class InvalidNextTokenException extends __BaseException {
111
- name = "InvalidNextTokenException";
112
- $fault = "client";
113
- Message;
114
- constructor(opts) {
115
- super({
116
- name: "InvalidNextTokenException",
117
- $fault: "client",
118
- ...opts,
119
- });
120
- Object.setPrototypeOf(this, InvalidNextTokenException.prototype);
121
- this.Message = opts.Message;
122
- }
123
- };
124
- exports.InvalidRequestException = class InvalidRequestException extends __BaseException {
125
- name = "InvalidRequestException";
126
- $fault = "client";
127
- Message;
128
- constructor(opts) {
129
- super({
130
- name: "InvalidRequestException",
131
- $fault: "client",
132
- ...opts,
133
- });
134
- Object.setPrototypeOf(this, InvalidRequestException.prototype);
135
- this.Message = opts.Message;
136
- }
137
- };
138
- exports.TooManyTagsException = class TooManyTagsException extends __BaseException {
139
- name = "TooManyTagsException";
140
- $fault = "client";
141
- Message;
142
- constructor(opts) {
143
- super({
144
- name: "TooManyTagsException",
145
- $fault: "client",
146
- ...opts,
147
- });
148
- Object.setPrototypeOf(this, TooManyTagsException.prototype);
149
- this.Message = opts.Message;
150
- }
151
- };
152
- exports.JobStatusException = class JobStatusException extends __BaseException {
153
- name = "JobStatusException";
154
- $fault = "client";
155
- Message;
156
- constructor(opts) {
157
- super({
158
- name: "JobStatusException",
159
- $fault: "client",
160
- ...opts,
161
- });
162
- Object.setPrototypeOf(this, JobStatusException.prototype);
163
- this.Message = opts.Message;
164
- }
165
- };
@@ -1,35 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { Sha256 } = require("@aws-crypto/sha256-browser");
3
- const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
4
- const { blobHasher: streamHasher, Md5 } = require("@smithy/core/checksum");
5
- const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
6
- const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
7
- const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
8
- const { calculateBodyLength } = require("@smithy/core/serde");
9
- const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
10
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
11
- const getRuntimeConfig = (config) => {
12
- const defaultsMode = resolveDefaultsModeConfig(config);
13
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
14
- const clientSharedValues = getSharedRuntimeConfig(config);
15
- return {
16
- ...clientSharedValues,
17
- ...config,
18
- runtime: "browser",
19
- defaultsMode,
20
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
21
- credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
22
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
23
- maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
24
- md5: config?.md5 ?? Md5,
25
- region: config?.region ?? invalidProvider("Region is missing"),
26
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
28
- sha256: config?.sha256 ?? Sha256,
29
- streamCollector: config?.streamCollector ?? streamCollector,
30
- streamHasher: config?.streamHasher ?? streamHasher,
31
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
32
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
33
- };
34
- };
35
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,50 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
3
- const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
4
- const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
5
- const { NODE_USE_ARN_REGION_CONFIG_OPTIONS } = require("@aws-sdk/middleware-sdk-s3/s3");
6
- const { fileStreamHasher: streamHasher } = require("@smithy/core/checksum");
7
- const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
8
- const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
9
- const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
10
- const { calculateBodyLength, Hash } = require("@smithy/core/serde");
11
- const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
12
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
13
- const getRuntimeConfig = (config) => {
14
- emitWarningIfUnsupportedVersion(process.version);
15
- const defaultsMode = resolveDefaultsModeConfig(config);
16
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
17
- const clientSharedValues = getSharedRuntimeConfig(config);
18
- awsCheckVersion(process.version);
19
- const loaderConfig = {
20
- profile: config?.profile,
21
- logger: clientSharedValues.logger,
22
- };
23
- return {
24
- ...clientSharedValues,
25
- ...config,
26
- runtime: "node",
27
- defaultsMode,
28
- authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
29
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
30
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
31
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
32
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
33
- md5: config?.md5 ?? Hash.bind(null, "md5"),
34
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
35
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
36
- retryMode: config?.retryMode ??
37
- loadNodeConfig({
38
- ...NODE_RETRY_MODE_CONFIG_OPTIONS,
39
- default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
40
- }, config),
41
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
42
- streamCollector: config?.streamCollector ?? streamCollector,
43
- streamHasher: config?.streamHasher ?? streamHasher,
44
- useArnRegion: config?.useArnRegion ?? loadNodeConfig(NODE_USE_ARN_REGION_CONFIG_OPTIONS, loaderConfig),
45
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
46
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
47
- userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
48
- };
49
- };
50
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,12 +0,0 @@
1
- const { Sha256 } = require("@aws-crypto/sha256-js");
2
- const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
3
- const getRuntimeConfig = (config) => {
4
- const browserDefaults = getBrowserRuntimeConfig(config);
5
- return {
6
- ...browserDefaults,
7
- ...config,
8
- runtime: "react-native",
9
- sha256: config?.sha256 ?? Sha256,
10
- };
11
- };
12
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,41 +0,0 @@
1
- const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { AwsRestXmlProtocol } = require("@aws-sdk/core/protocols");
3
- const { NoOpLogger } = require("@smithy/core/client");
4
- const { parseUrl } = require("@smithy/core/protocols");
5
- const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
6
- const { defaultS3ControlHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
7
- const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
8
- const { errorTypeRegistries } = require("./schemas/schemas_0");
9
- exports.getRuntimeConfig = (config) => {
10
- return {
11
- apiVersion: "2018-08-20",
12
- base64Decoder: config?.base64Decoder ?? fromBase64,
13
- base64Encoder: config?.base64Encoder ?? toBase64,
14
- disableHostPrefix: config?.disableHostPrefix ?? false,
15
- endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
16
- extensions: config?.extensions ?? [],
17
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultS3ControlHttpAuthSchemeProvider,
18
- httpAuthSchemes: config?.httpAuthSchemes ?? [
19
- {
20
- schemeId: "aws.auth#sigv4",
21
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
22
- signer: new AwsSdkSigV4Signer(),
23
- },
24
- ],
25
- logger: config?.logger ?? new NoOpLogger(),
26
- protocol: config?.protocol ?? AwsRestXmlProtocol,
27
- protocolSettings: config?.protocolSettings ?? {
28
- defaultNamespace: "com.amazonaws.s3control",
29
- errorTypeRegistries,
30
- xmlNamespace: "http://awss3control.amazonaws.com/doc/2018-08-20/",
31
- version: "2018-08-20",
32
- serviceTarget: "AWSS3ControlServiceV20180820",
33
- },
34
- serviceId: config?.serviceId ?? "S3 Control",
35
- signingEscapePath: config?.signingEscapePath ?? false,
36
- urlParser: config?.urlParser ?? parseUrl,
37
- useArnRegion: config?.useArnRegion ?? undefined,
38
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
39
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
40
- };
41
- };