@effect-aws/client-iam 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +82 -1
- package/lib/IAMService.d.ts +325 -319
- package/lib/IAMService.js +5 -2
- package/lib/esm/IAMService.js +5 -2
- package/package.json +6 -6
- package/vitest.config.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @effect-aws/client-iam
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`e540420`](https://github.com/floydspace/effect-aws/commit/e5404208c2438e1e1546637a8edbbdc1c9468850) Thanks [@floydspace](https://github.com/floydspace)! - integrate aws-sdk abort signal with effect interruption
|
|
8
|
+
|
|
3
9
|
## 1.3.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1 +1,82 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @effect-aws/client-iam
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install --save @effect-aws/client-iam
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
With default IAMClient instance:
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { IAMService, DefaultIAMServiceLayer } from "@effect-aws/client-iam";
|
|
15
|
+
|
|
16
|
+
const program = IAMService.createRole(args);
|
|
17
|
+
|
|
18
|
+
const result = pipe(
|
|
19
|
+
program,
|
|
20
|
+
Effect.provide(DefaultIAMServiceLayer),
|
|
21
|
+
Effect.runPromise,
|
|
22
|
+
);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
With custom IAMClient instance:
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import {
|
|
29
|
+
IAMService,
|
|
30
|
+
BaseIAMServiceLayer,
|
|
31
|
+
IAMClientInstance,
|
|
32
|
+
} from "@effect-aws/client-iam";
|
|
33
|
+
|
|
34
|
+
const program = IAMService.createRole(args);
|
|
35
|
+
|
|
36
|
+
const IAMClientInstanceLayer = Layer.succeed(
|
|
37
|
+
IAMClientInstance,
|
|
38
|
+
new IAMClient({ region: "eu-central-1" }),
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const result = await pipe(
|
|
42
|
+
program,
|
|
43
|
+
Effect.provide(BaseIAMServiceLayer),
|
|
44
|
+
Effect.provide(IAMClientInstanceLayer),
|
|
45
|
+
Effect.runPromise,
|
|
46
|
+
);
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
With custom IAMClient configuration:
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import {
|
|
53
|
+
IAMService,
|
|
54
|
+
BaseIAMServiceLayer,
|
|
55
|
+
DefaultIAMClientConfigLayer,
|
|
56
|
+
IAMClientInstance,
|
|
57
|
+
IAMClientInstanceConfig,
|
|
58
|
+
} from "@effect-aws/client-iam";
|
|
59
|
+
|
|
60
|
+
const program = IAMService.createRole(args);
|
|
61
|
+
|
|
62
|
+
const IAMClientInstanceLayer = Layer.provide(
|
|
63
|
+
Layer.effect(
|
|
64
|
+
IAMClientInstance,
|
|
65
|
+
IAMClientInstanceConfig.pipe(
|
|
66
|
+
Effect.map(
|
|
67
|
+
(config) => new IAMClient({ ...config, region: "eu-central-1" }),
|
|
68
|
+
),
|
|
69
|
+
),
|
|
70
|
+
),
|
|
71
|
+
DefaultIAMClientConfigLayer,
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
const result = await pipe(
|
|
75
|
+
program,
|
|
76
|
+
Effect.provide(BaseIAMServiceLayer),
|
|
77
|
+
Effect.provide(IAMClientInstanceLayer),
|
|
78
|
+
Effect.runPromiseExit,
|
|
79
|
+
);
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
or map over `DefaultIAMClientConfigLayer` layer context and update the configuration...
|