@effect-aws/client-elasticache 1.2.0 → 1.3.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @effect-aws/client-elasticache
2
2
 
3
+ ## 1.3.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.2.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -1 +1,82 @@
1
- # replace this
1
+ # @effect-aws/client-elasticache
2
+
3
+ ## Installation
4
+
5
+ ```bash
6
+ npm install --save @effect-aws/client-elasticache
7
+ ```
8
+
9
+ ## Usage
10
+
11
+ With default ElastiCacheClient instance:
12
+
13
+ ```typescript
14
+ import { ElastiCacheService, DefaultElastiCacheServiceLayer } from "@effect-aws/client-elasticache";
15
+
16
+ const program = ElastiCacheService.listTagsForResource(args);
17
+
18
+ const result = pipe(
19
+ program,
20
+ Effect.provide(DefaultElastiCacheServiceLayer),
21
+ Effect.runPromise,
22
+ );
23
+ ```
24
+
25
+ With custom ElastiCacheClient instance:
26
+
27
+ ```typescript
28
+ import {
29
+ ElastiCacheService,
30
+ BaseElastiCacheServiceLayer,
31
+ ElastiCacheClientInstance,
32
+ } from "@effect-aws/client-elasticache";
33
+
34
+ const program = ElastiCacheService.listTagsForResource(args);
35
+
36
+ const ElastiCacheClientInstanceLayer = Layer.succeed(
37
+ ElastiCacheClientInstance,
38
+ new ElastiCacheClient({ region: "eu-central-1" }),
39
+ );
40
+
41
+ const result = await pipe(
42
+ program,
43
+ Effect.provide(BaseElastiCacheServiceLayer),
44
+ Effect.provide(ElastiCacheClientInstanceLayer),
45
+ Effect.runPromise,
46
+ );
47
+ ```
48
+
49
+ With custom ElastiCacheClient configuration:
50
+
51
+ ```typescript
52
+ import {
53
+ ElastiCacheService,
54
+ BaseElastiCacheServiceLayer,
55
+ DefaultElastiCacheClientConfigLayer,
56
+ ElastiCacheClientInstance,
57
+ ElastiCacheClientInstanceConfig,
58
+ } from "@effect-aws/client-elasticache";
59
+
60
+ const program = ElastiCacheService.listTagsForResource(args);
61
+
62
+ const ElastiCacheClientInstanceLayer = Layer.provide(
63
+ Layer.effect(
64
+ ElastiCacheClientInstance,
65
+ ElastiCacheClientInstanceConfig.pipe(
66
+ Effect.map(
67
+ (config) => new ElastiCacheClient({ ...config, region: "eu-central-1" }),
68
+ ),
69
+ ),
70
+ ),
71
+ DefaultElastiCacheClientConfigLayer,
72
+ );
73
+
74
+ const result = await pipe(
75
+ program,
76
+ Effect.provide(BaseElastiCacheServiceLayer),
77
+ Effect.provide(ElastiCacheClientInstanceLayer),
78
+ Effect.runPromiseExit,
79
+ );
80
+ ```
81
+
82
+ or map over `DefaultElastiCacheClientConfigLayer` layer context and update the configuration...