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/replicationusages.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: recoveryservices-replicationusages
  x-tags:
    - Azure
    - Microsoft
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}/replicationUsages":
    get:
      deprecated: false
      description: Fetches the replication usages of the vault.
      operationId: ReplicationUsages_List
      parameters:
        - $ref: "#/parameters/SubscriptionId"
        - $ref: "#/parameters/ApiVersion"
        - $ref: "#/parameters/ResourceGroupName"
        - $ref: "#/parameters/VaultName"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ReplicationUsageList"
      tags:
        - ReplicationUsages
      x-ms-examples:
        Gets Replication usages of vault:
          parameters:
            api-version: 2016-06-01
            resourceGroupName: avrai7517RG1
            subscriptionId: 6808dbbc-98c7-431f-a1b1-9580902423b7
            vaultName: avrai7517Vault1
          responses:
            "200":
              body:
                value:
                  - jobsSummary:
                      failedJobs: 0
                      inProgressJobs: 0
                      suspendedJobs: 0
                    monitoringSummary:
                      deprecatedProviderCount: 0
                      eventsCount: 0
                      supportedProviderCount: 0
                      unHealthyProviderCount: 0
                      unHealthyVmCount: 0
                      unsupportedProviderCount: 0
                    protectedItemCount: 2
                    recoveryPlanCount: 1
                    registeredServersCount: 2
      x-ms-pageable:
        nextLinkName: null
definitions:
  JobsSummary:
    description: Summary of the replication job data for this vault.
    properties:
      failedJobs:
        description: Count of failed jobs.
        type: integer
      inProgressJobs:
        description: Count of in-progress jobs.
        type: integer
      suspendedJobs:
        description: Count of suspended jobs.
        type: integer
    type: object
  MonitoringSummary:
    description: Summary of the replication monitoring data for this vault.
    properties:
      deprecatedProviderCount:
        description: Count of all deprecated recovery service providers.
        type: integer
      eventsCount:
        description: Count of all critical warnings.
        type: integer
      supportedProviderCount:
        description: Count of all the supported recovery service providers.
        type: integer
      unHealthyProviderCount:
        description: Count of unhealthy replication providers.
        type: integer
      unHealthyVmCount:
        description: Count of unhealthy VMs.
        type: integer
      unsupportedProviderCount:
        description: Count of all the unsupported recovery service providers.
        type: integer
    type: object
  ReplicationUsage:
    description: Replication usages of a vault.
    properties:
      jobsSummary:
        $ref: "#/definitions/JobsSummary"
        description: Summary of the replication jobs data for this vault.
      monitoringSummary:
        $ref: "#/definitions/MonitoringSummary"
        description: Summary of the replication monitoring data for this vault.
      protectedItemCount:
        description: Number of replication protected items for this vault.
        type: integer
      recoveryPlanCount:
        description: Number of replication recovery plans for this vault.
        type: integer
      recoveryServicesProviderAuthType:
        description: The authentication type of recovery service providers in the vault.
        type: integer
      registeredServersCount:
        description: Number of servers registered to this vault.
        type: integer
    type: object
  ReplicationUsageList:
    description: Replication usages for vault.
    properties:
      value:
        description: The list of replication usages for the given vault.
        items:
          $ref: "#/definitions/ReplicationUsage"
        type: array
    type: object
