Skip to content

Commit

Permalink
Adding backupUsageSummaries API in 2018-12-20 version[Passive stamp] (A…
Browse files Browse the repository at this point in the history
…zure#14309)

* Adding backupUsageSummaries API in 2018-12-20 version[Passive stamp]

* Adding example

* Adding example

* Adding default error response

* Fixing operationId

* Revert "Fixing operationId"

This reverts commit f7327d7.

* Fixing operationId for getbackupusageSummaries

* Adding nextLink

* Adding nextLink in definition

* Update

* Reverting nextLink
  • Loading branch information
pratimaupadhyay02 authored and mkarmark committed Jul 20, 2021
1 parent 13e436c commit 745c564
Show file tree
Hide file tree
Showing 3 changed files with 263 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,72 @@
"application/json"
],
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries": {
"get": {
"tags": [
"BackupUsageSummaries_CRR"
],
"description": "Fetches the backup management usage summaries of the vault.",
"operationId": "BackupUsageSummariesCRR_List",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/VaultName"
},
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/SubscriptionId"
},
{
"name": "$filter",
"in": "query",
"description": "OData filter options.",
"required": false,
"type": "string"
},
{
"name": "$skipToken",
"in": "query",
"description": "skipToken Filter.",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/BackupManagementUsageList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/NewErrorResponse"
}
}
},
"x-ms-odata": "#/definitions/BMSBackupSummariesQueryObject",
"x-ms-pageable": {
"nextLinkName": null
},
"x-ms-examples": {
"Get Protected Items Usages Summary": {
"$ref": "./examples/Common/BackupProtectedItem_UsageSummary_Get.json"
},
"Get Protected Containers Usages Summary": {
"$ref": "./examples/Common/BackupProtectionContainers_UsageSummary_Get.json"
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties": {
"get": {
"tags": [
Expand Down Expand Up @@ -707,6 +773,97 @@
}
},
"definitions": {
"BackupManagementUsage": {
"description": "Backup management usages of a vault.",
"type": "object",
"properties": {
"unit": {
"description": "Unit of the usage.",
"enum": [
"Count",
"Bytes",
"Seconds",
"Percent",
"CountPerSecond",
"BytesPerSecond"
],
"type": "string",
"x-ms-enum": {
"name": "UsagesUnit",
"modelAsString": true
}
},
"quotaPeriod": {
"description": "Quota period of usage.",
"type": "string"
},
"nextResetTime": {
"format": "date-time",
"description": "Next reset time of usage.",
"type": "string"
},
"currentValue": {
"format": "int64",
"description": "Current value of usage.",
"type": "integer"
},
"limit": {
"format": "int64",
"description": "Limit of usage.",
"type": "integer"
},
"name": {
"$ref": "#/definitions/NameInfo",
"description": "Name of usage."
}
}
},
"NameInfo": {
"description": "The name of usage.",
"type": "object",
"properties": {
"value": {
"description": "Value of usage.",
"type": "string"
},
"localizedValue": {
"description": "Localized value of usage.",
"type": "string"
}
}
},
"BackupManagementUsageList": {
"description": "Backup management usage for vault.",
"type": "object",
"properties": {
"value": {
"description": "The list of backup management usages for the given vault.",
"type": "array",
"items": {
"$ref": "#/definitions/BackupManagementUsage"
}
}
}
},
"BMSBackupSummariesQueryObject": {
"description": "Query parameters to fetch backup summaries.",
"type": "object",
"properties": {
"type": {
"description": "Backup management type for this container.",
"enum": [
"Invalid",
"BackupProtectedItemCountSummary",
"BackupProtectionContainerCountSummary"
],
"type": "string",
"x-ms-enum": {
"name": "Type",
"modelAsString": true
}
}
}
},
"NewErrorResponse": {
"properties": {
"error": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testRG",
"vaultName": "testVault",
"api-version": "2017-07-01",
"$filter": "type eq 'BackupProtectedItemCountSummary'"
},
"responses": {
"200": {
"body": {
"value": [
{
"unit": "Count",
"currentValue": 7,
"limit": -1,
"name": {
"value": "AzureIaasVM",
"localizedValue": "Azure Virtual Machine"
}
},
{
"unit": "Count",
"currentValue": 3,
"limit": -1,
"name": {
"value": "MAB",
"localizedValue": "Azure Backup Agent"
}
},
{
"unit": "Count",
"currentValue": 1,
"limit": -1,
"name": {
"value": "AzureBackupServer",
"localizedValue": "Azure Backup Server"
}
},
{
"unit": "Count",
"currentValue": 2,
"limit": -1,
"name": {
"value": "AzureStorage",
"localizedValue": "Azure Storage (Azure Files)"
}
},
{
"unit": "Count",
"currentValue": 2,
"limit": -1,
"name": {
"value": "AzureWorkload",
"localizedValue": "SQL in Azure VM"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "testRG",
"vaultName": "testVault",
"api-version": "2017-07-01",
"$filter": "type eq 'BackupProtectionContainerCountSummary'"
},
"responses": {
"200": {
"body": {
"value": [
{
"unit": "Count",
"currentValue": 2,
"limit": -1,
"name": {
"value": "AzureBackupServer",
"localizedValue": "Azure Backup Server"
}
},
{
"unit": "Count",
"currentValue": 3,
"limit": -1,
"name": {
"value": "MAB",
"localizedValue": "Azure Backup Agent"
}
},
{
"unit": "Count",
"currentValue": 1,
"limit": -1,
"name": {
"value": "AzureWorkload",
"localizedValue": "SQL in Azure VM"
}
}
]
}
}
}
}

0 comments on commit 745c564

Please sign in to comment.