Skip to content

Commit a3b8e07

Browse files
author
awstools
committed
feat(client-docdb): Adding FailoverState and TagList to GlobalCluster and SynchronizationStatus to GlobalClusterMember.
1 parent fe5a3c2 commit a3b8e07

File tree

10 files changed

+314
-15
lines changed

10 files changed

+314
-15
lines changed

clients/client-docdb/src/commands/CreateGlobalClusterCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,19 @@ export interface CreateGlobalClusterCommandOutput extends CreateGlobalClusterRes
7373
* // "STRING_VALUE",
7474
* // ],
7575
* // IsWriter: true || false,
76+
* // SynchronizationStatus: "connected" || "pending-resync",
77+
* // },
78+
* // ],
79+
* // FailoverState: { // FailoverState
80+
* // Status: "pending" || "failing-over" || "cancelling",
81+
* // FromDbClusterArn: "STRING_VALUE",
82+
* // ToDbClusterArn: "STRING_VALUE",
83+
* // IsDataLossAllowed: true || false,
84+
* // },
85+
* // TagList: [ // TagList
86+
* // { // Tag
87+
* // Key: "STRING_VALUE",
88+
* // Value: "STRING_VALUE",
7689
* // },
7790
* // ],
7891
* // },

clients/client-docdb/src/commands/DeleteGlobalClusterCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,19 @@ export interface DeleteGlobalClusterCommandOutput extends DeleteGlobalClusterRes
6363
* // "STRING_VALUE",
6464
* // ],
6565
* // IsWriter: true || false,
66+
* // SynchronizationStatus: "connected" || "pending-resync",
67+
* // },
68+
* // ],
69+
* // FailoverState: { // FailoverState
70+
* // Status: "pending" || "failing-over" || "cancelling",
71+
* // FromDbClusterArn: "STRING_VALUE",
72+
* // ToDbClusterArn: "STRING_VALUE",
73+
* // IsDataLossAllowed: true || false,
74+
* // },
75+
* // TagList: [ // TagList
76+
* // { // Tag
77+
* // Key: "STRING_VALUE",
78+
* // Value: "STRING_VALUE",
6679
* // },
6780
* // ],
6881
* // },

clients/client-docdb/src/commands/DescribeGlobalClustersCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,19 @@ export interface DescribeGlobalClustersCommandOutput extends GlobalClustersMessa
7575
* // "STRING_VALUE",
7676
* // ],
7777
* // IsWriter: true || false,
78+
* // SynchronizationStatus: "connected" || "pending-resync",
79+
* // },
80+
* // ],
81+
* // FailoverState: { // FailoverState
82+
* // Status: "pending" || "failing-over" || "cancelling",
83+
* // FromDbClusterArn: "STRING_VALUE",
84+
* // ToDbClusterArn: "STRING_VALUE",
85+
* // IsDataLossAllowed: true || false,
86+
* // },
87+
* // TagList: [ // TagList
88+
* // { // Tag
89+
* // Key: "STRING_VALUE",
90+
* // Value: "STRING_VALUE",
7891
* // },
7992
* // ],
8093
* // },

clients/client-docdb/src/commands/FailoverGlobalClusterCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,19 @@ export interface FailoverGlobalClusterCommandOutput extends FailoverGlobalCluste
6666
* // "STRING_VALUE",
6767
* // ],
6868
* // IsWriter: true || false,
69+
* // SynchronizationStatus: "connected" || "pending-resync",
70+
* // },
71+
* // ],
72+
* // FailoverState: { // FailoverState
73+
* // Status: "pending" || "failing-over" || "cancelling",
74+
* // FromDbClusterArn: "STRING_VALUE",
75+
* // ToDbClusterArn: "STRING_VALUE",
76+
* // IsDataLossAllowed: true || false,
77+
* // },
78+
* // TagList: [ // TagList
79+
* // { // Tag
80+
* // Key: "STRING_VALUE",
81+
* // Value: "STRING_VALUE",
6982
* // },
7083
* // ],
7184
* // },

