Skip to content

Commit b1d12ae

Browse files
schaudhari6254888Francisco-Gamino
authored andcommitted
eventhub-preview swagger correction (Azure#28703)
* eventhub 2024-05-01-preview swagger correction * updates * updates * Updates * Updates * Updates * Updates * Spell correction * some more corrections * some more corrections * some more corrections2
1 parent 2a43562 commit b1d12ae

File tree

9 files changed

+146
-41
lines changed

9 files changed

+146
-41
lines changed

specification/eventhub/resource-manager/Microsoft.EventHub/preview/2023-01-01-preview/examples/NameSpaces/EHNamespaceFailover.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"parameters": {
88
"properties": {
99
"primaryLocation": "centralus",
10-
"maximumGracePeriodInMins": 5
10+
"force": true
1111
}
1212
}
1313
},

specification/eventhub/resource-manager/Microsoft.EventHub/preview/2023-01-01-preview/namespaces-preview.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -986,10 +986,9 @@
986986
"type": "string",
987987
"description": "Query parameter for the new primary location after failover."
988988
},
989-
"maximumGracePeriodInMins": {
990-
"type": "integer",
991-
"format": "int32",
992-
"description": "Maximum time duration allowed complete data replication from primary to secondary. Use maximumGracePeriodInMins = 0: For Unplanned Geo-Failover, which switches the role between primary and secondary immediately. The data that is not being replicated yet will be discarded. Use maximumGracePeriodInMins > 0: For Planned Geo-Failover/DR Drill, continue replicating data until grace period expires. Any data that is not replicated during the grace period will be discarded. During the replication the namespace stops accepting any new publishing requests"
989+
"force": {
990+
"type": "boolean",
991+
"description": "If Force is false then graceful failover is attempted after ensuring no data loss. If Force flag is set to true, Forced failover is attempted with possible data loss."
993992
}
994993
}
995994
},

