Skip to content

Commit 628ab50

Browse files
Swagger changes for Stop and Resume protection APIs (Azure#14250)
* Added Suspend/Resume APIs * Prettier changes * spell check fix * Fixing version in example * PR feedback changes * changes
1 parent 1f66f14 commit 628ab50

File tree

6 files changed

+460
-0
lines changed

6 files changed

+460
-0
lines changed

specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2021-02-01-preview/dataprotection.json

Lines changed: 362 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,6 +1520,350 @@
15201520
}
15211521
}
15221522
},
1523+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/resumeBackups": {
1524+
"post": {
1525+
"tags": [
1526+
"BackupInstances"
1527+
],
1528+
"description": "This operation will resume backups for backup instance",
1529+
"operationId": "BackupInstances_ResumeBackups",
1530+
"produces": [
1531+
"application/json"
1532+
],
1533+
"parameters": [
1534+
{
1535+
"$ref": "#/parameters/ApiVersion"
1536+
},
1537+
{
1538+
"$ref": "#/parameters/VaultName"
1539+
},
1540+
{
1541+
"$ref": "#/parameters/ResourceGroupName"
1542+
},
1543+
{
1544+
"$ref": "#/parameters/SubscriptionId"
1545+
},
1546+
{
1547+
"name": "backupInstanceName",
1548+
"in": "path",
1549+
"required": true,
1550+
"type": "string"
1551+
}
1552+
],
1553+
"responses": {
1554+
"200": {
1555+
"description": "OK"
1556+
},
1557+
"202": {
1558+
"description": "The operation will be completed asynchronously.",
1559+
"headers": {
1560+
"Location": {
1561+
"description": "The URL of the resource used to check the status of the asynchronous operation.",
1562+
"type": "string"
1563+
},
1564+
"Azure-AsyncOperation": {
1565+
"description": "The URL of the resource used to check the status of the asynchronous operation.",
1566+
"type": "string"
1567+
},
1568+
"Retry-After": {
1569+
"description": "Suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds.",
1570+
"type": "integer",
1571+
"format": "int32"
1572+
}
1573+
}
1574+
},
1575+
"default": {
1576+
"description": "Error response describing why the operation failed.",
1577+
"schema": {
1578+
"$ref": "#/definitions/CloudError"
1579+
}
1580+
}
1581+
},
1582+
"x-ms-long-running-operation": true,
1583+
"x-ms-examples": {
1584+
"ResumeBackups": {
1585+
"$ref": "./examples/BackupInstanceOperations/ResumeBackups.json"
1586+
}
1587+
}
1588+
}
1589+
},
1590+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/resumeProtection": {
1591+
"post": {
1592+
"tags": [
1593+
"BackupInstances"
1594+
],
1595+
"description": "This operation will resume protection for a stopped backup instance",
1596+
"operationId": "BackupInstances_ResumeProtection",
1597+
"produces": [
1598+
"application/json"
1599+
],
1600+
"parameters": [
1601+
{
1602+
"$ref": "#/parameters/ApiVersion"
1603+
},
1604+
{
1605+
"$ref": "#/parameters/VaultName"
1606+
},
1607+
{
1608+
"$ref": "#/parameters/ResourceGroupName"
1609+
},
1610+
{
1611+
"$ref": "#/parameters/SubscriptionId"
1612+
},
1613+
{
1614+
"name": "backupInstanceName",
1615+
"in": "path",
1616+
"required": true,
1617+
"type": "string"
1618+
}
1619+
],
1620+
"responses": {
1621+
"200": {
1622+
"description": "OK"
1623+
},
1624+
"202": {
1625+
"description": "The operation will be completed asynchronously.",
1626+
"headers": {
1627+
"Location": {
1628+
"description": "The URL of the resource used to check the status of the asynchronous operation.",
1629+
"type": "string"
1630+
},
1631+
"Azure-AsyncOperation": {
1632+
"description": "The URL of the resource used to check the status of the asynchronous operation.",
1633+
"type": "string"
1634+
},
1635+
"Retry-After": {
1636+
"description": "Suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds.",
1637+
"type": "integer",
1638+
"format": "int32"
1639+
}
1640+
}
1641+
},
1642+
"default": {
1643+
"description": "Error response describing why the operation failed.",
1644+
"schema": {
1645+
"$ref": "#/definitions/CloudError"
1646+
}
1647+
}
1648+
},
1649+
"x-ms-long-running-operation": true,
1650+
"x-ms-examples": {
1651+
"ResumeProtection": {
1652+
"$ref": "./examples/BackupInstanceOperations/ResumeProtection.json"
1653+
}
1654+
}
1655+
}
1656+
},
1657+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/stopProtection": {
1658+
"post": {
1659+
"tags": [
1660+
"BackupInstances"
1661+
],
1662+
"description": "This operation will stop protection of a backup instance and data will be held forever",
1663+
"operationId": "BackupInstances_StopProtection",
1664+
"produces": [
1665+
"application/json"
1666+
],
1667+
"parameters": [
1668+
{
1669+
"$ref": "#/parameters/ApiVersion"
1670+
},
1671+
{
1672+
"$ref": "#/parameters/VaultName"
1673+
},
1674+
{
1675+
"$ref": "#/parameters/ResourceGroupName"
1676+
},
1677+
{
1678+
"$ref": "#/parameters/SubscriptionId"
1679+
},
1680+
{
1681+
"name": "backupInstanceName",
1682+
"in": "path",
1683+
"required": true,
1684+
"type": "string"
1685+
}
1686+
],
1687+
"responses": {
1688+
"200": {
1689+
"description": "OK"
1690+
},
1691+
"202": {
1692+
"description": "The operation will be completed asynchronously.",
1693+
"headers": {
1694+
"Location": {
1695+
"description": "The URL of the resource used to check the status of the asynchronous operation.",
1696+
"type": "string"
1697+
},
1698+
"Azure-AsyncOperation": {
1699+
"description": "The URL of the resource used to check the status of the asynchronous operation.",
1700+
"type": "string"
1701+
},
1702+
"Retry-After": {
1703+
"description": "Suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds.",
1704+
"type": "integer",
1705+
"format": "int32"
1706+
}
1707+
}
1708+
},
1709+
"default": {
1710+
"description": "Error response describing why the operation failed.",
1711+
"schema": {
1712+
"$ref": "#/definitions/CloudError"
1713+
}
1714+
}
1715+
},
1716+
"x-ms-long-running-operation": true,
1717+
"x-ms-examples": {
1718+
"StopProtection": {
1719+
"$ref": "./examples/BackupInstanceOperations/StopProtection.json"
1720+
}
1721+
}
1722+
}
1723+
},
1724+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/suspendBackups": {
1725+
"post": {
1726+
"tags": [
1727+
"BackupInstances"
1728+
],
1729+
"description": "This operation will stop backups for backup instance",
1730+
"operationId": "BackupInstances_SuspendBackups",
1731+
"produces": [
1732+
"application/json"
1733+
],
1734+
"parameters": [
1735+
{
1736+
"$ref": "#/parameters/ApiVersion"
1737+
},
1738+
{
1739+
"$ref": "#/parameters/VaultName"
1740+
},
1741+
{
1742+
"$ref": "#/parameters/ResourceGroupName"
1743+
},
1744+
{
1745+
"$ref": "#/parameters/SubscriptionId"
1746+
},
1747+
{
1748+
"name": "backupInstanceName",
1749+
"in": "path",
1750+
"required": true,
1751+
"type": "string"
1752+
}
1753+
],
1754+
"responses": {
1755+
"200": {
1756+
"description": "OK"
1757+
},
1758+
"202": {
1759+
"description": "The operation will be completed asynchronously.",
1760+
"headers": {
1761+
"Location": {
1762+
"description": "The URL of the resource used to check the status of the asynchronous operation.",
1763+
"type": "string"
1764+
},
1765+
"Azure-AsyncOperation": {
1766+
"description": "The URL of the resource used to check the status of the asynchronous operation.",
1767+
"type": "string"
1768+
},
1769+
"Retry-After": {
1770+
"description": "Suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds.",
1771+
"type": "integer",
1772+
"format": "int32"
1773+
}
1774+
}
1775+
},
1776+
"default": {
1777+
"description": "Error response describing why the operation failed.",
1778+
"schema": {
1779+
"$ref": "#/definitions/CloudError"
1780+
}
1781+
}
1782+
},
1783+
"x-ms-long-running-operation": true,
1784+
"x-ms-examples": {
1785+
"SuspendBackups": {
1786+
"$ref": "./examples/BackupInstanceOperations/SuspendBackups.json"
1787+
}
1788+
}
1789+
}
1790+
},
1791+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/sync": {
1792+
"post": {
1793+
"tags": [
1794+
"BackupInstances"
1795+
],
1796+
"description": "Sync backup instance again in case of failure\r\nThis action will retry last failed operation and will bring backup instance to valid state",
1797+
"operationId": "BackupInstances_SyncBackupInstance",
1798+
"produces": [
1799+
"application/json"
1800+
],
1801+
"parameters": [
1802+
{
1803+
"$ref": "#/parameters/ApiVersion"
1804+
},
1805+
{
1806+
"$ref": "#/parameters/VaultName"
1807+
},
1808+
{
1809+
"$ref": "#/parameters/ResourceGroupName"
1810+
},
1811+
{
1812+
"$ref": "#/parameters/SubscriptionId"
1813+
},
1814+
{
1815+
"name": "backupInstanceName",
1816+
"in": "path",
1817+
"required": true,
1818+
"type": "string"
1819+
},
1820+
{
1821+
"name": "parameters",
1822+
"in": "body",
1823+
"description": "Request body for operation",
1824+
"required": true,
1825+
"schema": {
1826+
"$ref": "#/definitions/SyncBackupInstanceRequest"
1827+
}
1828+
}
1829+
],
1830+
"responses": {
1831+
"200": {
1832+
"description": "OK"
1833+
},
1834+
"202": {
1835+
"description": "The operation will be completed asynchronously.",
1836+
"headers": {
1837+
"Location": {
1838+
"description": "The URL of the resource used to check the status of the asynchronous operation.",
1839+
"type": "string"
1840+
},
1841+
"Azure-AsyncOperation": {
1842+
"description": "The URL of the resource used to check the status of the asynchronous operation.",
1843+
"type": "string"
1844+
},
1845+
"Retry-After": {
1846+
"description": "Suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds.",
1847+
"type": "integer",
1848+
"format": "int32"
1849+
}
1850+
}
1851+
},
1852+
"default": {
1853+
"description": "Error response describing why the operation failed.",
1854+
"schema": {
1855+
"$ref": "#/definitions/CloudError"
1856+
}
1857+
}
1858+
},
1859+
"x-ms-long-running-operation": true,
1860+
"x-ms-examples": {
1861+
"Sync BackupInstance": {
1862+
"$ref": "./examples/BackupInstanceOperations/SyncBackupInstance.json"
1863+
}
1864+
}
1865+
}
1866+
},
15231867
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore": {
15241868
"post": {
15251869
"tags": [
@@ -4364,6 +4708,24 @@
43644708
}
43654709
}
43664710
},
4711+
"SyncBackupInstanceRequest": {
4712+
"description": "Sync BackupInstance Request",
4713+
"type": "object",
4714+
"properties": {
4715+
"syncType": {
4716+
"description": "Field indicating sync type e.g. to sync only in case of failure or in all cases",
4717+
"enum": [
4718+
"Default",
4719+
"ForceResync"
4720+
],
4721+
"type": "string",
4722+
"x-ms-enum": {
4723+
"name": "SyncType",
4724+
"modelAsString": true
4725+
}
4726+
}
4727+
}
4728+
},
43674729
"TaggingCriteria": {
43684730
"description": "Tagging criteria",
43694731
"properties": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "04cf684a-d41f-4550-9f70-7708a3a2283b",
4+
"resourceGroupName": "testrg",
5+
"vaultName": "testvault",
6+
"backupInstanceName": "testbi",
7+
"api-version": "2021-02-01-preview"
8+
},
9+
"responses": {
10+
"202": {
11+
"headers": {
12+
"Location": "https://api-dogfood.resources.windows-int.net/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/testrg/providers/Microsoft.DataProtection/backupInstances/testbi/operationResults/ZTA4YjQ0ZGYtYmNkNS00YTk1LWFjZTMtOTc1MjNmZWIxYWZlO2Y1ODg1MzA3LWJkNjItNDQ2OC05ZjZlLTJkMGM2NjNiNmJmNg==?api-version=2021-02-01-preview",
13+
"Azure-AsyncOperation": "https://api-dogfood.resources.windows-int.net/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/providers/Microsoft.DataProtection/locations/westus/operationStatus/ZTA4YjQ0ZGYtYmNkNS00YTk1LWFjZTMtOTc1MjNmZWIxYWZlO2Y1ODg1MzA3LWJkNjItNDQ2OC05ZjZlLTJkMGM2NjNiNmJmNg==?api-version=2021-02-01-preview",
14+
"Retry-After": "60"
15+
}
16+
},
17+
"200": {}
18+
}
19+
}

0 commit comments

Comments
 (0)