clients/client-docdb/src/commands/ModifyGlobalClusterCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,19 @@ export interface ModifyGlobalClusterCommandOutput extends ModifyGlobalClusterRes
6565
* // "STRING_VALUE",
6666
* // ],
6767
* // IsWriter: true || false,
68+
* // SynchronizationStatus: "connected" || "pending-resync",
69+
* // },
70+
* // ],
71+
* // FailoverState: { // FailoverState
72+
* // Status: "pending" || "failing-over" || "cancelling",
73+
* // FromDbClusterArn: "STRING_VALUE",
74+
* // ToDbClusterArn: "STRING_VALUE",
75+
* // IsDataLossAllowed: true || false,
76+
* // },
77+
* // TagList: [ // TagList
78+
* // { // Tag
79+
* // Key: "STRING_VALUE",
80+
* // Value: "STRING_VALUE",
6881
* // },
6982
* // ],
7083
* // },

clients/client-docdb/src/commands/RemoveFromGlobalClusterCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,19 @@ export interface RemoveFromGlobalClusterCommandOutput extends RemoveFromGlobalCl
6464
* // "STRING_VALUE",
6565
* // ],
6666
* // IsWriter: true || false,
67+
* // SynchronizationStatus: "connected" || "pending-resync",
68+
* // },
69+
* // ],
70+
* // FailoverState: { // FailoverState
71+
* // Status: "pending" || "failing-over" || "cancelling",
72+
* // FromDbClusterArn: "STRING_VALUE",
73+
* // ToDbClusterArn: "STRING_VALUE",
74+
* // IsDataLossAllowed: true || false,
75+
* // },
76+
* // TagList: [ // TagList
77+
* // { // Tag
78+
* // Key: "STRING_VALUE",
79+
* // Value: "STRING_VALUE",
6780
* // },
6881
* // ],
6982
* // },

clients/client-docdb/src/commands/SwitchoverGlobalClusterCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,19 @@ export interface SwitchoverGlobalClusterCommandOutput extends SwitchoverGlobalCl
6161
* // "STRING_VALUE",
6262
* // ],
6363
* // IsWriter: true || false,
64+
* // SynchronizationStatus: "connected" || "pending-resync",
65+
* // },
66+
* // ],
67+
* // FailoverState: { // FailoverState
68+
* // Status: "pending" || "failing-over" || "cancelling",
69+
* // FromDbClusterArn: "STRING_VALUE",
70+
* // ToDbClusterArn: "STRING_VALUE",
71+
* // IsDataLossAllowed: true || false,
72+
* // },
73+
* // TagList: [ // TagList
74+
* // { // Tag
75+
* // Key: "STRING_VALUE",
76+
* // Value: "STRING_VALUE",
6477
* // },
6578
* // ],
6679
* // },

clients/client-docdb/src/models/models_0.ts

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3186,6 +3186,83 @@ export interface CreateGlobalClusterMessage {
31863186
StorageEncrypted?: boolean | undefined;
31873187
}
31883188

