Share via


VM Extensions - Create

Create a Virtual Machine Extension Image with publisher, version.

PUT https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/artifactTypes/VMExtension/publishers/{publisher}/types/{type}/versions/{version}?api-version=2015-12-01-preview

URI Parameters

Name In Required Type Description
location
path True

string

Location of the resource.

publisher
path True

string

Name of the publisher.

subscriptionId
path True

string

Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

type
path True

string

Type of extension.

version
path True

string

The version of the resource.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Type Description
properties.computeRole

string

Compute role

properties.isSystemExtension

boolean

Indicates if the extension is for the system.

properties.provisioningState

ProvisioningState

Provisioning state of extension.

properties.publisher

string

The publisher of the VM Extension

properties.sourceBlob

AzureBlob

URI to Azure or AzureStack blob.

properties.supportMultipleExtensions

boolean

True if supports multiple extensions.

properties.vmOsType

OsType

Target virtual machine operating system type necessary for deploying the extension handler.

properties.vmScaleSetEnabled

boolean

Value indicating whether the extension is enabled for virtual machine scale set support.

Responses

Name Type Description
200 OK

VMExtension

OK

201 Created

VMExtension

OK

Other Status Codes

CrpErrorResponse

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

Create a Virtual Machine Extension Image.

Sample request

PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Compute.Admin/locations/local/artifactTypes/VMExtension/publishers/Microsoft/types/MicroExtension/versions/0.2.0?api-version=2015-12-01-preview

{
  "properties": {
    "vmOsType": "Linux",
    "computeRole": "N/A",
    "vmScaleSetEnabled": false,
    "supportMultipleExtensions": true,
    "isSystemExtension": false,
    "sourceBlob": {
      "uri": "https://test.blob.local.azurestack.external/test/Microsoft.Powershell.DSC_2.19.0.0.zip"
    }
  }
}

Sample response

{
  "id": "/subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/providers/Microsoft.Compute.Admin/locations/local/artifactTypes/VMExtension/publishers/Microsoft/types/MicroExtension/versions/0.2.0",
  "type": "Microsoft.Compute.Admin/locations/artifactTypes/VMExtension/publishers/types/versions/",
  "location": "local",
  "properties": {
    "vmOsType": "Linux",
    "computeRole": "N/A",
    "vmScaleSetEnabled": false,
    "supportMultipleExtensions": true,
    "isSystemExtension": false,
    "provisioningState": "Succeeded"
  }
}
{
  "id": "/subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/providers/Microsoft.Compute.Admin/locations/local/artifactTypes/VMExtension/publishers/Microsoft/types/MicroExtension/versions/0.2.0",
  "type": "Microsoft.Compute.Admin/locations/artifactTypes/VMExtension/publishers/types/versions/",
  "location": "local",
  "properties": {
    "vmOsType": "Linux",
    "computeRole": "N/A",
    "vmScaleSetEnabled": false,
    "supportMultipleExtensions": true,
    "isSystemExtension": false,
    "provisioningState": "Succeeded"
  }
}

Definitions

Name Description
AzureBlob

Azure or AzureStack blob information.

CrpErrorResponse

Error response

ErrorDetail

The error detail.

OsType

Operating system type.

ProvisioningState

The provisioning state of the resource.

VMExtension

Virtual Machine Extension Image.

VMExtensionParameters

Parameters used to create a new Virtual Machine Extension Image.

AzureBlob

Azure or AzureStack blob information.

Name Type Description
uri

string

URI to Azure or AzureStack blob.

CrpErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ErrorDetail

The error detail.

Name Type Description
code

string

The error code.

message

string

The error message.

target

string

The error target.

OsType

Operating system type.

Value Description
Unknown
Windows
Linux

ProvisioningState

The provisioning state of the resource.

Value Description
Creating
Failed
Succeeded
Canceled

VMExtension

Virtual Machine Extension Image.

Name Type Description
id

string

ID of the resource.

location

string

Location of the resource.

name

string

Name of the resource.

properties.computeRole

string

Compute role

properties.isSystemExtension

boolean

Indicates if the extension is for the system.

properties.provisioningState

ProvisioningState

Provisioning state of extension.

properties.publisher

string

The publisher of the VM Extension

properties.sourceBlob

AzureBlob

URI to Azure or AzureStack blob.

properties.supportMultipleExtensions

boolean

True if supports multiple extensions.

properties.vmOsType

OsType

Target virtual machine operating system type necessary for deploying the extension handler.

properties.vmScaleSetEnabled

boolean

Value indicating whether the extension is enabled for virtual machine scale set support.

type

string

Type of Resource.

VMExtensionParameters

Parameters used to create a new Virtual Machine Extension Image.

Name Type Description
properties.computeRole

string

Compute role

properties.isSystemExtension

boolean

Indicates if the extension is for the system.

properties.provisioningState

ProvisioningState

Provisioning state of extension.

properties.publisher

string

The publisher of the VM Extension

properties.sourceBlob

AzureBlob

URI to Azure or AzureStack blob.

properties.supportMultipleExtensions

boolean

True if supports multiple extensions.

properties.vmOsType

OsType

Target virtual machine operating system type necessary for deploying the extension handler.

properties.vmScaleSetEnabled

boolean

Value indicating whether the extension is enabled for virtual machine scale set support.