@effect-aws/client-cloudformation 1.10.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/CloudFormationClientInstance/package.json +6 -0
- package/CloudFormationService/package.json +6 -0
- package/CloudFormationServiceConfig/package.json +6 -0
- package/Errors/package.json +6 -0
- package/LICENSE +19 -0
- package/README.md +58 -0
- package/dist/cjs/CloudFormationClientInstance.d.ts +24 -0
- package/dist/cjs/CloudFormationClientInstance.d.ts.map +1 -0
- package/dist/cjs/CloudFormationClientInstance.js +50 -0
- package/dist/cjs/CloudFormationClientInstance.js.map +1 -0
- package/dist/cjs/CloudFormationService.d.ts +406 -0
- package/dist/cjs/CloudFormationService.d.ts.map +1 -0
- package/dist/cjs/CloudFormationService.js +149 -0
- package/dist/cjs/CloudFormationService.js.map +1 -0
- package/dist/cjs/CloudFormationServiceConfig.d.ts +25 -0
- package/dist/cjs/CloudFormationServiceConfig.d.ts.map +1 -0
- package/dist/cjs/CloudFormationServiceConfig.js +35 -0
- package/dist/cjs/CloudFormationServiceConfig.js.map +1 -0
- package/dist/cjs/Errors.d.ts +36 -0
- package/dist/cjs/Errors.d.ts.map +1 -0
- package/dist/cjs/Errors.js +35 -0
- package/dist/cjs/Errors.js.map +1 -0
- package/dist/cjs/index.d.ts +44 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +56 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/dts/CloudFormationClientInstance.d.ts +24 -0
- package/dist/dts/CloudFormationClientInstance.d.ts.map +1 -0
- package/dist/dts/CloudFormationService.d.ts +406 -0
- package/dist/dts/CloudFormationService.d.ts.map +1 -0
- package/dist/dts/CloudFormationServiceConfig.d.ts +25 -0
- package/dist/dts/CloudFormationServiceConfig.d.ts.map +1 -0
- package/dist/dts/Errors.d.ts +36 -0
- package/dist/dts/Errors.d.ts.map +1 -0
- package/dist/dts/index.d.ts +44 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/esm/CloudFormationClientInstance.js +23 -0
- package/dist/esm/CloudFormationClientInstance.js.map +1 -0
- package/dist/esm/CloudFormationService.js +122 -0
- package/dist/esm/CloudFormationService.js.map +1 -0
- package/dist/esm/CloudFormationServiceConfig.js +31 -0
- package/dist/esm/CloudFormationServiceConfig.js.map +1 -0
- package/dist/esm/Errors.js +32 -0
- package/dist/esm/Errors.js.map +1 -0
- package/dist/esm/index.js +27 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +4 -0
- package/package.json +71 -0
- package/src/CloudFormationClientInstance.ts +33 -0
- package/src/CloudFormationService.ts +1509 -0
- package/src/CloudFormationServiceConfig.ts +52 -0
- package/src/Errors.ts +95 -0
- package/src/index.ts +50 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import type { CloudFormationClientConfig } from "@aws-sdk/client-cloudformation";
|
|
5
|
+
import { ServiceLogger } from "@effect-aws/commons";
|
|
6
|
+
import { Effect, FiberRef, Layer } from "effect";
|
|
7
|
+
import { dual } from "effect/Function";
|
|
8
|
+
import { globalValue } from "effect/GlobalValue";
|
|
9
|
+
import type { CloudFormationService } from "./CloudFormationService.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
* @category cloudformation service config
|
|
14
|
+
*/
|
|
15
|
+
const currentCloudFormationServiceConfig = globalValue(
|
|
16
|
+
"@effect-aws/client-cloudformation/currentCloudFormationServiceConfig",
|
|
17
|
+
() => FiberRef.unsafeMake<CloudFormationService.Config>({}),
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @since 1.0.0
|
|
22
|
+
* @category cloudformation service config
|
|
23
|
+
*/
|
|
24
|
+
export const withCloudFormationServiceConfig: {
|
|
25
|
+
(config: CloudFormationService.Config): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
|
|
26
|
+
<A, E, R>(effect: Effect.Effect<A, E, R>, config: CloudFormationService.Config): Effect.Effect<A, E, R>;
|
|
27
|
+
} = dual(
|
|
28
|
+
2,
|
|
29
|
+
<A, E, R>(effect: Effect.Effect<A, E, R>, config: CloudFormationService.Config): Effect.Effect<A, E, R> =>
|
|
30
|
+
Effect.locally(effect, currentCloudFormationServiceConfig, config),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @since 1.0.0
|
|
35
|
+
* @category cloudformation service config
|
|
36
|
+
*/
|
|
37
|
+
export const setCloudFormationServiceConfig = (config: CloudFormationService.Config) =>
|
|
38
|
+
Layer.locallyScoped(currentCloudFormationServiceConfig, config);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @since 1.0.0
|
|
42
|
+
* @category adapters
|
|
43
|
+
*/
|
|
44
|
+
export const toCloudFormationClientConfig: Effect.Effect<CloudFormationClientConfig> = Effect.gen(function*() {
|
|
45
|
+
const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentCloudFormationServiceConfig);
|
|
46
|
+
|
|
47
|
+
const logger = serviceLogger === true
|
|
48
|
+
? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)
|
|
49
|
+
: (serviceLogger ? yield* ServiceLogger.toClientLogger(ServiceLogger.make(serviceLogger)) : undefined);
|
|
50
|
+
|
|
51
|
+
return { logger, ...config };
|
|
52
|
+
});
|
package/src/Errors.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AlreadyExistsException,
|
|
3
|
+
CFNRegistryException,
|
|
4
|
+
ChangeSetNotFoundException,
|
|
5
|
+
ConcurrentResourcesLimitExceededException,
|
|
6
|
+
CreatedButModifiedException,
|
|
7
|
+
GeneratedTemplateNotFoundException,
|
|
8
|
+
HookResultNotFoundException,
|
|
9
|
+
InsufficientCapabilitiesException,
|
|
10
|
+
InvalidChangeSetStatusException,
|
|
11
|
+
InvalidOperationException,
|
|
12
|
+
InvalidStateTransitionException,
|
|
13
|
+
LimitExceededException,
|
|
14
|
+
NameAlreadyExistsException,
|
|
15
|
+
OperationIdAlreadyExistsException,
|
|
16
|
+
OperationInProgressException,
|
|
17
|
+
OperationNotFoundException,
|
|
18
|
+
OperationStatusCheckFailedException,
|
|
19
|
+
ResourceScanInProgressException,
|
|
20
|
+
ResourceScanLimitExceededException,
|
|
21
|
+
ResourceScanNotFoundException,
|
|
22
|
+
StackInstanceNotFoundException,
|
|
23
|
+
StackNotFoundException,
|
|
24
|
+
StackRefactorNotFoundException,
|
|
25
|
+
StackSetNotEmptyException,
|
|
26
|
+
StackSetNotFoundException,
|
|
27
|
+
StaleRequestException,
|
|
28
|
+
TokenAlreadyExistsException,
|
|
29
|
+
TypeConfigurationNotFoundException,
|
|
30
|
+
TypeNotFoundException,
|
|
31
|
+
} from "@aws-sdk/client-cloudformation";
|
|
32
|
+
import type { TaggedException } from "@effect-aws/commons";
|
|
33
|
+
|
|
34
|
+
export const AllServiceErrors = [
|
|
35
|
+
"AlreadyExistsException",
|
|
36
|
+
"CFNRegistryException",
|
|
37
|
+
"ChangeSetNotFoundException",
|
|
38
|
+
"ConcurrentResourcesLimitExceededException",
|
|
39
|
+
"CreatedButModifiedException",
|
|
40
|
+
"GeneratedTemplateNotFoundException",
|
|
41
|
+
"HookResultNotFoundException",
|
|
42
|
+
"InsufficientCapabilitiesException",
|
|
43
|
+
"InvalidChangeSetStatusException",
|
|
44
|
+
"InvalidOperationException",
|
|
45
|
+
"InvalidStateTransitionException",
|
|
46
|
+
"LimitExceededException",
|
|
47
|
+
"NameAlreadyExistsException",
|
|
48
|
+
"OperationIdAlreadyExistsException",
|
|
49
|
+
"OperationInProgressException",
|
|
50
|
+
"OperationNotFoundException",
|
|
51
|
+
"OperationStatusCheckFailedException",
|
|
52
|
+
"ResourceScanInProgressException",
|
|
53
|
+
"ResourceScanLimitExceededException",
|
|
54
|
+
"ResourceScanNotFoundException",
|
|
55
|
+
"StackInstanceNotFoundException",
|
|
56
|
+
"StackNotFoundException",
|
|
57
|
+
"StackRefactorNotFoundException",
|
|
58
|
+
"StackSetNotEmptyException",
|
|
59
|
+
"StackSetNotFoundException",
|
|
60
|
+
"StaleRequestException",
|
|
61
|
+
"TokenAlreadyExistsException",
|
|
62
|
+
"TypeConfigurationNotFoundException",
|
|
63
|
+
"TypeNotFoundException",
|
|
64
|
+
] as const;
|
|
65
|
+
|
|
66
|
+
export type AlreadyExistsError = TaggedException<AlreadyExistsException>;
|
|
67
|
+
export type CFNRegistryError = TaggedException<CFNRegistryException>;
|
|
68
|
+
export type ChangeSetNotFoundError = TaggedException<ChangeSetNotFoundException>;
|
|
69
|
+
export type ConcurrentResourcesLimitExceededError = TaggedException<ConcurrentResourcesLimitExceededException>;
|
|
70
|
+
export type CreatedButModifiedError = TaggedException<CreatedButModifiedException>;
|
|
71
|
+
export type GeneratedTemplateNotFoundError = TaggedException<GeneratedTemplateNotFoundException>;
|
|
72
|
+
export type HookResultNotFoundError = TaggedException<HookResultNotFoundException>;
|
|
73
|
+
export type InsufficientCapabilitiesError = TaggedException<InsufficientCapabilitiesException>;
|
|
74
|
+
export type InvalidChangeSetStatusError = TaggedException<InvalidChangeSetStatusException>;
|
|
75
|
+
export type InvalidOperationError = TaggedException<InvalidOperationException>;
|
|
76
|
+
export type InvalidStateTransitionError = TaggedException<InvalidStateTransitionException>;
|
|
77
|
+
export type LimitExceededError = TaggedException<LimitExceededException>;
|
|
78
|
+
export type NameAlreadyExistsError = TaggedException<NameAlreadyExistsException>;
|
|
79
|
+
export type OperationIdAlreadyExistsError = TaggedException<OperationIdAlreadyExistsException>;
|
|
80
|
+
export type OperationInProgressError = TaggedException<OperationInProgressException>;
|
|
81
|
+
export type OperationNotFoundError = TaggedException<OperationNotFoundException>;
|
|
82
|
+
export type OperationStatusCheckFailedError = TaggedException<OperationStatusCheckFailedException>;
|
|
83
|
+
export type ResourceScanInProgressError = TaggedException<ResourceScanInProgressException>;
|
|
84
|
+
export type ResourceScanLimitExceededError = TaggedException<ResourceScanLimitExceededException>;
|
|
85
|
+
export type ResourceScanNotFoundError = TaggedException<ResourceScanNotFoundException>;
|
|
86
|
+
export type StackInstanceNotFoundError = TaggedException<StackInstanceNotFoundException>;
|
|
87
|
+
export type StackNotFoundError = TaggedException<StackNotFoundException>;
|
|
88
|
+
export type StackRefactorNotFoundError = TaggedException<StackRefactorNotFoundException>;
|
|
89
|
+
export type StackSetNotEmptyError = TaggedException<StackSetNotEmptyException>;
|
|
90
|
+
export type StackSetNotFoundError = TaggedException<StackSetNotFoundException>;
|
|
91
|
+
export type StaleRequestError = TaggedException<StaleRequestException>;
|
|
92
|
+
export type TokenAlreadyExistsError = TaggedException<TokenAlreadyExistsException>;
|
|
93
|
+
export type TypeConfigurationNotFoundError = TaggedException<TypeConfigurationNotFoundException>;
|
|
94
|
+
export type TypeNotFoundError = TaggedException<TypeNotFoundException>;
|
|
95
|
+
export type SdkError = TaggedException<Error & { name: "SdkError" }>;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import { CloudFormationService } from "./CloudFormationService.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
*/
|
|
9
|
+
export * from "./Errors.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
*/
|
|
14
|
+
export * as CloudFormationClientInstance from "./CloudFormationClientInstance.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @since 1.0.0
|
|
18
|
+
*/
|
|
19
|
+
export * as CloudFormationServiceConfig from "./CloudFormationServiceConfig.js";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @since 1.0.0
|
|
23
|
+
*/
|
|
24
|
+
export * from "./CloudFormationService.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @since 1.0.0
|
|
28
|
+
* @category exports
|
|
29
|
+
* @alias CloudFormationService
|
|
30
|
+
*/
|
|
31
|
+
export declare namespace CloudFormation {
|
|
32
|
+
/**
|
|
33
|
+
* @since 1.0.0
|
|
34
|
+
* @alias CloudFormationService.Config
|
|
35
|
+
*/
|
|
36
|
+
export type Config = CloudFormationService.Config;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @since 1.0.0
|
|
40
|
+
* @alias CloudFormationService.Type
|
|
41
|
+
*/
|
|
42
|
+
export type Type = CloudFormationService.Type;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @since 1.0.0
|
|
47
|
+
* @category exports
|
|
48
|
+
* @alias CloudFormationService
|
|
49
|
+
*/
|
|
50
|
+
export const CloudFormation = CloudFormationService;
|