@@ -1115,16 +1115,16 @@ struct ClusterAttributeScope {
11151115// activeClustersByClusterAttribute is a map of whatever subdivision of the domain chosen
11161116// to active cluster info for active-active domains. The key refers to the type of
11171117// cluster attribute and the value refers to its cluster mappings.
1118- //
1118+ //
11191119// For example, a request to update the domain for two locations
1120- //
1120+ //
11211121// UpdateDomainRequest{
11221122// ReplicationConfiguration: {
11231123// ActiveClusters: {
11241124// ActiveClustersByClusterAttribute: {
11251125// "location": ClusterAttributeScope{
1126- // "Tokyo": {ActiveClusterInfo: "cluster0, FailoverVersion: 123},
1127- // "Morocco": {ActiveClusterInfo: "cluster1", FailoverVersion: 100},
1126+ // "Tokyo": {ActiveClusterInfo: "cluster0, FailoverVersion: 123},
1127+ // "Morocco": {ActiveClusterInfo: "cluster1", FailoverVersion: 100},
11281128// }
11291129// }
11301130// }
@@ -1232,6 +1232,64 @@ struct DeleteDomainRequest {
12321232 20: optional string securityToken
12331233}
12341234
1235+ struct ListFailoverHistoryRequest {
1236+ // ListFailoverHistoryRequestFilters specifies the filters to apply to the request.
1237+ // If not provided all failover events will be returned.
1238+ 10: optional ListFailoverHistoryRequestFilters filters
1239+ // PaginationOptions will be used to paginate the results.
1240+ // If not provided the first 5 events will be returned.
1241+ 20: optional PaginationOptions pagination
1242+ }
1243+
1244+ struct ListFailoverHistoryRequestFilters {
1245+ // domain_id is the id of the domain to list failover history for.
1246+ 10: optional string domainID
1247+ // attributes specifies every attribute type that should be returned on the request. If none are specified, defaults to all ClusterAttributes.
1248+ // If multiple attributes are specified all failover events containing any of the attributes will be returned.
1249+ 20: optional list<ClusterAttribute> attributes
1250+ // default_active_cluster: when true, retrieves the domain wide ActiveClusterName failover events.
1251+ 30: optional bool defaultActiveCluster
1252+ }
1253+
1254+ struct ListFailoverHistoryResponse {
1255+ 10: optional list<FailoverEvent> failoverEvents
1256+ // next_page_token can be passed in a subsequent request to fetch the next set of events.
1257+ 20: optional binary nextPageToken
1258+ }
1259+
1260+ struct FailoverEvent {
1261+ // id of the failover event
1262+ // Can be passed with the created time to fetch a specific event.
1263+ 10: optional string id
1264+ // created_time is the time the failover event was created.
1265+ // Can be passed with the ID to fetch a specific event.
1266+ 20: optional i64 (js.type = " Long" ) createdTime
1267+ 30: optional FailoverType failoverType
1268+ }
1269+
1270+ struct ClusterFailover {
1271+ 10: optional ActiveClusterInfo fromCluster
1272+ 20: optional ActiveClusterInfo toCluster
1273+ // cluster_attribute is the scope and name for the attribute that was failed over.
1274+ // It will not be defined when is_default_cluster is true.
1275+ 30: optional ClusterAttribute clusterAttribute
1276+ // If the failover was for the default domain-wide active cluster name.
1277+ 40: optional bool isDefaultCluster
1278+ }
1279+
1280+ // GetFailoverEventRequest is used to fetch a specific failover event by id and created time.
1281+ struct GetFailoverEventRequest {
1282+ 10: optional string domainID
1283+ 20: optional string failoverEventID
1284+ 30: optional i64 (js.type = " Long" ) createdTime
1285+ }
1286+
1287+ // GetFailoverEventResponse contains the cluster failovers that occurred as part of the failover event.
1288+ // It may be a large response if 1000s of ClusterAttributes were failed over as part of the event.
1289+ struct GetFailoverEventResponse {
1290+ 10: optional list<ClusterFailover> clusterFailovers
1291+ }
1292+
12351293struct StartWorkflowExecutionRequest {
12361294 10: optional string domain
12371295 20: optional string workflowId
@@ -2169,26 +2227,42 @@ struct ActiveClusterSelectionPolicy {
21692227// ClusterAttribute is used for subdividing workflows in a domain into their active
21702228// and passive clusters. Examples of this might be 'region' and 'cluster1' as
21712229// respective region and scope fields.
2172- //
2230+ //
21732231// for example, a workflow may specify this in it's start request:
2174- //
2232+ //
21752233// StartWorkflowRequest{
21762234// ActiveClusterSelectionPolicy: {
21772235// ClusterAttribute: {
21782236// Scope: "cityID",
2179- // Name: "Lisbon"
2237+ // Name: "Lisbon"
21802238// }
21812239// }
21822240// }
2183- //
2241+ //
21842242// and this means that this workflow will be associate with the domain's cluster attribute 'Lisbon',
2185- // be active in the cluster that has Lisbon active and
2243+ // be active in the cluster that has Lisbon active and
21862244// failover when that cluster-attribute is set to failover.
21872245struct ClusterAttribute {
21882246 1: optional string scope
21892247 2: optional string name
21902248}
21912249
2250+ // FailoverType describes how a failover operation will be performed.
2251+ enum FailoverType {
2252+ INVALID ,
2253+ FORCE ,
2254+ GRACEFUL ,
2255+ }
2256+
2257+ // PaginationOptions provides common options for paginated RPCs.
2258+ struct PaginationOptions {
2259+ // page_size configures the number of results to be returned as part of each page
2260+ 10: optional i32 pageSize
2261+ // next_page_token should be provided from a previous response to fetch the next page.
2262+ // if empty, the first page will be returned.
2263+ 20: optional binary nextPageToken
2264+ }
2265+
21922266// todo (david.porter) Remove this, as it's no longer needed
21932267// with the active/active configuration we have
21942268enum ActiveClusterSelectionStrategy {
0 commit comments