specification/eventhub/resource-manager/Microsoft.EventHub/preview/2024-05-01-preview/eventhubs.json

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,12 @@
9292
],
9393
"operationId": "EventHubs_CreateOrUpdate",
9494
"x-ms-examples": {
95-
"EventHubCreate": {
95+
"EHEventHubCreate": {
9696
"$ref": "./examples/EventHubs/EHEventHubCreate.json"
9797
},
98+
"EHEventHubWithDeleteOrCompactPolicyCreate": {
99+
"$ref": "./examples/EventHubs/EHEventHubWithDeleteOrCompactPolicyCreate.json"
100+
},
98101
"EHEventHubWithDeletePolicyCreate": {
99102
"$ref": "./examples/EventHubs/EHEventHubWithDeletePolicyCreate.json"
100103
},
@@ -281,7 +284,7 @@
281284
"enum": [
282285
"Delete",
283286
"Compact",
284-
"Delete,Compact"
287+
"DeleteOrCompact"
285288
],
286289
"x-ms-enum": {
287290
"name": "CleanupPolicyRetentionDescription",
@@ -291,21 +294,39 @@
291294
"retentionTimeInHours": {
292295
"format": "int64",
293296
"type": "integer",
294-
"description": "Number of hours to retain the events for this Event Hub. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue "
297+
"description": "Number of hours to retain the events for this Event Hub. This should be positive value upto namespace SKU max. -1 is a special case where retention time is infinite, but the size of an entity is restricted and its size depends on namespace SKU type."
295298
},
296299
"minCompactionLagInMins": {
297300
"format": "int64",
298301
"type": "integer",
299-
"description": "The minimum time a message will remain ineligible for compaction in the log. Only applicable for logs that are being compacted."
302+
"description": "The minimum time a message will remain ineligible for compaction in the log. This value is used when cleanupPolicy is Compact or DeleteOrCompact."
300303
},
301304
"tombstoneRetentionTimeInHours": {
302305
"format": "int32",
303306
"type": "integer",
304-
"description": "Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub"
307+
"description": "Number of hours to retain the tombstone markers of a compacted Event Hub. This value is used when cleanupPolicy is Compact or DeleteOrCompact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub"
305308
}
306309
},
307310
"description": "Properties to configure retention settings for the eventhub"
308311
},
312+
"MessageTimestampDescription": {
313+
"type": "object",
314+
"properties": {
315+
"timestampType": {
316+
"type": "string",
317+
"description": "Denotes the type of timestamp the message will hold.Two types of timestamp types - \"AppendTime\" and \"CreateTime\". AppendTime refers the time in which message got appended inside broker log. CreateTime refers to the time in which the message was generated on source side and producers can set this timestamp while sending the message. Default value is AppendTime. If you are using AMQP protocol, CreateTime equals AppendTime and its behavior remains the same.",
318+
"enum": [
319+
"LogAppend",
320+
"Create"
321+
],
322+
"x-ms-enum": {
323+
"name": "TimestampType",
324+
"modelAsString": true
325+
}
326+
}
327+
},
328+
"description": "Properties of MessageTimestamp Description"
329+
},
309330
"Eventhub": {
310331
"properties": {
311332
"properties": {
@@ -370,17 +391,9 @@
370391
"$ref": "#/definitions/RetentionDescription",
371392
"description": "Event Hub retention settings"
372393
},
373-
"messageTimestampType": {
374-
"type": "string",
375-
"description": "Denotes the type of timestamp the message will hold. Two types of timestamp types AppendTime, CreateTime. AppendTime refers the time in which message got appended inside broker log. CreateTime refers to the time in which the message was generated on source side and producers can set this timestamp while sending the message. Default value is AppendTime. If you are using AMQP protocol, CreateTime equals AppendTime for now and will full have runtime support later.",
376-
"enum": [
377-
"AppendTime",
378-
"CreateTime"
379-
],
380-
"x-ms-enum": {
381-
"name": "TimestampType",
382-
"modelAsString": true
383-
}
394+
"messageTimestampDescription": {
395+
"$ref": "#/definitions/MessageTimestampDescription",
396+
"description": "Properties of MessageTimestamp Description"
384397
},
385398
"identifier": {
386399
"type": "string",

specification/eventhub/resource-manager/Microsoft.EventHub/preview/2024-05-01-preview/examples/EventHubs/EHEventHubCreate.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
"subscriptionId": "5f750a97-50d9-4e36-8081-c9ee4c0210d4",
88
"parameters": {
99
"properties": {
10-
"messageRetentionInDays": 4,
1110
"partitionCount": 4,
1211
"status": "Active",
13-
"messageTimestampType": "AppendTime",
1412
"userMetadata": "key",
1513
"captureDescription": {
1614
"enabled": true,
@@ -29,10 +27,6 @@
2927
},
3028
"intervalInSeconds": 120,
3129
"sizeLimitInBytes": 10485763
32-
},
33-
"retentionDescription": {
34-
"cleanupPolicy": "Delete,Compact",
35-
"retentionTimeInHours": 24
3630
}
3731
}
3832
}
@@ -44,10 +38,9 @@
4438
"name": "sdk-EventHub-10",
4539
"type": "Microsoft.EventHub/Namespaces/EventHubs",
4640
"properties": {
47-
"messageRetentionInDays": 4,
41+
"messageRetentionInDays": 7,
4842
"partitionCount": 4,
4943
"status": "Active",
50-
"messageTimestampType": "AppendTime",
5144
"userMetadata": "key",
5245
"identifier": "identifierIDGUID",
5346
"createdAt": "2017-06-28T02:45:55.877Z",
@@ -77,8 +70,11 @@
7770
"sizeLimitInBytes": 10485763
7871
},
7972
"retentionDescription": {
80-
"cleanupPolicy": "Delete,Compact",
81-
"retentionTimeInHours": 24
73+
"cleanupPolicy": "Delete",
74+
"retentionTimeInHours": 168
75+
},
76+
"messageTimestampDescription": {
77+
"timestampType": "LogAppend"
8278
}
8379
}
8480
}

specification/eventhub/resource-manager/Microsoft.EventHub/preview/2024-05-01-preview/examples/EventHubs/EHEventHubWithCompactPolicyCreate.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"messageRetentionInDays": 4,
1111
"partitionCount": 4,
1212
"status": "Active",
13-
"messageTimestampType": "AppendTime",
1413
"userMetadata": "key",
1514
"captureDescription": {
1615
"enabled": true,
@@ -32,9 +31,11 @@
3231
},
3332
"retentionDescription": {
3433
"cleanupPolicy": "Compact",
35-
"retentionTimeInHours": -1,
3634
"minCompactionLagInMins": 10,
3735
"tombstoneRetentionTimeInHours": 1
36+
},
37+
"messageTimestampDescription": {
38+
"timestampType": "LogAppend"
3839
}
3940
}
4041
}
@@ -49,7 +50,6 @@
4950
"messageRetentionInDays": 4,
5051
"partitionCount": 4,
5152
"status": "Active",
52-
"messageTimestampType": "AppendTime",
5353
"userMetadata": "key",
5454
"identifier": "identifierIDGUID",
5555
"createdAt": "2017-06-28T02:45:55.877Z",
@@ -83,6 +83,9 @@
8383
"retentionTimeInHours": -1,
8484
"minCompactionLagInMins": 10,
8585
"tombstoneRetentionTimeInHours": 1
86+
},
87+
"messageTimestampDescription": {
88+
"timestampType": "LogAppend"
8689
}
8790
}
8891
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"parameters": {
3+
"namespaceName": "sdk-Namespace-5357",
4+
"resourceGroupName": "Default-NotificationHubs-AustraliaEast",
5+
"eventHubName": "sdk-EventHub-6547",
6+
"api-version": "2024-05-01-preview",
7+
"subscriptionId": "5f750a97-50d9-4e36-8081-c9ee4c0210d4",
8+
"parameters": {
9+
"properties": {
10+
"messageRetentionInDays": 4,
11+
"partitionCount": 4,
12+
"status": "Active",
13+
"userMetadata": "key",
14+
"captureDescription": {
15+
"enabled": true,
16+
"encoding": "Avro",
17+
"destination": {
18+
"name": "EventHubArchive.AzureBlockBlob",
19+
"properties": {
20+
"storageAccountResourceId": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage",
21+
"blobContainer": "container",
22+
"archiveNameFormat": "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"
23+
},
24+
"identity": {
25+
"type": "UserAssigned",
26+
"userAssignedIdentity": "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2"
27+
}
28+
},
29+
"intervalInSeconds": 120,
30+
"sizeLimitInBytes": 10485763
31+
},
32+
"retentionDescription": {
33+
"cleanupPolicy": "DeleteOrCompact",
34+
"retentionTimeInHours": 24
35+
},
36+
"messageTimestampDescription": {
37+
"timestampType": "LogAppend"
38+
}
39+
}
40+
}
41+
},
42+
"responses": {
43+
"200": {
44+
"body": {
45+
"id": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-NotificationHubs-AustraliaEast/providers/Microsoft.EventHub/namespaces/sdk-Namespace-716/eventhubs/sdk-EventHub-10",
46+
"name": "sdk-EventHub-10",
47+
"type": "Microsoft.EventHub/Namespaces/EventHubs",
48+
"properties": {
49+
"messageRetentionInDays": 4,
50+
"partitionCount": 4,
51+
"status": "Active",
52+
"userMetadata": "key",
53+
"identifier": "identifierIDGUID",
54+
"createdAt": "2017-06-28T02:45:55.877Z",
55+
"updatedAt": "2017-06-28T02:46:05.877Z",
56+
"partitionIds": [
57+
"0",
58+
"1",
59+
"2",
60+
"3"
61+
],
62+
"captureDescription": {
63+
"enabled": true,
64+
"encoding": "Avro",
65+
"destination": {
66+
"name": "EventHubArchive.AzureBlockBlob",
67+
"properties": {
68+
"storageAccountResourceId": "/subscriptions/e2f361f0-3b27-4503-a9cc-21cfba380093/resourceGroups/Default-Storage-SouthCentralUS/providers/Microsoft.ClassicStorage/storageAccounts/arjunteststorage",
69+
"blobContainer": "container",
70+
"archiveNameFormat": "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"
71+
},
72+
"identity": {
73+
"type": "UserAssigned",
74+
"userAssignedIdentity": "/subscriptions/SampleSubscription/resourceGroups/ResurceGroupSample/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ud2"
75+
}
76+
},
77+
"intervalInSeconds": 120,
78+
"sizeLimitInBytes": 10485763
79+
},
80+
"retentionDescription": {
81+
"cleanupPolicy": "DeleteOrCompact",
82+
"retentionTimeInHours": 24
83+
},
84+
"messageTimestampDescription": {
85+
"timestampType": "LogAppend"
86+
}
87+
}
88+
}
89+
}
90+
}
91+
}

