取得虛擬機擴充功能映像類型的清單。
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types?api-version=2024-03-01
URI 參數
名稱 |
位於 |
必要 |
類型 |
Description |
location
|
path |
True
|
string
|
支援的 Azure 區域名稱。
|
publisherName
|
path |
True
|
string
|
|
subscriptionId
|
path |
True
|
string
|
可唯一識別 Microsoft Azure 訂用帳戶的訂用帳戶認證。 訂用帳戶識別碼會構成每個服務呼叫 URI 的一部分。
|
api-version
|
query |
True
|
string
|
用戶端 API 版本。
|
回應
安全性
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名稱 |
Description |
user_impersonation
|
模擬您的用戶帳戶
|
範例
VirtualMachineExtensionImage_ListTypes_MaximumSet_Gen
Sample Request
GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/aaaaaaaaaaaaaaaaaaaaaaaaaa/publishers/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/artifacttypes/vmextension/types?api-version=2024-03-01
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python virtual_machine_extension_image_list_types_maximum_set_gen.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)
response = client.virtual_machine_extension_images.list_types(
location="aaaaaaaaaaaaaaaaaaaaaaaaaa",
publisher_name="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
)
print(response)
# x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListTypes_MaximumSet_Gen.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListTypes_MaximumSet_Gen.json
func ExampleVirtualMachineExtensionImagesClient_ListTypes_virtualMachineExtensionImageListTypesMaximumSetGen() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewVirtualMachineExtensionImagesClient().ListTypes(ctx, "aaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.VirtualMachineExtensionImageArray = []*armcompute.VirtualMachineExtensionImage{
// {
// Name: to.Ptr("aaaaaaaaaaaaaaa"),
// Type: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
// ID: to.Ptr("aaaaaaaaaaaaaaaaa"),
// Location: to.Ptr("aaaaaaaaaaaaa"),
// Tags: map[string]*string{
// "key9885": to.Ptr("aaaaaaaaa"),
// },
// Properties: &armcompute.VirtualMachineExtensionImageProperties{
// ComputeRole: to.Ptr("aaaaaaaaaaaaaaaaa"),
// HandlerSchema: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
// OperatingSystem: to.Ptr("aaaaaaaaaaaaaaaaaa"),
// SupportsMultipleExtensions: to.Ptr(true),
// VMScaleSetEnabled: to.Ptr(true),
// },
// }}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets a list of virtual machine extension image types.
*
* @summary Gets a list of virtual machine extension image types.
* x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListTypes_MaximumSet_Gen.json
*/
async function virtualMachineExtensionImageListTypesMaximumSetGen() {
const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}";
const location = "aaaaaaaaaaaaaaaaaaaaaaaaaa";
const publisherName = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
const credential = new DefaultAzureCredential();
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.virtualMachineExtensionImages.listTypes(location, publisherName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
[
{
"properties": {
"operatingSystem": "aaaaaaaaaaaaaaaaaa",
"computeRole": "aaaaaaaaaaaaaaaaa",
"handlerSchema": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"vmScaleSetEnabled": true,
"supportsMultipleExtensions": true
},
"id": "aaaaaaaaaaaaaaaaa",
"name": "aaaaaaaaaaaaaaa",
"type": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"location": "aaaaaaaaaaaaa",
"tags": {
"key9885": "aaaaaaaaa"
}
}
]
VirtualMachineExtensionImage_ListTypes_MinimumSet_Gen
Sample Request
GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/aaaa/publishers/aa/artifacttypes/vmextension/types?api-version=2024-03-01
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python virtual_machine_extension_image_list_types_minimum_set_gen.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)
response = client.virtual_machine_extension_images.list_types(
location="aaaa",
publisher_name="aa",
)
print(response)
# x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListTypes_MinimumSet_Gen.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListTypes_MinimumSet_Gen.json
func ExampleVirtualMachineExtensionImagesClient_ListTypes_virtualMachineExtensionImageListTypesMinimumSetGen() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewVirtualMachineExtensionImagesClient().ListTypes(ctx, "aaaa", "aa", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.VirtualMachineExtensionImageArray = []*armcompute.VirtualMachineExtensionImage{
// {
// Name: to.Ptr("aaaaaaaaaaaaaaa"),
// ID: to.Ptr("aaaaaaaaaaaaaaaaa"),
// Location: to.Ptr("aaaaaaaaaaaaa"),
// }}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Gets a list of virtual machine extension image types.
*
* @summary Gets a list of virtual machine extension image types.
* x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/virtualMachineExtensionImageExamples/VirtualMachineExtensionImage_ListTypes_MinimumSet_Gen.json
*/
async function virtualMachineExtensionImageListTypesMinimumSetGen() {
const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}";
const location = "aaaa";
const publisherName = "aa";
const credential = new DefaultAzureCredential();
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.virtualMachineExtensionImages.listTypes(location, publisherName);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
[
{
"name": "aaaaaaaaaaaaaaa",
"location": "aaaaaaaaaaaaa",
"id": "aaaaaaaaaaaaaaaaa"
}
]
定義
ApiError
Api 錯誤。
名稱 |
類型 |
Description |
code
|
string
|
錯誤碼。
|
details
|
ApiErrorBase[]
|
API 錯誤詳細數據
|
innererror
|
InnerError
|
Api 內部錯誤
|
message
|
string
|
錯誤訊息。
|
target
|
string
|
特定錯誤的目標。
|
ApiErrorBase
Api 錯誤基底。
名稱 |
類型 |
Description |
code
|
string
|
錯誤碼。
|
message
|
string
|
錯誤訊息。
|
target
|
string
|
特定錯誤的目標。
|
CloudError
計算服務的錯誤回應。
名稱 |
類型 |
Description |
error
|
ApiError
|
Api 錯誤。
|
InnerError
內部錯誤詳細數據。
名稱 |
類型 |
Description |
errordetail
|
string
|
內部錯誤訊息或例外狀況傾印。
|
exceptiontype
|
string
|
例外狀況型別。
|
VirtualMachineExtensionImage
描述虛擬機擴充功能映像。
名稱 |
類型 |
Description |
id
|
string
|
資源標識碼
|
location
|
string
|
資源位置
|
name
|
string
|
資源名稱
|
properties.computeRole
|
string
|
此延伸模組支援的角色類型 (IaaS 或 PaaS) 。
|
properties.handlerSchema
|
string
|
發行者所定義的架構,其中延伸模組取用者應該在相符的架構中提供設定。
|
properties.operatingSystem
|
string
|
此延伸模組支援的作業系統。
|
properties.supportsMultipleExtensions
|
boolean
|
處理程式是否可以支援多個延伸模組。
|
properties.vmScaleSetEnabled
|
boolean
|
延伸模組是否可以在 xRP VMScaleSet 上使用。 根據預設,現有的擴充功能可在擴展集上使用,但在某些情況下,發行者想要明確指出只有CRP VM才啟用擴充功能,但未啟用VMSS的情況。
|
tags
|
object
|
資源標籤
|
type
|
string
|
資源類型
|