你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Platform Images - Create
Creates a platform image.
Creates a new platform image with given publisher, offer, skus and version.
PUT https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/artifactTypes/platformImage/publishers/{publisher}/offers/{offer}/skus/{sku}/versions/{version}?api-version=2015-12-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
location
|
path | True |
string |
Location of the resource. |
offer
|
path | True |
string |
Name of the offer. |
publisher
|
path | True |
string |
Name of the publisher. |
sku
|
path | True |
string |
Name of the SKU. |
subscription
|
path | True |
string |
Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
version
|
path | True |
string |
The version of the resource. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Request Body
Name | Type | Description |
---|---|---|
properties.dataDisks |
Data |
Data disks used by the platform image. |
properties.details |
Information about the image. |
|
properties.osDisk |
Operating system used for this platform image. |
|
properties.provisioningState |
Provisioning status of the platform image. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
201 Created |
CREATED |
|
202 Accepted |
ACCEPTED |
|
Other Status Codes |
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). |
Security
azure_auth
Authorization uses an Azure Active Directory OAuth2 flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Creates a new platform image.
Sample Request
PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Compute.Admin/locations/local/artifactTypes/platformImage/publishers/Canonical/offers/UbuntuServer/skus/16.04-:LTS/versions/16.04?api-version=2015-12-01-preview
{
"properties": {
"osDisk": {
"osType": "Linux",
"uri": "https://test.blob.local.azurestack.external/test/medium.vhd"
}
}
}
Sample Response
{
"id": "/subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/providers/Microsoft.Compute.Admin/locations/local/artifactTypes/platformImage/publishers/Canonical/offers/UbuntuServer/skus/16.04-LTS/versions/1.0.0",
"type": "Microsoft.Compute.Admin/locations/artifactTypes/publishers/offers/skus/versions",
"location": "local",
"properties": {
"osDisk": {
"osType": "Linux",
"uri": "https://test.blob.local.azurestack.external/test/medium.vhd"
},
"provisioningState": "Creating"
}
}
{
"id": "/subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/providers/Microsoft.Compute.Admin/locations/local/artifactTypes/platformImage/publishers/Canonical/offers/UbuntuServer/skus/16.04-LTS/versions/1.0.0",
"type": "Microsoft.Compute.Admin/locations/artifactTypes/publishers/offers/skus/versions",
"location": "local",
"properties": {
"osDisk": {
"osType": "Linux",
"uri": "https://test.blob.local.azurestack.external/test/medium.vhd"
},
"provisioningState": "Creating"
}
}
{
"id": "/subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/providers/Microsoft.Compute.Admin/locations/local/artifactTypes/platformImage/publishers/Canonical/offers/UbuntuServer/skus/16.04-LTS/versions/1.0.0",
"type": "Microsoft.Compute.Admin/locations/artifactTypes/publishers/offers/skus/versions",
"location": "local",
"properties": {
"osDisk": {
"osType": "Linux",
"uri": "https://test.blob.local.azurestack.external/test/medium.vhd"
},
"provisioningState": "Creating"
}
}
Definitions
Name | Description |
---|---|
Crp |
Error response |
Data |
Information about datadisk. |
Error |
The error detail. |
Image |
Information about the disk image. |
Os |
Operating system disk. |
Os |
Operating system type. |
Platform |
Platform image represents a virtual machine. |
Platform |
Parameters used to create a new platform image. |
Provisioning |
The provisioning state of the resource. |
CrpErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
DataDisk
Information about datadisk.
Name | Type | Description |
---|---|---|
lun |
integer |
Logical unit number. |
uri |
string |
Location of the disk template. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
code |
string |
The error code. |
message |
string |
The error message. |
target |
string |
The error target. |
ImageDetails
Information about the disk image.
Name | Type | Description |
---|---|---|
billingPartNumber |
string |
The part number is used to bill for software costs. |
OsDisk
Operating system disk.
Name | Type | Description |
---|---|---|
osType |
Operating system type. |
|
uri |
string |
Location of the disk. |
OsType
Operating system type.
Name | Type | Description |
---|---|---|
Linux |
string |
|
Unknown |
string |
|
Windows |
string |
PlatformImage
Platform image represents a virtual machine.
Name | Type | Description |
---|---|---|
id |
string |
ID of the resource. |
location |
string |
Location of the resource. |
name |
string |
Name of the resource. |
properties.dataDisks |
Data |
Data disks used by the platform image. |
properties.details |
Information about the image. |
|
properties.osDisk |
Operating system used for this platform image. |
|
properties.provisioningState |
Provisioning status of the platform image. |
|
type |
string |
Type of Resource. |
PlatformImageParameters
Parameters used to create a new platform image.
Name | Type | Description |
---|---|---|
properties.dataDisks |
Data |
Data disks used by the platform image. |
properties.details |
Information about the image. |
|
properties.osDisk |
Operating system used for this platform image. |
|
properties.provisioningState |
Provisioning status of the platform image. |
ProvisioningState
The provisioning state of the resource.
Name | Type | Description |
---|---|---|
Canceled |
string |
|
Creating |
string |
|
Failed |
string |
|
Succeeded |
string |