specification/eventhub/resource-manager/Microsoft.EventHub/preview/2024-05-01-preview/examples/EventHubs/EHEventHubWithDeletePolicyCreate.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"messageRetentionInDays": 4,
1111
"partitionCount": 4,
1212
"status": "Active",
13-
"messageTimestampType": "AppendTime",
1413
"userMetadata": "key",
1514
"captureDescription": {
1615
"enabled": true,
@@ -33,6 +32,9 @@
3332
"retentionDescription": {
3433
"cleanupPolicy": "Delete",
3534
"retentionTimeInHours": 24
35+
},
36+
"messageTimestampDescription": {
37+
"timestampType": "LogAppend"
3638
}
3739
}
3840
}
@@ -47,7 +49,6 @@
4749
"messageRetentionInDays": 4,
4850
"partitionCount": 4,
4951
"status": "Active",
50-
"messageTimestampType": "AppendTime",
5152
"userMetadata": "key",
5253
"identifier": "identifierIDGUID",
5354
"createdAt": "2017-06-28T02:45:55.877Z",
@@ -79,6 +80,9 @@
7980
"retentionDescription": {
8081
"cleanupPolicy": "Delete",
8182
"retentionTimeInHours": 24
83+
},
84+
"messageTimestampDescription": {
85+
"timestampType": "LogAppend"
8286
}
8387
}
8488
}

