Skip to content

Commit be39f5a

Browse files
usvoyagerSudipta Dey (WDG)changlong-liu
authored
Swagger for Communication Services Resource Manager Preview (#10877)
* Swagger for Communication Services Preview * python track2 * Fix SpellCheck and PrettierCheck errors * More PrettierCheck fixes Co-authored-by: Sudipta Dey (WDG) <[email protected]> Co-authored-by: Changlong Liu <[email protected]>
1 parent 02aa7ac commit be39f5a

File tree

15 files changed

+1504
-0
lines changed

15 files changed

+1504
-0
lines changed

specification/communication/resource-manager/Microsoft.Communication/preview/2020-08-20-preview/CommunicationService.json

Lines changed: 1088 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "12345",
4+
"resourceGroupName": "MyResourceGroup",
5+
"communicationServiceName": "MyCommunicationResource",
6+
"api-version": "2020-08-20-preview",
7+
"parameters": {
8+
"location": "Global",
9+
"properties": {
10+
"dataLocation": "United States"
11+
}
12+
}
13+
},
14+
"responses": {
15+
"200": {
16+
"body": {
17+
"id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
18+
"name": "MyCommunicationResource",
19+
"type": "Microsoft.Communication/CommunicationServices",
20+
"location": "Global",
21+
"properties": {
22+
"dataLocation": "United States",
23+
"provisioningState": "Succeeded",
24+
"hostName": "mycommunicationresource.communications.azure.com"
25+
}
26+
}
27+
},
28+
"201": {
29+
"headers": {
30+
"Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.Communication/locations/westus/operationStatuses/ed5d502c-acaa-42ec-ad61-0d8488a9fd1d"
31+
},
32+
"body": {
33+
"id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
34+
"name": "MyCommunicationResource",
35+
"type": "Microsoft.Communication/CommunicationServices",
36+
"location": "Global",
37+
"properties": {
38+
"dataLocation": "United States",
39+
"provisioningState": "Accepted"
40+
}
41+
}
42+
}
43+
}
44+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "12345",
4+
"resourceGroupName": "MyResourceGroup",
5+
"communicationServiceName": "MyCommunicationResource",
6+
"api-version": "2020-08-20-preview"
7+
},
8+
"responses": {
9+
"200": {},
10+
"202": {
11+
"headers": {
12+
"Location": "https://management.azure.com/providers/Microsoft.Communication/locations/westus/operationStatuses/ed5d502c-acaa-42ec-ad61-0d8488a9fd1d"
13+
}
14+
},
15+
"204": {}
16+
}
17+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "12345",
4+
"resourceGroupName": "MyResourceGroup",
5+
"communicationServiceName": "MyCommunicationResource",
6+
"api-version": "2020-08-20-preview"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"id": "/subscriptions/12345/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
12+
"name": "MyCommunicationResource",
13+
"type": "Microsoft.Communication/CommunicationServices",
14+
"location": "Global",
15+
"properties": {
16+
"dataLocation": "United States",
17+
"provisioningState": "Running",
18+
"hostName": "mycommunicationservice.comms.azure.net",
19+
"version": "0.2.0"
20+
}
21+
}
22+
},
23+
"default": {
24+
"body": {
25+
"error": {
26+
"code": "ResourceNotFound",
27+
"message": "The requested resource was not found"
28+
}
29+
}
30+
}
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"parameters": {
3+
"location": "westus2",
4+
"operationId": "db5f291f-284d-46e9-9152-d5c83f7c14b8",
5+
"api-version": "2020-08-20-preview"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"id": "db5f291f-284d-46e9-9152-d5c83f7c14b8",
11+
"status": "Succeeded",
12+
"startTime": "2020-07-06T17:06:26.100Z",
13+
"endTime": "2020-07-06T17:06:42.800Z",
14+
"percentComplete": 100
15+
}
16+
},
17+
"default": {
18+
"body": {
19+
"error": {
20+
"code": "OperationNotFound",
21+
"message": "The requested async operation was not found"
22+
}
23+
}
24+
}
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "12345",
4+
"resourceGroupName": "MyResourceGroup",
5+
"communicationServiceName": "MyCommunicationResource",
6+
"api-version": "2020-08-20-preview",
7+
"linkNotificationHubParameters": {
8+
"resourceId": "/subscriptions/12345/resourceGroups/MyOtherResourceGroup/providers/Microsoft.NotificationHubs/namespaces/MyNamespace/notificationHubs/MyHub",
9+
"connectionString": "Endpoint=sb://MyNamespace.servicebus.windows.net/;SharedAccessKey=abcd1234"
10+
}
11+
},
12+
"responses": {
13+
"200": {
14+
"body": {
15+
"resourceId": "/subscriptions/12345/resourceGroups/MyOtherResourceGroup/providers/Microsoft.NotificationHubs/namespaces/MyNamespace/notificationHubs/MyHub"
16+
}
17+
},
18+
"default": {
19+
"body": {
20+
"error": {
21+
"code": "WrongSubscription",
22+
"message": "The notification hub must be in the same subscription as the communication service"
23+
}
24+
}
25+
}
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "12345",
4+
"resourceGroupName": "MyResourceGroup",
5+
"api-version": "2020-08-20-preview"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"properties": {
13+
"provisioningState": "Running",
14+
"dataLocation": "United States",
15+
"hostName": "mycommunicationservice.comms.azure.net",
16+
"version": "0.2.0"
17+
}
18+
}
19+
]
20+
}
21+
}
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "12345",
4+
"api-version": "2020-08-20-preview"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"value": [
10+
{
11+
"properties": {
12+
"provisioningState": "Running",
13+
"dataLocation": "United States",
14+
"hostName": "mycommunicationservice.comms.azure.net",
15+
"version": "0.2.0"
16+
}
17+
}
18+
]
19+
}
20+
}
21+
}
22+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "12345",
4+
"resourceGroupName": "MyResourceGroup",
5+
"communicationServiceName": "MyCommunicationResource",
6+
"api-version": "2020-08-20-preview"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"primaryKey": "1234",
12+
"secondaryKey": "ABCD"
13+
}
14+
}
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "12345",
4+
"resourceGroupName": "MyResourceGroup",
5+
"communicationServiceName": "MyCommunicationResource",
6+
"api-version": "2020-08-20-preview",
7+
"parameters": {
8+
"keyType": "Primary"
9+
}
10+
},
11+
"responses": {
12+
"200": {
13+
"body": {
14+
"primaryKey": "1234",
15+
"primaryConnectionString": "endpoint=http://example.com;accesskey=1234"
16+
}
17+
},
18+
"201": {
19+
"body": {}
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)