Skip to content

Commit 0757058

Browse files
imadan1996FredericHeem
authored andcommitted
Add swagger examples for cross subscription operations (Azure#18136)
* Add swagger examples for cross sub restore ops to API ver 2019-06-01-preview * Add swagger examples for cross sub restore ops to API ver 2021-05-01-preview * Add swagger examples for cross sub restore ops to API ver 2021-08-01-preview * Add PatchCoreDatabase.json file to examples, add back older unused params that were deleted frrom databases.json
1 parent 1d341a1 commit 0757058

13 files changed

+2717
-1020
lines changed

specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/databases.json

Lines changed: 464 additions & 268 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-1111-2222-3333-444444444444",
4+
"resourceGroupName": "Default-SQL-SouthEastAsia",
5+
"serverName": "testsvr",
6+
"databaseName": "testdw",
7+
"api-version": "2019-06-01-preview",
8+
"parameters": {
9+
"location": "southeastasia",
10+
"properties": {
11+
"createMode": "PointInTimeRestore",
12+
"sourceResourceId": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/databases/srcdw",
13+
"restorePointInTime": "2022-01-22T05:35:31.503Z"
14+
}
15+
}
16+
},
17+
"responses": {
18+
"200": {
19+
"body": {
20+
"sku": {
21+
"name": "DataWarehouse",
22+
"tier": "DataWarehouse",
23+
"capacity": 9000
24+
},
25+
"kind": "v12.0,user,datawarehouse,gen2",
26+
"properties": {
27+
"collation": "SQL_Latin1_General_CP1_CI_AS",
28+
"maxSizeBytes": 263882790666240,
29+
"status": "Online",
30+
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
31+
"creationDate": "2022-01-24T06:46:14.99Z",
32+
"currentServiceObjectiveName": "DW1000c",
33+
"requestedServiceObjectiveName": "DW1000c",
34+
"defaultSecondaryLocation": "eastus",
35+
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
36+
"readScale": "Disabled",
37+
"currentSku": {
38+
"name": "DataWarehouse",
39+
"tier": "DataWarehouse",
40+
"capacity": 9000
41+
},
42+
"storageAccountType": "Standard_LRS"
43+
},
44+
"location": "southeastasia",
45+
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
46+
"name": "testdw",
47+
"type": "Microsoft.Sql/servers/databases"
48+
}
49+
},
50+
"201": {
51+
"body": {
52+
"sku": {
53+
"name": "DataWarehouse",
54+
"tier": "DataWarehouse",
55+
"capacity": 9000
56+
},
57+
"kind": "v12.0,user,datawarehouse,gen2",
58+
"properties": {
59+
"collation": "SQL_Latin1_General_CP1_CI_AS",
60+
"maxSizeBytes": 263882790666240,
61+
"status": "Online",
62+
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
63+
"creationDate": "2022-01-24T06:46:14.99Z",
64+
"currentServiceObjectiveName": "DW1000c",
65+
"requestedServiceObjectiveName": "DW1000c",
66+
"defaultSecondaryLocation": "eastus",
67+
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
68+
"readScale": "Disabled",
69+
"currentSku": {
70+
"name": "DataWarehouse",
71+
"tier": "DataWarehouse",
72+
"capacity": 9000
73+
},
74+
"storageAccountType": "Standard_LRS"
75+
},
76+
"location": "southeastasia",
77+
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
78+
"name": "testdw",
79+
"type": "Microsoft.Sql/servers/databases"
80+
}
81+
},
82+
"202": {}
83+
}
84+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-1111-2222-3333-444444444444",
4+
"resourceGroupName": "Default-SQL-WestUS",
5+
"serverName": "testsvr",
6+
"databaseName": "testdw",
7+
"api-version": "2019-06-01-preview",
8+
"parameters": {
9+
"location": "westus",
10+
"properties": {
11+
"createMode": "Recovery",
12+
"sourceResourceId": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-EastUS/providers/Microsoft.Sql/servers/srcsvr/recoverabledatabases/srcdw"
13+
}
14+
}
15+
},
16+
"responses": {
17+
"200": {
18+
"body": {
19+
"sku": {
20+
"name": "DataWarehouse",
21+
"tier": "DataWarehouse",
22+
"capacity": 9000
23+
},
24+
"kind": "v12.0,user,datawarehouse,gen2",
25+
"properties": {
26+
"collation": "SQL_Latin1_General_CP1_CI_AS",
27+
"maxSizeBytes": 263882790666240,
28+
"status": "Online",
29+
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
30+
"creationDate": "2022-01-24T06:46:14.99Z",
31+
"currentServiceObjectiveName": "DW1000c",
32+
"requestedServiceObjectiveName": "DW1000c",
33+
"defaultSecondaryLocation": "eastus",
34+
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
35+
"readScale": "Disabled",
36+
"currentSku": {
37+
"name": "DataWarehouse",
38+
"tier": "DataWarehouse",
39+
"capacity": 9000
40+
},
41+
"storageAccountType": "Standard_LRS"
42+
},
43+
"location": "westus",
44+
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-WestUS/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
45+
"name": "testdw",
46+
"type": "Microsoft.Sql/servers/databases"
47+
}
48+
},
49+
"201": {
50+
"body": {
51+
"sku": {
52+
"name": "DataWarehouse",
53+
"tier": "DataWarehouse",
54+
"capacity": 9000
55+
},
56+
"kind": "v12.0,user,datawarehouse,gen2",
57+
"properties": {
58+
"collation": "SQL_Latin1_General_CP1_CI_AS",
59+
"maxSizeBytes": 263882790666240,
60+
"status": "Online",
61+
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
62+
"creationDate": "2022-01-24T06:46:14.99Z",
63+
"currentServiceObjectiveName": "DW1000c",
64+
"requestedServiceObjectiveName": "DW1000c",
65+
"defaultSecondaryLocation": "eastus",
66+
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
67+
"readScale": "Disabled",
68+
"currentSku": {
69+
"name": "DataWarehouse",
70+
"tier": "DataWarehouse",
71+
"capacity": 9000
72+
},
73+
"storageAccountType": "Standard_LRS"
74+
},
75+
"location": "westus",
76+
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-WestUS/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
77+
"name": "testdw",
78+
"type": "Microsoft.Sql/servers/databases"
79+
}
80+
},
81+
"202": {}
82+
}
83+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-1111-2222-3333-444444444444",
4+
"resourceGroupName": "Default-SQL-SouthEastAsia",
5+
"serverName": "testsvr",
6+
"databaseName": "testdw",
7+
"api-version": "2019-06-01-preview",
8+
"parameters": {
9+
"location": "southeastasia",
10+
"properties": {
11+
"createMode": "Restore",
12+
"sourceResourceId": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/restorableDroppedDatabases/srcdw,131403269876900000"
13+
}
14+
}
15+
},
16+
"responses": {
17+
"200": {
18+
"body": {
19+
"sku": {
20+
"name": "DataWarehouse",
21+
"tier": "DataWarehouse",
22+
"capacity": 9000
23+
},
24+
"kind": "v12.0,user,datawarehouse,gen2",
25+
"properties": {
26+
"collation": "SQL_Latin1_General_CP1_CI_AS",
27+
"maxSizeBytes": 263882790666240,
28+
"status": "Online",
29+
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
30+
"creationDate": "2022-01-24T06:46:14.99Z",
31+
"currentServiceObjectiveName": "DW1000c",
32+
"requestedServiceObjectiveName": "DW1000c",
33+
"defaultSecondaryLocation": "eastus",
34+
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
35+
"readScale": "Disabled",
36+
"currentSku": {
37+
"name": "DataWarehouse",
38+
"tier": "DataWarehouse",
39+
"capacity": 9000
40+
},
41+
"storageAccountType": "Standard_LRS"
42+
},
43+
"location": "southeastasia",
44+
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
45+
"name": "testdw",
46+
"type": "Microsoft.Sql/servers/databases"
47+
}
48+
},
49+
"201": {
50+
"body": {
51+
"sku": {
52+
"name": "DataWarehouse",
53+
"tier": "DataWarehouse",
54+
"capacity": 9000
55+
},
56+
"kind": "v12.0,user,datawarehouse,gen2",
57+
"properties": {
58+
"collation": "SQL_Latin1_General_CP1_CI_AS",
59+
"maxSizeBytes": 263882790666240,
60+
"status": "Online",
61+
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
62+
"creationDate": "2022-01-24T06:46:14.99Z",
63+
"currentServiceObjectiveName": "DW1000c",
64+
"requestedServiceObjectiveName": "DW1000c",
65+
"defaultSecondaryLocation": "eastus",
66+
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
67+
"readScale": "Disabled",
68+
"currentSku": {
69+
"name": "DataWarehouse",
70+
"tier": "DataWarehouse",
71+
"capacity": 9000
72+
},
73+
"storageAccountType": "Standard_LRS"
74+
},
75+
"location": "southeastasia",
76+
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
77+
"name": "testdw",
78+
"type": "Microsoft.Sql/servers/databases"
79+
}
80+
},
81+
"202": {}
82+
}
83+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-1111-2222-3333-444444444444",
4+
"resourceGroupName": "Default-SQL-SouthEastAsia",
5+
"serverName": "testsvr",
6+
"databaseName": "testdb",
7+
"api-version": "2019-06-01-preview",
8+
"parameters": {
9+
"sku": {
10+
"name": "BC_Gen4_4"
11+
},
12+
"properties": {
13+
"maxSizeBytes": 1073741824,
14+
"licenseType": "LicenseIncluded"
15+
}
16+
}
17+
},
18+
"responses": {
19+
"200": {
20+
"body": {
21+
"sku": {
22+
"name": "BC_Gen4_4",
23+
"tier": "BusinessCritical",
24+
"capacity": 4
25+
},
26+
"kind": "v12.0,user,vcore",
27+
"properties": {
28+
"collation": "SQL_Latin1_General_CP1_CI_AS",
29+
"maxSizeBytes": 1073741824,
30+
"status": "Online",
31+
"databaseId": "6c764297-577b-470f-9af4-96d3d41e2ba3",
32+
"creationDate": "2017-06-07T04:41:33.937Z",
33+
"currentServiceObjectiveName": "BC_Gen4_4",
34+
"defaultSecondaryLocation": "North Europe",
35+
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
36+
"licenseType": "LicenseIncluded",
37+
"maxLogSizeBytes": 104857600
38+
},
39+
"location": "southeastasia",
40+
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
41+
"name": "testdb",
42+
"type": "Microsoft.Sql/servers/databases"
43+
}
44+
},
45+
"202": {}
46+
}
47+
}

specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/Databases.json

Lines changed: 729 additions & 377 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-1111-2222-3333-444444444444",
4+
"resourceGroupName": "Default-SQL-SouthEastAsia",
5+
"serverName": "testsvr",
6+
"databaseName": "testdw",
7+
"api-version": "2021-05-01-preview",
8+
"parameters": {
9+
"location": "southeastasia",
10+
"properties": {
11+
"createMode": "PointInTimeRestore",
12+
"sourceResourceId": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/databases/srcdw",
13+
"restorePointInTime": "2022-01-22T05:35:31.503Z"
14+
}
15+
}
16+
},
17+
"responses": {
18+
"200": {
19+
"body": {
20+
"sku": {
21+
"name": "DataWarehouse",
22+
"tier": "DataWarehouse",
23+
"capacity": 9000
24+
},
25+
"kind": "v12.0,user,datawarehouse,gen2",
26+
"properties": {
27+
"collation": "SQL_Latin1_General_CP1_CI_AS",
28+
"maxSizeBytes": 263882790666240,
29+
"status": "Online",
30+
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
31+
"creationDate": "2022-01-24T06:46:14.99Z",
32+
"currentServiceObjectiveName": "DW1000c",
33+
"requestedServiceObjectiveName": "DW1000c",
34+
"defaultSecondaryLocation": "eastus",
35+
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
36+
"readScale": "Disabled",
37+
"currentSku": {
38+
"name": "DataWarehouse",
39+
"tier": "DataWarehouse",
40+
"capacity": 9000
41+
},
42+
"currentBackupStorageRedundancy": "Geo"
43+
},
44+
"location": "southeastasia",
45+
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
46+
"name": "testdw",
47+
"type": "Microsoft.Sql/servers/databases"
48+
}
49+
},
50+
"201": {
51+
"body": {
52+
"sku": {
53+
"name": "DataWarehouse",
54+
"tier": "DataWarehouse",
55+
"capacity": 9000
56+
},
57+
"kind": "v12.0,user,datawarehouse,gen2",
58+
"properties": {
59+
"collation": "SQL_Latin1_General_CP1_CI_AS",
60+
"maxSizeBytes": 263882790666240,
61+
"status": "Online",
62+
"databaseId": "188784c9-d602-4684-86cf-e67b6f03551a",
63+
"creationDate": "2022-01-24T06:46:14.99Z",
64+
"currentServiceObjectiveName": "DW1000c",
65+
"requestedServiceObjectiveName": "DW1000c",
66+
"defaultSecondaryLocation": "eastus",
67+
"catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
68+
"readScale": "Disabled",
69+
"currentSku": {
70+
"name": "DataWarehouse",
71+
"tier": "DataWarehouse",
72+
"capacity": 9000
73+
},
74+
"currentBackupStorageRedundancy": "Geo"
75+
},
76+
"location": "southeastasia",
77+
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw",
78+
"name": "testdw",
79+
"type": "Microsoft.Sql/servers/databases"
80+
}
81+
},
82+
"202": {}
83+
}
84+
}

0 commit comments

Comments
 (0)