swagger: "2.0"
schemes:
  - https
host: adminmanagement.local.azurestack.external
info:
  description: The Admin Backup Management Client.
  title: BackupManagementClient
  version: 2016-05-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/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/BackupLocations.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: azsadmin-BackupLocations
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Authorization uses an Azure Active Directory OAuth2 flow.
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters:
  BackupLocationObjectParameter:
    description: Backup location object.
    in: body
    name: backup
    required: true
    schema:
      $ref: "#/definitions/BackupLocation"
    x-ms-parameter-location: method
  BackupLocationParameter:
    description: Name of the backup location.
    in: path
    name: location
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations":
    get:
      description: Returns the list of backup locations.
      operationId: BackupLocations_List
      parameters:
        - description: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: Name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - default: 2016-05-01
          description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/BackupLocationList"
      tags:
        - BackupLocations
      x-ms-examples:
        Returns the list of backup locations.:
          parameters:
            api-version: 2016-05-01
            resourceGroupName: System.local
            subscriptionId: 11111111-2222-3333-4444-555555555555
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/resourceGroups/System.local/providers/Microsoft.Backup.Admin/backupLocations/local
                    location: local
                    name: local
                    properties:
                      externalStoreDefault:
                        availableCapacity: 10GB
                        isBackupSchedulerEnabled: false
                        path: \\\\100.68.88.192\\C$\\backup_test
                        userName: AzureStack\\Administrator
                    tags: {}
                    type: Microsoft.Backup.Admin/backupLocations
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}":
    get:
      description: Returns a specific backup location based on name.
      operationId: BackupLocations_Get
      parameters:
        - description: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: Name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - $ref: "#/parameters/BackupLocationParameter"
        - default: 2016-05-01
          description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/BackupLocation"
        "404":
          description: NOT FOUND
      tags:
        - BackupLocations
      x-ms-examples:
        Returns a specific backup location based on name.:
          parameters:
            api-version: 2016-05-01
            location: local
            resourceGroupName: System.local
            subscriptionId: 11111111-2222-3333-4444-555555555555
          responses:
            "200":
              body:
                id: /subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/resourceGroups/System.local/providers/Microsoft.Backup.Admin/backupLocations/local
                location: local
                name: local
                properties:
                  externalStoreDefault:
                    availableCapacity: 10GB
                    isBackupSchedulerEnabled: false
                    path: \\\\100.68.88.192\\C$\\backup_test
                    userName: AzureStack\\Administrator
                tags: {}
                type: Microsoft.Backup.Admin/backupLocations
            "404": {}
    put:
      description: Update a backup location.
      operationId: BackupLocations_Update
      parameters:
        - description: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: Name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - $ref: "#/parameters/BackupLocationParameter"
        - default: 2016-05-01
          description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
        - $ref: "#/parameters/BackupLocationObjectParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/BackupLocation"
        "202":
          description: ACCEPTED
          schema:
            $ref: "#/definitions/BackupLocation"
        "404":
          description: NOT FOUND
      tags:
        - BackupLocations
      x-ms-examples:
        Update new backup location.:
          parameters:
            api-version: 2016-05-01
            backup:
              location: local
              properties:
                externalStoreDefault:
                  availableCapacity: 10GB
                  encryptionKeyBase64: YVVOa0J3S2xTamhHZ1lyRU9wQ1pKQ0xWanhjaHlkaU5ZQnNDeHRPTGFQenJKdWZsRGtYT25oYmlaa1RMVWFKeQ==
                  isBackupSchedulerEnabled: false
                  password: secretPassword
                  path: \\192.168.1.1\Share
                  userName: UserName
              tags: {}
            location: local
            resourceGroupName: System.local
            subscriptionId: 11111111-2222-3333-4444-555555555555
          responses:
            "200":
              body:
                id: /subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/resourcegroups/System.local/providers/Microsoft.Backup.Admin/backupLocations/local
                location: local
                name: local
                properties:
                  externalStoreDefault:
                    availableCapacity: 10GB
                    encryptionKeyBase64: ""
                    isBackupSchedulerEnabled: false
                    password: ""
                    path: \\192.168.1.1\Share
                    userName: UserName
                tags: {}
                type: Microsoft.Backup.Admin/backupLocations
            "202":
              body:
                id: /subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/resourcegroups/System.local/providers/Microsoft.Backup.Admin/backupLocations/local
                location: local
                name: local
                properties:
                  externalStoreDefault:
                    availableCapacity: 10GB
                    encryptionKeyBase64: ""
                    isBackupSchedulerEnabled: false
                    password: ""
                    path: \\192.168.1.1\Share
                    userName: UserName
                tags: {}
                type: Microsoft.Backup.Admin/backupLocations
            "404": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/createBackup":
    post:
      description: Back up a specific location.
      operationId: BackupLocations_CreateBackup
      parameters:
        - description: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: Name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - $ref: "#/parameters/BackupLocationParameter"
        - default: 2016-05-01
          description: Client API version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            allOf:
              - description: Base Resource Object
                properties:
                  id:
                    description: URI of the resource.
                    readOnly: true
                    type: string
                  location:
                    description: Location of the resource.
                    readOnly: false
                    type: string
                  name:
                    description: Name of the resource.
                    readOnly: true
                    type: string
                  tags:
                    additionalProperties:
                      type: string
                    description: List of key value pairs.
                    readOnly: false
                    type: object
                  type:
                    description: Type of resource.
                    readOnly: true
                    type: string
                type: object
                x-ms-azure-resource: true
            description: Information related to a backup.
            properties:
              properties:
                description: Properties for a backup.
                properties:
                  backupInfo:
                    description: Holds information for a backup.
                    properties:
                      backupDataVersion:
                        description: Version of the backup data.
                        readOnly: true
                        type: string
                      backupId:
                        description: Unique GUID for the backup.
                        readOnly: true
                        type: string
                      createdDateTime:
                        description: Creation time of the backup.
                        format: date-time
                        readOnly: true
                        type: string
                      deploymentID:
                        description: Deployment Id of the stamp.
                        readOnly: true
                        type: string
                      oemVersion:
                        description: OEM version.
                        readOnly: true
                        type: string
                      roleStatus:
                        description: object
                        items:
                          description: Backup status for a role.
                          properties:
                            roleName:
                              description: Name of the role.
                              type: string
                            status:
                              description: Status of an operation.
                              enum:
                                - Creating
                                - Queued
                                - Running
                                - Deleted
                                - Failed
                                - PartialSucceeded
                                - Succeeded
                              type: string
                              x-ms-enum:
                                modelAsString: false
                                name: OperationStatus
                          type: object
                        type: array
                      stampVersion:
                        description: Current version.
                        readOnly: true
                        type: string
                      status:
                        description: Status of an operation.
                        enum:
                          - Creating
                          - Queued
                          - Running
                          - Deleted
                          - Failed
                          - PartialSucceeded
                          - Succeeded
                        type: string
                        x-ms-enum:
                          modelAsString: false
                          name: OperationStatus
                      timeTakenToCreate:
                        description: Duration to create the backup.
                        readOnly: true
                        type: string
                    type: object
            type: object
        "202":
          description: ACCEPTED
          schema:
            allOf:
              - description: Base Resource Object
                properties:
                  id:
                    description: URI of the resource.
                    readOnly: true
                    type: string
                  location:
                    description: Location of the resource.
                    readOnly: false
                    type: string
                  name:
                    description: Name of the resource.
                    readOnly: true
                    type: string
                  tags:
                    additionalProperties:
                      type: string
                    description: List of key value pairs.
                    readOnly: false
                    type: object
                  type:
                    description: Type of resource.
                    readOnly: true
                    type: string
                type: object
                x-ms-azure-resource: true
            description: Information related to a backup.
            properties:
              properties:
                description: Properties for a backup.
                properties:
                  backupInfo:
                    description: Holds information for a backup.
                    properties:
                      backupDataVersion:
                        description: Version of the backup data.
                        readOnly: true
                        type: string
                      backupId:
                        description: Unique GUID for the backup.
                        readOnly: true
                        type: string
                      createdDateTime:
                        description: Creation time of the backup.
                        format: date-time
                        readOnly: true
                        type: string
                      deploymentID:
                        description: Deployment Id of the stamp.
                        readOnly: true
                        type: string
                      oemVersion:
                        description: OEM version.
                        readOnly: true
                        type: string
                      roleStatus:
                        description: object
                        items:
                          description: Backup status for a role.
                          properties:
                            roleName:
                              description: Name of the role.
                              type: string
                            status:
                              description: Status of an operation.
                              enum:
                                - Creating
                                - Queued
                                - Running
                                - Deleted
                                - Failed
                                - PartialSucceeded
                                - Succeeded
                              type: string
                              x-ms-enum:
                                modelAsString: false
                                name: OperationStatus
                          type: object
                        type: array
                      stampVersion:
                        description: Current version.
                        readOnly: true
                        type: string
                      status:
                        description: Status of an operation.
                        enum:
                          - Creating
                          - Queued
                          - Running
                          - Deleted
                          - Failed
                          - PartialSucceeded
                          - Succeeded
                        type: string
                        x-ms-enum:
                          modelAsString: false
                          name: OperationStatus
                      timeTakenToCreate:
                        description: Duration to create the backup.
                        readOnly: true
                        type: string
                    type: object
            type: object
      tags:
        - BackupLocations
      x-ms-examples:
        Back up a specific location.:
          parameters:
            api-version: 2016-05-01
            location: local
            resourceGroupName: System.local
            subscriptionId: 11111111-2222-3333-4444-555555555555
          responses:
            "200":
              body:
                id: /subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/resourceGroups/system.local/providers/Microsoft.Backup.Admin/backupLocations/local/backups/290b4726-a9a1-40ba-a837-895a1173dc73
                location: local
                name: 290b4726-a9a1-40ba-a837-895a1173dc73
                properties:
                  backupInfo:
                    backupId: 290b4726-a9a1-40ba-a837-895a1173dc73
                    createdDateTime: 2018-02-16T23:01:56.2015457Z
                    roleStatus:
                      - roleName: NRP
                        status: Succeeded
                      - roleName: SRP
                        status: Succeeded
                      - roleName: CRP
                        status: Succeeded
                      - roleName: KeyVaultInternalControlPlane
                        status: Succeeded
                      - roleName: KeyVaultInternalDataPlane
                        status: Succeeded
                      - roleName: KeyVaultControlPlane
                        status: Succeeded
                      - roleName: KeyVaultDataPlane
                        status: Succeeded
                      - roleName: KeyVaultNamingService
                        status: Succeeded
                      - roleName: WAS
                        status: Succeeded
                      - roleName: ECE
                        status: Succeeded
                      - roleName: CA
                        status: Succeeded
                      - roleName: ACS
                        status: Succeeded
                    status: Succeeded
                    timeTakenToCreate: PT4M54.5150429S
                tags: {}
                type: Microsoft.Backup.Admin/backupLocations/backups
            "202":
              body:
                id: /subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/resourceGroups/system.local/providers/Microsoft.Backup.Admin/backupLocations/local/backups/290b4726-a9a1-40ba-a837-895a1173dc73
                location: local
                name: 290b4726-a9a1-40ba-a837-895a1173dc73
                properties:
                  backupInfo:
                    backupId: 290b4726-a9a1-40ba-a837-895a1173dc73
                    createdDateTime: 2018-02-16T23:01:56.2015457Z
                    roleStatus:
                      - roleName: NRP
                        status: Succeeded
                      - roleName: SRP
                        status: Succeeded
                      - roleName: CRP
                        status: Succeeded
                      - roleName: KeyVaultInternalControlPlane
                        status: Succeeded
                      - roleName: KeyVaultInternalDataPlane
                        status: Succeeded
                      - roleName: KeyVaultControlPlane
                        status: Succeeded
                      - roleName: KeyVaultDataPlane
                        status: Succeeded
                      - roleName: KeyVaultNamingService
                        status: Succeeded
                      - roleName: WAS
                        status: Succeeded
                      - roleName: ECE
                        status: Succeeded
                      - roleName: CA
                        status: Succeeded
                      - roleName: ACS
                        status: Succeeded
                    status: Succeeded
                    timeTakenToCreate: PT4M54.5150429S
                tags: {}
                type: Microsoft.Backup.Admin/backupLocations/backups
      x-ms-long-running-operation: true
