Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
375 changes: 375 additions & 0 deletions arm-recoveryservices/2016-06-01/swagger/backup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,375 @@
{
"swagger": "2.0",
"info": {
"version": "2016-12-01",
"title": "RecoveryServicesBackupClient",
"x-ms-code-generation-settings": {
"internalConstructors": false
}
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations": {
"get": {
"tags": [
"Operations"
],
"description": "Returns the list of available operations.",
"operationId": "Operations_List",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/SubscriptionId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/ResourceGroupName"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "./vaults.json#/definitions/ClientDiscoveryResponse"
}
}
},
"deprecated": false,
"x-ms-pageable": {
"nextLinkName": "NextLink"
}
}
},
"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General convention for constructing URLs is providers/provider.namespace/typename/{typevalue} Consider parameterizing /backupconfig/vaultconfig accordingly

"get": {
"tags": [
"BackupVaultConfigs"
],
"description": "Fetches vault config.",
"operationId": "BackupVaultConfigs_Get",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/SubscriptionId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/VaultName"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/BackupVaultConfigResource"
}
}
},
"deprecated": false
},
"patch": {
"tags": [
"BackupVaultConfigs"
],
"description": "Updates vault config model type.",
"operationId": "BackupVaultConfigs_Update",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/SubscriptionId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/VaultName"
},
{
"name": "backupVaultConfigResource",
"in": "body",
"description": "Backup vault config resource.",
"required": true,
"schema": {
"$ref": "#/definitions/BackupVaultConfigResource"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/BackupVaultConfigResource"
}
}
},
"deprecated": false
}
},
"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General convention for constructing URLs is providers/provider.namespace/typename/{typevalue} Consider parameterizing /backupstorageconfig/vaultstorageconfig accordingly

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I acknowledge this issue but we can't take this at this moment, as this API is already in production

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, please track this issue appropriately at your end since moving forward we plan to make these as hard requirements

"get": {
"tags": [
"BackupStorageConfigs"
],
"description": "Fetches resource storage config.",
"operationId": "BackupStorageConfigs_Get",
"produces": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/SubscriptionId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/VaultName"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/BackupStorageConfigResource"
}
}
},
"deprecated": false
},
"patch": {
"tags": [
"BackupStorageConfigs"
],
"description": "Updates vault storage model type.",
"operationId": "BackupStorageConfigs_Update",
"parameters": [
{
"$ref": "#/parameters/SubscriptionId"
},
{
"$ref": "#/parameters/ApiVersion"
},
{
"$ref": "#/parameters/ResourceGroupName"
},
{
"$ref": "#/parameters/VaultName"
},
{
"name": "backupStorageConfigResource",
"in": "body",
"description": "Backup storage config resource.",
"required": true,
"schema": {
"$ref": "#/definitions/BackupStorageConfigResource"
}
}
],
"responses": {
"204": {
"description": "NoContent"
}
},
"deprecated": false
}
}
},
"definitions": {
"BackupStorageConfig": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much better, but I would go further and simply name this as BackupStorageConfigProperties (same for BackupVaultConfigProperties)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this fine for you:
BackupStorageConfigResource -> BackupStorageConfig
BackupStorageConfig -> BackupStorageConfigProperties

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like that very much!

"description": "The backup storage config.",
"type": "object",
"properties": {
"storageModelType": {
"description": "Storage model type.",
"enum": [
"Invalid",
"GeoRedundant",
"LocallyRedundant"
],
"type": "string",
"x-ms-enum": {
"name": "StorageModelType",
"modelAsString": true
}
},
"storageType": {
"description": "Storage type.",
"enum": [
"Invalid",
"GeoRedundant",
"LocallyRedundant"
],
"type": "string",
"x-ms-enum": {
"name": "StorageType",
"modelAsString": true
}
},
"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": {
"name": "StorageTypeState",
"modelAsString": true
}
}
}
},
"BackupStorageConfigResource": {
"description": "The backup storage config.",
"allOf": [
{
"$ref": "./vaults.json#/definitions/Resource"
}
],
"properties": {
"properties": {
"$ref": "#/definitions/BackupStorageConfig",
"x-ms-client-flatten": true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff! 👍

}
}
},
"BackupVaultConfig": {
"description": "Backup vault config details.",
"type": "object",
"properties": {
"storageType": {
"description": "Storage type.",
"enum": [
"Invalid",
"GeoRedundant",
"LocallyRedundant"
],
"type": "string",
"x-ms-enum": {
"name": "StorageType",
"modelAsString": true
}
},
"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": {
"name": "StorageTypeState",
"modelAsString": true
}
},
"enhancedSecurityState": {
"description": "Enabled or Disabled.",
"enum": [
"Invalid",
"Enabled",
"Disabled"
],
"type": "string",
"x-ms-enum": {
"name": "EnhancedSecurityState",
"modelAsString": true
}
}
}
},
"BackupVaultConfigResource": {
"description": "Backup vault config details.",
"allOf": [
{
"$ref": "./vaults.json#/definitions/Resource"
}
],
"properties": {
"properties": {
"$ref": "#/definitions/BackupVaultConfig",
"x-ms-client-flatten": true
}
}
}
},
"parameters": {
"SubscriptionId": {
"name": "subscriptionId",
"in": "path",
"description": "The subscription Id.",
"required": true,
"type": "string"
},
"ResourceGroupName": {
"name": "resourceGroupName",
"in": "path",
"description": "The name of the resource group where the recovery services vault is present.",
"required": true,
"x-ms-parameter-location": "method",
"type": "string"
},
"VaultName": {
"name": "vaultName",
"in": "path",
"description": "The name of the recovery services vault.",
"required": true,
"x-ms-parameter-location": "method",
"type": "string"
},
"ApiVersion": {
"name": "api-version",
"in": "query",
"description": "Client Api Version.",
"required": true,
"type": "string"
}
},
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"description": "Azure Active Directory OAuth2 Flow",
"flow": "implicit",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"scopes": {
"user_impersonation": "impersonate your user account."
}
}
},
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
}
}
},
"ResourceCertificateAndAADDetails": {
"ResourceCertificateAndAadDetails": {
"description": "Certificate details representing the Vault credentials for AAD.",
"required": [
"certificate",
Expand Down Expand Up @@ -227,7 +227,7 @@
},
"x-ms-discriminator-value": "AzureActiveDirectory"
},
"ResourceCertificateAndACSDetails": {
"ResourceCertificateAndAcsDetails": {
"description": "Certificate details representing the Vault credentials for ACS.",
"required": [
"certificate",
Expand Down
Loading