指定した場所、発行元、オファーの仮想マシン イメージ SKU の一覧を取得します。
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus?api-version=2024-03-01
URI パラメーター
名前 |
/ |
必須 |
型 |
説明 |
location
|
path |
True
|
string
|
サポートされている Azure リージョンの名前。
|
offer
|
path |
True
|
string
|
有効なイメージ発行元オファー。
|
publisherName
|
path |
True
|
string
|
有効なイメージ発行元。
|
subscriptionId
|
path |
True
|
string
|
Microsoft Azure サブスクリプションを一意に識別するサブスクリプション資格情報。 サブスクリプション ID は、全ての修理依頼についてURI の一部を生じさせます。
|
api-version
|
query |
True
|
string
|
クライアント API のバージョン。
|
応答
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名前 |
説明 |
user_impersonation
|
ユーザー アカウントの借用
|
例
VirtualMachineImage_ListSkus_MaximumSet_Gen
Sample Request
GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/aaaa/publishers/aaaaaaaaaaaaaaaaaaaaaaaaaaaa/artifacttypes/vmimage/offers/aaaaaaa/skus?api-version=2024-03-01
/**
* Samples for VirtualMachineImages ListSkus.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/
* virtualMachineImageExamples/VirtualMachineImage_ListSkus_MaximumSet_Gen.json
*/
/**
* Sample code: VirtualMachineImage_ListSkus_MaximumSet_Gen.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void virtualMachineImageListSkusMaximumSetGen(com.azure.resourcemanager.AzureResourceManager azure) {
azure.virtualMachines().manager().serviceClient().getVirtualMachineImages().listSkusWithResponse("aaaa",
"aaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaa", com.azure.core.util.Context.NONE);
}
}
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/virtualMachineImageExamples/VirtualMachineImage_ListSkus_MaximumSet_Gen.json
func ExampleVirtualMachineImagesClient_ListSKUs_virtualMachineImageListSkusMaximumSetGen() {
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.NewVirtualMachineImagesClient().ListSKUs(ctx, "aaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaa", 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.VirtualMachineImageResourceArray = []*armcompute.VirtualMachineImageResource{
// {
// ID: to.Ptr("aaaaaaaaaaa"),
// Name: to.Ptr("aaaaaaaa"),
// ExtendedLocation: &armcompute.ExtendedLocation{
// Name: to.Ptr("aaaaaaaaaaaaaaaaaaaaa"),
// Type: to.Ptr(armcompute.ExtendedLocationTypesEdgeZone),
// },
// Location: to.Ptr("aaaaaaaaaaaaaaaaaa"),
// Tags: map[string]*string{
// "key7868": to.Ptr("aaaaa"),
// },
// }}
}
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": "aaaaaaaa",
"location": "aaaaaaaaaaaaaaaaaa",
"tags": {
"key7868": "aaaaa"
},
"extendedLocation": {
"name": "aaaaaaaaaaaaaaaaaaaaa",
"type": "EdgeZone"
},
"id": "aaaaaaaaaaa"
}
]
VirtualMachineImage_ListSkus_MinimumSet_Gen
Sample Request
GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/aaaa/publishers/aaaaaaaaaaaaa/artifacttypes/vmimage/offers/aaaaaaa/skus?api-version=2024-03-01
/**
* Samples for VirtualMachineImages ListSkus.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/examples/
* virtualMachineImageExamples/VirtualMachineImage_ListSkus_MinimumSet_Gen.json
*/
/**
* Sample code: VirtualMachineImage_ListSkus_MinimumSet_Gen.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void virtualMachineImageListSkusMinimumSetGen(com.azure.resourcemanager.AzureResourceManager azure) {
azure.virtualMachines().manager().serviceClient().getVirtualMachineImages().listSkusWithResponse("aaaa",
"aaaaaaaaaaaaa", "aaaaaaa", com.azure.core.util.Context.NONE);
}
}
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/virtualMachineImageExamples/VirtualMachineImage_ListSkus_MinimumSet_Gen.json
func ExampleVirtualMachineImagesClient_ListSKUs_virtualMachineImageListSkusMinimumSetGen() {
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.NewVirtualMachineImagesClient().ListSKUs(ctx, "aaaa", "aaaaaaaaaaaaa", "aaaaaaa", 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.VirtualMachineImageResourceArray = []*armcompute.VirtualMachineImageResource{
// {
// ID: to.Ptr("aaaaaaaaaaa"),
// Name: to.Ptr("aaaaaaaa"),
// Location: to.Ptr("aaaaaaaaaaaaaaaaaa"),
// }}
}
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": "aaaaaaaa",
"location": "aaaaaaaaaaaaaaaaaa",
"id": "aaaaaaaaaaa"
}
]
定義
ApiError
API エラー。
名前 |
型 |
説明 |
code
|
string
|
エラー コード。
|
details
|
ApiErrorBase[]
|
Api エラーの詳細
|
innererror
|
InnerError
|
Api の内部エラー
|
message
|
string
|
エラー メッセージ。
|
target
|
string
|
特定のエラーのターゲット。
|
ApiErrorBase
API エラーベース。
名前 |
型 |
説明 |
code
|
string
|
エラー コード。
|
message
|
string
|
エラー メッセージ。
|
target
|
string
|
特定のエラーのターゲット。
|
CloudError
コンピューティング サービスからのエラー応答。
ExtendedLocation
拡張場所の複合型。
ExtendedLocationTypes
拡張場所の型。
InnerError
内部エラーの詳細。
名前 |
型 |
説明 |
errordetail
|
string
|
内部エラー メッセージまたは例外ダンプ。
|
exceptiontype
|
string
|
例外の種類。
|
VirtualMachineImageResource
仮想マシン イメージ のリソース情報。
名前 |
型 |
説明 |
extendedLocation
|
ExtendedLocation
|
仮想マシンの拡張された場所。
|
id
|
string
|
リソース ID
|
location
|
string
|
リソースのサポートされている Azure の場所。
|
name
|
string
|
リソースの名前。
|
tags
|
object
|
仮想マシンに割り当てられるタグを指定します。 タグの使用の詳細については、「タグ を使用して Azure リソースを整理する」を参照してください。
|