definitions:
  BackupLocation:
    allOf:
      - description: Base Resource Object
        properties:
          id:
            description: URI of the resource.
            readOnly: true
            type: string
          location:
            description: Location of the resource.
            readOnly: false
            type: string
          name:
            description: Name of the resource.
            readOnly: true
            type: string
          tags:
            additionalProperties:
              type: string
            description: List of key value pairs.
            readOnly: false
            type: object
          type:
            description: Type of resource.
            readOnly: true
            type: string
        type: object
        x-ms-azure-resource: true
    description: Information about the backup location.
    properties:
      properties:
        $ref: "#/definitions/BackupLocationModel"
        description: Properties of a backup location.
        x-ms-client-flatten: true
    type: object
  BackupLocationList:
    description: List of backup locations.
    properties:
      nextLink:
        description: URI to the next page.
        type: string
      value:
        description: List of backup locations.
        items:
          $ref: "#/definitions/BackupLocation"
        type: array
    type: object
  BackupLocationModel:
    description: Properties of a backup location.
    properties:
      externalStoreDefault:
        $ref: "#/definitions/ExternalStore"
        description: Information about an external storage location.
        x-ms-client-flatten: true
    type: object
  ExternalStore:
    description: Information about an external storage location.
    properties:
      availableCapacity:
        description: Free space at the backup location.
        type: string
      backupFrequencyInHours:
        description: The interval, in hours, for the frequency that the scheduler takes a backup.
        type: integer
      backupRetentionPeriodInDays:
        description: The retention period, in days, for backs in the storage location.
        type: integer
      encryptionKeyBase64:
        description: Encryption key.
        type: string
      isBackupSchedulerEnabled:
        description: True if the backup scheduler is enabled.
        type: boolean
      lastBackupTime:
        description: Time of backup.
        format: date-time
        type: string
      nextBackupTime:
        description: The scheduled time of the next backup.
        format: date-time
        type: string
      password:
        description: Password to access the location.
        type: string
      path:
        description: Path to the update location
        type: string
      userName:
        description: Username to access the location.
        type: string
    type: object
