diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/dataprotection.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/dataprotection.json index 715a2657a5d1..b2963c59973c 100644 --- a/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/dataprotection.json +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/dataprotection.json @@ -3456,6 +3456,275 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies": { + "get": { + "tags": [ + "DppResourceGuardProxies" + ], + "operationId": "DppResourceGuardProxy_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "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 ResourceGuardProxies": { + "$ref": "./examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}": { + "get": { + "tags": [ + "DppResourceGuardProxies" + ], + "operationId": "DppResourceGuardProxy_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "name": "resourceGuardProxyName", + "description": "name of the resource guard proxy", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]*$" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "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": [ + "DppResourceGuardProxies" + ], + "operationId": "DppResourceGuardProxy_Put", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "name": "resourceGuardProxyName", + "description": "name of the resource guard proxy", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]*$" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "description": "Request body for operation", + "required": true, + "schema": { + "$ref": "#/definitions/ResourceGuardProxyBaseResource" + } + } + ], + "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": [ + "DppResourceGuardProxies" + ], + "operationId": "DppResourceGuardProxy_Delete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "name": "resourceGuardProxyName", + "description": "name of the resource guard proxy", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]*$" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "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.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete": { + "post": { + "tags": [ + "DppResourceGuardProxies" + ], + "operationId": "DppResourceGuardProxy_UnlockDelete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "name": "resourceGuardProxyName", + "description": "name of the resource guard proxy", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]*$" + }, + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "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": { @@ -6973,6 +7242,95 @@ } } } + }, + "ResourceGuardOperationDetail": { + "type": "object", + "properties": { + "vaultCriticalOperation": { + "type": "string" + }, + "defaultResourceRequest": { + "type": "string" + } + } + }, + "ResourceGuardProxyBase": { + "type": "object", + "properties": { + "resourceGuardResourceId": { + "type": "string" + }, + "resourceGuardOperationDetails": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceGuardOperationDetail" + }, + "x-ms-identifiers": [] + }, + "lastUpdatedTime": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "ResourceGuardProxyBaseResource": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/DppResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/ResourceGuardProxyBase", + "description": "ResourceGuardProxyBaseResource properties" + } + } + }, + "ResourceGuardProxyBaseResourceList": { + "description": "List of ResourceGuardProxyBase resources", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/DppResourceList" + } + ], + "properties": { + "value": { + "description": "List of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/ResourceGuardProxyBaseResource" + } + } + } + }, + "UnlockDeleteRequest": { + "description": "Request body of unlock delete API.", + "type": "object", + "properties": { + "resourceGuardOperationRequests": { + "type": "array", + "items": { + "type": "string" + } + }, + "resourceToBeDeleted": { + "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" + } + } } }, "parameters": { diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json new file mode 100644 index 000000000000..deed421e31ae --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "5e13b949-1218-4d18-8b99-7e12155ec4f7", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "resourceGuardProxyName": "swaggerExample", + "api-version": "2023-01-01" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json new file mode 100644 index 000000000000..f3f15673a115 --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "5e13b949-1218-4d18-8b99-7e12155ec4f7", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "resourceGuardProxyName": "swaggerExample", + "api-version": "2023-01-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/5e13b949-1218-4d18-8b99-7e12155ec4f7/resourceGroups/SampleResourceGroup/providers/Microsoft.DataProtection/backupVaults/sampleVault/backupResourceGuardProxies/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.DataProtection/vaults/backupResourceGuardProxies", + "properties": { + "resourceGuardResourceId": "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource", + "resourceGuardOperationDetails": [ + { + "vaultCriticalOperation": "Microsoft.DataProtection/backupVaults/backupInstances/delete", + "defaultResourceRequest": "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource/deleteBackupInstanceRequests/default" + }, + { + "vaultCriticalOperation": "Microsoft.DataProtection/backupVaults/backupResourceGuardProxies/delete", + "defaultResourceRequest": "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource/deleteResourceGuardProxyRequests/default" + } + ], + "lastUpdatedTime": "2022-09-16T11:44:37.6130487Z", + "description": "Please take JIT access before performing any of the critical operation" + } + } + } + } +} diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json new file mode 100644 index 000000000000..28e3b4b9b8ce --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "5e13b949-1218-4d18-8b99-7e12155ec4f7", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "api-version": "2023-01-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/5e13b949-1218-4d18-8b99-7e12155ec4f7/resourceGroups/SampleResourceGroup/providers/Microsoft.DataProtection/backupVaults/sampleVault/backupResourceGuardProxies/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.DataProtection/vaults/backupResourceGuardProxies", + "properties": { + "resourceGuardResourceId": "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource", + "resourceGuardOperationDetails": [ + { + "vaultCriticalOperation": "Microsoft.DataProtection/backupVaults/backupInstances/delete", + "defaultResourceRequest": "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource/deleteBackupInstanceRequests/default" + }, + { + "vaultCriticalOperation": "Microsoft.DataProtection/backupVaults/backupResourceGuardProxies/delete", + "defaultResourceRequest": "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource/deleteResourceGuardProxyRequests/default" + } + ], + "lastUpdatedTime": "2022-09-16T11:44:37.6130487Z", + "description": "Please take JIT access before performing any of the critical operation" + } + } + ] + } + } + } +} diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json new file mode 100644 index 000000000000..f4e6370432c9 --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "5e13b949-1218-4d18-8b99-7e12155ec4f7", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "resourceGuardProxyName": "swaggerExample", + "api-version": "2023-01-01", + "parameters": { + "properties": { + "resourceGuardResourceId": "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/5e13b949-1218-4d18-8b99-7e12155ec4f7/resourceGroups/SampleResourceGroup/providers/Microsoft.DataProtection/backupVaults/sampleVault/backupResourceGuardProxies/swaggerExample", + "name": "swaggerExample", + "type": "Microsoft.DataProtection/vaults/backupResourceGuardProxies", + "properties": { + "resourceGuardResourceId": "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource", + "resourceGuardOperationDetails": [ + { + "vaultCriticalOperation": "Microsoft.DataProtection/backupVaults/backupInstances/delete", + "defaultResourceRequest": "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource/deleteBackupInstanceRequests/default" + }, + { + "vaultCriticalOperation": "Microsoft.DataProtection/backupVaults/backupResourceGuardProxies/delete", + "defaultResourceRequest": "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource/deleteResourceGuardProxyRequests/default" + } + ], + "lastUpdatedTime": "2022-09-16T11:44:37.6130487Z", + "description": "Please take JIT access before performing any of the critical operation" + } + } + } + } +} diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json new file mode 100644 index 000000000000..c196a278456a --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "5e13b949-1218-4d18-8b99-7e12155ec4f7", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "resourceGuardProxyName": "swaggerExample", + "api-version": "2023-01-01", + "parameters": { + "resourceGuardOperationRequests": [ + "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource/deleteBackupInstanceRequests/default" + ], + "resourceToBeDeleted": "/subscriptions/5e13b949-1218-4d18-8b99-7e12155ec4f7/resourceGroups/SampleResourceGroup/providers/Microsoft.DataProtection/backupVaults/sampleVault/backupInstances/TestBI9779f4de" + } + }, + "responses": { + "200": { + "body": { + "unlockDeleteExpiryTime": "2022-09-16T12:50:10.7039695Z" + } + } + } +}