1 | import type { PropertyDifference, Resource } from '@aws-cdk/cloudformation-diff';
|
2 | import type { SDK } from '../aws-auth';
|
3 | export declare const ICON = "\u2728";
|
4 | export interface HotswappableChange {
|
5 | readonly hotswappable: true;
|
6 | readonly resourceType: string;
|
7 | readonly propsChanged: Array<string>;
|
8 | |
9 |
|
10 |
|
11 |
|
12 | readonly service: string;
|
13 | |
14 |
|
15 |
|
16 | readonly resourceNames: string[];
|
17 | readonly apply: (sdk: SDK) => Promise<void>;
|
18 | }
|
19 | export interface NonHotswappableChange {
|
20 | readonly hotswappable: false;
|
21 | readonly resourceType: string;
|
22 | readonly rejectedChanges: Array<string>;
|
23 | readonly logicalId: string;
|
24 | |
25 |
|
26 |
|
27 |
|
28 | readonly reason?: string;
|
29 | |
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | readonly hotswapOnlyVisible?: boolean;
|
36 | }
|
37 | export type ChangeHotswapResult = Array<HotswappableChange | NonHotswappableChange>;
|
38 | export interface ClassifiedResourceChanges {
|
39 | hotswappableChanges: HotswappableChange[];
|
40 | nonHotswappableChanges: NonHotswappableChange[];
|
41 | }
|
42 | export declare enum HotswapMode {
|
43 | |
44 |
|
45 |
|
46 | FALL_BACK = "fall-back",
|
47 | |
48 |
|
49 |
|
50 | HOTSWAP_ONLY = "hotswap-only",
|
51 | |
52 |
|
53 |
|
54 | FULL_DEPLOYMENT = "full-deployment"
|
55 | }
|
56 |
|
57 |
|
58 |
|
59 | export declare class HotswappableChangeCandidate {
|
60 | |
61 |
|
62 |
|
63 | readonly logicalId: string;
|
64 | |
65 |
|
66 |
|
67 | readonly oldValue: Resource;
|
68 | |
69 |
|
70 |
|
71 | readonly newValue: Resource;
|
72 | |
73 |
|
74 |
|
75 | readonly propertyUpdates: PropDiffs;
|
76 | constructor(logicalId: string, oldValue: Resource, newValue: Resource, propertyUpdates: PropDiffs);
|
77 | }
|
78 | type Exclude = {
|
79 | [key: string]: Exclude | true;
|
80 | };
|
81 |
|
82 |
|
83 |
|
84 | export declare class HotswapPropertyOverrides {
|
85 | ecsHotswapProperties?: EcsHotswapProperties;
|
86 | constructor(ecsHotswapProperties?: EcsHotswapProperties);
|
87 | }
|
88 | /**
|
89 | * Represents configuration properties for ECS hotswap deployments
|
90 | */
|
91 | export declare class EcsHotswapProperties {
|
92 | readonly minimumHealthyPercent?: number;
|
93 | readonly maximumHealthyPercent?: number;
|
94 | constructor(minimumHealthyPercent?: number, maximumHealthyPercent?: number);
|
95 | /**
|
96 | * Check if any hotswap properties are defined
|
97 | * @returns true if all properties are undefined, false otherwise
|
98 | */
|
99 | isEmpty(): boolean;
|
100 | }
|
101 | /**
|
102 | * This function transforms all keys (recursively) in the provided `val` object.
|
103 | *
|
104 | * @param val The object whose keys need to be transformed.
|
105 | * @param transform The function that will be applied to each key.
|
106 | * @param exclude The keys that will not be transformed and copied to output directly
|
107 | * @returns A new object with the same values as `val`, but with all keys transformed according to `transform`.
|
108 | */
|
109 | export declare function transformObjectKeys(val: any, transform: (str: string) => string, exclude?: Exclude): any;
|
110 | /**
|
111 | * This function lower cases the first character of the string provided.
|
112 | */
|
113 | export declare function lowerCaseFirstCharacter(str: string): string;
|
114 | export type PropDiffs = Record<string, PropertyDifference<any>>;
|
115 | export declare class ClassifiedChanges {
|
116 | readonly change: HotswappableChangeCandidate;
|
117 | readonly hotswappableProps: PropDiffs;
|
118 | readonly nonHotswappableProps: PropDiffs;
|
119 | constructor(change: HotswappableChangeCandidate, hotswappableProps: PropDiffs, nonHotswappableProps: PropDiffs);
|
120 | reportNonHotswappablePropertyChanges(ret: ChangeHotswapResult): void;
|
121 | get namesOfHotswappableProps(): string[];
|
122 | }
|
123 | export declare function classifyChanges(xs: HotswappableChangeCandidate, hotswappablePropNames: string[]): ClassifiedChanges;
|
124 | export declare function reportNonHotswappableChange(ret: ChangeHotswapResult, change: HotswappableChangeCandidate, nonHotswappableProps?: PropDiffs, reason?: string, hotswapOnlyVisible?: boolean): void;
|
125 | export declare function reportNonHotswappableResource(change: HotswappableChangeCandidate, reason?: string): ChangeHotswapResult;
|
126 | export {};
|