Skip to content

Commit

Permalink
Adding PreBackup and PreRestore APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijithps18 committed Feb 22, 2025
1 parent 2eb767d commit cc5792e
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,122 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/preBackup": {
"post": {
"tags": [
"VolumesBackupValidation"
],
"description": "Validate whether a disk snapshot backup can be taken for list of volumes.",
"operationId": "VolumeGroups_Pre_Backup",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ElasticSanNameParameter"
},
{
"$ref": "#/parameters/VolumeGroupNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/VolumeNameList"
},
"description": "Volume Name List"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK -- Resource backup validation is successfully completed."
},
"201": {
"description": "Created -- Resource backup Validation started; operation will complete asynchronously."
},
"default": {
"description": "Error from the ElasticSan Resource Provider.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"VolumeGroups_Pre_Backup_MaximumSet_Gen": {
"$ref": "./examples/VolumeGroups_Pre_Backup_MaximumSet_Gen.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/preRestore": {
"post": {
"tags": [
"VolumesRestoreValidation"
],
"description": "Validate whether a list of backed up disk snapshots can be restored into ElasticSan volumes.",
"operationId": "VolumeGroups_Pre_Restore",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ElasticSanNameParameter"
},
{
"$ref": "#/parameters/VolumeGroupNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DiskSnapshotList"
},
"description": "Disk Snapshot List"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK -- Resource Restore validation is successfully completed."
},
"201": {
"description": "Created -- Resource Restore Validation started; operation will complete asynchronously."
},
"default": {
"description": "Error from the ElasticSan Resource Provider.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"VolumeGroups_Pre_Restore_MaximumSet_Gen": {
"$ref": "./examples/VolumeGroups_Pre_Restore_MaximumSet_Gen.json"
}
}
}
}
},
"parameters": {
Expand Down Expand Up @@ -2751,6 +2867,34 @@
"description": "Fully qualified resource ID of the volume. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}\""
}
}
},
"VolumeNameList": {
"type": "object",
"description": "object to hold array of volume names",
"properties" : {
"volumeNames": {
"type": "array",
"description": "array of volume names",
"items": {
"type": "string",
"description": "volume name"
}
}
}
},
"DiskSnapshotList": {
"type": "object",
"description": "object to hold array of Disk Snapshot ARM IDs",
"properties" : {
"diskSnapshotIds": {
"type": "array",
"description": "array of DiskSnapshot ARM IDs",
"items": {
"type": "string",
"description": "Fully qualified ARM Resource ID of Disk Snapshot"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{

Check failure on line 1 in specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2025-03-01/examples/VolumeGroups_Pre_Backup_MaximumSet_Gen.json

View check run for this annotation

Azure Pipelines / Swagger PrettierCheck

specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2025-03-01/examples/VolumeGroups_Pre_Backup_MaximumSet_Gen.json#L1

specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2025-03-01/examples/VolumeGroups_Pre_Backup_MaximumSet_Gen.json(1,1): error : Code style issues found, please run prettier. > npm install > npx prettier --write specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2025-03-01/examples/VolumeGroups_Pre_Backup_MaximumSet_Gen.json
"title": "VolumeGroups_Pre_Backup_MaximumSet",
"operationId": "VolumeGroups_Pre_Backup",
"parameters": {
"subscriptionId": "67B407F8-ED08-4144-B074-BA08FF4FB978",
"resourceGroupName": "rgelasticsan",
"elasticSanName": "elasticSanName",
"volumeGroupName": "volumeGroupName",
"parameters": {
"volumeNames": [
"volume1"
]
},
"api-version": "2025-03-01"
},
"responses": {
"200": {},
"201": {
"headers": {
"location": "https://contoso.com/operationstatus"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{

Check failure on line 1 in specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2025-03-01/examples/VolumeGroups_Pre_Restore_MaximumSet_Gen.json

View check run for this annotation

Azure Pipelines / Swagger PrettierCheck

specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2025-03-01/examples/VolumeGroups_Pre_Restore_MaximumSet_Gen.json#L1

specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2025-03-01/examples/VolumeGroups_Pre_Restore_MaximumSet_Gen.json(1,1): error : Code style issues found, please run prettier. > npm install > npx prettier --write specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2025-03-01/examples/VolumeGroups_Pre_Restore_MaximumSet_Gen.json
"title": "VolumeGroups_Pre_Restore_MaximumSet",
"operationId": "VolumeGroups_Pre_Restore",
"parameters": {
"subscriptionId": "67B407F8-ED08-4144-B074-BA08FF4FB978",
"resourceGroupName": "rgelasticsan",
"elasticSanName": "elasticSanName",
"volumeGroupName": "volumeGroupName",
"parameters": {
"diskSnapshotIds": [
"subscriptions/67B407F8-ED08-4144-B074-BA08FF4FB978/resourceGroups/rgelasticsan/providers/Microsoft.Compute/snapshots/disksnapshot1"
]
},
"api-version": "2025-03-01"
},
"responses": {
"200": {},
"201": {
"headers": {
"location": "https://contoso.com/operationstatus"
}
}
}
}

0 comments on commit cc5792e

Please sign in to comment.