diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/preview/2018-09-01/Backup.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/preview/2018-09-01/Backup.json index fd8ff97174fc..578460a3f5cd 100644 --- a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/preview/2018-09-01/Backup.json +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/preview/2018-09-01/Backup.json @@ -181,6 +181,20 @@ "required": true, "type": "string", "x-ms-parameter-location": "method" + }, + "TopParameter": { + "description": "OData top parameter.", + "name": "$top", + "in": "query", + "type": "string", + "x-ms-parameter-location": "method" + }, + "SkipParameter": { + "description": "OData skip parameter.", + "name": "$skip", + "in": "query", + "type": "string", + "x-ms-parameter-location": "method" } }, "securityDefinitions": { diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/preview/2018-09-01/BackupLocations.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/preview/2018-09-01/BackupLocations.json index 0ff6e617dd72..92e8b8a79be8 100644 --- a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/preview/2018-09-01/BackupLocations.json +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/preview/2018-09-01/BackupLocations.json @@ -16,7 +16,7 @@ "application/json" ], "paths": { - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations": { "get": { "x-ms-examples": { "Returns the list of backup locations.": { @@ -37,6 +37,12 @@ }, { "$ref": "Backup.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "Backup.json#/parameters/TopParameter" + }, + { + "$ref": "Backup.json#/parameters/SkipParameter" } ], "responses": { @@ -52,7 +58,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}": { "get": { "x-ms-examples": { "Returns a specific backup location based on name.": { @@ -129,10 +135,13 @@ } } }, - "x-ms-long-running-operation": true + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options" : { + "final-state-via" : "location" + } } }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/createBackup": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/createBackup": { "post": { "x-ms-examples": { "Back up a specific location.": { @@ -140,6 +149,9 @@ } }, "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options" : { + "final-state-via" : "location" + }, "description": "Back up a specific location.", "tags": [ "BackupLocations" diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/preview/2018-09-01/Backups.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/preview/2018-09-01/Backups.json index b5f2abbb75a4..150ff5ea0b78 100644 --- a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/preview/2018-09-01/Backups.json +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/preview/2018-09-01/Backups.json @@ -16,7 +16,7 @@ "application/json" ], "paths": { - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups": { "get": { "x-ms-examples": { "Returns a list of backups from a location.": { @@ -40,6 +40,12 @@ }, { "$ref": "Backup.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "Backup.json#/parameters/TopParameter" + }, + { + "$ref": "Backup.json#/parameters/SkipParameter" } ], "responses": { @@ -55,7 +61,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups/{backup}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups/{backup}": { "get": { "x-ms-examples": { "Returns a backup from a location based on name.": { @@ -94,7 +100,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups/{backup}/restore": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups/{backup}/restore": { "post": { "x-ms-examples": { "Restore a backup.": { @@ -137,7 +143,10 @@ "description": "ACCEPTED" } }, - "x-ms-long-running-operation": true + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options" : { + "final-state-via" : "location" + } } } }, diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/Backup.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/Backup.json new file mode 100644 index 000000000000..2e1306b80a80 --- /dev/null +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/Backup.json @@ -0,0 +1,204 @@ +{ + "swagger": "2.0", + "info": { + "version": "2016-05-01", + "title": "BackupManagementClient", + "description": "The Admin Backup Management Client." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.Backup.Admin/operations": { + "get": { + "x-ms-examples": { + "Returns the list of support REST operations.": { + "$ref": "./examples/Operations/List.json" + } + }, + "description": "Returns the list of support REST operations.", + "tags": [ + "Backup" + ], + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/OperationList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "Resource": { + "description": "Base Resource Object", + "type": "object", + "properties": { + "id": { + "description": "URI of the resource.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Name of the resource.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Type of resource.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Location of the resource.", + "type": "string", + "readOnly": false + }, + "tags": { + "description": "List of key value pairs.", + "type": "object", + "readOnly": false, + "additionalProperties": { + "type": "string" + } + } + }, + "x-ms-azure-resource": true + }, + "Operation": { + "description": "Describes the supported REST operation.", + "properties": { + "name": { + "description": "The name of the operation being performed on this particular object. This name should match the name that appears in RBAC or the event service.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "Contains the localized display information for this particular operation / action.", + "$ref": "#/definitions/Display", + "readOnly": true + } + } + }, + "Display": { + "description": "Contains the localized display information for this particular operation / action.", + "properties": { + "provider": { + "description": "The localized friendly form of the resource provider name – it is expected to also include the publisher/company responsible. It should use Title Casing and begin with \"Microsoft\" for 1st party services. e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute.\"", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "The localized, friendly version of the resource type related to this action or operation; the resource type should match the public documentation for the resource provider.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The localized, friendly name for the operation. Use the name as it will displayed to the user.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The localized, friendly description for the operation. The description will be displayed to the user. It should be thorough and concise for used in both tooltips and detailed views.", + "type": "string", + "readOnly": true + } + } + }, + "OperationList": { + "description": "List of Operations", + "properties": { + "value": { + "description": "Array of operations", + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "readOnly": true + }, + "nextLink": { + "description": "URI to the next page of operations.", + "type": "string", + "readOnly": true + } + } + }, + "LongRunningOperationStatus": { + "description": "Status of a long running operation.", + "type": "object", + "properties": { + "code": { + "description": "Operation result code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Description of the operation status.", + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "required": true, + "type": "string" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "Client API version.", + "required": true, + "type": "string", + "default": "2016-05-01" + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "Name of the resource group.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Authorization uses an Azure Active Directory OAuth2 flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] +} diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/BackupLocations.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/BackupLocations.json new file mode 100644 index 000000000000..555c6e4fae3b --- /dev/null +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/BackupLocations.json @@ -0,0 +1,317 @@ +{ + "swagger": "2.0", + "info": { + "version": "2016-05-01", + "title": "BackupManagementClient", + "description": "The Admin Backup Management Client." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations": { + "get": { + "x-ms-examples": { + "Returns the list of backup locations.": { + "$ref": "./examples/BackupLocations/List.json" + } + }, + "description": "Returns the list of backup locations.", + "tags": [ + "BackupLocations" + ], + "operationId": "BackupLocations_List", + "parameters": [ + { + "$ref": "Backup.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Backup.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "Backup.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/BackupLocationList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}": { + "get": { + "x-ms-examples": { + "Returns a specific backup location based on name.": { + "$ref": "./examples/BackupLocations/Get.json" + } + }, + "description": "Returns a specific backup location based on name.", + "tags": [ + "BackupLocations" + ], + "operationId": "BackupLocations_Get", + "parameters": [ + { + "$ref": "Backup.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Backup.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/BackupLocationParameter" + }, + { + "$ref": "Backup.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/BackupLocation" + } + }, + "404": { + "description": "NOT FOUND" + } + } + }, + "put": { + "x-ms-examples": { + "Update new backup location.": { + "$ref": "./examples/BackupLocations/Update.json" + } + }, + "description": "Update a backup location.", + "tags": [ + "BackupLocations" + ], + "operationId": "BackupLocations_Update", + "parameters": [ + { + "$ref": "Backup.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Backup.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/BackupLocationParameter" + }, + { + "$ref": "Backup.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/BackupLocationObjectParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/BackupLocation" + } + }, + "202": { + "description": "ACCEPTED", + "schema": { + "$ref": "#/definitions/BackupLocation" + } + }, + "404": { + "description": "NOT FOUND" + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/createBackup": { + "post": { + "x-ms-examples": { + "Back up a specific location.": { + "$ref": "./examples/BackupLocations/Backup.json" + } + }, + "x-ms-long-running-operation": true, + "description": "Back up a specific location.", + "tags": [ + "BackupLocations" + ], + "operationId": "BackupLocations_CreateBackup", + "parameters": [ + { + "$ref": "Backup.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Backup.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/BackupLocationParameter" + }, + { + "$ref": "Backup.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "Backups.json#/definitions/Backup" + } + }, + "202": { + "description": "ACCEPTED", + "schema": { + "$ref": "Backups.json#/definitions/Backup" + } + } + } + } + } + }, + "definitions": { + "BackupLocation": { + "description": "Information about the backup location.", + "type": "object", + "properties": { + "properties": { + "description": "Properties of a backup location.", + "$ref": "#/definitions/BackupLocationModel", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "Backup.json#/definitions/Resource" + } + ] + }, + "BackupLocationModel": { + "type": "object", + "description": "Properties of a backup location.", + "properties": { + "externalStoreDefault": { + "description": "Information about an external storage location.", + "$ref": "#/definitions/ExternalStore", + "x-ms-client-flatten": true + } + } + }, + "ExternalStore": { + "type": "object", + "description": "Information about an external storage location.", + "properties": { + "path": { + "description": "Path to the update location", + "type": "string" + }, + "userName": { + "description": "Username to access the location.", + "type": "string" + }, + "password": { + "description": "Password to access the location.", + "type": "string" + }, + "encryptionKeyBase64": { + "description": "Encryption key.", + "type": "string" + }, + "backupFrequencyInHours": { + "description": "The interval, in hours, for the frequency that the scheduler takes a backup.", + "type": "integer" + }, + "availableCapacity": { + "description": "Free space at the backup location.", + "type": "string" + }, + "isBackupSchedulerEnabled": { + "description": "True if the backup scheduler is enabled.", + "type": "boolean" + }, + "nextBackupTime": { + "description": "The scheduled time of the next backup.", + "type": "string", + "format": "date-time" + }, + "lastBackupTime": { + "description": "Time of backup.", + "type": "string", + "format": "date-time" + }, + "backupRetentionPeriodInDays": { + "description": "The retention period, in days, for backs in the storage location.", + "type": "integer" + } + } + }, + "BackupLocationList": { + "type": "object", + "description": "List of backup locations.", + "properties": { + "value": { + "description": "List of backup locations.", + "type": "array", + "items": { + "$ref": "#/definitions/BackupLocation" + } + }, + "nextLink": { + "description": "URI to the next page.", + "type": "string" + } + } + } + }, + "parameters": { + "BackupLocationParameter": { + "name": "location", + "in": "path", + "description": "Name of the backup location.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "BackupLocationObjectParameter": { + "name": "backup", + "in": "body", + "description": "Backup location object.", + "required": true, + "schema": { + "$ref": "#/definitions/BackupLocation" + }, + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Authorization uses an Azure Active Directory OAuth2 flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] +} diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/Backups.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/Backups.json new file mode 100644 index 000000000000..56c214548f3a --- /dev/null +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/Backups.json @@ -0,0 +1,310 @@ +{ + "swagger": "2.0", + "info": { + "version": "2016-05-01", + "title": "BackupManagementClient", + "description": "The Admin Backup Management Client." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups": { + "get": { + "x-ms-examples": { + "Returns a list of backups from a location.": { + "$ref": "./examples/Backups/List.json" + } + }, + "description": "Returns a list of backups from a location.", + "tags": [ + "Backups" + ], + "operationId": "Backups_List", + "parameters": [ + { + "$ref": "Backup.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Backup.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "BackupLocations.json#/parameters/BackupLocationParameter" + }, + { + "$ref": "Backup.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/BackupList" + } + }, + "404": { + "description": "NOT FOUND" + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups/{backup}": { + "get": { + "x-ms-examples": { + "Returns a backup from a location based on name.": { + "$ref": "./examples/Backups/Get.json" + } + }, + "description": "Returns a backup from a location based on name.", + "tags": [ + "Backups" + ], + "operationId": "Backups_Get", + "parameters": [ + { + "$ref": "Backup.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Backup.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "BackupLocations.json#/parameters/BackupLocationParameter" + }, + { + "$ref": "#/parameters/BackupParameter" + }, + { + "$ref": "Backup.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Backup" + } + }, + "404": { + "description": "NOT FOUND" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups/{backup}/restore": { + "post": { + "x-ms-examples": { + "Restore a backup.": { + "$ref": "./examples/Backups/Restore.json" + } + }, + "description": "Restore a backup.", + "tags": [ + "Backups" + ], + "operationId": "Backups_Restore", + "parameters": [ + { + "$ref": "Backup.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "BackupLocations.json#/parameters/BackupLocationParameter" + }, + { + "$ref": "Backup.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/BackupParameter" + }, + { + "$ref": "Backup.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "202": { + "description": "ACCEPTED" + }, + "404": { + "description": "NOT FOUND" + } + }, + "x-ms-long-running-operation": true + } + } + }, + "definitions": { + "Backup": { + "description": "Information related to a backup.", + "type": "object", + "properties": { + "properties": { + "description": "Properties for a backup.", + "$ref": "#/definitions/BackupModel", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "Backup.json#/definitions/Resource" + } + ] + }, + "BackupModel": { + "description": "Properties for a backup.", + "properties": { + "backupInfo": { + "description": "Holds information for a backup.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/BackupInfo" + } + } + }, + "BackupInfo": { + "type": "object", + "description": "Holds information for a backup.", + "properties": { + "backupDataVersion": { + "description": "Version of the backup data.", + "type": "string", + "readOnly": true + }, + "backupId": { + "description": "Unique GUID for the backup.", + "type": "string", + "readOnly": true + }, + "roleStatus": { + "description": "Backup status for each role.", + "$ref": "#/definitions/RoleOperationStatusList", + "readOnly": true + }, + "status": { + "description": "Current status of the backup.", + "$ref": "#/definitions/OperationStatus", + "readOnly": true + }, + "createdDateTime": { + "description": "Creation time of the backup.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "timeTakenToCreate": { + "description": "Duration to create the backup.", + "type": "string", + "readOnly": true + }, + "deploymentID": { + "description": "Deployment Id of the stamp.", + "type": "string", + "readOnly": true + }, + "stampVersion": { + "description": "Current version.", + "type": "string", + "readOnly": true + }, + "oemVersion": { + "description": "OEM version.", + "type": "string", + "readOnly": true + } + } + }, + "OperationStatus": { + "description": "Status of an operation.", + "type": "string", + "enum": [ + "Creating", + "Queued", + "Running", + "Deleted", + "Failed", + "PartialSucceeded", + "Succeeded" + ], + "x-ms-enum": { + "name": "OperationStatus", + "modelAsString": false + } + }, + "RoleOperationStatusList": { + "description": "object", + "type": "array", + "items": { + "$ref": "#/definitions/RoleOperationStatus" + } + }, + "RoleOperationStatus": { + "description": "Backup status for a role.", + "type": "object", + "properties": { + "roleName": { + "description": "Name of the role.", + "type": "string" + }, + "status": { + "description": "Status of the role.", + "$ref": "#/definitions/OperationStatus" + } + } + }, + "BackupList": { + "type": "object", + "description": "List of backups.", + "properties": { + "value": { + "description": "List of backups.", + "type": "array", + "items": { + "$ref": "#/definitions/Backup" + } + }, + "nextLink": { + "description": "URI to the next page.", + "type": "string" + } + } + } + }, + "parameters": { + "BackupParameter": { + "name": "backup", + "in": "path", + "description": "Name of the backup.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Authorization uses an Azure Active Directory OAuth2 flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] +} diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/BackupLocations/Backup.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/BackupLocations/Backup.json new file mode 100644 index 000000000000..4af9dafe6c33 --- /dev/null +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/BackupLocations/Backup.json @@ -0,0 +1,144 @@ +{ + "parameters": { + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "resourceGroupName": "System.local", + "location": "local", + "api-version": "2016-05-01" + }, + "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", + "name": "290b4726-a9a1-40ba-a837-895a1173dc73", + "type": "Microsoft.Backup.Admin/backupLocations/backups", + "location": "local", + "tags": {}, + "properties": { + "backupInfo": { + "backupId": "290b4726-a9a1-40ba-a837-895a1173dc73", + "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", + "createdDateTime": "2018-02-16T23:01:56.2015457Z", + "timeTakenToCreate": "PT4M54.5150429S" + } + } + } + }, + "202": { + "body": { + "id": "/subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/resourceGroups/system.local/providers/Microsoft.Backup.Admin/backupLocations/local/backups/290b4726-a9a1-40ba-a837-895a1173dc73", + "name": "290b4726-a9a1-40ba-a837-895a1173dc73", + "type": "Microsoft.Backup.Admin/backupLocations/backups", + "location": "local", + "tags": {}, + "properties": { + "backupInfo": { + "backupId": "290b4726-a9a1-40ba-a837-895a1173dc73", + "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", + "createdDateTime": "2018-02-16T23:01:56.2015457Z", + "timeTakenToCreate": "PT4M54.5150429S" + } + } + } + } + } +} diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/BackupLocations/Get.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/BackupLocations/Get.json new file mode 100644 index 000000000000..5aaefbf84e1e --- /dev/null +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/BackupLocations/Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "resourceGroupName": "System.local", + "location": "local", + "api-version": "2016-05-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/resourceGroups/System.local/providers/Microsoft.Backup.Admin/backupLocations/local", + "name": "local", + "type": "Microsoft.Backup.Admin/backupLocations", + "location": "local", + "tags": {}, + "properties": { + "externalStoreDefault": { + "path": "\\\\\\\\100.68.88.192\\\\C$\\\\backup_test", + "userName": "AzureStack\\\\Administrator", + "availableCapacity": "10GB", + "isBackupSchedulerEnabled": false + } + } + } + }, + "404": {} + } +} diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/BackupLocations/List.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/BackupLocations/List.json new file mode 100644 index 000000000000..ca868479ec5f --- /dev/null +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/BackupLocations/List.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "resourceGroupName": "System.local", + "api-version": "2016-05-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/resourceGroups/System.local/providers/Microsoft.Backup.Admin/backupLocations/local", + "name": "local", + "type": "Microsoft.Backup.Admin/backupLocations", + "location": "local", + "tags": {}, + "properties": { + "externalStoreDefault": { + "path": "\\\\\\\\100.68.88.192\\\\C$\\\\backup_test", + "userName": "AzureStack\\\\Administrator", + "availableCapacity": "10GB", + "isBackupSchedulerEnabled": false + } + } + } + ] + } + } + } +} diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/BackupLocations/Update.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/BackupLocations/Update.json new file mode 100644 index 000000000000..9c14a0c5360a --- /dev/null +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/BackupLocations/Update.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "resourceGroupName": "System.local", + "location": "local", + "backup": { + "properties": { + "externalStoreDefault": { + "path": "\\\\192.168.1.1\\Share", + "userName": "UserName", + "password": "secretPassword", + "encryptionKeyBase64": "YVVOa0J3S2xTamhHZ1lyRU9wQ1pKQ0xWanhjaHlkaU5ZQnNDeHRPTGFQenJKdWZsRGtYT25oYmlaa1RMVWFKeQ==", + "availableCapacity": "10GB", + "isBackupSchedulerEnabled": false + } + }, + "location": "local", + "tags": {} + }, + "api-version": "2016-05-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/resourcegroups/System.local/providers/Microsoft.Backup.Admin/backupLocations/local", + "name": "local", + "type": "Microsoft.Backup.Admin/backupLocations", + "location": "local", + "tags": {}, + "properties": { + "externalStoreDefault": { + "path": "\\\\192.168.1.1\\Share", + "userName": "UserName", + "password": "", + "encryptionKeyBase64": "", + "availableCapacity": "10GB", + "isBackupSchedulerEnabled": false + } + } + } + }, + "202": { + "body": { + "id": "/subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/resourcegroups/System.local/providers/Microsoft.Backup.Admin/backupLocations/local", + "name": "local", + "type": "Microsoft.Backup.Admin/backupLocations", + "location": "local", + "tags": {}, + "properties": { + "externalStoreDefault": { + "path": "\\\\192.168.1.1\\Share", + "userName": "UserName", + "password": "", + "encryptionKeyBase64": "", + "availableCapacity": "10GB", + "isBackupSchedulerEnabled": false + } + } + } + }, + "404": {} + } +} diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/Backups/Get.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/Backups/Get.json new file mode 100644 index 000000000000..8e7a67e2033c --- /dev/null +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/Backups/Get.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "resourceGroupName": "System.local", + "location": "local", + "backup": "de038ae0-294d-468d-90a1-fbe5ae028ce2", + "api-version": "2016-05-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/System.local/providers/Microsoft.Backup.Admin/backupLocations/local/backups/de038ae0-294d-468d-90a1-fbe5ae028ce2", + "name": "de038ae0-294d-468d-90a1-fbe5ae028ce2", + "type": "Microsoft.Backup.Admin/backupLocations/backups", + "location": "local", + "tags": {}, + "properties": { + "backupInfo": { + "backupDataVersion": "", + "backupId": "de038ae0-294d-468d-90a1-fbe5ae028ce2", + "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", + "createdDateTime": "2018-02-16T16:06:10.1160531Z", + "timeTakenToCreate": "PT5M1.5611298S", + "stampVersion": "", + "oemVersion": "", + "deploymentID": "" + } + } + } + }, + "404": {} + } +} diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/Backups/List.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/Backups/List.json new file mode 100644 index 000000000000..e9a6530d6d79 --- /dev/null +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/Backups/List.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "resourceGroupName": "System.local", + "location": "local", + "api-version": "2016-05-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/System.local/providers/Microsoft.Backup.Admin/backupLocations/local/backups/de038ae0-294d-468d-90a1-fbe5ae028ce2", + "name": "de038ae0-294d-468d-90a1-fbe5ae028ce2", + "type": "Microsoft.Backup.Admin/backupLocations/backups", + "location": "local", + "tags": {}, + "properties": { + "backupInfo": { + "backupDataVersion": "", + "backupId": "de038ae0-294d-468d-90a1-fbe5ae028ce2", + "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", + "createdDateTime": "2018-02-16T16:06:10.1160531Z", + "timeTakenToCreate": "PT5M1.5611298S", + "stampVersion": "", + "oemVersion": "", + "deploymentID": "" + } + } + } + ], + "nextLink": null + } + }, + "404": {} + } +} diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/Backups/Restore.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/Backups/Restore.json new file mode 100644 index 000000000000..bf9ad301b24e --- /dev/null +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/Backups/Restore.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "resourceGroupName": "System.local", + "location": "local", + "backup": "de038ae0-294d-468d-90a1-fbe5ae028ce2", + "api-version": "2016-05-01" + }, + "responses": { + "200": {}, + "202": {}, + "404": {} + } +} diff --git a/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/Operations/List.json b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/Operations/List.json new file mode 100644 index 000000000000..9a6f651b6097 --- /dev/null +++ b/specification/azsadmin/resource-manager/backup/Microsoft.Backup.Admin/stable/2016-05-01/examples/Operations/List.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "local", + "api-version": "2016-05-01" + }, + "responses": { + "200": { + "body": { + "value": [], + "nextLink": null + } + } + } +} diff --git a/specification/azsadmin/resource-manager/backup/readme.azsautogen.md b/specification/azsadmin/resource-manager/backup/readme.azsautogen.md new file mode 100644 index 000000000000..25d43d61ed70 --- /dev/null +++ b/specification/azsadmin/resource-manager/backup/readme.azsautogen.md @@ -0,0 +1,50 @@ +# Backup Admin + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Backup Admin. + +--- +## Getting Started +To build the SDK for Backup Admin, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` +--- + +## Configuration + +### Basic Information +These are the global settings for the Backup Admin API. + +``` yaml +title: BackupAdminClient +description: Backup Admin Client +openapi-type: arm +tag: package-2018-09-01 +``` + +``` yaml +input-file: + - $(this-folder)/Microsoft.Backup.Admin/preview/2018-09-01/Backup.json + - $(this-folder)/Microsoft.Backup.Admin/preview/2018-09-01/BackupLocations.json + - $(this-folder)/Microsoft.Backup.Admin/preview/2018-09-01/Backups.json +``` + +--- +# Code Generation + +## C# + +``` yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + namespace: Microsoft.AzureStack.Management.Backup.Admin + payload-flattening-threshold: 1 + output-folder: $(csharp-sdks-folder)/Generated + clear-output-folder: true +``` \ No newline at end of file diff --git a/specification/azsadmin/resource-manager/backup/readme.md b/specification/azsadmin/resource-manager/backup/readme.md index d7340b2de5eb..afdd99612088 100644 --- a/specification/azsadmin/resource-manager/backup/readme.md +++ b/specification/azsadmin/resource-manager/backup/readme.md @@ -38,6 +38,17 @@ input-file: - Microsoft.Backup.Admin/preview/2018-09-01/Backups.json ``` +### Tag: package-2016-05-01 + +These settings apply only when `--tag=package-2016-05-01` is specified on the command line. + +``` yaml $(tag) == 'package-2016-05-01' +input-file: + - $(this-folder)/Microsoft.Backup.Admin/stable/2016-05-01/Backup.json + - $(this-folder)/Microsoft.Backup.Admin/stable/2016-05-01/BackupLocations.json + - $(this-folder)/Microsoft.Backup.Admin/stable/2016-05-01/Backups.json +``` + --- # Code Generation @@ -52,30 +63,3 @@ csharp: output-folder: $(csharp-sdks-folder)/Generated clear-output-folder: true ``` - -## Multi-API/Profile support for AutoRest v3 generators - -AutoRest V3 generators require the use of `--tag=all-api-versions` to select api files. - -This block is updated by an automatic script. Edits may be lost! - -``` yaml $(tag) == 'all-api-versions' /* autogenerated */ -# include the azure profile definitions from the standard location -require: $(this-folder)/../../../../profiles/readme.md - -# all the input files across all versions -input-file: - - $(this-folder)/Microsoft.Backup.Admin/preview/2018-09-01/Backup.json - - $(this-folder)/Microsoft.Backup.Admin/preview/2018-09-01/BackupLocations.json - - $(this-folder)/Microsoft.Backup.Admin/preview/2018-09-01/Backups.json - -``` - -If there are files that should not be in the `all-api-versions` set, -uncomment the `exclude-file` section below and add the file paths. - -``` yaml $(tag) == 'all-api-versions' -#exclude-file: -# - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json -``` -