specification/eventhub/resource-manager/Microsoft.EventHub/preview/2024-05-01-preview/examples/NameSpaces/EHNamespaceFailover.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"parameters": {
88
"properties": {
99
"primaryLocation": "centralus",
10-
"maximumGracePeriodInMins": 5
10+
"force": true
1111
}
1212
}
1313
},

specification/eventhub/resource-manager/Microsoft.EventHub/preview/2024-05-01-preview/namespaces.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,10 +1002,9 @@
10021002
"type": "string",
10031003
"description": "Query parameter for the new primary location after failover."
10041004
},
1005-
"maximumGracePeriodInMins": {
1006-
"type": "integer",
1007-
"format": "int32",
1008-
"description": "Maximum time duration allowed complete data replication from primary to secondary. Use maximumGracePeriodInMins = 0: For Unplanned Geo-Failover, which switches the role between primary and secondary immediately. The data that is not being replicated yet will be discarded. Use maximumGracePeriodInMins > 0: For Planned Geo-Failover/DR Drill, continue replicating data until grace period expires. Any data that is not replicated during the grace period will be discarded. During the replication the namespace stops accepting any new publishing requests"
1005+
"force": {
1006+
"type": "boolean",
1007+
"description": "If Force is false then graceful failover is attempted after ensuring no data loss. If Force flag is set to true, Forced failover is attempted with possible data loss."
10091008
}
10101009
}
10111010
},

0 commit comments

Comments
 (0)