{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "title": "RecoveryServicesClient",
    "version": "2016-06-01",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2016-06-01/vaultusages.json",
        "version": "2.0"
      }
    ],
    "x-preferred": true,
    "x-providerName": "azure.com",
    "x-serviceName": "recoveryservices-vaultusages",
    "x-tags": [
      "Azure",
      "Microsoft"
    ],
    "x-datafire": {
      "name": "azure_recoveryservices_vaultusages",
      "type": "openapi"
    }
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account."
      },
      "type": "oauth2"
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ],
  "parameters": {
    "ApiVersion": {
      "description": "Client Api Version.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "ResourceGroupName": {
      "description": "The name of the resource group where the recovery services vault is present.",
      "in": "path",
      "name": "resourceGroupName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "SubscriptionId": {
      "description": "The subscription Id.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string"
    },
    "VaultName": {
      "description": "The name of the recovery services vault.",
      "in": "path",
      "name": "vaultName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    }
  },
  "paths": {
    "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/usages": {
      "get": {
        "deprecated": false,
        "description": "Fetches the usages of the vault.",
        "operationId": "Usages_ListByVaults",
        "parameters": [
          {
            "$ref": "#/parameters/SubscriptionId"
          },
          {
            "$ref": "#/parameters/ApiVersion"
          },
          {
            "$ref": "#/parameters/ResourceGroupName"
          },
          {
            "$ref": "#/parameters/VaultName"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/VaultUsageList"
            }
          }
        },
        "tags": [
          "VaultUsages"
        ],
        "x-ms-examples": {
          "Gets vault usages": {
            "parameters": {
              "api-version": "2016-06-01",
              "resourceGroupName": "Default-RecoveryServices-ResourceGroup",
              "subscriptionId": "77777777-b0c6-47a2-b37c-d8e65a629c18",
              "vaultName": "swaggerExample"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "currentValue": 6,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Backup management servers",
                        "value": "MABContainersCount"
                      },
                      "unit": "Count"
                    },
                    {
                      "currentValue": 3,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Backup items/Azure virtual machine backup",
                        "value": "ProtectedItemCount"
                      },
                      "unit": "Count"
                    },
                    {
                      "currentValue": 0,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Critical",
                        "value": "ProtectedItemCriticalCount"
                      },
                      "unit": "Count"
                    },
                    {
                      "currentValue": 0,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Warning",
                        "value": "ProtectedItemWarningCount"
                      },
                      "unit": "Count"
                    },
                    {
                      "currentValue": 0,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Azure Virtual Machines",
                        "value": "IaaSVMProtectedItemCount"
                      },
                      "unit": "Count"
                    },
                    {
                      "currentValue": 0,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Critical",
                        "value": "IaaSVMProtectedItemCriticalCount"
                      },
                      "unit": "Count"
                    },
                    {
                      "currentValue": 0,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Warning",
                        "value": "IaaSVMProtectedItemWarningCount"
                      },
                      "unit": "Count"
                    },
                    {
                      "currentValue": 0,
                      "limit": -1,
                      "name": {
                        "localizedValue": "File-Folders",
                        "value": "MABProtectedItemCount"
                      },
                      "unit": "Count"
                    },
                    {
                      "currentValue": 1,
                      "limit": -1,
                      "name": {
                        "localizedValue": "DPM Protected Items Count",
                        "value": "DPMProtectedItemCount"
                      },
                      "unit": "Count"
                    },
                    {
                      "currentValue": 2,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Azure Backup Server Protected Items Count",
                        "value": "AzureBackupServerProtectedItemCount"
                      },
                      "unit": "Count"
                    },
                    {
                      "currentValue": 0,
                      "limit": -1,
                      "name": {
                        "localizedValue": "In progress",
                        "value": "InProgressJobsCount"
                      },
                      "quotaPeriod": "P1D",
                      "unit": "Count"
                    },
                    {
                      "currentValue": 0,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Failed",
                        "value": "FailedJobsCount"
                      },
                      "quotaPeriod": "P1D",
                      "unit": "Count"
                    },
                    {
                      "currentValue": 117007930,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Cloud - GRS",
                        "value": "GRSStorageUsage"
                      },
                      "unit": "Bytes"
                    },
                    {
                      "currentValue": 0,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Cloud - LRS",
                        "value": "LRSStorageUsage"
                      },
                      "unit": "Bytes"
                    },
                    {
                      "currentValue": 5,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Protected Instances",
                        "value": "ManagedInstances"
                      },
                      "unit": "Count"
                    },
                    {
                      "currentValue": 0,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Dedup - GRS",
                        "value": "GRSDedupStorageUsage"
                      },
                      "unit": "Bytes"
                    },
                    {
                      "currentValue": 0,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Dedup - LRS",
                        "value": "LRSDedupStorageUsage"
                      },
                      "unit": "Bytes"
                    },
                    {
                      "currentValue": 117851553792,
                      "limit": -1,
                      "name": {
                        "localizedValue": "Backup Engines' Disk Used",
                        "value": "UsedDiskSize"
                      },
                      "unit": "Bytes"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": null
        }
      }
    }
  },
  "definitions": {
    "NameInfo": {
      "description": "The name of usage.",
      "properties": {
        "localizedValue": {
          "description": "Localized value of usage.",
          "type": "string"
        },
        "value": {
          "description": "Value of usage.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "VaultUsage": {
      "description": "Usages of a vault.",
      "properties": {
        "currentValue": {
          "description": "Current value of usage.",
          "format": "int64",
          "type": "integer"
        },
        "limit": {
          "description": "Limit of usage.",
          "format": "int64",
          "type": "integer"
        },
        "name": {
          "$ref": "#/definitions/NameInfo",
          "description": "Name of usage."
        },
        "nextResetTime": {
          "description": "Next reset time of usage.",
          "format": "date-time",
          "type": "string"
        },
        "quotaPeriod": {
          "description": "Quota period of usage.",
          "type": "string"
        },
        "unit": {
          "description": "Unit of the usage.",
          "enum": [
            "Count",
            "Bytes",
            "Seconds",
            "Percent",
            "CountPerSecond",
            "BytesPerSecond"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "UsagesUnit"
          }
        }
      },
      "type": "object"
    },
    "VaultUsageList": {
      "description": "Usage for vault.",
      "properties": {
        "value": {
          "description": "The list of usages for the given vault.",
          "items": {
            "$ref": "#/definitions/VaultUsage"
          },
          "type": "array"
        }
      },
      "type": "object"
    }
  }
}