Labs - Generate Upload Uri

Generate a URI for uploading custom disk images to a Lab.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}/generateUploadUri?api-version=2018-09-15

URI Parameters

Name In Required Type Description
name
path True

string

The name of the lab.

resourceGroupName
path True

string

The name of the resource group.

subscriptionId
path True

string

The subscription ID.

api-version
query True

string

Client API version.

Request Body

Name Type Description
blobName

string

The blob name of the upload URI.

Responses

Name Type Description
200 OK

GenerateUploadUriResponse

OK

Other Status Codes

CloudError

BadRequest

Security

azure_auth

OAuth2 Implicit Grant

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation Access Microsoft Azure

Examples

Labs_GenerateUploadUri

Sample Request

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/generateUploadUri?api-version=2018-09-15

{
  "blobName": "{blob-name}"
}

Sample Response

{
  "uploadUri": "https://{storageName}.blob.core.windows.net/uploads/{blobName}?sv=2017-04-17&sr=b&sig={signature}&st=2018-10-02T01:55:24Z&se=2018-10-03T02:10:23Z&sp=rcw"
}

Definitions

Name Description
CloudError

Error from a REST request.

CloudErrorBody

Body of an error from a REST request.

GenerateUploadUriParameter

Properties for generating an upload URI.

GenerateUploadUriResponse

Response body for generating an upload URI.

CloudError

Error from a REST request.

Name Type Description
error

CloudErrorBody

The cloud error that occurred

CloudErrorBody

Body of an error from a REST request.

Name Type Description
code

string

The error code.

details

CloudErrorBody[]

Inner errors.

message

string

The error message.

target

string

The error target.

GenerateUploadUriParameter

Properties for generating an upload URI.

Name Type Description
blobName

string

The blob name of the upload URI.

GenerateUploadUriResponse

Response body for generating an upload URI.

Name Type Description
uploadUri

string

The upload URI for the VHD.