3189+
/**
3190+
* @public
3191+
* @enum
3192+
*/
3193+
export const FailoverStatus = {
3194+
CANCELLING: "cancelling",
3195+
FAILING_OVER: "failing-over",
3196+
PENDING: "pending",
3197+
} as const;
3198+
3199+
/**
3200+
* @public
3201+
*/
3202+
export type FailoverStatus = (typeof FailoverStatus)[keyof typeof FailoverStatus];
3203+
3204+
/**
3205+
* <p>Contains the state of scheduled or in-process operations on an Amazon DocumentDB global cluster.
3206+
* This data type is empty unless a switchover or failover operation is scheduled or is in progress on the global cluster.</p>
3207+
* @public
3208+
*/
3209+
export interface FailoverState {
3210+
/**
3211+
* <p>The current status of the global cluster. Possible values are as follows:</p>
3212+
* <ul>
3213+
* <li>
3214+
* <p>
3215+
* <b>pending</b> – The service received a request to switch over or fail over the global cluster.
3216+
* The global cluster's primary cluster and the specified secondary cluster are being verified before the operation starts.</p>
3217+
* </li>
3218+
* <li>
3219+
* <p>
3220+
* <b>failing-over</b> – The chosen secondary cluster is being promoted to become the new primary cluster to fail over the global cluster.</p>
3221+
* </li>
3222+
* <li>
3223+
* <p>
3224+
* <b>cancelling</b> – The request to switch over or fail over the global cluster was cancelled and the primary cluster and the selected secondary cluster are returning to their previous states.</p>
3225+
* </li>
3226+
* </ul>
3227+
* @public
3228+
*/
3229+
Status?: FailoverStatus | undefined;
3230+
3231+
/**
3232+
* <p>The Amazon Resource Name (ARN) of the Amazon DocumentDB cluster that is currently being demoted, and which is associated with this state.</p>
3233+
* @public
3234+
*/
3235+
FromDbClusterArn?: string | undefined;
3236+
3237+
/**
3238+
* <p>The Amazon Resource Name (ARN) of the Amazon DocumentDB cluster that is currently being promoted, and which is associated with this state.</p>
3239+
* @public
3240+
*/
3241+
ToDbClusterArn?: string | undefined;
3242+
3243+
/**
3244+
* <p>Indicates whether the operation is a global switchover or a global failover.
3245+
* If data loss is allowed, then the operation is a global failover. Otherwise, it's a switchover.</p>
3246+
* @public
3247+
*/
3248+
IsDataLossAllowed?: boolean | undefined;
3249+
}
3250+
3251+
/**
3252+
* @public
3253+
* @enum
3254+
*/
3255+
export const GlobalClusterMemberSynchronizationStatus = {
3256+
CONNECTED: "connected",
3257+
PENDING_RESYNC: "pending-resync",
3258+
} as const;
3259+
3260+
/**
3261+
* @public
3262+
*/
3263+
export type GlobalClusterMemberSynchronizationStatus =
3264+
(typeof GlobalClusterMemberSynchronizationStatus)[keyof typeof GlobalClusterMemberSynchronizationStatus];
3265+
31893266
/**
31903267
* <p>A data structure with information about any primary and secondary clusters associated with an Amazon DocumentDB global clusters. </p>
31913268
* @public
@@ -3208,6 +3285,12 @@ export interface GlobalClusterMember {
32083285
* @public
32093286
*/
32103287
IsWriter?: boolean | undefined;
3288+
3289+
/**
3290+
* <p>The status of synchronization of each Amazon DocumentDB cluster in the global cluster.</p>
3291+
* @public
3292+
*/
3293+
SynchronizationStatus?: GlobalClusterMemberSynchronizationStatus | undefined;
32113294
}
32123295

32133296
/**
@@ -3275,6 +3358,19 @@ export interface GlobalCluster {
32753358
* @public
32763359
*/
32773360
GlobalClusterMembers?: GlobalClusterMember[] | undefined;
3361+
3362+
/**
3363+
* <p>A data object containing all properties for the current state of an in-process or pending switchover or failover process for this global cluster.
3364+
* This object is empty unless the <code>SwitchoverGlobalCluster</code> or <code>FailoverGlobalCluster</code> operation was called on this global cluster.</p>
3365+
* @public
3366+
*/
3367+
FailoverState?: FailoverState | undefined;
3368+
3369+
/**
3370+
* <p>A list of global cluster tags.</p>
3371+
* @public
3372+
*/
3373+
TagList?: Tag[] | undefined;
32783374
}
32793375

