swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  title: RecoveryServicesBackupClient
  version: 2016-12-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-12-01/backup.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: recoveryservices-backup
  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}/backupconfig/vaultconfig":
    get:
      deprecated: false
      description: Fetches vault config.
      operationId: BackupVaultConfigs_Get
      parameters:
        - $ref: "#/parameters/SubscriptionId"
        - $ref: "#/parameters/ApiVersion"
        - $ref: "#/parameters/ResourceGroupName"
        - $ref: "#/parameters/VaultName"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/BackupVaultConfig"
      tags:
        - BackupVaultConfigs
    patch:
      deprecated: false
      description: Updates vault config model type.
      operationId: BackupVaultConfigs_Update
      parameters:
        - $ref: "#/parameters/SubscriptionId"
        - $ref: "#/parameters/ApiVersion"
        - $ref: "#/parameters/ResourceGroupName"
        - $ref: "#/parameters/VaultName"
        - description: Backup vault config.
          in: body
          name: backupVaultConfig
          required: true
          schema:
            $ref: "#/definitions/BackupVaultConfig"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/BackupVaultConfig"
      tags:
        - BackupVaultConfigs
  "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig":
    get:
      deprecated: false
      description: Fetches resource storage config.
      operationId: BackupStorageConfigs_Get
      parameters:
        - $ref: "#/parameters/SubscriptionId"
        - $ref: "#/parameters/ApiVersion"
        - $ref: "#/parameters/ResourceGroupName"
        - $ref: "#/parameters/VaultName"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/BackupStorageConfig"
      tags:
        - BackupStorageConfigs
    patch:
      deprecated: false
      description: Updates vault storage model type.
      operationId: BackupStorageConfigs_Update
      parameters:
        - $ref: "#/parameters/SubscriptionId"
        - $ref: "#/parameters/ApiVersion"
        - $ref: "#/parameters/ResourceGroupName"
        - $ref: "#/parameters/VaultName"
        - description: Backup storage config.
          in: body
          name: backupStorageConfig
          required: true
          schema:
            $ref: "#/definitions/BackupStorageConfig"
      responses:
        "204":
          description: NoContent
      tags:
        - BackupStorageConfigs
definitions:
  BackupStorageConfig:
    allOf:
      - description: ARM Resource.
        properties:
          eTag:
            description: Optional ETag.
            type: string
          id:
            description: Resource Id represents the complete path to the resource.
            readOnly: true
            type: string
          name:
            description: Resource name associated with the resource.
            readOnly: true
            type: string
          type:
            description: Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
            readOnly: true
            type: string
        type: object
        x-ms-azure-resource: true
    description: The backup storage config.
    properties:
      properties:
        $ref: "#/definitions/BackupStorageConfigProperties"
        x-ms-client-flatten: true
  BackupStorageConfigProperties:
    description: The backup storage config.
    properties:
      storageModelType:
        description: Storage model type.
        enum:
          - Invalid
          - GeoRedundant
          - LocallyRedundant
        type: string
        x-ms-enum:
          modelAsString: true
          name: StorageModelType
      storageType:
        description: Storage type.
        enum:
          - Invalid
          - GeoRedundant
          - LocallyRedundant
        type: string
        x-ms-enum:
          modelAsString: true
          name: StorageType
      storageTypeState:
        description: Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked.
        enum:
          - Invalid
          - Locked
          - Unlocked
        type: string
        x-ms-enum:
          modelAsString: true
          name: StorageTypeState
    type: object
  BackupVaultConfig:
    allOf:
      - description: ARM Resource.
        properties:
          eTag:
            description: Optional ETag.
            type: string
          id:
            description: Resource Id represents the complete path to the resource.
            readOnly: true
            type: string
          name:
            description: Resource name associated with the resource.
            readOnly: true
            type: string
          type:
            description: Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
            readOnly: true
            type: string
        type: object
        x-ms-azure-resource: true
    description: Backup vault config details.
    properties:
      properties:
        $ref: "#/definitions/BackupVaultConfigProperties"
        x-ms-client-flatten: true
  BackupVaultConfigProperties:
    description: Backup vault config details.
    properties:
      enhancedSecurityState:
        description: Enabled or Disabled.
        enum:
          - Invalid
          - Enabled
          - Disabled
        type: string
        x-ms-enum:
          modelAsString: true
          name: EnhancedSecurityState
      storageType:
        description: Storage type.
        enum:
          - Invalid
          - GeoRedundant
          - LocallyRedundant
        type: string
        x-ms-enum:
          modelAsString: true
          name: StorageType
      storageTypeState:
        description: Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked.
        enum:
          - Invalid
          - Locked
          - Unlocked
        type: string
        x-ms-enum:
          modelAsString: true
          name: StorageTypeState
    type: object
