@kensio/yulin 0.40.0 → 0.41.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/README.md +1 -0
- package/dist/sdk/router/resolve-sim-sdk-command-router.d.ts.map +1 -1
- package/dist/sdk/router/resolve-sim-sdk-command-router.js +3 -0
- package/dist/sdk/router/resolve-sim-sdk-command-router.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-service-factory.d.ts +8 -0
- package/dist/service/aws/factory/sim-aws-service-factory.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-service-factory.js +14 -0
- package/dist/service/aws/factory/sim-aws-service-factory.js.map +1 -1
- package/dist/service/aws/sim-aws-account-region-scope.d.ts +5 -0
- package/dist/service/aws/sim-aws-account-region-scope.d.ts.map +1 -1
- package/dist/service/aws/sim-aws-account-region-scope.js +6 -0
- package/dist/service/aws/sim-aws-account-region-scope.js.map +1 -1
- package/dist/service/aws/sim-aws.d.ts +5 -0
- package/dist/service/aws/sim-aws.d.ts.map +1 -1
- package/dist/service/aws/sim-aws.js +6 -0
- package/dist/service/aws/sim-aws.js.map +1 -1
- package/dist/service/ssm/command/authorize/sim-ssm-authorizer.d.ts +44 -0
- package/dist/service/ssm/command/authorize/sim-ssm-authorizer.d.ts.map +1 -0
- package/dist/service/ssm/command/authorize/sim-ssm-authorizer.js +65 -0
- package/dist/service/ssm/command/authorize/sim-ssm-authorizer.js.map +1 -0
- package/dist/service/ssm/command/parameter/parameter.command.d.ts +98 -0
- package/dist/service/ssm/command/parameter/parameter.command.d.ts.map +1 -0
- package/dist/service/ssm/command/parameter/parameter.command.js +2 -0
- package/dist/service/ssm/command/parameter/parameter.command.js.map +1 -0
- package/dist/service/ssm/command/parameter/query.command.d.ts +85 -0
- package/dist/service/ssm/command/parameter/query.command.d.ts.map +1 -0
- package/dist/service/ssm/command/parameter/query.command.js +2 -0
- package/dist/service/ssm/command/parameter/query.command.js.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-delete-parameter-commands.d.ts +38 -0
- package/dist/service/ssm/command/parameter/sim-ssm-delete-parameter-commands.d.ts.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-delete-parameter-commands.js +62 -0
- package/dist/service/ssm/command/parameter/sim-ssm-delete-parameter-commands.js.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-describe-parameters.d.ts +43 -0
- package/dist/service/ssm/command/parameter/sim-ssm-describe-parameters.d.ts.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-describe-parameters.js +63 -0
- package/dist/service/ssm/command/parameter/sim-ssm-describe-parameters.js.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-get-parameter-commands.d.ts +37 -0
- package/dist/service/ssm/command/parameter/sim-ssm-get-parameter-commands.d.ts.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-get-parameter-commands.js +59 -0
- package/dist/service/ssm/command/parameter/sim-ssm-get-parameter-commands.js.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-get-parameters-by-path.d.ts +34 -0
- package/dist/service/ssm/command/parameter/sim-ssm-get-parameters-by-path.d.ts.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-get-parameters-by-path.js +50 -0
- package/dist/service/ssm/command/parameter/sim-ssm-get-parameters-by-path.js.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-names.d.ts +5 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-names.d.ts.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-names.js +22 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-names.js.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-page.d.ts +35 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-page.d.ts.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-page.js +51 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-page.js.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-reader.d.ts +49 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-reader.d.ts.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-reader.js +55 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-reader.js.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-view.d.ts +33 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-view.d.ts.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-view.js +55 -0
- package/dist/service/ssm/command/parameter/sim-ssm-parameter-view.js.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-put-parameter.d.ts +34 -0
- package/dist/service/ssm/command/parameter/sim-ssm-put-parameter.d.ts.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-put-parameter.js +49 -0
- package/dist/service/ssm/command/parameter/sim-ssm-put-parameter.js.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-unsimulated-put-options.d.ts +19 -0
- package/dist/service/ssm/command/parameter/sim-ssm-unsimulated-put-options.d.ts.map +1 -0
- package/dist/service/ssm/command/parameter/sim-ssm-unsimulated-put-options.js +48 -0
- package/dist/service/ssm/command/parameter/sim-ssm-unsimulated-put-options.js.map +1 -0
- package/dist/service/ssm/command/sim-ssm-command.types.d.ts +6 -0
- package/dist/service/ssm/command/sim-ssm-command.types.d.ts.map +1 -0
- package/dist/service/ssm/command/sim-ssm-command.types.js +2 -0
- package/dist/service/ssm/command/sim-ssm-command.types.js.map +1 -0
- package/dist/service/ssm/error/sim-ssm.error.d.ts +88 -0
- package/dist/service/ssm/error/sim-ssm.error.d.ts.map +1 -0
- package/dist/service/ssm/error/sim-ssm.error.js +101 -0
- package/dist/service/ssm/error/sim-ssm.error.js.map +1 -0
- package/dist/service/ssm/index.d.ts +10 -0
- package/dist/service/ssm/index.d.ts.map +1 -0
- package/dist/service/ssm/index.js +10 -0
- package/dist/service/ssm/index.js.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-arn.d.ts +33 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-arn.d.ts.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-arn.js +34 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-arn.js.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-name.d.ts +48 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-name.d.ts.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-name.js +117 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-name.js.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-path.d.ts +36 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-path.d.ts.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-path.js +56 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-path.js.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-selector.d.ts +34 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-selector.d.ts.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-selector.js +63 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-selector.js.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-store.d.ts +46 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-store.d.ts.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-store.js +66 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-store.js.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-type.d.ts +25 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-type.d.ts.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-type.js +42 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-type.js.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-value.d.ts +14 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-value.d.ts.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-value.js +36 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-value.js.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-version.d.ts +40 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-version.d.ts.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-version.js +32 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-version.js.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-writer.d.ts +52 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-writer.d.ts.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-writer.js +79 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter-writer.js.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter.d.ts +41 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter.d.ts.map +1 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter.js +57 -0
- package/dist/service/ssm/parameter/sim-ssm-parameter.js.map +1 -0
- package/dist/service/ssm/sdk/sim-ssm-sdk-command-router.d.ts +18 -0
- package/dist/service/ssm/sdk/sim-ssm-sdk-command-router.d.ts.map +1 -0
- package/dist/service/ssm/sdk/sim-ssm-sdk-command-router.js +52 -0
- package/dist/service/ssm/sdk/sim-ssm-sdk-command-router.js.map +1 -0
- package/dist/service/ssm/sim-ssm.d.ts +77 -0
- package/dist/service/ssm/sim-ssm.d.ts.map +1 -0
- package/dist/service/ssm/sim-ssm.js +129 -0
- package/dist/service/ssm/sim-ssm.js.map +1 -0
- package/package.json +6 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
|
|
2
|
+
import type { SimSsmParameterStore } from "../../parameter/sim-ssm-parameter-store.js";
|
|
3
|
+
import type { SimSsmAuthorizer } from "../authorize/sim-ssm-authorizer.js";
|
|
4
|
+
import type { SimDeleteParameterCommand, SimDeleteParameterCommandOutput, SimDeleteParametersCommand, SimDeleteParametersCommandOutput } from "./parameter.command.js";
|
|
5
|
+
interface SimSsmDeleteParameterCommandsProperties {
|
|
6
|
+
readonly parameters: SimSsmParameterStore;
|
|
7
|
+
readonly authorizer: SimSsmAuthorizer;
|
|
8
|
+
}
|
|
9
|
+
interface SimSsmDeleteParameterCommandsOptions {
|
|
10
|
+
readonly caller?: SimAwsCaller;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The commands that delete parameters.
|
|
14
|
+
*
|
|
15
|
+
* A parameter is gone as soon as it is deleted: Parameter Store has no
|
|
16
|
+
* recovery window, so its whole version history goes with it and the name is
|
|
17
|
+
* free again.
|
|
18
|
+
*/
|
|
19
|
+
export declare class SimSsmDeleteParameterCommands {
|
|
20
|
+
private readonly parameters;
|
|
21
|
+
private readonly authorizer;
|
|
22
|
+
constructor(properties: SimSsmDeleteParameterCommandsProperties);
|
|
23
|
+
/**
|
|
24
|
+
* Delete one parameter, refusing if it is not there.
|
|
25
|
+
*/
|
|
26
|
+
delete(command: SimDeleteParameterCommand, options?: SimSsmDeleteParameterCommandsOptions): SimDeleteParameterCommandOutput;
|
|
27
|
+
/**
|
|
28
|
+
* Delete several parameters at once.
|
|
29
|
+
*
|
|
30
|
+
* A name no parameter answers to comes back in `InvalidParameters` rather
|
|
31
|
+
* than failing the request, so the parameters that were found are still
|
|
32
|
+
* deleted.
|
|
33
|
+
*/
|
|
34
|
+
deleteMany(command: SimDeleteParametersCommand, options?: SimSsmDeleteParameterCommandsOptions): SimDeleteParametersCommandOutput;
|
|
35
|
+
private authorize;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=sim-ssm-delete-parameter-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-ssm-delete-parameter-commands.d.ts","sourceRoot":"","sources":["../../../../../src/service/ssm/command/parameter/sim-ssm-delete-parameter-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAG1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EACV,yBAAyB,EACzB,+BAA+B,EAC/B,0BAA0B,EAC1B,gCAAgC,EACjC,MAAM,wBAAwB,CAAC;AAGhC,UAAU,uCAAuC;IAC/C,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;CACvC;AAED,UAAU,oCAAoC;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;;;GAMG;AACH,qBAAa,6BAA6B;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuB;IAClD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAE9C,YAAY,UAAU,EAAE,uCAAuC,EAG9D;IAED;;OAEG;IACH,MAAM,CACJ,OAAO,EAAE,yBAAyB,EAClC,OAAO,CAAC,EAAE,oCAAoC,GAC7C,+BAA+B,CAajC;IAED;;;;;;OAMG;IACH,UAAU,CACR,OAAO,EAAE,0BAA0B,EACnC,OAAO,CAAC,EAAE,oCAAoC,GAC7C,gCAAgC,CA8BlC;IAED,OAAO,CAAC,SAAS;CAWlB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { SimSsmValidationException } from "../../error/sim-ssm.error.js";
|
|
2
|
+
import { SimSsmParameterName } from "../../parameter/sim-ssm-parameter-name.js";
|
|
3
|
+
import { requireParameterNames } from "./sim-ssm-parameter-names.js";
|
|
4
|
+
/**
|
|
5
|
+
* The commands that delete parameters.
|
|
6
|
+
*
|
|
7
|
+
* A parameter is gone as soon as it is deleted: Parameter Store has no
|
|
8
|
+
* recovery window, so its whole version history goes with it and the name is
|
|
9
|
+
* free again.
|
|
10
|
+
*/
|
|
11
|
+
export class SimSsmDeleteParameterCommands {
|
|
12
|
+
parameters;
|
|
13
|
+
authorizer;
|
|
14
|
+
constructor(properties) {
|
|
15
|
+
this.parameters = properties.parameters;
|
|
16
|
+
this.authorizer = properties.authorizer;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Delete one parameter, refusing if it is not there.
|
|
20
|
+
*/
|
|
21
|
+
delete(command, options) {
|
|
22
|
+
const requested = command.input.Name;
|
|
23
|
+
if (requested === undefined || requested.trim() === "") {
|
|
24
|
+
throw new SimSsmValidationException("DeleteParameter requires a parameter Name");
|
|
25
|
+
}
|
|
26
|
+
this.authorize("ssm:DeleteParameter", requested, options?.caller);
|
|
27
|
+
this.parameters.remove(this.parameters.require(requested));
|
|
28
|
+
return { $metadata: {} };
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Delete several parameters at once.
|
|
32
|
+
*
|
|
33
|
+
* A name no parameter answers to comes back in `InvalidParameters` rather
|
|
34
|
+
* than failing the request, so the parameters that were found are still
|
|
35
|
+
* deleted.
|
|
36
|
+
*/
|
|
37
|
+
deleteMany(command, options) {
|
|
38
|
+
const names = requireParameterNames(command.input.Names, "DeleteParameters");
|
|
39
|
+
const deleted = [];
|
|
40
|
+
const invalid = [];
|
|
41
|
+
for (const name of names) {
|
|
42
|
+
this.authorize("ssm:DeleteParameters", name, options?.caller);
|
|
43
|
+
const parameter = this.parameters.find(name);
|
|
44
|
+
if (parameter === undefined) {
|
|
45
|
+
invalid.push(name);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this.parameters.remove(parameter);
|
|
49
|
+
deleted.push(name);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
$metadata: {},
|
|
54
|
+
DeletedParameters: deleted.toSorted((one, other) => one.localeCompare(other)),
|
|
55
|
+
InvalidParameters: invalid.toSorted((one, other) => one.localeCompare(other)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
authorize(action, requested, caller) {
|
|
59
|
+
this.authorizer.authorizeParameterResource(action, SimSsmParameterName.resourceFor(requested), caller);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=sim-ssm-delete-parameter-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-ssm-delete-parameter-commands.js","sourceRoot":"","sources":["../../../../../src/service/ssm/command/parameter/sim-ssm-delete-parameter-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAShF,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAWrE;;;;;;GAMG;AACH,MAAM,OAAO,6BAA6B;IACvB,UAAU,CAAuB;IACjC,UAAU,CAAmB;IAE9C,YAAY,UAAmD;QAC7D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,OAAkC,EAClC,OAA8C;QAE9C,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;QAErC,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YACvD,MAAM,IAAI,yBAAyB,CACjC,2CAA2C,CAC5C,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,qBAAqB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAClE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;QAE3D,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAC3B,CAAC;IAED;;;;;;OAMG;IACH,UAAU,CACR,OAAmC,EACnC,OAA8C;QAE9C,MAAM,KAAK,GAAG,qBAAqB,CACjC,OAAO,CAAC,KAAK,CAAC,KAAK,EACnB,kBAAkB,CACnB,CAAC;QACF,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,MAAM,OAAO,GAAa,EAAE,CAAC;QAE7B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,SAAS,CAAC,sBAAsB,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YAE9D,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAE7C,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;gBAC5B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBAClC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;QAED,OAAO;YACL,SAAS,EAAE,EAAE;YACb,iBAAiB,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CACjD,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CACzB;YACD,iBAAiB,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CACjD,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CACzB;SACF,CAAC;IACJ,CAAC;IAEO,SAAS,CACf,MAAc,EACd,SAAiB,EACjB,MAAgC;QAEhC,IAAI,CAAC,UAAU,CAAC,0BAA0B,CACxC,MAAM,EACN,mBAAmB,CAAC,WAAW,CAAC,SAAS,CAAC,EAC1C,MAAM,CACP,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
|
|
2
|
+
import type { SimSsmParameterStore } from "../../parameter/sim-ssm-parameter-store.js";
|
|
3
|
+
import type { SimSsmAuthorizer } from "../authorize/sim-ssm-authorizer.js";
|
|
4
|
+
import type { SimDescribeParametersCommand, SimDescribeParametersCommandOutput } from "./query.command.js";
|
|
5
|
+
interface SimSsmDescribeParametersProperties {
|
|
6
|
+
readonly parameters: SimSsmParameterStore;
|
|
7
|
+
readonly authorizer: SimSsmAuthorizer;
|
|
8
|
+
}
|
|
9
|
+
interface SimSsmDescribeParametersOptions {
|
|
10
|
+
readonly caller?: SimAwsCaller;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The DescribeParameters command.
|
|
14
|
+
*
|
|
15
|
+
* Real Parameter Store gives this action no resource-level permissions, so it
|
|
16
|
+
* authorizes against `*` rather than against each parameter, and it does not
|
|
17
|
+
* filter the listing by what the caller may read. A policy naming individual
|
|
18
|
+
* parameter ARNs therefore grants nothing here, which is what it grants on
|
|
19
|
+
* real AWS.
|
|
20
|
+
*
|
|
21
|
+
* Values are never reported: this is the metadata listing, and reading a
|
|
22
|
+
* value takes GetParameter and its own permission.
|
|
23
|
+
*/
|
|
24
|
+
export declare class SimSsmDescribeParameters {
|
|
25
|
+
private readonly parameters;
|
|
26
|
+
private readonly authorizer;
|
|
27
|
+
private readonly view;
|
|
28
|
+
constructor(properties: SimSsmDescribeParametersProperties);
|
|
29
|
+
/**
|
|
30
|
+
* List the parameters in this scope, without their values.
|
|
31
|
+
*/
|
|
32
|
+
handle(command: SimDescribeParametersCommand, options?: SimSsmDescribeParametersOptions): SimDescribeParametersCommandOutput;
|
|
33
|
+
/**
|
|
34
|
+
* Refuse the request inputs this simulation does not model.
|
|
35
|
+
*
|
|
36
|
+
* Ignoring a filter would list more parameters than real Parameter Store
|
|
37
|
+
* lists, which is the kind of divergence that makes a passing test mean
|
|
38
|
+
* nothing.
|
|
39
|
+
*/
|
|
40
|
+
private refuseUnsimulatedInput;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=sim-ssm-describe-parameters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-ssm-describe-parameters.d.ts","sourceRoot":"","sources":["../../../../../src/service/ssm/command/parameter/sim-ssm-describe-parameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EACV,4BAA4B,EAE5B,kCAAkC,EACnC,MAAM,oBAAoB,CAAC;AAS5B,UAAU,kCAAkC;IAC1C,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;CACvC;AAED,UAAU,+BAA+B;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuB;IAClD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAC9C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA6B;IAElD,YAAY,UAAU,EAAE,kCAAkC,EAGzD;IAED;;OAEG;IACH,MAAM,CACJ,OAAO,EAAE,4BAA4B,EACrC,OAAO,CAAC,EAAE,+BAA+B,GACxC,kCAAkC,CAgBpC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,sBAAsB;CAiB/B"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { SimSsmValidationException } from "../../error/sim-ssm.error.js";
|
|
2
|
+
import { SimSsmParameterPage } from "./sim-ssm-parameter-page.js";
|
|
3
|
+
import { SimSsmParameterView } from "./sim-ssm-parameter-view.js";
|
|
4
|
+
/**
|
|
5
|
+
* The page size real Parameter Store uses for a describe listing.
|
|
6
|
+
*/
|
|
7
|
+
const maxResults = 50;
|
|
8
|
+
/**
|
|
9
|
+
* The DescribeParameters command.
|
|
10
|
+
*
|
|
11
|
+
* Real Parameter Store gives this action no resource-level permissions, so it
|
|
12
|
+
* authorizes against `*` rather than against each parameter, and it does not
|
|
13
|
+
* filter the listing by what the caller may read. A policy naming individual
|
|
14
|
+
* parameter ARNs therefore grants nothing here, which is what it grants on
|
|
15
|
+
* real AWS.
|
|
16
|
+
*
|
|
17
|
+
* Values are never reported: this is the metadata listing, and reading a
|
|
18
|
+
* value takes GetParameter and its own permission.
|
|
19
|
+
*/
|
|
20
|
+
export class SimSsmDescribeParameters {
|
|
21
|
+
parameters;
|
|
22
|
+
authorizer;
|
|
23
|
+
view = new SimSsmParameterView();
|
|
24
|
+
constructor(properties) {
|
|
25
|
+
this.parameters = properties.parameters;
|
|
26
|
+
this.authorizer = properties.authorizer;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* List the parameters in this scope, without their values.
|
|
30
|
+
*/
|
|
31
|
+
handle(command, options) {
|
|
32
|
+
const input = command.input ?? {};
|
|
33
|
+
this.refuseUnsimulatedInput(input);
|
|
34
|
+
this.authorizer.authorizeAny("ssm:DescribeParameters", options?.caller);
|
|
35
|
+
const page = new SimSsmParameterPage(this.parameters.allByName, input, {
|
|
36
|
+
operation: "DescribeParameters",
|
|
37
|
+
maxResults,
|
|
38
|
+
});
|
|
39
|
+
return {
|
|
40
|
+
$metadata: {},
|
|
41
|
+
Parameters: page.items.map((parameter) => this.view.metadata(parameter)),
|
|
42
|
+
NextToken: page.nextToken,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Refuse the request inputs this simulation does not model.
|
|
47
|
+
*
|
|
48
|
+
* Ignoring a filter would list more parameters than real Parameter Store
|
|
49
|
+
* lists, which is the kind of divergence that makes a passing test mean
|
|
50
|
+
* nothing.
|
|
51
|
+
*/
|
|
52
|
+
refuseUnsimulatedInput(input) {
|
|
53
|
+
if (input.Filters !== undefined || input.ParameterFilters !== undefined) {
|
|
54
|
+
throw new SimSsmValidationException("DescribeParameters Filters and ParameterFilters are not simulated: " +
|
|
55
|
+
"parameters are listed in name order");
|
|
56
|
+
}
|
|
57
|
+
if (input.Shared !== undefined) {
|
|
58
|
+
throw new SimSsmValidationException("DescribeParameters Shared is not simulated: parameters cannot be " +
|
|
59
|
+
"shared between simulated Accounts");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=sim-ssm-describe-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-ssm-describe-parameters.js","sourceRoot":"","sources":["../../../../../src/service/ssm/command/parameter/sim-ssm-describe-parameters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAQzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE;;GAEG;AACH,MAAM,UAAU,GAAG,EAAE,CAAC;AAWtB;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,wBAAwB;IAClB,UAAU,CAAuB;IACjC,UAAU,CAAmB;IAC7B,IAAI,GAAG,IAAI,mBAAmB,EAAE,CAAC;IAElD,YAAY,UAA8C;QACxD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,OAAqC,EACrC,OAAyC;QAEzC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QAElC,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,wBAAwB,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAExE,MAAM,IAAI,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,KAAK,EAAE;YACrE,SAAS,EAAE,oBAAoB;YAC/B,UAAU;SACX,CAAC,CAAC;QAEH,OAAO;YACL,SAAS,EAAE,EAAE;YACb,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YACxE,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACK,sBAAsB,CAC5B,KAAwC;QAExC,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACxE,MAAM,IAAI,yBAAyB,CACjC,qEAAqE;gBACnE,qCAAqC,CACxC,CAAC;QACJ,CAAC;QAED,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC/B,MAAM,IAAI,yBAAyB,CACjC,mEAAmE;gBACjE,mCAAmC,CACtC,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
|
|
2
|
+
import type { SimSsmParameterStore } from "../../parameter/sim-ssm-parameter-store.js";
|
|
3
|
+
import type { SimSsmAuthorizer } from "../authorize/sim-ssm-authorizer.js";
|
|
4
|
+
import type { SimGetParameterCommand, SimGetParameterCommandOutput, SimGetParametersCommand, SimGetParametersCommandOutput } from "./query.command.js";
|
|
5
|
+
interface SimSsmGetParameterCommandsProperties {
|
|
6
|
+
readonly parameters: SimSsmParameterStore;
|
|
7
|
+
readonly authorizer: SimSsmAuthorizer;
|
|
8
|
+
}
|
|
9
|
+
interface SimSsmGetParameterCommandsOptions {
|
|
10
|
+
readonly caller?: SimAwsCaller;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The commands that read parameter values.
|
|
14
|
+
*
|
|
15
|
+
* `WithDecryption` is accepted and ignored, as real Parameter Store ignores it
|
|
16
|
+
* for `String` and `StringList` parameters. Nothing else here is encrypted,
|
|
17
|
+
* because `SecureString` is not simulated.
|
|
18
|
+
*/
|
|
19
|
+
export declare class SimSsmGetParameterCommands {
|
|
20
|
+
private readonly reader;
|
|
21
|
+
constructor(properties: SimSsmGetParameterCommandsProperties);
|
|
22
|
+
/**
|
|
23
|
+
* Read one parameter, refusing if it is not there.
|
|
24
|
+
*/
|
|
25
|
+
get(command: SimGetParameterCommand, options?: SimSsmGetParameterCommandsOptions): SimGetParameterCommandOutput;
|
|
26
|
+
/**
|
|
27
|
+
* Read several parameters at once.
|
|
28
|
+
*
|
|
29
|
+
* A name no parameter answers to comes back in `InvalidParameters` rather
|
|
30
|
+
* than failing the request. That is what makes a typo silently return
|
|
31
|
+
* nothing on real AWS, so a test that asserts on `Parameters` alone passes
|
|
32
|
+
* while the application reads no configuration at all.
|
|
33
|
+
*/
|
|
34
|
+
getMany(command: SimGetParametersCommand, options?: SimSsmGetParameterCommandsOptions): SimGetParametersCommandOutput;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=sim-ssm-get-parameter-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-ssm-get-parameter-commands.d.ts","sourceRoot":"","sources":["../../../../../src/service/ssm/command/parameter/sim-ssm-get-parameter-commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EACV,sBAAsB,EACtB,4BAA4B,EAC5B,uBAAuB,EACvB,6BAA6B,EAC9B,MAAM,oBAAoB,CAAC;AAO5B,UAAU,oCAAoC;IAC5C,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;CACvC;AAED,UAAU,iCAAiC;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;;;GAMG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwB;IAE/C,YAAY,UAAU,EAAE,oCAAoC,EAE3D;IAED;;OAEG;IACH,GAAG,CACD,OAAO,EAAE,sBAAsB,EAC/B,OAAO,CAAC,EAAE,iCAAiC,GAC1C,4BAA4B,CAgB9B;IAED;;;;;;;OAOG;IACH,OAAO,CACL,OAAO,EAAE,uBAAuB,EAChC,OAAO,CAAC,EAAE,iCAAiC,GAC1C,6BAA6B,CA4B/B;CACF"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { SimSsmValidationException } from "../../error/sim-ssm.error.js";
|
|
2
|
+
import { requireParameterNames } from "./sim-ssm-parameter-names.js";
|
|
3
|
+
import { SimSsmParameterReader, } from "./sim-ssm-parameter-reader.js";
|
|
4
|
+
/**
|
|
5
|
+
* The commands that read parameter values.
|
|
6
|
+
*
|
|
7
|
+
* `WithDecryption` is accepted and ignored, as real Parameter Store ignores it
|
|
8
|
+
* for `String` and `StringList` parameters. Nothing else here is encrypted,
|
|
9
|
+
* because `SecureString` is not simulated.
|
|
10
|
+
*/
|
|
11
|
+
export class SimSsmGetParameterCommands {
|
|
12
|
+
reader;
|
|
13
|
+
constructor(properties) {
|
|
14
|
+
this.reader = new SimSsmParameterReader(properties);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Read one parameter, refusing if it is not there.
|
|
18
|
+
*/
|
|
19
|
+
get(command, options) {
|
|
20
|
+
const requested = command.input.Name;
|
|
21
|
+
if (requested === undefined || requested.trim() === "") {
|
|
22
|
+
throw new SimSsmValidationException("GetParameter requires a parameter Name");
|
|
23
|
+
}
|
|
24
|
+
const found = this.reader.read("ssm:GetParameter", requested, options?.caller);
|
|
25
|
+
return { $metadata: {}, Parameter: found.output };
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Read several parameters at once.
|
|
29
|
+
*
|
|
30
|
+
* A name no parameter answers to comes back in `InvalidParameters` rather
|
|
31
|
+
* than failing the request. That is what makes a typo silently return
|
|
32
|
+
* nothing on real AWS, so a test that asserts on `Parameters` alone passes
|
|
33
|
+
* while the application reads no configuration at all.
|
|
34
|
+
*/
|
|
35
|
+
getMany(command, options) {
|
|
36
|
+
const names = requireParameterNames(command.input.Names, "GetParameters");
|
|
37
|
+
const found = [];
|
|
38
|
+
const invalid = [];
|
|
39
|
+
for (const name of names) {
|
|
40
|
+
const parameter = this.reader.readOrInvalid("ssm:GetParameters", name, options?.caller);
|
|
41
|
+
if (parameter === undefined) {
|
|
42
|
+
invalid.push(name);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
found.push(parameter);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
$metadata: {},
|
|
50
|
+
// Real Parameter Store lists these in alphabetical order rather than in
|
|
51
|
+
// the order the request asked for them.
|
|
52
|
+
Parameters: found
|
|
53
|
+
.toSorted((one, other) => one.name.localeCompare(other.name))
|
|
54
|
+
.map((entry) => entry.output),
|
|
55
|
+
InvalidParameters: invalid,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=sim-ssm-get-parameter-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-ssm-get-parameter-commands.js","sourceRoot":"","sources":["../../../../../src/service/ssm/command/parameter/sim-ssm-get-parameter-commands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AASzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAEL,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AAWvC;;;;;;GAMG;AACH,MAAM,OAAO,0BAA0B;IACpB,MAAM,CAAwB;IAE/C,YAAY,UAAgD;QAC1D,IAAI,CAAC,MAAM,GAAG,IAAI,qBAAqB,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACH,GAAG,CACD,OAA+B,EAC/B,OAA2C;QAE3C,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;QAErC,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YACvD,MAAM,IAAI,yBAAyB,CACjC,wCAAwC,CACzC,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAC5B,kBAAkB,EAClB,SAAS,EACT,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;IACpD,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,OAAgC,EAChC,OAA2C;QAE3C,MAAM,KAAK,GAAG,qBAAqB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;QAC1E,MAAM,KAAK,GAA2B,EAAE,CAAC;QACzC,MAAM,OAAO,GAAa,EAAE,CAAC;QAE7B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CACzC,mBAAmB,EACnB,IAAI,EACJ,OAAO,EAAE,MAAM,CAChB,CAAC;YAEF,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;gBAC5B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACxB,CAAC;QACH,CAAC;QAED,OAAO;YACL,SAAS,EAAE,EAAE;YACb,wEAAwE;YACxE,wCAAwC;YACxC,UAAU,EAAE,KAAK;iBACd,QAAQ,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;iBAC5D,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;YAC/B,iBAAiB,EAAE,OAAO;SAC3B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
|
|
2
|
+
import type { SimAwsAccountRegionScope } from "../../../aws/sim-aws-account-region-scope.js";
|
|
3
|
+
import type { SimSsmParameterStore } from "../../parameter/sim-ssm-parameter-store.js";
|
|
4
|
+
import type { SimSsmAuthorizer } from "../authorize/sim-ssm-authorizer.js";
|
|
5
|
+
import type { SimGetParametersByPathCommand, SimGetParametersByPathCommandOutput } from "./query.command.js";
|
|
6
|
+
interface SimSsmGetParametersByPathProperties {
|
|
7
|
+
readonly parameters: SimSsmParameterStore;
|
|
8
|
+
readonly authorizer: SimSsmAuthorizer;
|
|
9
|
+
readonly accountRegionScope: SimAwsAccountRegionScope;
|
|
10
|
+
}
|
|
11
|
+
interface SimSsmGetParametersByPathOptions {
|
|
12
|
+
readonly caller?: SimAwsCaller;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The GetParametersByPath command.
|
|
16
|
+
*
|
|
17
|
+
* This authorizes against the path rather than against each parameter it
|
|
18
|
+
* returns, as real Parameter Store does. Access to a path is access to
|
|
19
|
+
* everything under it: a caller allowed `/myapp` can read `/myapp/prod/db-host`
|
|
20
|
+
* recursively even where a policy explicitly denies that parameter.
|
|
21
|
+
*/
|
|
22
|
+
export declare class SimSsmGetParametersByPath {
|
|
23
|
+
private readonly parameters;
|
|
24
|
+
private readonly authorizer;
|
|
25
|
+
private readonly accountRegionScope;
|
|
26
|
+
private readonly view;
|
|
27
|
+
constructor(properties: SimSsmGetParametersByPathProperties);
|
|
28
|
+
/**
|
|
29
|
+
* List the parameters under one level of the hierarchy.
|
|
30
|
+
*/
|
|
31
|
+
handle(command: SimGetParametersByPathCommand, options?: SimSsmGetParametersByPathOptions): SimGetParametersByPathCommandOutput;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=sim-ssm-get-parameters-by-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-ssm-get-parameters-by-path.d.ts","sourceRoot":"","sources":["../../../../../src/service/ssm/command/parameter/sim-ssm-get-parameters-by-path.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAG7F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EACV,6BAA6B,EAC7B,mCAAmC,EACpC,MAAM,oBAAoB,CAAC;AAS5B,UAAU,mCAAmC;IAC3C,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;CACvD;AAED,UAAU,gCAAgC;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,qBAAa,yBAAyB;IACpC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuB;IAClD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAC9C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA2B;IAC9D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA6B;IAElD,YAAY,UAAU,EAAE,mCAAmC,EAI1D;IAED;;OAEG;IACH,MAAM,CACJ,OAAO,EAAE,6BAA6B,EACtC,OAAO,CAAC,EAAE,gCAAgC,GACzC,mCAAmC,CAmCrC;CACF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { SimSsmValidationException } from "../../error/sim-ssm.error.js";
|
|
2
|
+
import { SimSsmParameterPath } from "../../parameter/sim-ssm-parameter-path.js";
|
|
3
|
+
import { SimSsmParameterPage } from "./sim-ssm-parameter-page.js";
|
|
4
|
+
import { SimSsmParameterView } from "./sim-ssm-parameter-view.js";
|
|
5
|
+
/**
|
|
6
|
+
* The page size real Parameter Store uses for a path listing.
|
|
7
|
+
*/
|
|
8
|
+
const maxResults = 10;
|
|
9
|
+
/**
|
|
10
|
+
* The GetParametersByPath command.
|
|
11
|
+
*
|
|
12
|
+
* This authorizes against the path rather than against each parameter it
|
|
13
|
+
* returns, as real Parameter Store does. Access to a path is access to
|
|
14
|
+
* everything under it: a caller allowed `/myapp` can read `/myapp/prod/db-host`
|
|
15
|
+
* recursively even where a policy explicitly denies that parameter.
|
|
16
|
+
*/
|
|
17
|
+
export class SimSsmGetParametersByPath {
|
|
18
|
+
parameters;
|
|
19
|
+
authorizer;
|
|
20
|
+
accountRegionScope;
|
|
21
|
+
view = new SimSsmParameterView();
|
|
22
|
+
constructor(properties) {
|
|
23
|
+
this.parameters = properties.parameters;
|
|
24
|
+
this.authorizer = properties.authorizer;
|
|
25
|
+
this.accountRegionScope = properties.accountRegionScope;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* List the parameters under one level of the hierarchy.
|
|
29
|
+
*/
|
|
30
|
+
handle(command, options) {
|
|
31
|
+
const { input } = command;
|
|
32
|
+
if (input.ParameterFilters !== undefined) {
|
|
33
|
+
throw new SimSsmValidationException("GetParametersByPath ParameterFilters are not simulated: applying " +
|
|
34
|
+
"none of them would return more parameters than real Parameter " +
|
|
35
|
+
"Store returns");
|
|
36
|
+
}
|
|
37
|
+
const path = new SimSsmParameterPath({
|
|
38
|
+
path: input.Path,
|
|
39
|
+
accountRegionScope: this.accountRegionScope,
|
|
40
|
+
});
|
|
41
|
+
this.authorizer.authorizeArn("ssm:GetParametersByPath", path.arn, options?.caller);
|
|
42
|
+
const page = new SimSsmParameterPage(this.parameters.under(path, input.Recursive === true), input, { operation: "GetParametersByPath", maxResults });
|
|
43
|
+
return {
|
|
44
|
+
$metadata: {},
|
|
45
|
+
Parameters: page.items.map((parameter) => this.view.value(parameter, parameter.currentVersion)),
|
|
46
|
+
NextToken: page.nextToken,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=sim-ssm-get-parameters-by-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-ssm-get-parameters-by-path.js","sourceRoot":"","sources":["../../../../../src/service/ssm/command/parameter/sim-ssm-get-parameters-by-path.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAOhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE;;GAEG;AACH,MAAM,UAAU,GAAG,EAAE,CAAC;AAYtB;;;;;;;GAOG;AACH,MAAM,OAAO,yBAAyB;IACnB,UAAU,CAAuB;IACjC,UAAU,CAAmB;IAC7B,kBAAkB,CAA2B;IAC7C,IAAI,GAAG,IAAI,mBAAmB,EAAE,CAAC;IAElD,YAAY,UAA+C;QACzD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,kBAAkB,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAC1D,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,OAAsC,EACtC,OAA0C;QAE1C,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAE1B,IAAI,KAAK,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACzC,MAAM,IAAI,yBAAyB,CACjC,mEAAmE;gBACjE,gEAAgE;gBAChE,eAAe,CAClB,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,mBAAmB,CAAC;YACnC,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;SAC5C,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,CAAC,YAAY,CAC1B,yBAAyB,EACzB,IAAI,CAAC,GAAG,EACR,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,MAAM,IAAI,GAAG,IAAI,mBAAmB,CAClC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC,EACrD,KAAK,EACL,EAAE,SAAS,EAAE,qBAAqB,EAAE,UAAU,EAAE,CACjD,CAAC;QAEF,OAAO;YACL,SAAS,EAAE,EAAE;YACb,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CACvC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,cAAc,CAAC,CACrD;YACD,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-ssm-parameter-names.d.ts","sourceRoot":"","sources":["../../../../../src/service/ssm/command/parameter/sim-ssm-parameter-names.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EACpC,SAAS,EAAE,MAAM,GAChB,SAAS,MAAM,EAAE,CAenB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SimSsmValidationException } from "../../error/sim-ssm.error.js";
|
|
2
|
+
/**
|
|
3
|
+
* The most names GetParameters and DeleteParameters accept in one request.
|
|
4
|
+
*
|
|
5
|
+
* This is a real limit and a commonly hit one: code that reads a growing list
|
|
6
|
+
* of parameters in one batch works until the eleventh is added.
|
|
7
|
+
*/
|
|
8
|
+
const maxNames = 10;
|
|
9
|
+
/**
|
|
10
|
+
* Read the parameter names a batch request carries, or refuse.
|
|
11
|
+
*/
|
|
12
|
+
export function requireParameterNames(names, operation) {
|
|
13
|
+
if (names === undefined || names.length === 0) {
|
|
14
|
+
throw new SimSsmValidationException(`${operation} requires at least one parameter name in Names`);
|
|
15
|
+
}
|
|
16
|
+
if (names.length > maxNames) {
|
|
17
|
+
throw new SimSsmValidationException(`${operation} accepts at most ${String(maxNames)} names in one ` +
|
|
18
|
+
`request, and was given ${String(names.length)}`);
|
|
19
|
+
}
|
|
20
|
+
return names;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=sim-ssm-parameter-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-ssm-parameter-names.js","sourceRoot":"","sources":["../../../../../src/service/ssm/command/parameter/sim-ssm-parameter-names.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAoC,EACpC,SAAiB;IAEjB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,yBAAyB,CACjC,GAAG,SAAS,gDAAgD,CAC7D,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,GAAG,QAAQ,EAAE,CAAC;QAC5B,MAAM,IAAI,yBAAyB,CACjC,GAAG,SAAS,oBAAoB,MAAM,CAAC,QAAQ,CAAC,gBAAgB;YAC9D,0BAA0B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CACnD,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The paging fields a parameter listing request carries.
|
|
3
|
+
*/
|
|
4
|
+
export interface SimSsmParameterPageInput {
|
|
5
|
+
readonly MaxResults?: number | undefined;
|
|
6
|
+
readonly NextToken?: string | undefined;
|
|
7
|
+
}
|
|
8
|
+
interface SimSsmParameterPageLimits {
|
|
9
|
+
readonly operation: string;
|
|
10
|
+
readonly maxResults: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* One page of listed parameters, and the token that reaches the next one.
|
|
14
|
+
*
|
|
15
|
+
* The page sizes are small and worth keeping: GetParametersByPath returns ten
|
|
16
|
+
* parameters at a time on real AWS, so code that reads a hierarchy without
|
|
17
|
+
* following NextToken silently stops at the tenth parameter.
|
|
18
|
+
*/
|
|
19
|
+
export declare class SimSsmParameterPage<TItem> {
|
|
20
|
+
readonly items: readonly TItem[];
|
|
21
|
+
readonly nextToken: string | undefined;
|
|
22
|
+
constructor(listed: readonly TItem[], input: SimSsmParameterPageInput, limits: SimSsmParameterPageLimits);
|
|
23
|
+
private static maxResults;
|
|
24
|
+
/**
|
|
25
|
+
* Read a continuation token as its offset into the listed parameters.
|
|
26
|
+
*
|
|
27
|
+
* Tokens are the canonical positive integer representation these commands
|
|
28
|
+
* emit, so anything else is refused rather than silently starting again from
|
|
29
|
+
* the beginning. That includes `0`, which is never issued because the first
|
|
30
|
+
* page is the one reached without a token at all.
|
|
31
|
+
*/
|
|
32
|
+
private static startIndex;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=sim-ssm-parameter-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-ssm-parameter-page.d.ts","sourceRoot":"","sources":["../../../../../src/service/ssm/command/parameter/sim-ssm-parameter-page.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED,UAAU,yBAAyB;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,qBAAa,mBAAmB,CAAC,KAAK;IACpC,SAAgB,KAAK,EAAE,SAAS,KAAK,EAAE,CAAC;IACxC,SAAgB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9C,YACE,MAAM,EAAE,SAAS,KAAK,EAAE,EACxB,KAAK,EAAE,wBAAwB,EAC/B,MAAM,EAAE,yBAAyB,EAWlC;IAED,OAAO,CAAC,MAAM,CAAC,UAAU;IAoBzB;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;CAuB1B"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { SimSsmValidationException } from "../../error/sim-ssm.error.js";
|
|
2
|
+
/**
|
|
3
|
+
* One page of listed parameters, and the token that reaches the next one.
|
|
4
|
+
*
|
|
5
|
+
* The page sizes are small and worth keeping: GetParametersByPath returns ten
|
|
6
|
+
* parameters at a time on real AWS, so code that reads a hierarchy without
|
|
7
|
+
* following NextToken silently stops at the tenth parameter.
|
|
8
|
+
*/
|
|
9
|
+
export class SimSsmParameterPage {
|
|
10
|
+
items;
|
|
11
|
+
nextToken;
|
|
12
|
+
constructor(listed, input, limits) {
|
|
13
|
+
const maxResults = SimSsmParameterPage.maxResults(input.MaxResults, limits);
|
|
14
|
+
const startIndex = SimSsmParameterPage.startIndex(input.NextToken, listed.length);
|
|
15
|
+
const nextIndex = startIndex + maxResults;
|
|
16
|
+
this.items = listed.slice(startIndex, nextIndex);
|
|
17
|
+
this.nextToken = nextIndex >= listed.length ? undefined : String(nextIndex);
|
|
18
|
+
}
|
|
19
|
+
static maxResults(requested, limits) {
|
|
20
|
+
const maxResults = requested ?? limits.maxResults;
|
|
21
|
+
if (!Number.isSafeInteger(maxResults) ||
|
|
22
|
+
maxResults < 1 ||
|
|
23
|
+
maxResults > limits.maxResults) {
|
|
24
|
+
throw new SimSsmValidationException(`${limits.operation} MaxResults must be a whole number between 1 ` +
|
|
25
|
+
`and ${String(limits.maxResults)}`);
|
|
26
|
+
}
|
|
27
|
+
return maxResults;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Read a continuation token as its offset into the listed parameters.
|
|
31
|
+
*
|
|
32
|
+
* Tokens are the canonical positive integer representation these commands
|
|
33
|
+
* emit, so anything else is refused rather than silently starting again from
|
|
34
|
+
* the beginning. That includes `0`, which is never issued because the first
|
|
35
|
+
* page is the one reached without a token at all.
|
|
36
|
+
*/
|
|
37
|
+
static startIndex(nextToken, listedCount) {
|
|
38
|
+
if (nextToken === undefined) {
|
|
39
|
+
return 0;
|
|
40
|
+
}
|
|
41
|
+
const startIndex = Number(nextToken);
|
|
42
|
+
if (!Number.isSafeInteger(startIndex) ||
|
|
43
|
+
startIndex < 1 ||
|
|
44
|
+
startIndex >= listedCount ||
|
|
45
|
+
String(startIndex) !== nextToken) {
|
|
46
|
+
throw new SimSsmValidationException("NextToken is not a token this simulation issued");
|
|
47
|
+
}
|
|
48
|
+
return startIndex;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=sim-ssm-parameter-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-ssm-parameter-page.js","sourceRoot":"","sources":["../../../../../src/service/ssm/command/parameter/sim-ssm-parameter-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAezE;;;;;;GAMG;AACH,MAAM,OAAO,mBAAmB;IACd,KAAK,CAAmB;IACxB,SAAS,CAAqB;IAE9C,YACE,MAAwB,EACxB,KAA+B,EAC/B,MAAiC;QAEjC,MAAM,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAC5E,MAAM,UAAU,GAAG,mBAAmB,CAAC,UAAU,CAC/C,KAAK,CAAC,SAAS,EACf,MAAM,CAAC,MAAM,CACd,CAAC;QACF,MAAM,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;QAE1C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QACjD,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC9E,CAAC;IAEO,MAAM,CAAC,UAAU,CACvB,SAA6B,EAC7B,MAAiC;QAEjC,MAAM,UAAU,GAAG,SAAS,IAAI,MAAM,CAAC,UAAU,CAAC;QAElD,IACE,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC;YACjC,UAAU,GAAG,CAAC;YACd,UAAU,GAAG,MAAM,CAAC,UAAU,EAC9B,CAAC;YACD,MAAM,IAAI,yBAAyB,CACjC,GAAG,MAAM,CAAC,SAAS,+CAA+C;gBAChE,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CACrC,CAAC;QACJ,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;IAED;;;;;;;OAOG;IACK,MAAM,CAAC,UAAU,CACvB,SAA6B,EAC7B,WAAmB;QAEnB,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,OAAO,CAAC,CAAC;QACX,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAErC,IACE,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC;YACjC,UAAU,GAAG,CAAC;YACd,UAAU,IAAI,WAAW;YACzB,MAAM,CAAC,UAAU,CAAC,KAAK,SAAS,EAChC,CAAC;YACD,MAAM,IAAI,yBAAyB,CACjC,iDAAiD,CAClD,CAAC;QACJ,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;CACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
|
|
2
|
+
import type { SimSsmParameterStore } from "../../parameter/sim-ssm-parameter-store.js";
|
|
3
|
+
import type { SimSsmAuthorizer } from "../authorize/sim-ssm-authorizer.js";
|
|
4
|
+
import type { SimSsmParameterOutput } from "./parameter.command.js";
|
|
5
|
+
/**
|
|
6
|
+
* A parameter a read resolved, with the stored name it is ordered by.
|
|
7
|
+
*
|
|
8
|
+
* The name is carried separately rather than read back off the output because
|
|
9
|
+
* a batch read has to sort by it, and the reported shape leaves every field
|
|
10
|
+
* optional.
|
|
11
|
+
*/
|
|
12
|
+
export interface SimSsmFoundParameter {
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly output: SimSsmParameterOutput;
|
|
15
|
+
}
|
|
16
|
+
interface SimSsmParameterReaderProperties {
|
|
17
|
+
readonly parameters: SimSsmParameterStore;
|
|
18
|
+
readonly authorizer: SimSsmAuthorizer;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Resolves one requested parameter name to the value a read reports.
|
|
22
|
+
*
|
|
23
|
+
* GetParameter and GetParameters differ only in what they do when a name
|
|
24
|
+
* resolves to nothing, so everything before that point belongs here.
|
|
25
|
+
*/
|
|
26
|
+
export declare class SimSsmParameterReader {
|
|
27
|
+
private readonly parameters;
|
|
28
|
+
private readonly authorizer;
|
|
29
|
+
private readonly view;
|
|
30
|
+
constructor(properties: SimSsmParameterReaderProperties);
|
|
31
|
+
/**
|
|
32
|
+
* Read one requested name, authorizing it before resolving it.
|
|
33
|
+
*
|
|
34
|
+
* Authorization comes first because real IAM evaluates a request before the
|
|
35
|
+
* service sees it: a caller with no permission is refused whether or not the
|
|
36
|
+
* parameter exists, rather than being told it is missing.
|
|
37
|
+
*/
|
|
38
|
+
read(action: string, requested: string, caller: SimAwsCaller | undefined): SimSsmFoundParameter;
|
|
39
|
+
/**
|
|
40
|
+
* Read one name of a batch, reporting a name that resolves to nothing as
|
|
41
|
+
* invalid rather than failing the whole request.
|
|
42
|
+
*
|
|
43
|
+
* A refused authorization still throws, because one name the caller may not
|
|
44
|
+
* read fails the whole batch on real AWS.
|
|
45
|
+
*/
|
|
46
|
+
readOrInvalid(action: string, requested: string, caller: SimAwsCaller | undefined): SimSsmFoundParameter | undefined;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=sim-ssm-parameter-reader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-ssm-parameter-reader.d.ts","sourceRoot":"","sources":["../../../../../src/service/ssm/command/parameter/sim-ssm-parameter-reader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAO1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAGpE;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;CACxC;AAED,UAAU,+BAA+B;IACvC,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;CACvC;AAED;;;;;GAKG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuB;IAClD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAC9C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA6B;IAElD,YAAY,UAAU,EAAE,+BAA+B,EAGtD;IAED;;;;;;OAMG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,SAAS,GAC/B,oBAAoB,CAmBtB;IAED;;;;;;OAMG;IACH,aAAa,CACX,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,GAAG,SAAS,GAC/B,oBAAoB,GAAG,SAAS,CAalC;CACF"}
|