32803376
/**

clients/client-docdb/src/protocols/Aws_query.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ import {
319319
FailoverDBClusterResult,
320320
FailoverGlobalClusterMessage,
321321
FailoverGlobalClusterResult,
322+
FailoverState,
322323
Filter,
323324
GlobalCluster,
324325
GlobalClusterAlreadyExistsFault,
@@ -7105,6 +7106,26 @@ const de_FailoverGlobalClusterResult = (output: any, context: __SerdeContext): F
71057106
return contents;
71067107
};
71077108

7109+
/**
7110+
* deserializeAws_queryFailoverState
7111+
*/
7112+
const de_FailoverState = (output: any, context: __SerdeContext): FailoverState => {
7113+
const contents: any = {};
7114+
if (output[_St] != null) {
7115+
contents[_St] = __expectString(output[_St]);
7116+
}
7117+
if (output[_FDCA] != null) {
7118+
contents[_FDCA] = __expectString(output[_FDCA]);
7119+
}
7120+
if (output[_TDCA] != null) {
7121+
contents[_TDCA] = __expectString(output[_TDCA]);
7122+
}
7123+
if (output[_IDLA] != null) {
7124+
contents[_IDLA] = __parseBoolean(output[_IDLA]);
7125+
}
7126+
return contents;
7127+
};
7128+
71087129
/**
71097130
* deserializeAws_queryGlobalCluster
71107131
*/
@@ -7142,6 +7163,14 @@ const de_GlobalCluster = (output: any, context: __SerdeContext): GlobalCluster =
71427163
} else if (output[_GCM] != null && output[_GCM][_GCMl] != null) {
71437164
contents[_GCM] = de_GlobalClusterMemberList(__getArrayIfSingleItem(output[_GCM][_GCMl]), context);
71447165
}
7166+
if (output[_FS] != null) {
7167+
contents[_FS] = de_FailoverState(output[_FS], context);
7168+
}
7169+
if (String(output.TagList).trim() === "") {
7170+
contents[_TL] = [];
7171+
} else if (output[_TL] != null && output[_TL][_Ta] != null) {
7172+
contents[_TL] = de_TagList(__getArrayIfSingleItem(output[_TL][_Ta]), context);
7173+
}
71457174
return contents;
71467175
};
71477176

@@ -7183,6 +7212,9 @@ const de_GlobalClusterMember = (output: any, context: __SerdeContext): GlobalClu
71837212
if (output[_IW] != null) {
71847213
contents[_IW] = __parseBoolean(output[_IW]);
71857214
}
7215+
if (output[_SSy] != null) {
7216+
contents[_SSy] = __expectString(output[_SSy]);
7217+
}
71867218
return contents;
71877219
};
71887220

@@ -8442,8 +8474,10 @@ const _F = "Filters";
84428474
const _FAD = "ForcedApplyDate";
84438475
const _FDBC = "FailoverDBCluster";
84448476
const _FDBSI = "FinalDBSnapshotIdentifier";
8477+
const _FDCA = "FromDbClusterArn";
84458478
const _FF = "ForceFailover";
84468479
const _FGC = "FailoverGlobalCluster";
8480+
const _FS = "FailoverState";
84478481
const _GC = "GlobalCluster";
84488482
const _GCA = "GlobalClusterArn";
84498483
const _GCI = "GlobalClusterIdentifier";
@@ -8455,6 +8489,7 @@ const _HZI = "HostedZoneId";
84558489
const _I = "Iops";
84568490
const _ICT = "InstanceCreateTime";
84578491
const _ICW = "IsClusterWriter";
8492+
const _IDLA = "IsDataLossAllowed";
84588493
const _IM = "IsModifiable";
84598494
const _IMVU = "IsMajorVersionUpgrade";
84608495
const _IOONAMT = "IOOptimizedNextAllowedModificationTime";
@@ -8568,6 +8603,7 @@ const _SN = "SubscriptionName";
85688603
const _SNT = "SupportedNetworkTypes";
85698604
const _SS = "SecretStatus";
85708605
const _SSu = "SubnetStatus";
8606+
const _SSy = "SynchronizationStatus";
85718607
const _ST = "StorageType";
85728608
const _STA = "SnsTopicArn";
85738609
const _STn = "SnapshotType";
@@ -8585,6 +8621,7 @@ const _TDBCPGD = "TargetDBClusterParameterGroupDescription";
85858621
const _TDBCPGI = "TargetDBClusterParameterGroupIdentifier";
85868622
const _TDBCSI = "TargetDBClusterSnapshotIdentifier";
85878623
const _TDBII = "TargetDBInstanceIdentifier";
8624+
const _TDCA = "ToDbClusterArn";
85888625
const _TDCI = "TargetDbClusterIdentifier";
85898626
const _TK = "TagKeys";
85908627
const _TL = "TagList";

0 commit comments

Comments
 (0)