From 4ece9b1a161a30cb5a2eec6365c4a979b6a191e7 Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Thu, 20 Oct 2022 18:29:58 +0530 Subject: [PATCH 1/5] Adds base for updating Microsoft.DataProtection from version preview/2022-09-01-preview to version 2022-10-01-preview Updates readme Updates API version in new specs and examples --- .../2022-10-01-preview/dataprotection.json | 905 ++++++++++++++---- .../ListBackupInstancesExtensionRouting.json | 59 ++ .../GetDeletedBackupInstance.json | 53 + .../ListDeletedBackupInstances.json | 56 ++ .../UndeleteDeletedBackupInstance.json | 19 + .../DeleteResourceGuardProxy.json | 13 + .../GetResourceGuardProxy.json | 33 + .../ListResourceGuardProxy.json | 36 + .../PutResourceGuardProxy.json | 38 + .../UnlockDeleteResourceGuardProxy.json | 22 + .../dataprotection/resource-manager/readme.md | 14 +- 11 files changed, 1064 insertions(+), 184 deletions(-) create mode 100644 specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json create mode 100644 specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json create mode 100644 specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json create mode 100644 specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json create mode 100644 specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json create mode 100644 specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json create mode 100644 specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json create mode 100644 specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json create mode 100644 specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json index 8190b11526ca..54076da95600 100644 --- a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json @@ -1013,6 +1013,48 @@ } } }, + "/{resourceId}/providers/Microsoft.DataProtection/backupInstances": { + "get": { + "tags": [ + "BackupInstancesExtensionRouting" + ], + "description": "Gets a list backup instances associated with a tracked resource", + "operationId": "BackupInstancesExtensionRouting_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/ResourceId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/BackupInstanceResourceList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List BackupInstances associated with an azure resource": { + "$ref": "./examples/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}": { "get": { "tags": [ @@ -2415,6 +2457,158 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances": { + "get": { + "tags": [ + "DeletedBackupInstances" + ], + "description": "Gets deleted backup instances belonging to a backup vault", + "operationId": "DeletedBackupInstances_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/VaultName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DeletedBackupInstanceResourceList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List DeletedBackupInstances in a Vault": { + "$ref": "./examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances/{backupInstanceName}": { + "get": { + "tags": [ + "DeletedBackupInstances" + ], + "description": "Gets a deleted backup instance with name in a backup vault", + "operationId": "DeletedBackupInstances_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "name": "backupInstanceName", + "description": "The name of the deleted backup instance", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/DeletedBackupInstanceResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get DeletedBackupInstance": { + "$ref": "./examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances/{backupInstanceName}/undelete": { + "post": { + "tags": [ + "DeletedBackupInstances" + ], + "operationId": "DeletedBackupInstances_Undelete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "name": "backupInstanceName", + "description": "The name of the deleted backup instance", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Undelete Deleted BackupInstance": { + "$ref": "./examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json" + } + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/resourceGuards": { "get": { "tags": [ @@ -3354,6 +3548,267 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies": { + "get": { + "tags": [ + "DppResourceGuardProxies" + ], + "operationId": "DppResourceGuardProxy_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "$ref": "#/parameters/ApiVersion" + } + ], + "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": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "name": "resourceGuardProxyName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersion" + } + ], + "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": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "name": "resourceGuardProxyName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersion" + }, + { + "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": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "name": "resourceGuardProxyName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersion" + } + ], + "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": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "name": "resourceGuardProxyName", + "in": "path", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersion" + }, + { + "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": { @@ -4025,81 +4480,22 @@ "AzureOperationalStoreParameters": { "description": "Parameters for Operational-Tier DataStore", "required": [ - "objectType", - "dataStoreType" - ], - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataStoreParameters" - } - ], - "properties": { - "resourceGroupId": { - "description": "Gets or sets the Snapshot Resource Group Uri.", - "type": "string" - } - }, - "x-ms-discriminator-value": "AzureOperationalStoreParameters" - }, - "KubernetesClusterBackupDatasourceParameters": { - "description": "Parameters for Kubernetes Cluster Backup Datasource", - "required": [ - "snapshotVolumes", - "includeClusterScopeResources" - ], - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/BackupDatasourceParameters" - } - ], - "properties": { - "snapshotVolumes": { - "description": "Gets or sets the volume snapshot property. This property if enabled will take volume snapshots during restore.", - "type": "boolean" - }, - "includeClusterScopeResources": { - "description": "Gets or sets the include cluster resources property. This property if enabled will include cluster scope resources during restore.", - "type": "boolean" - }, - "includedNamespaces": { - "description": "Gets or sets the include namespaces property. This property sets the namespaces to be included during restore.", - "items": { - "type": "string" - }, - "type": "array" - }, - "excludedNamespaces": { - "description": "Gets or sets the exclude namespaces property. This property sets the namespaces to be excluded during restore.", - "items": { - "type": "string" - }, - "type": "array" - }, - "includedResourceTypes": { - "description": "Gets or sets the include resource types property. This property sets the resource types to be included during restore.", - "items": { - "type": "string" - }, - "type": "array" - }, - "excludedResourceTypes": { - "description": "Gets or sets the exclude resource types property. This property sets the resource types to be excluded during restore.", - "items": { - "type": "string" - }, - "type": "array" - }, - "labelSelectors": { - "description": "Gets or sets the LabelSelectors property. This property sets the resource with such label selectors to be included during restore.", - "items": { - "type": "string" - }, - "type": "array" + "objectType", + "dataStoreType" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/DataStoreParameters" + } + ], + "properties": { + "resourceGroupId": { + "description": "Gets or sets the Snapshot Resource Group Uri.", + "type": "string" } }, - "x-ms-discriminator-value": "KubernetesClusterBackupDatasourceParameters" + "x-ms-discriminator-value": "AzureOperationalStoreParameters" }, "AzureRetentionRule": { "allOf": [ @@ -4372,6 +4768,10 @@ "description": "Resource move details for backup vault", "readOnly": true }, + "securitySettings": { + "$ref": "#/definitions/SecuritySettings", + "description": "Security Settings" + }, "storageSettings": { "description": "Storage Settings", "items": { @@ -4844,21 +5244,6 @@ }, "discriminator": "objectType" }, - "BackupDatasourceParameters": { - "description": "Parameters for Backup Datasource", - "required": [ - "objectType" - ], - "type": "object", - "properties": { - "objectType": { - "description": "Type of the specific object - used for deserializing", - "type": "string", - "readOnly": false - } - }, - "discriminator": "objectType" - }, "Day": { "description": "Day of the week", "properties": { @@ -4875,6 +5260,85 @@ "title": "Day", "type": "object" }, + "DeletedBackupInstance": { + "description": "Deleted Backup Instance", + "required": [ + "dataSourceInfo", + "policyInfo" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/BackupInstance" + } + ], + "properties": { + "deletionInfo": { + "$ref": "#/definitions/DeletionInfo", + "description": "Deletion info of Backup Instance", + "readOnly": true + } + } + }, + "DeletedBackupInstanceResource": { + "description": "Deleted Backup Instance", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/DppResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DeletedBackupInstance", + "description": "DeletedBackupInstanceResource properties" + } + } + }, + "DeletedBackupInstanceResourceList": { + "description": "List of DeletedBackupInstance resources", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/DppResourceList" + } + ], + "properties": { + "value": { + "description": "List of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/DeletedBackupInstanceResource" + } + } + } + }, + "DeletionInfo": { + "description": "Deletion Info", + "type": "object", + "properties": { + "deletionTime": { + "description": "Specifies time of deletion", + "type": "string", + "readOnly": true + }, + "billingEndDate": { + "description": "Specifies billing end date", + "type": "string", + "readOnly": true + }, + "scheduledPurgeTime": { + "description": "Specifies purge time", + "type": "string", + "readOnly": true + }, + "deleteActivityID": { + "description": "Delete activity ID for troubleshooting purpose", + "type": "string", + "readOnly": true + } + } + }, "DeleteOption": { "description": "Delete Option", "discriminator": "objectType", @@ -5034,6 +5498,25 @@ "type": "object", "x-ms-azure-resource": true }, + "ImmutabilitySettings": { + "description": "Immutability Settings at vault level", + "type": "object", + "properties": { + "state": { + "description": "Immutability state", + "enum": [ + "Disabled", + "Unlocked", + "Locked" + ], + "type": "string", + "x-ms-enum": { + "name": "ImmutabilityState", + "modelAsString": true + } + } + } + }, "DppProxyResource": { "properties": { "id": { @@ -5590,6 +6073,10 @@ "monitoringSettings": { "$ref": "#/definitions/MonitoringSettings", "description": "Monitoring Settings" + }, + "securitySettings": { + "$ref": "#/definitions/SecuritySettings", + "description": "Security Settings" } } }, @@ -5651,14 +6138,6 @@ "$ref": "#/definitions/DataStoreParameters" }, "x-ms-identifiers": [] - }, - "backupDatasourceParametersList": { - "description": "Gets or sets the Backup Data Source Parameters", - "type": "array", - "items": { - "$ref": "#/definitions/BackupDatasourceParameters" - }, - "x-ms-identifiers": [] } } }, @@ -5749,91 +6228,6 @@ }, "x-ms-discriminator-value": "KubernetesPVRestoreCriteria" }, - "KubernetesClusterRestoreCriteria": { - "description": "kubernetes Cluster Backup target info for restore operation", - "required": [ - "includeClusterScopeResources" - ], - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ItemLevelRestoreCriteria" - } - ], - "properties": { - "includeClusterScopeResources": { - "description": "Gets or sets the include cluster resources property. This property if enabled will include cluster scope resources during restore.", - "type": "boolean" - }, - "includedNamespaces": { - "description": "Gets or sets the include namespaces property. This property sets the namespaces to be included during restore.", - "items": { - "type": "string" - }, - "type": "array" - }, - "excludedNamespaces": { - "description": "Gets or sets the exclude namespaces property. This property sets the namespaces to be excluded during restore.", - "items": { - "type": "string" - }, - "type": "array" - }, - "includedResourceTypes": { - "description": "Gets or sets the include resource types property. This property sets the resource types to be included during restore.", - "items": { - "type": "string" - }, - "type": "array" - }, - "excludedResourceTypes": { - "description": "Gets or sets the exclude resource types property. This property sets the resource types to be excluded during restore.", - "items": { - "type": "string" - }, - "type": "array" - }, - "labelSelectors": { - "description": "Gets or sets the LabelSelectors property. This property sets the resource with such label selectors to be included during restore.", - "items": { - "type": "string" - }, - "type": "array" - }, - "persistentVolumeRestoreMode": { - "description": "Gets or sets the PV Restore Mode property. This property sets whether volumes needs to be restored.", - "enum": [ - "RestoreWithVolumeData", - "RestoreWithoutVolumeData" - ], - "type": "string", - "x-ms-enum": { - "name": "PersistentVolumeRestoreMode", - "modelAsString": true - } - }, - "conflictPolicy": { - "description": "Gets or sets the Conflict Policy property. This property sets policy during conflict of resources during restore.", - "enum": [ - "Skip", - "Patch" - ], - "type": "string", - "x-ms-enum": { - "name": "ExistingResourcePolicy", - "modelAsString": true - } - }, - "namespaceMappings": { - "description": "Gets or sets the Namespace Mappings property. This property sets if namespace needs to be change during restore.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "x-ms-discriminator-value": "KubernetesClusterRestoreCriteria" - }, "RecoveryPointDataStoreDetails": { "description": "RecoveryPoint datastore details", "properties": { @@ -6248,6 +6642,56 @@ } } }, + "SecuritySettings": { + "description": "Class containing security settings of vault", + "type": "object", + "properties": { + "softDeleteSettings": { + "$ref": "#/definitions/SoftDeleteSettings" + }, + "immutabilitySettings": { + "$ref": "#/definitions/ImmutabilitySettings" + } + } + }, + "SoftDeleteSettings": { + "description": "Soft delete related settings", + "type": "object", + "properties": { + "state": { + "description": "State of soft delete", + "enum": [ + "Off", + "On", + "AlwaysOn" + ], + "type": "string", + "x-ms-enum": { + "name": "SoftDeleteState", + "modelAsString": true, + "values": [ + { + "description": "Soft Delete is turned off for the BackupVault", + "value": "Off" + }, + { + "description": "Soft Delete is enabled for the BackupVault but can be turned off", + "value": "On" + }, + { + "description": "Soft Delete is permanently enabled for the BackupVault and the setting cannot be changed", + "value": "AlwaysOn" + } + ] + } + }, + "retentionDurationInDays": { + "description": "Soft delete retention duration", + "format": "double", + "type": "number" + } + } + }, "SourceLifeCycle": { "description": "Source LifeCycle", "properties": { @@ -6562,7 +7006,7 @@ "type": "string", "readOnly": true, "x-ms-enum": { - "name": "ProvisioningState", + "name": "ResourceGuardProvisioningState", "modelAsString": true } }, @@ -6641,6 +7085,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": { @@ -6673,6 +7206,14 @@ "description": "Client Api Version.", "required": true, "type": "string" + }, + "ResourceId": { + "name": "resourceId", + "in": "path", + "description": "ARM path of the resource to be protected using Microsoft.DataProtection", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } }, "securityDefinitions": { diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json new file mode 100644 index 000000000000..9ccad2d78611 --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "resourceId": "subscriptions/36d32b25-3dc7-41b0-bde1-397500644591/resourceGroups/testRG/providers/Microsoft.Compute/disks/testDisk", + "api-version": "2022-03-31-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "friendlyName": "testDisk", + "dataSourceInfo": { + "resourceID": "/subscriptions/36d32b25-3dc7-41b0-bde1-397500644591/resourceGroups/testRG/providers/Microsoft.Compute/disks/testDisk", + "resourceUri": "/subscriptions/36d32b25-3dc7-41b0-bde1-397500644591/resourceGroups/testRG/providers/Microsoft.Compute/disks/testDisk", + "datasourceType": "Microsoft.Compute/disks", + "resourceName": "testDisk", + "resourceType": "Microsoft.Compute/disks", + "resourceLocation": "eastus2euap", + "objectType": "Datasource" + }, + "dataSourceSetInfo": { + "resourceID": "/subscriptions/36d32b25-3dc7-41b0-bde1-397500644591/resourceGroups/testRG/providers/Microsoft.Compute/disks/testDisk", + "resourceUri": "/subscriptions/36d32b25-3dc7-41b0-bde1-397500644591/resourceGroups/testRG/providers/Microsoft.Compute/disks/testDisk", + "datasourceType": "Microsoft.Compute/disks", + "resourceName": "testDisk", + "resourceType": "Microsoft.Compute/disks", + "resourceLocation": "eastus2euap", + "objectType": "DatasourceSet" + }, + "policyInfo": { + "policyId": "/subscriptions/36d32b25-3dc7-41b0-bde1-397500644591/resourceGroups/policyRG/providers/Microsoft.DataProtection/backupVaults/jeczrsecy/backupPolicies/disk", + "policyVersion": "", + "policyParameters": { + "dataStoreParametersList": [ + { + "objectType": "AzureOperationalStoreParameters", + "dataStoreType": "OperationalStore", + "resourceGroupId": "/subscriptions/36d32b25-3dc7-41b0-bde1-397500644591/resourceGroups/policyRG" + } + ] + } + }, + "protectionStatus": { + "status": "ProtectionConfigured" + }, + "currentProtectionState": "ProtectionConfigured", + "provisioningState": "Succeeded", + "objectType": "BackupInstance" + }, + "id": "/subscriptions/36d32b25-3dc7-41b0-bde1-397500644591/resourceGroups/testRG/providers/Microsoft.Compute/disks/testDisk/providers/Microsoft.DataProtection/backupInstances/testDiskBI1-testDiskBI1-7664c12f-4d0a-440f-a0dc-b64f708b10e3", + "name": "testDiskBI1-testDiskBI1-7664c12f-4d0a-440f-a0dc-b64f708b10e3", + "type": "Microsoft.DataProtection/backupVaults/backupInstances" + } + ] + } + } + } +} diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json new file mode 100644 index 000000000000..cf7b783e12af --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "04cf684a-d41f-4550-9f70-7708a3a2283b", + "resourceGroupName": "000pikumar", + "vaultName": "PratikPrivatePreviewVault1", + "api-version": "2022-07-01-preview", + "backupInstanceName": "testInstance1" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PratikPrivatePreviewVault1/deletedBackupInstances/testInstance1", + "name": "testInstance1", + "type": "Microsoft.DataProtection/backupVaults/deletedBackupInstances", + "properties": { + "friendlyName": "testInstance1", + "dataSourceInfo": { + "resourceID": "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb", + "resourceUri": "", + "datasourceType": "Microsoft.DBforPostgreSQL/servers/databases", + "resourceName": "testdb", + "resourceType": "Microsoft.DBforPostgreSQL/servers/databases", + "resourceLocation": "", + "objectType": "Datasource" + }, + "dataSourceSetInfo": { + "resourceID": "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest", + "resourceUri": "", + "datasourceType": "Microsoft.DBforPostgreSQL/servers/databases", + "resourceName": "viveksipgtest", + "resourceType": "Microsoft.DBforPostgreSQL/servers", + "resourceLocation": "", + "objectType": "DatasourceSet" + }, + "deletionInfo": { + "deletionTime": "2022-05-04T00:00:36.6660445Z", + "scheduledPurgeTime": "2022-05-20T00:00:36.6660445Z", + "billingEndDate": "2022-05-06T00:00:36.6660445Z", + "deleteActivityID": "1e9ec790-d198-4efb-bbd7-e4669d5351a4" + }, + "policyInfo": { + "policyId": "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1" + }, + "protectionStatus": { + "status": "SoftDeleted" + }, + "provisioningState": "Succeeded", + "objectType": "DeletedBackupInstance" + } + } + } + } +} diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json new file mode 100644 index 000000000000..28eb14d398d7 --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "04cf684a-d41f-4550-9f70-7708a3a2283b", + "resourceGroupName": "000pikumar", + "vaultName": "PratikPrivatePreviewVault1", + "api-version": "2022-07-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PratikPrivatePreviewVault1/deletedBackupInstances/testInstance1", + "name": "testInstance1", + "type": "Microsoft.DataProtection/backupVaults/deletedBackupInstances", + "properties": { + "friendlyName": "testInstance1", + "dataSourceInfo": { + "resourceID": "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb", + "resourceUri": "", + "datasourceType": "Microsoft.DBforPostgreSQL/servers/databases", + "resourceName": "testdb", + "resourceType": "Microsoft.DBforPostgreSQL/servers/databases", + "resourceLocation": "", + "objectType": "Datasource" + }, + "dataSourceSetInfo": { + "resourceID": "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest", + "resourceUri": "", + "datasourceType": "Microsoft.DBforPostgreSQL/servers/databases", + "resourceName": "viveksipgtest", + "resourceType": "Microsoft.DBforPostgreSQL/servers", + "resourceLocation": "", + "objectType": "DatasourceSet" + }, + "deletionInfo": { + "deletionTime": "2022-05-04T00:00:36.6660445Z", + "scheduledPurgeTime": "2022-05-20T00:00:36.6660445Z", + "billingEndDate": "2022-05-06T00:00:36.6660445Z", + "deleteActivityID": "1e9ec790-d198-4efb-bbd7-e4669d5351a4" + }, + "policyInfo": { + "policyId": "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PratikPrivatePreviewVault1/backupPolicies/PratikPolicy1" + }, + "protectionStatus": { + "status": "SoftDeleted" + }, + "provisioningState": "Succeeded", + "objectType": "DeletedBackupInstance" + } + } + ] + } + } + } +} diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json new file mode 100644 index 000000000000..cc813cee873a --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "04cf684a-d41f-4550-9f70-7708a3a2283b", + "resourceGroupName": "testrg", + "vaultName": "testvault", + "backupInstanceName": "testbi", + "api-version": "2022-07-01-preview" + }, + "responses": { + "202": { + "headers": { + "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=2022-07-01-preview", + "Azure-AsyncOperation": "https://api-dogfood.resources.windows-int.net/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/testrg/providers/Microsoft.DataProtection/backupVaults/testvault/operationStatus/ZTA4YjQ0ZGYtYmNkNS00YTk1LWFjZTMtOTc1MjNmZWIxYWZlO2Y1ODg1MzA3LWJkNjItNDQ2OC05ZjZlLTJkMGM2NjNiNmJmNg==?api-version=2022-07-01-preview", + "Retry-After": "60" + } + }, + "200": {} + } +} diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json new file mode 100644 index 000000000000..5bc8e272dc6b --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "5e13b949-1218-4d18-8b99-7e12155ec4f7", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "resourceGuardProxyName": "swaggerExample", + "api-version": "2022-10-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json new file mode 100644 index 000000000000..600aab1a60fc --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "5e13b949-1218-4d18-8b99-7e12155ec4f7", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "resourceGuardProxyName": "swaggerExample", + "api-version": "2022-10-01-preview" + }, + "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/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json new file mode 100644 index 000000000000..d4bd2a838101 --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "5e13b949-1218-4d18-8b99-7e12155ec4f7", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "api-version": "2022-10-01-preview" + }, + "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/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json new file mode 100644 index 000000000000..eef2505e6a7e --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "5e13b949-1218-4d18-8b99-7e12155ec4f7", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "resourceGuardProxyName": "swaggerExample", + "api-version": "2022-10-01-preview", + "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/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json new file mode 100644 index 000000000000..617606c31ec2 --- /dev/null +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "5e13b949-1218-4d18-8b99-7e12155ec4f7", + "vaultName": "sampleVault", + "resourceGroupName": "SampleResourceGroup", + "resourceGuardProxyName": "swaggerExample", + "api-version": "2022-10-01-preview", + "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" + } + } + } +} diff --git a/specification/dataprotection/resource-manager/readme.md b/specification/dataprotection/resource-manager/readme.md index e488aa2354dd..e861fe1e3fe2 100644 --- a/specification/dataprotection/resource-manager/readme.md +++ b/specification/dataprotection/resource-manager/readme.md @@ -28,7 +28,7 @@ These are the global settings for the DataProtection API. title: Data Protection Client description: Open API 2.0 Specs for Azure Data Protection service openapi-type: arm -tag: package-2022-10-preview +tag: package-preview-2022-10 csharp-sdks-folder: ./Generated/CSharp python-sdks-folder: ./Generated/Python go-sdk-folder: ./Generated/Golang @@ -46,6 +46,15 @@ semantic-validator: true message-format: json ``` + +### Tag: package-preview-2022-10 + +These settings apply only when `--tag=package-preview-2022-10` is specified on the command line. + +```yaml $(tag) == 'package-preview-2022-10' +input-file: + - Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json +``` ### Tag: package-2022-10-preview These settings apply only when `--tag=package-2022-10-preview` is specified on the command line. @@ -59,10 +68,11 @@ input-file: These settings apply only when `--tag=package-preview-2022-09` is specified on the command line. -```yaml $(tag) == 'package-preview-2022-09' +``` yaml $(tag) == 'package-preview-2022-09' input-file: - Microsoft.DataProtection/preview/2022-09-01-preview/dataprotection.json ``` + ### Tag: package-2022-05 These settings apply only when `--tag=package-2022-05` is specified on the command line. From a275646a5d4fa64fd4fbb7694d479bc97b51ad50 Mon Sep 17 00:00:00 2001 From: Mayank Aggarwal Date: Thu, 20 Oct 2022 12:45:39 +0530 Subject: [PATCH 2/5] Fixing completeness from 2022-09-01-preview --- .../2022-10-01-preview/dataprotection.json | 169 +++++++++++++++++- 1 file changed, 168 insertions(+), 1 deletion(-) diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json index 54076da95600..a59757f2b0bc 100644 --- a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json @@ -4497,6 +4497,65 @@ }, "x-ms-discriminator-value": "AzureOperationalStoreParameters" }, + "KubernetesClusterBackupDatasourceParameters": { + "description": "Parameters for Kubernetes Cluster Backup Datasource", + "required": [ + "snapshotVolumes", + "includeClusterScopeResources" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/BackupDatasourceParameters" + } + ], + "properties": { + "snapshotVolumes": { + "description": "Gets or sets the volume snapshot property. This property if enabled will take volume snapshots during restore.", + "type": "boolean" + }, + "includeClusterScopeResources": { + "description": "Gets or sets the include cluster resources property. This property if enabled will include cluster scope resources during restore.", + "type": "boolean" + }, + "includedNamespaces": { + "description": "Gets or sets the include namespaces property. This property sets the namespaces to be included during restore.", + "items": { + "type": "string" + }, + "type": "array" + }, + "excludedNamespaces": { + "description": "Gets or sets the exclude namespaces property. This property sets the namespaces to be excluded during restore.", + "items": { + "type": "string" + }, + "type": "array" + }, + "includedResourceTypes": { + "description": "Gets or sets the include resource types property. This property sets the resource types to be included during restore.", + "items": { + "type": "string" + }, + "type": "array" + }, + "excludedResourceTypes": { + "description": "Gets or sets the exclude resource types property. This property sets the resource types to be excluded during restore.", + "items": { + "type": "string" + }, + "type": "array" + }, + "labelSelectors": { + "description": "Gets or sets the LabelSelectors property. This property sets the resource with such label selectors to be included during restore.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "x-ms-discriminator-value": "KubernetesClusterBackupDatasourceParameters" + }, "AzureRetentionRule": { "allOf": [ { @@ -5244,6 +5303,21 @@ }, "discriminator": "objectType" }, + "BackupDatasourceParameters": { + "description": "Parameters for Backup Datasource", + "required": [ + "objectType" + ], + "type": "object", + "properties": { + "objectType": { + "description": "Type of the specific object - used for deserializing", + "type": "string", + "readOnly": false + } + }, + "discriminator": "objectType" + }, "Day": { "description": "Day of the week", "properties": { @@ -6138,6 +6212,14 @@ "$ref": "#/definitions/DataStoreParameters" }, "x-ms-identifiers": [] + }, + "backupDatasourceParametersList": { + "description": "Gets or sets the Backup Data Source Parameters", + "type": "array", + "items": { + "$ref": "#/definitions/BackupDatasourceParameters" + }, + "x-ms-identifiers": [] } } }, @@ -6228,6 +6310,91 @@ }, "x-ms-discriminator-value": "KubernetesPVRestoreCriteria" }, + "KubernetesClusterRestoreCriteria": { + "description": "kubernetes Cluster Backup target info for restore operation", + "required": [ + "includeClusterScopeResources" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ItemLevelRestoreCriteria" + } + ], + "properties": { + "includeClusterScopeResources": { + "description": "Gets or sets the include cluster resources property. This property if enabled will include cluster scope resources during restore.", + "type": "boolean" + }, + "includedNamespaces": { + "description": "Gets or sets the include namespaces property. This property sets the namespaces to be included during restore.", + "items": { + "type": "string" + }, + "type": "array" + }, + "excludedNamespaces": { + "description": "Gets or sets the exclude namespaces property. This property sets the namespaces to be excluded during restore.", + "items": { + "type": "string" + }, + "type": "array" + }, + "includedResourceTypes": { + "description": "Gets or sets the include resource types property. This property sets the resource types to be included during restore.", + "items": { + "type": "string" + }, + "type": "array" + }, + "excludedResourceTypes": { + "description": "Gets or sets the exclude resource types property. This property sets the resource types to be excluded during restore.", + "items": { + "type": "string" + }, + "type": "array" + }, + "labelSelectors": { + "description": "Gets or sets the LabelSelectors property. This property sets the resource with such label selectors to be included during restore.", + "items": { + "type": "string" + }, + "type": "array" + }, + "persistentVolumeRestoreMode": { + "description": "Gets or sets the PV Restore Mode property. This property sets whether volumes needs to be restored.", + "enum": [ + "RestoreWithVolumeData", + "RestoreWithoutVolumeData" + ], + "type": "string", + "x-ms-enum": { + "name": "PersistentVolumeRestoreMode", + "modelAsString": true + } + }, + "conflictPolicy": { + "description": "Gets or sets the Conflict Policy property. This property sets policy during conflict of resources during restore.", + "enum": [ + "Skip", + "Patch" + ], + "type": "string", + "x-ms-enum": { + "name": "ExistingResourcePolicy", + "modelAsString": true + } + }, + "namespaceMappings": { + "description": "Gets or sets the Namespace Mappings property. This property sets if namespace needs to be change during restore.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "x-ms-discriminator-value": "KubernetesClusterRestoreCriteria" + }, "RecoveryPointDataStoreDetails": { "description": "RecoveryPoint datastore details", "properties": { @@ -7234,4 +7401,4 @@ ] } ] -} +} \ No newline at end of file From 82d7edc05474d590a39452b761a886c5aa0b9b03 Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Fri, 21 Oct 2022 13:15:49 +0530 Subject: [PATCH 3/5] reverted readme --- .../dataprotection/resource-manager/readme.md | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/specification/dataprotection/resource-manager/readme.md b/specification/dataprotection/resource-manager/readme.md index e861fe1e3fe2..e488aa2354dd 100644 --- a/specification/dataprotection/resource-manager/readme.md +++ b/specification/dataprotection/resource-manager/readme.md @@ -28,7 +28,7 @@ These are the global settings for the DataProtection API. title: Data Protection Client description: Open API 2.0 Specs for Azure Data Protection service openapi-type: arm -tag: package-preview-2022-10 +tag: package-2022-10-preview csharp-sdks-folder: ./Generated/CSharp python-sdks-folder: ./Generated/Python go-sdk-folder: ./Generated/Golang @@ -46,15 +46,6 @@ semantic-validator: true message-format: json ``` - -### Tag: package-preview-2022-10 - -These settings apply only when `--tag=package-preview-2022-10` is specified on the command line. - -```yaml $(tag) == 'package-preview-2022-10' -input-file: - - Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json -``` ### Tag: package-2022-10-preview These settings apply only when `--tag=package-2022-10-preview` is specified on the command line. @@ -68,11 +59,10 @@ input-file: These settings apply only when `--tag=package-preview-2022-09` is specified on the command line. -``` yaml $(tag) == 'package-preview-2022-09' +```yaml $(tag) == 'package-preview-2022-09' input-file: - Microsoft.DataProtection/preview/2022-09-01-preview/dataprotection.json ``` - ### Tag: package-2022-05 These settings apply only when `--tag=package-2022-05` is specified on the command line. From 099ebe5fe57cff184f73192c7c14b8e1c50bbf4c Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Fri, 21 Oct 2022 14:14:55 +0530 Subject: [PATCH 4/5] resolved prettier --- .../preview/2022-10-01-preview/dataprotection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json index a59757f2b0bc..51c5548a8ec3 100644 --- a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/dataprotection.json @@ -7401,4 +7401,4 @@ ] } ] -} \ No newline at end of file +} From c7c3433115e15726f4ad92bd1ce4e79f2da6374e Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Thu, 27 Oct 2022 09:05:24 +0530 Subject: [PATCH 5/5] fixed model validation issues --- .../ListBackupInstancesExtensionRouting.json | 2 +- .../GetDeletedBackupInstance.json | 2 +- .../ListDeletedBackupInstances.json | 2 +- .../UndeleteDeletedBackupInstance.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json index 9ccad2d78611..2379383e4acc 100644 --- a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json @@ -1,7 +1,7 @@ { "parameters": { "resourceId": "subscriptions/36d32b25-3dc7-41b0-bde1-397500644591/resourceGroups/testRG/providers/Microsoft.Compute/disks/testDisk", - "api-version": "2022-03-31-preview" + "api-version": "2022-10-01-preview" }, "responses": { "200": { diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json index cf7b783e12af..e72317e2cb3d 100644 --- a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json @@ -3,7 +3,7 @@ "subscriptionId": "04cf684a-d41f-4550-9f70-7708a3a2283b", "resourceGroupName": "000pikumar", "vaultName": "PratikPrivatePreviewVault1", - "api-version": "2022-07-01-preview", + "api-version": "2022-10-01-preview", "backupInstanceName": "testInstance1" }, "responses": { diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json index 28eb14d398d7..638cd034585b 100644 --- a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json @@ -3,7 +3,7 @@ "subscriptionId": "04cf684a-d41f-4550-9f70-7708a3a2283b", "resourceGroupName": "000pikumar", "vaultName": "PratikPrivatePreviewVault1", - "api-version": "2022-07-01-preview" + "api-version": "2022-10-01-preview" }, "responses": { "200": { diff --git a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json index cc813cee873a..a511e1244b24 100644 --- a/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json +++ b/specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2022-10-01-preview/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json @@ -4,7 +4,7 @@ "resourceGroupName": "testrg", "vaultName": "testvault", "backupInstanceName": "testbi", - "api-version": "2022-07-01-preview" + "api-version": "2022-10-01-preview" }, "responses": { "202": {