diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/bms.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/bms.json index 444356982e6d..45d6b00ca5d8 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/bms.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/bms.json @@ -3916,6 +3916,263 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies": { + "get": { + "tags": [ + "ResourceGuardProxies" + ], + "description": "List the ResourceGuardProxies under vault", + "operationId": "ResourceGuardProxies_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/SubscriptionId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ResourceGuardProxyBaseResourceList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get VaultGuardProxies": { + "$ref": "./examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}": { + "get": { + "tags": [ + "ResourceGuardProxy" + ], + "description": "Returns ResourceGuardProxy under vault and with the name referenced in request", + "operationId": "ResourceGuardProxy_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "name": "resourceGuardProxyName", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ResourceGuardProxyBaseResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get ResourceGuardProxy": { + "$ref": "./examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json" + } + } + }, + "put": { + "tags": [ + "ResourceGuardProxy" + ], + "description": "Add or Update ResourceGuardProxy under vault\r\nSecures vault critical operations", + "operationId": "ResourceGuardProxy_Put", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "name": "resourceGuardProxyName", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ResourceGuardProxyBaseResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Create ResourceGuardProxy": { + "$ref": "./examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json" + } + } + }, + "delete": { + "tags": [ + "ResourceGuardProxy" + ], + "description": "Delete ResourceGuardProxy under vault", + "operationId": "ResourceGuardProxy_Delete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "name": "resourceGuardProxyName", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Delete ResourceGuardProxy": { + "$ref": "./examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete": { + "post": { + "tags": [ + "ResourceGuardProxy" + ], + "description": "Secures delete ResourceGuardProxy operations.", + "operationId": "ResourceGuardProxy_UnlockDelete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "name": "resourceGuardProxyName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "Request body for operation", + "required": true, + "schema": { + "$ref": "#/definitions/UnlockDeleteRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/UnlockDeleteResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "UnlockDelete ResourceGuardProxy": { + "$ref": "./examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json" + } + } + } } }, "definitions": { @@ -8315,6 +8572,13 @@ "name": "SoftDeleteFeatureState", "modelAsString": true } + }, + "resourceGuardOperationRequests": { + "description": "ResourceGuard Operation Requests", + "type": "array", + "items": { + "type": "string" + } } } }, @@ -11235,6 +11499,87 @@ } } } + }, + "UnlockDeleteRequest": { + "description": "Request body of unlock delete API.", + "type": "object", + "properties": { + "resourceGuardOperationRequests": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "UnlockDeleteResponse": { + "description": "Response of Unlock Delete API.", + "type": "object", + "properties": { + "unlockDeleteExpiryTime": { + "description": "This is the time when unlock delete privileges will get expired.", + "type": "string" + } + } + }, + "ResourceGuardOperationDetail": { + "type": "object", + "properties": { + "vaultCriticalOperation": { + "type": "string" + }, + "defaultResourceRequest": { + "type": "string" + } + } + }, + "ResourceGuardProxyBase": { + "type": "object", + "properties": { + "resourceGuardResourceId": { + "type": "string" + }, + "resourceGuardOperationDetails": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceGuardOperationDetail" + } + }, + "lastUpdatedTime": { + "type": "string" + } + } + }, + "ResourceGuardProxyBaseResource": { + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ResourceGuardProxyBase", + "description": "ResourceGuardProxyBaseResource properties" + } + } + }, + "ResourceGuardProxyBaseResourceList": { + "description": "List of ResourceGuardProxyBase resources", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ResourceList" + } + ], + "properties": { + "value": { + "description": "List of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/ResourceGuardProxyBaseResource" + } + } + } } }, "parameters": { diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json new file mode 100644 index 000000000000..8351afaf5abb --- /dev/null +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "0b352192-dcac-4cc7-992e-a96190ccc68c", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "resourceGuardProxyName": "swaggerExample", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json new file mode 100644 index 000000000000..4cc5c0cb226a --- /dev/null +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "0b352192-dcac-4cc7-992e-a96190ccc68c", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "resourceGuardProxyName": "swaggerExample", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/backupmanagement/resources/sampleVault/backupResourceGuardProxies/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.RecoveryServices/vaults/backupResourceGuardProxies", + "properties": { + "resourceGuardResourceId": "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew", + "resourceGuardOperationDetails": [ + { + "vaultCriticalOperation": "Microsoft.DataProtection/resourceGuards/deleteResourceGuardProxyRequests", + "defaultResourceRequest": "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew/deleteResourceGuardProxyRequests/default" + }, + { + "vaultCriticalOperation": "Microsoft.DataProtection/resourceGuards/disableSoftDeleteRequests", + "defaultResourceRequest": "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/resourceguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew/disableSoftDeleteRequests/default" + } + ], + "lastUpdatedTime": "2021-02-11T12:20:47.8210031Z" + } + } + } + } +} diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json new file mode 100644 index 000000000000..0cc6a32170e0 --- /dev/null +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "0b352192-dcac-4cc7-992e-a96190ccc68c", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "api-version": "2021-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/backupmanagement/resources/sampleVault/backupResourceGuardProxies/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.RecoveryServices/vaults/backupResourceGuardProxies", + "properties": { + "resourceGuardResourceId": "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew", + "resourceGuardOperationDetails": [ + { + "vaultCriticalOperation": "Microsoft.DataProtection/resourceGuards/deleteResourceGuardProxyRequests", + "defaultResourceRequest": "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew/deleteResourceGuardProxyRequests/default" + }, + { + "vaultCriticalOperation": "Microsoft.DataProtection/resourceGuards/disableSoftDeleteRequests", + "defaultResourceRequest": "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew/disableSoftDeleteRequests/default" + } + ], + "lastUpdatedTime": "2021-02-11T12:20:47.8210031Z" + } + } + ] + } + } + } +} diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json new file mode 100644 index 000000000000..d6739c872826 --- /dev/null +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "0b352192-dcac-4cc7-992e-a96190ccc68c", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "resourceGuardProxyName": "swaggerExample", + "api-version": "2021-02-01-preview", + "parameters": { + "id": "/subscriptions/0b352192-dcac-4cc7-992e-a96190ccc68c/resourceGroups/SampleResourceGroup/providers/Microsoft.RecoveryServicesBVTD2/vaults/sampleVault/backupResourceGuardProxies/swaggerExample", + "type": "Microsoft.RecoveryServices/vaults/backupResourceGuardProxies", + "properties": { + "resourceGuardResourceId": "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/backupmanagement/resources/sampleVault/backupResourceGuardProxies/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.RecoveryServices/vaults/backupResourceGuardProxies", + "properties": { + "resourceGuardResourceId": "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew", + "resourceGuardOperationDetails": [ + { + "vaultCriticalOperation": "Microsoft.DataProtection/resourceGuards/deleteResourceGuardProxyRequests", + "defaultResourceRequest": "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew/deleteResourceGuardProxyRequests/default" + }, + { + "vaultCriticalOperation": "Microsoft.DataProtection/resourceGuards/disableSoftDeleteRequests", + "defaultResourceRequest": "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew/disableSoftDeleteRequests/default" + } + ], + "lastUpdatedTime": "2021-02-11T12:20:47.8210031Z" + } + } + } + } +} diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json new file mode 100644 index 000000000000..1ddea4c12b29 --- /dev/null +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2021-02-01-preview/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "0b352192-dcac-4cc7-992e-a96190ccc68c", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "resourceGuardProxyName": "swaggerExample", + "api-version": "2021-02-01-preview", + "parameters": { + "resourceGuardOperationRequests": [ + "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew/deleteResourceGuardProxiesRequests/default" + ] + } + }, + "responses": { + "200": { + "body": { + "unlockDeleteExpiryTime": "2021-02-11T13:12:27.7870742Z" + } + } + } +}