@kensio/yulin 1.20.5 → 1.20.6
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/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.d.ts +83 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.d.ts.map +1 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.js +87 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-configuration.js.map +1 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.d.ts +24 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.d.ts.map +1 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.js +42 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-expiry.js.map +1 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-selection.d.ts +24 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-selection.d.ts.map +1 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-selection.js +51 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-selection.js.map +1 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.d.ts +38 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.d.ts.map +1 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.js +66 -0
- package/dist/service/s3/bucket/lifecycle/sim-s3-lifecycle-sweep.js.map +1 -0
- package/dist/service/s3/bucket/sim-s3-bucket.d.ts +34 -0
- package/dist/service/s3/bucket/sim-s3-bucket.d.ts.map +1 -1
- package/dist/service/s3/bucket/sim-s3-bucket.js +43 -4
- package/dist/service/s3/bucket/sim-s3-bucket.js.map +1 -1
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-configuration.d.ts +31 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-configuration.d.ts.map +1 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-configuration.js +69 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-configuration.js.map +1 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.d.ts +31 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.d.ts.map +1 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.js +50 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-fields.js.map +1 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-transitions.d.ts +19 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-transitions.d.ts.map +1 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-transitions.js +28 -0
- package/dist/service/s3/cfn/bucket/lifecycle/sim-cfn-s3-bucket-lifecycle-transitions.js.map +1 -0
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.d.ts +1 -0
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.d.ts.map +1 -1
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.js +11 -0
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-configurator.js.map +1 -1
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-names.d.ts.map +1 -1
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-names.js +1 -4
- package/dist/service/s3/cfn/bucket/sim-cfn-s3-bucket-property-names.js.map +1 -1
- package/dist/service/s3/command/create-bucket/create-bucket.handler.js +1 -1
- package/dist/service/s3/command/create-bucket/create-bucket.handler.js.map +1 -1
- package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.command.d.ts +20 -0
- package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.command.d.ts.map +1 -0
- package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.command.js +2 -0
- package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.command.js.map +1 -0
- package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.handler.d.ts +29 -0
- package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.handler.d.ts.map +1 -0
- package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.handler.js +37 -0
- package/dist/service/s3/command/delete-bucket-lifecycle/delete-bucket-lifecycle.handler.js.map +1 -0
- package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.command.d.ts +26 -0
- package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.command.d.ts.map +1 -0
- package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.command.js +2 -0
- package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.command.js.map +1 -0
- package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.handler.d.ts +30 -0
- package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.handler.d.ts.map +1 -0
- package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.handler.js +43 -0
- package/dist/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.handler.js.map +1 -0
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-authorizer.d.ts +32 -0
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-authorizer.d.ts.map +1 -0
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-authorizer.js +51 -0
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-authorizer.js.map +1 -0
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-commands.d.ts +23 -0
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-commands.d.ts.map +1 -0
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-commands.js +31 -0
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-commands.js.map +1 -0
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-rules-validation.d.ts +12 -0
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-rules-validation.d.ts.map +1 -0
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-rules-validation.js +53 -0
- package/dist/service/s3/command/lifecycle/sim-s3-lifecycle-rules-validation.js.map +1 -0
- package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.d.ts +111 -0
- package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.d.ts.map +1 -0
- package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.js +2 -0
- package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.js.map +1 -0
- package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.handler.d.ts +30 -0
- package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.handler.d.ts.map +1 -0
- package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.handler.js +43 -0
- package/dist/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.handler.js.map +1 -0
- package/dist/service/s3/command/sim-s3-command.types.d.ts +3 -0
- package/dist/service/s3/command/sim-s3-command.types.d.ts.map +1 -1
- package/dist/service/s3/error/sim-s3.error.d.ts +11 -0
- package/dist/service/s3/error/sim-s3.error.d.ts.map +1 -1
- package/dist/service/s3/error/sim-s3.error.js +13 -0
- package/dist/service/s3/error/sim-s3.error.js.map +1 -1
- package/dist/service/s3/sdk/sim-s3-sdk-command-router.d.ts.map +1 -1
- package/dist/service/s3/sdk/sim-s3-sdk-command-router.js +12 -0
- package/dist/service/s3/sdk/sim-s3-sdk-command-router.js.map +1 -1
- package/dist/service/s3/sim-s3-commands.d.ts +2 -0
- package/dist/service/s3/sim-s3-commands.d.ts.map +1 -1
- package/dist/service/s3/sim-s3-commands.js +3 -0
- package/dist/service/s3/sim-s3-commands.js.map +1 -1
- package/dist/service/s3/sim-s3-operations.d.ts +6 -0
- package/dist/service/s3/sim-s3-operations.d.ts.map +1 -1
- package/dist/service/s3/sim-s3-operations.js +12 -0
- package/dist/service/s3/sim-s3-operations.js.map +1 -1
- package/dist/service/s3/upload/sim-s3-multipart-uploads.d.ts +9 -0
- package/dist/service/s3/upload/sim-s3-multipart-uploads.d.ts.map +1 -1
- package/dist/service/s3/upload/sim-s3-multipart-uploads.js +15 -0
- package/dist/service/s3/upload/sim-s3-multipart-uploads.js.map +1 -1
- package/dist/terraform/map/sim-tf-map-s3-lifecycle.d.ts.map +1 -1
- package/dist/terraform/map/sim-tf-map-s3-lifecycle.js +4 -5
- package/dist/terraform/map/sim-tf-map-s3-lifecycle.js.map +1 -1
- package/dist/util/clock/sim-clock-control.d.ts +8 -0
- package/dist/util/clock/sim-clock-control.d.ts.map +1 -1
- package/dist/util/clock/sim-clock-control.js +10 -0
- package/dist/util/clock/sim-clock-control.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SimResponseMetadata } from "../../../aws/metadata/response-metadata.type.js";
|
|
2
|
+
import type { SimS3LifecycleRule } from "../put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.js";
|
|
3
|
+
/**
|
|
4
|
+
* Minimal structural sim S3 GetBucketLifecycleConfiguration command.
|
|
5
|
+
*/
|
|
6
|
+
export interface SimGetBucketLifecycleConfigurationCommand {
|
|
7
|
+
readonly input: SimGetBucketLifecycleConfigurationCommandInput;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Minimal structural sim S3 GetBucketLifecycleConfiguration input.
|
|
11
|
+
*/
|
|
12
|
+
export interface SimGetBucketLifecycleConfigurationCommandInput {
|
|
13
|
+
readonly Bucket?: string | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Minimal structural sim S3 GetBucketLifecycleConfiguration output.
|
|
17
|
+
*
|
|
18
|
+
* The rules come back at the top level rather than under a
|
|
19
|
+
* `LifecycleConfiguration`, which is the asymmetry real S3 has between putting
|
|
20
|
+
* a configuration and reading one.
|
|
21
|
+
*/
|
|
22
|
+
export interface SimGetBucketLifecycleConfigurationCommandOutput {
|
|
23
|
+
readonly Rules: readonly SimS3LifecycleRule[];
|
|
24
|
+
readonly $metadata: SimResponseMetadata;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=get-bucket-lifecycle-configuration.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-bucket-lifecycle-configuration.command.d.ts","sourceRoot":"","sources":["../../../../../src/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qFAAqF,CAAC;AAE9H;;GAEG;AACH,MAAM,WAAW,yCAAyC;IACxD,QAAQ,CAAC,KAAK,EAAE,8CAA8C,CAAC;CAChE;AAED;;GAEG;AACH,MAAM,WAAW,8CAA8C;IAC7D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,+CAA+C;IAC9D,QAAQ,CAAC,KAAK,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC9C,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-bucket-lifecycle-configuration.command.js","sourceRoot":"","sources":["../../../../../src/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.command.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CommandHandler } from "../../../../command/command-handler.js";
|
|
2
|
+
import { type BackgroundScheduler } from "../../../../util/background/background.js";
|
|
3
|
+
import type { SimS3RequestOptions } from "../sim-s3-request-options.js";
|
|
4
|
+
import type { SimIamInterServiceAuthZ } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
5
|
+
import type { SimS3Bucket, SimS3BucketName } from "../../bucket/sim-s3-bucket.js";
|
|
6
|
+
import type { SimGetBucketLifecycleConfigurationCommand, SimGetBucketLifecycleConfigurationCommandOutput } from "./get-bucket-lifecycle-configuration.command.js";
|
|
7
|
+
interface GetBucketLifecycleConfigurationHandlerProperties {
|
|
8
|
+
readonly buckets: Map<SimS3BucketName, SimS3Bucket>;
|
|
9
|
+
readonly iam?: SimIamInterServiceAuthZ;
|
|
10
|
+
readonly background?: BackgroundScheduler;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Simulated S3 GetBucketLifecycleConfigurationCommand handler.
|
|
14
|
+
*/
|
|
15
|
+
export declare class GetBucketLifecycleConfigurationCommandHandler implements CommandHandler<SimGetBucketLifecycleConfigurationCommand, SimGetBucketLifecycleConfigurationCommandOutput> {
|
|
16
|
+
private readonly buckets;
|
|
17
|
+
private readonly authorizer;
|
|
18
|
+
private readonly background;
|
|
19
|
+
constructor(properties: GetBucketLifecycleConfigurationHandlerProperties);
|
|
20
|
+
/**
|
|
21
|
+
* Authorize and return a Bucket's lifecycle rules.
|
|
22
|
+
*
|
|
23
|
+
* A Bucket carrying no rules is reported as NoSuchLifecycleConfiguration
|
|
24
|
+
* rather than an empty list, which is how real S3 separates a Bucket nobody
|
|
25
|
+
* configured from one configured to do nothing.
|
|
26
|
+
*/
|
|
27
|
+
handle(command: SimGetBucketLifecycleConfigurationCommand, options?: SimS3RequestOptions): Promise<SimGetBucketLifecycleConfigurationCommandOutput>;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=get-bucket-lifecycle-configuration.handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-bucket-lifecycle-configuration.handler.d.ts","sourceRoot":"","sources":["../../../../../src/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAEtG,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EAChB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,KAAK,EACV,yCAAyC,EACzC,+CAA+C,EAChD,MAAM,iDAAiD,CAAC;AAEzD,UAAU,gDAAgD;IACxD,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;IACpD,QAAQ,CAAC,GAAG,CAAC,EAAE,uBAAuB,CAAC;IACvC,QAAQ,CAAC,UAAU,CAAC,EAAE,mBAAmB,CAAC;CAC3C;AAED;;GAEG;AACH,qBAAa,6CAA8C,YAAW,cAAc,CAClF,yCAAyC,EACzC,+CAA+C,CAChD;IACC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;IAC5D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA2B;IACtD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IAEjD,YAAY,UAAU,EAAE,gDAAgD,EAUvE;IAED;;;;;;OAMG;IACG,MAAM,CACV,OAAO,EAAE,yCAAyC,EAClD,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,+CAA+C,CAAC,CAwB1D;CACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BackgroundTasks, } from "../../../../util/background/background.js";
|
|
2
|
+
import { assertDefined } from "../../../../util/type-guard/defined.js";
|
|
3
|
+
import { SimIamAllowAllAuth } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
4
|
+
import { SimS3NoSuchLifecycleConfiguration } from "../../error/sim-s3.error.js";
|
|
5
|
+
import { SimS3LifecycleAuthorizer } from "../lifecycle/sim-s3-lifecycle-authorizer.js";
|
|
6
|
+
import { requireSimS3Bucket } from "../require-sim-s3-bucket.js";
|
|
7
|
+
/**
|
|
8
|
+
* Simulated S3 GetBucketLifecycleConfigurationCommand handler.
|
|
9
|
+
*/
|
|
10
|
+
export class GetBucketLifecycleConfigurationCommandHandler {
|
|
11
|
+
buckets;
|
|
12
|
+
authorizer;
|
|
13
|
+
background;
|
|
14
|
+
constructor(properties) {
|
|
15
|
+
const { buckets, iam = new SimIamAllowAllAuth(), background = new BackgroundTasks(), } = properties;
|
|
16
|
+
this.buckets = buckets;
|
|
17
|
+
this.authorizer = new SimS3LifecycleAuthorizer({ iam });
|
|
18
|
+
this.background = background;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Authorize and return a Bucket's lifecycle rules.
|
|
22
|
+
*
|
|
23
|
+
* A Bucket carrying no rules is reported as NoSuchLifecycleConfiguration
|
|
24
|
+
* rather than an empty list, which is how real S3 separates a Bucket nobody
|
|
25
|
+
* configured from one configured to do nothing.
|
|
26
|
+
*/
|
|
27
|
+
async handle(command, options) {
|
|
28
|
+
assertDefined(command.input.Bucket, "GetBucketLifecycleConfigurationCommand.input.Bucket");
|
|
29
|
+
const bucketName = command.input.Bucket;
|
|
30
|
+
const bucket = requireSimS3Bucket(this.buckets, bucketName);
|
|
31
|
+
await this.background.sequence();
|
|
32
|
+
this.authorizer.authorizeRead(bucket, options);
|
|
33
|
+
const lifecycle = bucket.getLifecycle();
|
|
34
|
+
if (lifecycle.isEmpty) {
|
|
35
|
+
throw new SimS3NoSuchLifecycleConfiguration(`No lifecycle configuration on S3 Bucket ${bucketName}`);
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
Rules: lifecycle.rules,
|
|
39
|
+
$metadata: {},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=get-bucket-lifecycle-configuration.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-bucket-lifecycle-configuration.handler.js","sourceRoot":"","sources":["../../../../../src/service/s3/command/get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.handler.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,GAChB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wDAAwD,CAAC;AAK5F,OAAO,EAAE,iCAAiC,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAYjE;;GAEG;AACH,MAAM,OAAO,6CAA6C;IAIvC,OAAO,CAAoC;IAC3C,UAAU,CAA2B;IACrC,UAAU,CAAsB;IAEjD,YAAY,UAA4D;QACtE,MAAM,EACJ,OAAO,EACP,GAAG,GAAG,IAAI,kBAAkB,EAAE,EAC9B,UAAU,GAAG,IAAI,eAAe,EAAE,GACnC,GAAG,UAAU,CAAC;QAEf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,IAAI,wBAAwB,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CACV,OAAkD,EAClD,OAA6B;QAE7B,aAAa,CACX,OAAO,CAAC,KAAK,CAAC,MAAM,EACpB,qDAAqD,CACtD,CAAC;QAEF,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,MAAyB,CAAC;QAC3D,MAAM,MAAM,GAAG,kBAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAE5D,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAEjC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAE/C,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;QACxC,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;YACtB,MAAM,IAAI,iCAAiC,CACzC,2CAA2C,UAAU,EAAE,CACxD,CAAC;QACJ,CAAC;QAED,OAAO;YACL,KAAK,EAAE,SAAS,CAAC,KAAK;YACtB,SAAS,EAAE,EAAE;SACd,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SimIamInterServiceAuthZ } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
2
|
+
import type { SimS3Bucket } from "../../bucket/sim-s3-bucket.js";
|
|
3
|
+
import type { SimS3RequestOptions } from "../sim-s3-request-options.js";
|
|
4
|
+
interface SimS3LifecycleAuthorizerProperties {
|
|
5
|
+
readonly iam: SimIamInterServiceAuthZ;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Applies IAM authorization to the S3 lifecycle configuration commands.
|
|
9
|
+
*
|
|
10
|
+
* Reading is governed by s3:GetLifecycleConfiguration. Both replacing and
|
|
11
|
+
* removing the configuration are governed by s3:PutLifecycleConfiguration:
|
|
12
|
+
* real S3 has no separate delete permission, so removing the rules needs
|
|
13
|
+
* exactly what setting them needs. Neither action name carries "Bucket", which
|
|
14
|
+
* is where they differ from the rest of the Bucket configuration actions.
|
|
15
|
+
*/
|
|
16
|
+
export declare class SimS3LifecycleAuthorizer {
|
|
17
|
+
private static readonly readAction;
|
|
18
|
+
private static readonly writeAction;
|
|
19
|
+
private readonly iam;
|
|
20
|
+
constructor(properties: SimS3LifecycleAuthorizerProperties);
|
|
21
|
+
/**
|
|
22
|
+
* Ensure the caller may read the Bucket's lifecycle rules.
|
|
23
|
+
*/
|
|
24
|
+
authorizeRead(bucket: SimS3Bucket, options?: SimS3RequestOptions): void;
|
|
25
|
+
/**
|
|
26
|
+
* Ensure the caller may replace or remove the Bucket's lifecycle rules.
|
|
27
|
+
*/
|
|
28
|
+
authorizeWrite(bucket: SimS3Bucket, options?: SimS3RequestOptions): void;
|
|
29
|
+
private authorize;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=sim-s3-lifecycle-authorizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-s3-lifecycle-authorizer.d.ts","sourceRoot":"","sources":["../../../../../src/service/s3/command/lifecycle/sim-s3-lifecycle-authorizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAGtG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAGjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE,UAAU,kCAAkC;IAC1C,QAAQ,CAAC,GAAG,EAAE,uBAAuB,CAAC;CACvC;AAED;;;;;;;;GAQG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAkC;IACpE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAkC;IAErE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA0B;IAE9C,YAAY,UAAU,EAAE,kCAAkC,EAEzD;IAED;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAEtE;IAED;;OAEG;IACH,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAEvE;IAED,OAAO,CAAC,SAAS;CAsBlB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { SimIamAccessDenied } from "../../../iam/error/sim-iam.error.js";
|
|
2
|
+
import { simS3BucketArn } from "../../bucket/sim-s3-bucket-arn.js";
|
|
3
|
+
import { simS3BucketResourcePolicies } from "../authorize/sim-s3-bucket-resource-policies.js";
|
|
4
|
+
import { simS3ConditionContext } from "../authorize/sim-s3-condition-context.js";
|
|
5
|
+
/**
|
|
6
|
+
* Applies IAM authorization to the S3 lifecycle configuration commands.
|
|
7
|
+
*
|
|
8
|
+
* Reading is governed by s3:GetLifecycleConfiguration. Both replacing and
|
|
9
|
+
* removing the configuration are governed by s3:PutLifecycleConfiguration:
|
|
10
|
+
* real S3 has no separate delete permission, so removing the rules needs
|
|
11
|
+
* exactly what setting them needs. Neither action name carries "Bucket", which
|
|
12
|
+
* is where they differ from the rest of the Bucket configuration actions.
|
|
13
|
+
*/
|
|
14
|
+
export class SimS3LifecycleAuthorizer {
|
|
15
|
+
static readAction = "s3:GetLifecycleConfiguration";
|
|
16
|
+
static writeAction = "s3:PutLifecycleConfiguration";
|
|
17
|
+
iam;
|
|
18
|
+
constructor(properties) {
|
|
19
|
+
this.iam = properties.iam;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Ensure the caller may read the Bucket's lifecycle rules.
|
|
23
|
+
*/
|
|
24
|
+
authorizeRead(bucket, options) {
|
|
25
|
+
this.authorize(SimS3LifecycleAuthorizer.readAction, bucket, options);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Ensure the caller may replace or remove the Bucket's lifecycle rules.
|
|
29
|
+
*/
|
|
30
|
+
authorizeWrite(bucket, options) {
|
|
31
|
+
this.authorize(SimS3LifecycleAuthorizer.writeAction, bucket, options);
|
|
32
|
+
}
|
|
33
|
+
authorize(action, bucket, options) {
|
|
34
|
+
const resource = simS3BucketArn(bucket.bucketName);
|
|
35
|
+
const decision = this.iam.authorize({
|
|
36
|
+
action,
|
|
37
|
+
resource,
|
|
38
|
+
caller: options?.caller,
|
|
39
|
+
conditionContext: simS3ConditionContext(options),
|
|
40
|
+
resourcePolicies: simS3BucketResourcePolicies(bucket),
|
|
41
|
+
});
|
|
42
|
+
if (decision.isDenied) {
|
|
43
|
+
throw new SimIamAccessDenied({
|
|
44
|
+
principal: decision.caller.principal,
|
|
45
|
+
action,
|
|
46
|
+
resource,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=sim-s3-lifecycle-authorizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-s3-lifecycle-authorizer.js","sourceRoot":"","sources":["../../../../../src/service/s3/command/lifecycle/sim-s3-lifecycle-authorizer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAOjF;;;;;;;;GAQG;AACH,MAAM,OAAO,wBAAwB;IAC3B,MAAM,CAAU,UAAU,GAAG,8BAA8B,CAAC;IAC5D,MAAM,CAAU,WAAW,GAAG,8BAA8B,CAAC;IAEpD,GAAG,CAA0B;IAE9C,YAAY,UAA8C;QACxD,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,aAAa,CAAC,MAAmB,EAAE,OAA6B;QAC9D,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED;;OAEG;IACH,cAAc,CAAC,MAAmB,EAAE,OAA6B;QAC/D,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAEO,SAAS,CACf,MAAc,EACd,MAAmB,EACnB,OAA6B;QAE7B,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;YAClC,MAAM;YACN,QAAQ;YACR,MAAM,EAAE,OAAO,EAAE,MAAM;YACvB,gBAAgB,EAAE,qBAAqB,CAAC,OAAO,CAAC;YAChD,gBAAgB,EAAE,2BAA2B,CAAC,MAAM,CAAC;SACtD,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACtB,MAAM,IAAI,kBAAkB,CAAC;gBAC3B,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS;gBACpC,MAAM;gBACN,QAAQ;aACT,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SimS3BucketCommandState } from "../sim-s3-bucket-command-state.js";
|
|
2
|
+
import type * as simS3Commands from "../sim-s3-command.types.js";
|
|
3
|
+
import type { SimS3RequestOptions } from "../sim-s3-request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* The lifecycle configuration commands of one simulated S3 scope.
|
|
6
|
+
*/
|
|
7
|
+
export declare class SimS3LifecycleCommands {
|
|
8
|
+
private readonly state;
|
|
9
|
+
constructor(state: SimS3BucketCommandState);
|
|
10
|
+
/**
|
|
11
|
+
* Replace a Bucket's lifecycle rules.
|
|
12
|
+
*/
|
|
13
|
+
put(command: simS3Commands.SimPutBucketLifecycleConfigurationCommand, options?: SimS3RequestOptions): Promise<simS3Commands.SimPutBucketLifecycleConfigurationCommandOutput>;
|
|
14
|
+
/**
|
|
15
|
+
* Read a Bucket's lifecycle rules.
|
|
16
|
+
*/
|
|
17
|
+
get(command: simS3Commands.SimGetBucketLifecycleConfigurationCommand, options?: SimS3RequestOptions): Promise<simS3Commands.SimGetBucketLifecycleConfigurationCommandOutput>;
|
|
18
|
+
/**
|
|
19
|
+
* Remove a Bucket's lifecycle rules.
|
|
20
|
+
*/
|
|
21
|
+
delete(command: simS3Commands.SimDeleteBucketLifecycleCommand, options?: SimS3RequestOptions): Promise<simS3Commands.SimDeleteBucketLifecycleCommandOutput>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=sim-s3-lifecycle-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-s3-lifecycle-commands.d.ts","sourceRoot":"","sources":["../../../../../src/service/s3/command/lifecycle/sim-s3-lifecycle-commands.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,KAAK,KAAK,aAAa,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE;;GAEG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA0B;IAEhD,YAAY,KAAK,EAAE,uBAAuB,EAEzC;IAED;;OAEG;IACG,GAAG,CACP,OAAO,EAAE,aAAa,CAAC,yCAAyC,EAChE,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,aAAa,CAAC,+CAA+C,CAAC,CAIxE;IAED;;OAEG;IACG,GAAG,CACP,OAAO,EAAE,aAAa,CAAC,yCAAyC,EAChE,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,aAAa,CAAC,+CAA+C,CAAC,CAIxE;IAED;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,aAAa,CAAC,+BAA+B,EACtD,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,aAAa,CAAC,qCAAqC,CAAC,CAK9D;CACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DeleteBucketLifecycleCommandHandler } from "../delete-bucket-lifecycle/delete-bucket-lifecycle.handler.js";
|
|
2
|
+
import { GetBucketLifecycleConfigurationCommandHandler } from "../get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.handler.js";
|
|
3
|
+
import { PutBucketLifecycleConfigurationCommandHandler } from "../put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.handler.js";
|
|
4
|
+
/**
|
|
5
|
+
* The lifecycle configuration commands of one simulated S3 scope.
|
|
6
|
+
*/
|
|
7
|
+
export class SimS3LifecycleCommands {
|
|
8
|
+
state;
|
|
9
|
+
constructor(state) {
|
|
10
|
+
this.state = state;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Replace a Bucket's lifecycle rules.
|
|
14
|
+
*/
|
|
15
|
+
async put(command, options) {
|
|
16
|
+
return await new PutBucketLifecycleConfigurationCommandHandler(this.state).handle(command, options);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Read a Bucket's lifecycle rules.
|
|
20
|
+
*/
|
|
21
|
+
async get(command, options) {
|
|
22
|
+
return await new GetBucketLifecycleConfigurationCommandHandler(this.state).handle(command, options);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Remove a Bucket's lifecycle rules.
|
|
26
|
+
*/
|
|
27
|
+
async delete(command, options) {
|
|
28
|
+
return await new DeleteBucketLifecycleCommandHandler(this.state).handle(command, options);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=sim-s3-lifecycle-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-s3-lifecycle-commands.js","sourceRoot":"","sources":["../../../../../src/service/s3/command/lifecycle/sim-s3-lifecycle-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,+DAA+D,CAAC;AACpH,OAAO,EAAE,6CAA6C,EAAE,MAAM,qFAAqF,CAAC;AACpJ,OAAO,EAAE,6CAA6C,EAAE,MAAM,qFAAqF,CAAC;AAKpJ;;GAEG;AACH,MAAM,OAAO,sBAAsB;IAChB,KAAK,CAA0B;IAEhD,YAAY,KAA8B;QACxC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG,CACP,OAAgE,EAChE,OAA6B;QAE7B,OAAO,MAAM,IAAI,6CAA6C,CAC5D,IAAI,CAAC,KAAK,CACX,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG,CACP,OAAgE,EAChE,OAA6B;QAE7B,OAAO,MAAM,IAAI,6CAA6C,CAC5D,IAAI,CAAC,KAAK,CACX,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAsD,EACtD,OAA6B;QAE7B,OAAO,MAAM,IAAI,mCAAmC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CACrE,OAAO,EACP,OAAO,CACR,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SimS3BucketName } from "../../bucket/sim-s3-bucket.js";
|
|
2
|
+
import type { SimS3LifecycleConfiguration } from "../put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.js";
|
|
3
|
+
/**
|
|
4
|
+
* Refuse a lifecycle configuration real S3 would refuse to store.
|
|
5
|
+
*
|
|
6
|
+
* Real S3 answers MalformedXML for a configuration carrying no rules, for a
|
|
7
|
+
* rule whose Status is anything but Enabled or Disabled, and for a rule
|
|
8
|
+
* stating no action at all. All three are worth keeping, because a rule real
|
|
9
|
+
* S3 would have rejected reads back here looking configured.
|
|
10
|
+
*/
|
|
11
|
+
export declare function validateSimS3LifecycleRules(configuration: SimS3LifecycleConfiguration, bucketName: SimS3BucketName): void;
|
|
12
|
+
//# sourceMappingURL=sim-s3-lifecycle-rules-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-s3-lifecycle-rules-validation.d.ts","sourceRoot":"","sources":["../../../../../src/service/s3/command/lifecycle/sim-s3-lifecycle-rules-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,EACV,2BAA2B,EAE5B,MAAM,qFAAqF,CAAC;AA6B7F;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,aAAa,EAAE,2BAA2B,EAC1C,UAAU,EAAE,eAAe,GAC1B,IAAI,CAYN"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { SimS3MalformedXml } from "../../error/sim-s3.error.js";
|
|
2
|
+
const ruleStatuses = new Set(["Enabled", "Disabled"]);
|
|
3
|
+
/**
|
|
4
|
+
* The fields that make a rule do something, for the refusal to name.
|
|
5
|
+
*/
|
|
6
|
+
const ruleActionNames = "Expiration, Transitions, NoncurrentVersionExpiration, " +
|
|
7
|
+
"NoncurrentVersionTransitions or AbortIncompleteMultipartUpload";
|
|
8
|
+
/**
|
|
9
|
+
* Whether a rule states an action to take on the Objects it selects.
|
|
10
|
+
*
|
|
11
|
+
* Real S3 refuses a rule stating none, because a rule that selects Objects and
|
|
12
|
+
* then does nothing with them is a configuration with no meaning. An empty
|
|
13
|
+
* list of transitions counts as none. The field is there and the rule still
|
|
14
|
+
* transitions nothing.
|
|
15
|
+
*/
|
|
16
|
+
function statesAnAction(rule) {
|
|
17
|
+
return [
|
|
18
|
+
rule.Expiration !== undefined,
|
|
19
|
+
rule.NoncurrentVersionExpiration !== undefined,
|
|
20
|
+
rule.AbortIncompleteMultipartUpload !== undefined,
|
|
21
|
+
(rule.Transitions ?? []).length > 0,
|
|
22
|
+
(rule.NoncurrentVersionTransitions ?? []).length > 0,
|
|
23
|
+
].includes(true);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Refuse a lifecycle configuration real S3 would refuse to store.
|
|
27
|
+
*
|
|
28
|
+
* Real S3 answers MalformedXML for a configuration carrying no rules, for a
|
|
29
|
+
* rule whose Status is anything but Enabled or Disabled, and for a rule
|
|
30
|
+
* stating no action at all. All three are worth keeping, because a rule real
|
|
31
|
+
* S3 would have rejected reads back here looking configured.
|
|
32
|
+
*/
|
|
33
|
+
export function validateSimS3LifecycleRules(configuration, bucketName) {
|
|
34
|
+
const rules = configuration.Rules ?? [];
|
|
35
|
+
if (rules.length === 0) {
|
|
36
|
+
throw new SimS3MalformedXml(`Lifecycle configuration for S3 Bucket ${bucketName} states no rules`);
|
|
37
|
+
}
|
|
38
|
+
for (const rule of rules) {
|
|
39
|
+
validateRule(rule, bucketName);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function validateRule(rule, bucketName) {
|
|
43
|
+
const named = rule.ID ?? "(unnamed)";
|
|
44
|
+
if (rule.Status === undefined || !ruleStatuses.has(rule.Status)) {
|
|
45
|
+
throw new SimS3MalformedXml(`Lifecycle rule ${named} for S3 Bucket ${bucketName} must state a ` +
|
|
46
|
+
`Status of Enabled or Disabled`);
|
|
47
|
+
}
|
|
48
|
+
if (!statesAnAction(rule)) {
|
|
49
|
+
throw new SimS3MalformedXml(`Lifecycle rule ${named} for S3 Bucket ${bucketName} must state at ` +
|
|
50
|
+
`least one of ${ruleActionNames}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=sim-s3-lifecycle-rules-validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-s3-lifecycle-rules-validation.js","sourceRoot":"","sources":["../../../../../src/service/s3/command/lifecycle/sim-s3-lifecycle-rules-validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAMhE,MAAM,YAAY,GAAwB,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,eAAe,GACnB,wDAAwD;IACxD,gEAAgE,CAAC;AAEnE;;;;;;;GAOG;AACH,SAAS,cAAc,CAAC,IAAwB;IAC9C,OAAO;QACL,IAAI,CAAC,UAAU,KAAK,SAAS;QAC7B,IAAI,CAAC,2BAA2B,KAAK,SAAS;QAC9C,IAAI,CAAC,8BAA8B,KAAK,SAAS;QACjD,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC;QACnC,CAAC,IAAI,CAAC,4BAA4B,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC;KACrD,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACnB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,2BAA2B,CACzC,aAA0C,EAC1C,UAA2B;IAE3B,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,IAAI,EAAE,CAAC;IAExC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,iBAAiB,CACzB,yCAAyC,UAAU,kBAAkB,CACtE,CAAC;IACJ,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACjC,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CACnB,IAAwB,EACxB,UAA2B;IAE3B,MAAM,KAAK,GAAG,IAAI,CAAC,EAAE,IAAI,WAAW,CAAC;IAErC,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAChE,MAAM,IAAI,iBAAiB,CACzB,kBAAkB,KAAK,kBAAkB,UAAU,gBAAgB;YACjE,+BAA+B,CAClC,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,iBAAiB,CACzB,kBAAkB,KAAK,kBAAkB,UAAU,iBAAiB;YAClE,gBAAgB,eAAe,EAAE,CACpC,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { SimResponseMetadata } from "../../../aws/metadata/response-metadata.type.js";
|
|
2
|
+
/**
|
|
3
|
+
* Minimal structural sim S3 PutBucketLifecycleConfiguration command.
|
|
4
|
+
*/
|
|
5
|
+
export interface SimPutBucketLifecycleConfigurationCommand {
|
|
6
|
+
readonly input: SimPutBucketLifecycleConfigurationCommandInput;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Minimal structural sim S3 PutBucketLifecycleConfiguration input.
|
|
10
|
+
*/
|
|
11
|
+
export interface SimPutBucketLifecycleConfigurationCommandInput {
|
|
12
|
+
readonly Bucket?: string | undefined;
|
|
13
|
+
readonly LifecycleConfiguration?: SimS3LifecycleConfiguration | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Minimal structural sim S3 PutBucketLifecycleConfiguration output.
|
|
17
|
+
*/
|
|
18
|
+
export interface SimPutBucketLifecycleConfigurationCommandOutput {
|
|
19
|
+
readonly $metadata: SimResponseMetadata;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Minimal structural sim S3 lifecycle configuration.
|
|
23
|
+
*
|
|
24
|
+
* A Bucket has one of these rather than a list of them, so a put replaces
|
|
25
|
+
* whatever was there instead of adding to it.
|
|
26
|
+
*/
|
|
27
|
+
export interface SimS3LifecycleConfiguration {
|
|
28
|
+
readonly Rules?: readonly SimS3LifecycleRule[] | undefined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Minimal structural sim S3 lifecycle rule.
|
|
32
|
+
*
|
|
33
|
+
* Simulated S3 holds a rule and hands it back. Nothing expires or transitions
|
|
34
|
+
* an Object, which is why the fields carry no more type than the SDK gives
|
|
35
|
+
* them.
|
|
36
|
+
*/
|
|
37
|
+
export interface SimS3LifecycleRule {
|
|
38
|
+
readonly ID?: string | undefined;
|
|
39
|
+
readonly Status?: string | undefined;
|
|
40
|
+
readonly Prefix?: string | undefined;
|
|
41
|
+
readonly Filter?: SimS3LifecycleRuleFilter | undefined;
|
|
42
|
+
readonly Expiration?: SimS3LifecycleExpiration | undefined;
|
|
43
|
+
readonly Transitions?: readonly SimS3LifecycleTransition[] | undefined;
|
|
44
|
+
readonly AbortIncompleteMultipartUpload?: SimS3LifecycleAbortIncompleteMultipartUpload | undefined;
|
|
45
|
+
readonly NoncurrentVersionExpiration?: SimS3LifecycleNoncurrentVersionExpiration | undefined;
|
|
46
|
+
readonly NoncurrentVersionTransitions?: readonly SimS3LifecycleNoncurrentVersionTransition[] | undefined;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Minimal structural sim S3 lifecycle rule filter.
|
|
50
|
+
*/
|
|
51
|
+
export interface SimS3LifecycleRuleFilter {
|
|
52
|
+
readonly Prefix?: string | undefined;
|
|
53
|
+
readonly Tag?: SimS3LifecycleTag | undefined;
|
|
54
|
+
readonly And?: SimS3LifecycleRuleAndOperator | undefined;
|
|
55
|
+
readonly ObjectSizeGreaterThan?: number | undefined;
|
|
56
|
+
readonly ObjectSizeLessThan?: number | undefined;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Minimal structural sim S3 lifecycle rule filter conjunction.
|
|
60
|
+
*/
|
|
61
|
+
export interface SimS3LifecycleRuleAndOperator {
|
|
62
|
+
readonly Prefix?: string | undefined;
|
|
63
|
+
readonly Tags?: readonly SimS3LifecycleTag[] | undefined;
|
|
64
|
+
readonly ObjectSizeGreaterThan?: number | undefined;
|
|
65
|
+
readonly ObjectSizeLessThan?: number | undefined;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Minimal structural sim S3 Object tag, as a lifecycle filter names one.
|
|
69
|
+
*/
|
|
70
|
+
export interface SimS3LifecycleTag {
|
|
71
|
+
readonly Key?: string | undefined;
|
|
72
|
+
readonly Value?: string | undefined;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Minimal structural sim S3 lifecycle expiry.
|
|
76
|
+
*/
|
|
77
|
+
export interface SimS3LifecycleExpiration {
|
|
78
|
+
readonly Date?: Date | undefined;
|
|
79
|
+
readonly Days?: number | undefined;
|
|
80
|
+
readonly ExpiredObjectDeleteMarker?: boolean | undefined;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Minimal structural sim S3 lifecycle storage class transition.
|
|
84
|
+
*/
|
|
85
|
+
export interface SimS3LifecycleTransition {
|
|
86
|
+
readonly Date?: Date | undefined;
|
|
87
|
+
readonly Days?: number | undefined;
|
|
88
|
+
readonly StorageClass?: string | undefined;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Minimal structural sim S3 lifecycle abandoned upload rule.
|
|
92
|
+
*/
|
|
93
|
+
export interface SimS3LifecycleAbortIncompleteMultipartUpload {
|
|
94
|
+
readonly DaysAfterInitiation?: number | undefined;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Minimal structural sim S3 lifecycle noncurrent version expiry.
|
|
98
|
+
*/
|
|
99
|
+
export interface SimS3LifecycleNoncurrentVersionExpiration {
|
|
100
|
+
readonly NoncurrentDays?: number | undefined;
|
|
101
|
+
readonly NewerNoncurrentVersions?: number | undefined;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Minimal structural sim S3 lifecycle noncurrent version transition.
|
|
105
|
+
*/
|
|
106
|
+
export interface SimS3LifecycleNoncurrentVersionTransition {
|
|
107
|
+
readonly NoncurrentDays?: number | undefined;
|
|
108
|
+
readonly StorageClass?: string | undefined;
|
|
109
|
+
readonly NewerNoncurrentVersions?: number | undefined;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=put-bucket-lifecycle-configuration.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"put-bucket-lifecycle-configuration.command.d.ts","sourceRoot":"","sources":["../../../../../src/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"put-bucket-lifecycle-configuration.command.js","sourceRoot":"","sources":["../../../../../src/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CommandHandler } from "../../../../command/command-handler.js";
|
|
2
|
+
import { type BackgroundScheduler } from "../../../../util/background/background.js";
|
|
3
|
+
import type { SimS3RequestOptions } from "../sim-s3-request-options.js";
|
|
4
|
+
import type { SimIamInterServiceAuthZ } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
5
|
+
import type { SimS3Bucket, SimS3BucketName } from "../../bucket/sim-s3-bucket.js";
|
|
6
|
+
import type { SimPutBucketLifecycleConfigurationCommand, SimPutBucketLifecycleConfigurationCommandOutput } from "./put-bucket-lifecycle-configuration.command.js";
|
|
7
|
+
interface PutBucketLifecycleConfigurationHandlerProperties {
|
|
8
|
+
readonly buckets: Map<SimS3BucketName, SimS3Bucket>;
|
|
9
|
+
readonly iam?: SimIamInterServiceAuthZ;
|
|
10
|
+
readonly background?: BackgroundScheduler;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Simulated S3 PutBucketLifecycleConfigurationCommand handler.
|
|
14
|
+
*/
|
|
15
|
+
export declare class PutBucketLifecycleConfigurationCommandHandler implements CommandHandler<SimPutBucketLifecycleConfigurationCommand, SimPutBucketLifecycleConfigurationCommandOutput> {
|
|
16
|
+
private readonly buckets;
|
|
17
|
+
private readonly authorizer;
|
|
18
|
+
private readonly background;
|
|
19
|
+
constructor(properties: PutBucketLifecycleConfigurationHandlerProperties);
|
|
20
|
+
/**
|
|
21
|
+
* Authorize and replace a Bucket's lifecycle rules.
|
|
22
|
+
*
|
|
23
|
+
* The supplied configuration replaces the previous one wholesale, so a rule
|
|
24
|
+
* it leaves out is gone rather than kept from whatever the Bucket had
|
|
25
|
+
* before.
|
|
26
|
+
*/
|
|
27
|
+
handle(command: SimPutBucketLifecycleConfigurationCommand, options?: SimS3RequestOptions): Promise<SimPutBucketLifecycleConfigurationCommandOutput>;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=put-bucket-lifecycle-configuration.handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"put-bucket-lifecycle-configuration.handler.d.ts","sourceRoot":"","sources":["../../../../../src/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAGtG,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EAChB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,KAAK,EACV,yCAAyC,EACzC,+CAA+C,EAChD,MAAM,iDAAiD,CAAC;AAEzD,UAAU,gDAAgD;IACxD,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;IACpD,QAAQ,CAAC,GAAG,CAAC,EAAE,uBAAuB,CAAC;IACvC,QAAQ,CAAC,UAAU,CAAC,EAAE,mBAAmB,CAAC;CAC3C;AAED;;GAEG;AACH,qBAAa,6CAA8C,YAAW,cAAc,CAClF,yCAAyC,EACzC,+CAA+C,CAChD;IACC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;IAC5D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA2B;IACtD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IAEjD,YAAY,UAAU,EAAE,gDAAgD,EAUvE;IAED;;;;;;OAMG;IACG,MAAM,CACV,OAAO,EAAE,yCAAyC,EAClD,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,+CAA+C,CAAC,CA2B1D;CACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BackgroundTasks, } from "../../../../util/background/background.js";
|
|
2
|
+
import { assertDefined } from "../../../../util/type-guard/defined.js";
|
|
3
|
+
import { SimIamAllowAllAuth } from "../../../iam/authorize/sim-iam-inter-service-auth-z.js";
|
|
4
|
+
import { SimS3LifecycleConfiguration } from "../../bucket/lifecycle/sim-s3-lifecycle-configuration.js";
|
|
5
|
+
import { SimS3LifecycleAuthorizer } from "../lifecycle/sim-s3-lifecycle-authorizer.js";
|
|
6
|
+
import { validateSimS3LifecycleRules } from "../lifecycle/sim-s3-lifecycle-rules-validation.js";
|
|
7
|
+
import { requireSimS3Bucket } from "../require-sim-s3-bucket.js";
|
|
8
|
+
/**
|
|
9
|
+
* Simulated S3 PutBucketLifecycleConfigurationCommand handler.
|
|
10
|
+
*/
|
|
11
|
+
export class PutBucketLifecycleConfigurationCommandHandler {
|
|
12
|
+
buckets;
|
|
13
|
+
authorizer;
|
|
14
|
+
background;
|
|
15
|
+
constructor(properties) {
|
|
16
|
+
const { buckets, iam = new SimIamAllowAllAuth(), background = new BackgroundTasks(), } = properties;
|
|
17
|
+
this.buckets = buckets;
|
|
18
|
+
this.authorizer = new SimS3LifecycleAuthorizer({ iam });
|
|
19
|
+
this.background = background;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Authorize and replace a Bucket's lifecycle rules.
|
|
23
|
+
*
|
|
24
|
+
* The supplied configuration replaces the previous one wholesale, so a rule
|
|
25
|
+
* it leaves out is gone rather than kept from whatever the Bucket had
|
|
26
|
+
* before.
|
|
27
|
+
*/
|
|
28
|
+
async handle(command, options) {
|
|
29
|
+
assertDefined(command.input.Bucket, "PutBucketLifecycleConfigurationCommand.input.Bucket");
|
|
30
|
+
assertDefined(command.input.LifecycleConfiguration, "PutBucketLifecycleConfigurationCommand.input.LifecycleConfiguration");
|
|
31
|
+
const bucketName = command.input.Bucket;
|
|
32
|
+
const bucket = requireSimS3Bucket(this.buckets, bucketName);
|
|
33
|
+
await this.background.sequence();
|
|
34
|
+
this.authorizer.authorizeWrite(bucket, options);
|
|
35
|
+
const configuration = command.input.LifecycleConfiguration;
|
|
36
|
+
validateSimS3LifecycleRules(configuration, bucketName);
|
|
37
|
+
bucket.configureLifecycle(SimS3LifecycleConfiguration.fromConfiguration(configuration));
|
|
38
|
+
return {
|
|
39
|
+
$metadata: {},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=put-bucket-lifecycle-configuration.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"put-bucket-lifecycle-configuration.handler.js","sourceRoot":"","sources":["../../../../../src/service/s3/command/put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.handler.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,GAChB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wDAAwD,CAAC;AAC5F,OAAO,EAAE,2BAA2B,EAAE,MAAM,0DAA0D,CAAC;AAKvG,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAYjE;;GAEG;AACH,MAAM,OAAO,6CAA6C;IAIvC,OAAO,CAAoC;IAC3C,UAAU,CAA2B;IACrC,UAAU,CAAsB;IAEjD,YAAY,UAA4D;QACtE,MAAM,EACJ,OAAO,EACP,GAAG,GAAG,IAAI,kBAAkB,EAAE,EAC9B,UAAU,GAAG,IAAI,eAAe,EAAE,GACnC,GAAG,UAAU,CAAC;QAEf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,IAAI,wBAAwB,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CACV,OAAkD,EAClD,OAA6B;QAE7B,aAAa,CACX,OAAO,CAAC,KAAK,CAAC,MAAM,EACpB,qDAAqD,CACtD,CAAC;QACF,aAAa,CACX,OAAO,CAAC,KAAK,CAAC,sBAAsB,EACpC,qEAAqE,CACtE,CAAC;QAEF,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,MAAyB,CAAC;QAC3D,MAAM,MAAM,GAAG,kBAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAE5D,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAEjC,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAEhD,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,sBAAsB,CAAC;QAC3D,2BAA2B,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;QAEvD,MAAM,CAAC,kBAAkB,CACvB,2BAA2B,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAC7D,CAAC;QAEF,OAAO;YACL,SAAS,EAAE,EAAE;SACd,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -13,6 +13,9 @@ export type { SimDeleteBucketPolicyCommand, SimDeleteBucketPolicyCommandOutput,
|
|
|
13
13
|
export type { SimDeleteObjectCommand, SimDeleteObjectCommandOutput, } from "./delete-object/delete-object.command.js";
|
|
14
14
|
export type { SimDeleteObjectsCommand, SimDeleteObjectsCommandOutput, } from "./delete-objects/delete-objects.command.js";
|
|
15
15
|
export type { SimDeletePublicAccessBlockCommand, SimDeletePublicAccessBlockCommandOutput, } from "./delete-public-access-block/delete-public-access-block.command.js";
|
|
16
|
+
export type { SimDeleteBucketLifecycleCommand, SimDeleteBucketLifecycleCommandOutput, } from "./delete-bucket-lifecycle/delete-bucket-lifecycle.command.js";
|
|
17
|
+
export type { SimGetBucketLifecycleConfigurationCommand, SimGetBucketLifecycleConfigurationCommandOutput, } from "./get-bucket-lifecycle-configuration/get-bucket-lifecycle-configuration.command.js";
|
|
18
|
+
export type { SimPutBucketLifecycleConfigurationCommand, SimPutBucketLifecycleConfigurationCommandOutput, SimS3LifecycleConfiguration, SimS3LifecycleRule, } from "./put-bucket-lifecycle-configuration/put-bucket-lifecycle-configuration.command.js";
|
|
16
19
|
export type { SimGetBucketPolicyCommand, SimGetBucketPolicyCommandOutput, } from "./get-bucket-policy/get-bucket-policy.command.js";
|
|
17
20
|
export type { SimGetBucketNotificationConfigurationCommand, SimGetBucketNotificationConfigurationCommandOutput, } from "./get-bucket-notification-configuration/get-bucket-notification-configuration.command.js";
|
|
18
21
|
export type { SimGetObjectCommand, SimGetObjectCommandOutput, } from "./get-object/get-object.command.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-s3-command.types.d.ts","sourceRoot":"","sources":["../../../../src/service/s3/command/sim-s3-command.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EACV,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,0CAA0C,CAAC;AAClD,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EACV,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,0CAA0C,CAAC;AAClD,YAAY,EACV,4BAA4B,EAC5B,kCAAkC,GACnC,MAAM,wDAAwD,CAAC;AAChE,YAAY,EACV,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,0CAA0C,CAAC;AAClD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,4CAA4C,CAAC;AACpD,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC;AAC5E,YAAY,EACV,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,kDAAkD,CAAC;AAC1D,YAAY,EACV,4CAA4C,EAC5C,kDAAkD,GACnD,MAAM,0FAA0F,CAAC;AAClG,YAAY,EACV,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,8BAA8B,EAC9B,oCAAoC,GACrC,MAAM,8DAA8D,CAAC;AACtE,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,qBAAqB,EACrB,2BAA2B,EAC3B,kBAAkB,GACnB,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,4CAA4C,EAC5C,kDAAkD,GACnD,MAAM,0FAA0F,CAAC;AAClG,YAAY,EACV,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,kDAAkD,CAAC;AAC1D,YAAY,EACV,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,oDAAoD,CAAC;AAC5D,YAAY,EACV,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,8BAA8B,EAC9B,oCAAoC,GACrC,MAAM,8DAA8D,CAAC;AACtE,YAAY,EACV,8BAA8B,EAC9B,oCAAoC,GACrC,MAAM,4DAA4D,CAAC;AACpE,YAAY,EACV,iCAAiC,EACjC,uCAAuC,EACvC,sBAAsB,GACvB,MAAM,kEAAkE,CAAC;AAC1E,YAAY,EACV,+BAA+B,EAC/B,qCAAqC,GACtC,MAAM,8DAA8D,CAAC;AACtE,YAAY,EACV,8BAA8B,EAC9B,oCAAoC,EACpC,yBAAyB,GAC1B,MAAM,4DAA4D,CAAC;AACpE,YAAY,EACV,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,sCAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"sim-s3-command.types.d.ts","sourceRoot":"","sources":["../../../../src/service/s3/command/sim-s3-command.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EACV,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,0CAA0C,CAAC;AAClD,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EACV,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,0CAA0C,CAAC;AAClD,YAAY,EACV,4BAA4B,EAC5B,kCAAkC,GACnC,MAAM,wDAAwD,CAAC;AAChE,YAAY,EACV,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,0CAA0C,CAAC;AAClD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,4CAA4C,CAAC;AACpD,YAAY,EACV,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,oEAAoE,CAAC;AAC5E,YAAY,EACV,+BAA+B,EAC/B,qCAAqC,GACtC,MAAM,8DAA8D,CAAC;AACtE,YAAY,EACV,yCAAyC,EACzC,+CAA+C,GAChD,MAAM,oFAAoF,CAAC;AAC5F,YAAY,EACV,yCAAyC,EACzC,+CAA+C,EAC/C,2BAA2B,EAC3B,kBAAkB,GACnB,MAAM,oFAAoF,CAAC;AAC5F,YAAY,EACV,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,kDAAkD,CAAC;AAC1D,YAAY,EACV,4CAA4C,EAC5C,kDAAkD,GACnD,MAAM,0FAA0F,CAAC;AAClG,YAAY,EACV,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,8BAA8B,EAC9B,oCAAoC,GACrC,MAAM,8DAA8D,CAAC;AACtE,YAAY,EACV,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,qBAAqB,EACrB,2BAA2B,EAC3B,kBAAkB,GACnB,MAAM,wCAAwC,CAAC;AAChD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,4CAA4C,EAC5C,kDAAkD,GACnD,MAAM,0FAA0F,CAAC;AAClG,YAAY,EACV,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,kDAAkD,CAAC;AAC1D,YAAY,EACV,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,oDAAoD,CAAC;AAC5D,YAAY,EACV,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,8BAA8B,EAC9B,oCAAoC,GACrC,MAAM,8DAA8D,CAAC;AACtE,YAAY,EACV,8BAA8B,EAC9B,oCAAoC,GACrC,MAAM,4DAA4D,CAAC;AACpE,YAAY,EACV,iCAAiC,EACjC,uCAAuC,EACvC,sBAAsB,GACvB,MAAM,kEAAkE,CAAC;AAC1E,YAAY,EACV,+BAA+B,EAC/B,qCAAqC,GACtC,MAAM,8DAA8D,CAAC;AACtE,YAAY,EACV,8BAA8B,EAC9B,oCAAoC,EACpC,yBAAyB,GAC1B,MAAM,4DAA4D,CAAC;AACpE,YAAY,EACV,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,sCAAsC,CAAC"}
|
|
@@ -47,6 +47,17 @@ export declare class SimS3NoSuchBucketPolicy extends SimS3Error {
|
|
|
47
47
|
readonly name = "NoSuchBucketPolicy";
|
|
48
48
|
constructor(message: string);
|
|
49
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Simulated S3 NoSuchLifecycleConfiguration error.
|
|
52
|
+
*
|
|
53
|
+
* Real S3 distinguishes a Bucket that does not exist from a Bucket that exists
|
|
54
|
+
* without lifecycle rules, so GetBucketLifecycleConfiguration answers this
|
|
55
|
+
* rather than an empty list of rules.
|
|
56
|
+
*/
|
|
57
|
+
export declare class SimS3NoSuchLifecycleConfiguration extends SimS3Error {
|
|
58
|
+
readonly name = "NoSuchLifecycleConfiguration";
|
|
59
|
+
constructor(message: string);
|
|
60
|
+
}
|
|
50
61
|
/**
|
|
51
62
|
* Simulated S3 AccessDenied error.
|
|
52
63
|
*
|