サブスクリプションで使用できる Microsoft.Compute SKU の一覧を取得します。
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus?api-version=2021-07-01
省略可能なパラメーターを含む:
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus?api-version=2021-07-01&$filter={$filter}&includeExtendedLocations={includeExtendedLocations}
URI パラメーター
名前 |
/ |
必須 |
型 |
説明 |
subscriptionId
|
path |
True
|
string
|
Microsoft Azure サブスクリプションを一意に識別するサブスクリプション資格情報。 サブスクリプション ID は、全ての修理依頼についてURI の一部を生じさせます。
|
api-version
|
query |
True
|
string
|
クライアント API のバージョン。
|
$filter
|
query |
|
string
|
操作に適用するフィルター。 現在、 場所 フィルターのみがサポートされています。
|
includeExtendedLocations
|
query |
|
string
|
[拡張された場所] 情報を応答に含めるか含めないようにします。
|
応答
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
名前 |
説明 |
user_impersonation
|
ユーザー アカウントの借用
|
例
Lists all available Resource SKUs
要求のサンプル
GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/skus?api-version=2021-07-01
/**
* Samples for ResourceSkus List.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/
* ListAvailableResourceSkus.json
*/
/**
* Sample code: Lists all available Resource SKUs.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void listsAllAvailableResourceSKUs(com.azure.resourcemanager.AzureResourceManager azure) {
azure.virtualMachines().manager().serviceClient().getResourceSkus().list(null, null,
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/v6"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7b98b36e4023331545051284d8500adf98f02fe/specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/ListAvailableResourceSkus.json
func ExampleResourceSKUsClient_NewListPager_listsAllAvailableResourceSkUs() {
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)
}
pager := clientFactory.NewResourceSKUsClient().NewListPager(&armcompute.ResourceSKUsClientListOptions{Filter: nil,
IncludeExtendedLocations: nil,
})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.ResourceSKUsResult = armcompute.ResourceSKUsResult{
// Value: []*armcompute.ResourceSKU{
// {
// Name: to.Ptr("Standard_A0"),
// Capabilities: []*armcompute.ResourceSKUCapabilities{
// {
// Name: to.Ptr("MaxResourceVolumeMB"),
// Value: to.Ptr("20480"),
// },
// {
// Name: to.Ptr("OSVhdSizeMB"),
// Value: to.Ptr("1047552"),
// },
// {
// Name: to.Ptr("vCPUs"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("HyperVGenerations"),
// Value: to.Ptr("V1"),
// },
// {
// Name: to.Ptr("MemoryGB"),
// Value: to.Ptr("0.75"),
// },
// {
// Name: to.Ptr("MaxDataDiskCount"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("LowPriorityCapable"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("PremiumIO"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("vCPUsAvailable"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("ACUs"),
// Value: to.Ptr("50"),
// },
// {
// Name: to.Ptr("vCPUsPerCore"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("EphemeralOSDiskSupported"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("AcceleratedNetworkingEnabled"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("RdmaEnabled"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("MaxNetworkInterfaces"),
// Value: to.Ptr("2"),
// }},
// Family: to.Ptr("standardA0_A7Family"),
// LocationInfo: []*armcompute.ResourceSKULocationInfo{
// {
// Location: to.Ptr("westus"),
// ZoneDetails: []*armcompute.ResourceSKUZoneDetails{
// {
// Name: []*string{
// to.Ptr("2")},
// Capabilities: []*armcompute.ResourceSKUCapabilities{
// {
// Name: to.Ptr("UltraSSDAvailable"),
// Value: to.Ptr("True"),
// }},
// }},
// Zones: []*string{
// to.Ptr("2"),
// to.Ptr("1")},
// }},
// Locations: []*string{
// to.Ptr("westus")},
// ResourceType: to.Ptr("virtualMachines"),
// Size: to.Ptr("A0"),
// Tier: to.Ptr("Standard"),
// },
// {
// Name: to.Ptr("Standard_A1"),
// Capabilities: []*armcompute.ResourceSKUCapabilities{
// {
// Name: to.Ptr("MaxResourceVolumeMB"),
// Value: to.Ptr("71680"),
// },
// {
// Name: to.Ptr("OSVhdSizeMB"),
// Value: to.Ptr("1047552"),
// },
// {
// Name: to.Ptr("vCPUs"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("HyperVGenerations"),
// Value: to.Ptr("V1"),
// },
// {
// Name: to.Ptr("MemoryGB"),
// Value: to.Ptr("1.75"),
// },
// {
// Name: to.Ptr("MaxDataDiskCount"),
// Value: to.Ptr("2"),
// },
// {
// Name: to.Ptr("LowPriorityCapable"),
// Value: to.Ptr("True"),
// },
// {
// Name: to.Ptr("PremiumIO"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("vCPUsAvailable"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("ACUs"),
// Value: to.Ptr("100"),
// },
// {
// Name: to.Ptr("vCPUsPerCore"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("EphemeralOSDiskSupported"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("AcceleratedNetworkingEnabled"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("RdmaEnabled"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("MaxNetworkInterfaces"),
// Value: to.Ptr("2"),
// }},
// Family: to.Ptr("standardA0_A7Family"),
// LocationInfo: []*armcompute.ResourceSKULocationInfo{
// {
// Location: to.Ptr("westus"),
// Zones: []*string{
// to.Ptr("1"),
// to.Ptr("2"),
// to.Ptr("3")},
// }},
// Locations: []*string{
// to.Ptr("westus")},
// ResourceType: to.Ptr("virtualMachines"),
// Size: to.Ptr("A1"),
// Tier: to.Ptr("Standard"),
// }},
// }
}
}
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 the list of Microsoft.Compute SKUs available for your Subscription.
*
* @summary Gets the list of Microsoft.Compute SKUs available for your Subscription.
* x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/ListAvailableResourceSkus.json
*/
async function listsAllAvailableResourceSkUs() {
const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}";
const credential = new DefaultAzureCredential();
const client = new ComputeManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.resourceSkus.list()) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Compute.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Compute;
// Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/ListAvailableResourceSkus.json
// this example is just showing the usage of "ResourceSkus_List" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "{subscription-id}";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation and iterate over the result
await foreach (ComputeResourceSku item in subscriptionResource.GetComputeResourceSkusAsync())
{
Console.WriteLine($"Succeeded: {item}");
}
Console.WriteLine($"Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
az vm list-skus
Click here to learn more about the Azure CLI command.
応答のサンプル
{
"value": [
{
"resourceType": "virtualMachines",
"locations": [
"westus"
],
"capabilities": [
{
"name": "MaxResourceVolumeMB",
"value": "20480"
},
{
"name": "OSVhdSizeMB",
"value": "1047552"
},
{
"name": "vCPUs",
"value": "1"
},
{
"name": "HyperVGenerations",
"value": "V1"
},
{
"name": "MemoryGB",
"value": "0.75"
},
{
"name": "MaxDataDiskCount",
"value": "1"
},
{
"name": "LowPriorityCapable",
"value": "False"
},
{
"name": "PremiumIO",
"value": "False"
},
{
"name": "vCPUsAvailable",
"value": "1"
},
{
"name": "ACUs",
"value": "50"
},
{
"name": "vCPUsPerCore",
"value": "1"
},
{
"name": "EphemeralOSDiskSupported",
"value": "False"
},
{
"name": "AcceleratedNetworkingEnabled",
"value": "False"
},
{
"name": "RdmaEnabled",
"value": "False"
},
{
"name": "MaxNetworkInterfaces",
"value": "2"
}
],
"locationInfo": [
{
"location": "westus",
"zones": [
"2",
"1"
],
"zoneDetails": [
{
"name": [
"2"
],
"capabilities": [
{
"name": "UltraSSDAvailable",
"value": "True"
}
]
}
]
}
],
"name": "Standard_A0",
"tier": "Standard",
"size": "A0",
"family": "standardA0_A7Family"
},
{
"resourceType": "virtualMachines",
"locations": [
"westus"
],
"capabilities": [
{
"name": "MaxResourceVolumeMB",
"value": "71680"
},
{
"name": "OSVhdSizeMB",
"value": "1047552"
},
{
"name": "vCPUs",
"value": "1"
},
{
"name": "HyperVGenerations",
"value": "V1"
},
{
"name": "MemoryGB",
"value": "1.75"
},
{
"name": "MaxDataDiskCount",
"value": "2"
},
{
"name": "LowPriorityCapable",
"value": "True"
},
{
"name": "PremiumIO",
"value": "False"
},
{
"name": "vCPUsAvailable",
"value": "1"
},
{
"name": "ACUs",
"value": "100"
},
{
"name": "vCPUsPerCore",
"value": "1"
},
{
"name": "EphemeralOSDiskSupported",
"value": "False"
},
{
"name": "AcceleratedNetworkingEnabled",
"value": "False"
},
{
"name": "RdmaEnabled",
"value": "False"
},
{
"name": "MaxNetworkInterfaces",
"value": "2"
}
],
"locationInfo": [
{
"location": "westus",
"zones": [
"1",
"2",
"3"
]
}
],
"name": "Standard_A1",
"tier": "Standard",
"size": "A1",
"family": "standardA0_A7Family"
}
],
"nextLink": null
}
Lists all available Resource SKUs for the specified region
要求のサンプル
GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/skus?api-version=2021-07-01&$filter=location eq 'westus'
/**
* Samples for ResourceSkus List.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/
* ListAvailableResourceSkusForARegion.json
*/
/**
* Sample code: Lists all available Resource SKUs for the specified region.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void
listsAllAvailableResourceSKUsForTheSpecifiedRegion(com.azure.resourcemanager.AzureResourceManager azure) {
azure.virtualMachines().manager().serviceClient().getResourceSkus().list("location eq 'westus'", null,
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/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7b98b36e4023331545051284d8500adf98f02fe/specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/ListAvailableResourceSkusForARegion.json
func ExampleResourceSKUsClient_NewListPager_listsAllAvailableResourceSkUsForTheSpecifiedRegion() {
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)
}
pager := clientFactory.NewResourceSKUsClient().NewListPager(&armcompute.ResourceSKUsClientListOptions{Filter: to.Ptr("location eq 'westus'"),
IncludeExtendedLocations: nil,
})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.ResourceSKUsResult = armcompute.ResourceSKUsResult{
// Value: []*armcompute.ResourceSKU{
// {
// Name: to.Ptr("Standard_A0"),
// Capabilities: []*armcompute.ResourceSKUCapabilities{
// {
// Name: to.Ptr("MaxResourceVolumeMB"),
// Value: to.Ptr("20480"),
// },
// {
// Name: to.Ptr("OSVhdSizeMB"),
// Value: to.Ptr("1047552"),
// },
// {
// Name: to.Ptr("vCPUs"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("HyperVGenerations"),
// Value: to.Ptr("V1"),
// },
// {
// Name: to.Ptr("MemoryGB"),
// Value: to.Ptr("0.75"),
// },
// {
// Name: to.Ptr("MaxDataDiskCount"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("LowPriorityCapable"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("PremiumIO"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("vCPUsAvailable"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("ACUs"),
// Value: to.Ptr("50"),
// },
// {
// Name: to.Ptr("vCPUsPerCore"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("EphemeralOSDiskSupported"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("AcceleratedNetworkingEnabled"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("RdmaEnabled"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("MaxNetworkInterfaces"),
// Value: to.Ptr("2"),
// }},
// Family: to.Ptr("standardA0_A7Family"),
// LocationInfo: []*armcompute.ResourceSKULocationInfo{
// {
// Location: to.Ptr("westus"),
// ZoneDetails: []*armcompute.ResourceSKUZoneDetails{
// {
// Name: []*string{
// to.Ptr("2")},
// Capabilities: []*armcompute.ResourceSKUCapabilities{
// {
// Name: to.Ptr("UltraSSDAvailable"),
// Value: to.Ptr("True"),
// }},
// }},
// Zones: []*string{
// to.Ptr("2"),
// to.Ptr("1")},
// }},
// Locations: []*string{
// to.Ptr("westus")},
// ResourceType: to.Ptr("virtualMachines"),
// Size: to.Ptr("A0"),
// Tier: to.Ptr("Standard"),
// },
// {
// Name: to.Ptr("Standard_A1"),
// Capabilities: []*armcompute.ResourceSKUCapabilities{
// {
// Name: to.Ptr("MaxResourceVolumeMB"),
// Value: to.Ptr("71680"),
// },
// {
// Name: to.Ptr("OSVhdSizeMB"),
// Value: to.Ptr("1047552"),
// },
// {
// Name: to.Ptr("vCPUs"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("HyperVGenerations"),
// Value: to.Ptr("V1"),
// },
// {
// Name: to.Ptr("MemoryGB"),
// Value: to.Ptr("1.75"),
// },
// {
// Name: to.Ptr("MaxDataDiskCount"),
// Value: to.Ptr("2"),
// },
// {
// Name: to.Ptr("LowPriorityCapable"),
// Value: to.Ptr("True"),
// },
// {
// Name: to.Ptr("PremiumIO"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("vCPUsAvailable"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("ACUs"),
// Value: to.Ptr("100"),
// },
// {
// Name: to.Ptr("vCPUsPerCore"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("EphemeralOSDiskSupported"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("AcceleratedNetworkingEnabled"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("RdmaEnabled"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("MaxNetworkInterfaces"),
// Value: to.Ptr("2"),
// }},
// Family: to.Ptr("standardA0_A7Family"),
// LocationInfo: []*armcompute.ResourceSKULocationInfo{
// {
// Location: to.Ptr("westus"),
// Zones: []*string{
// to.Ptr("1"),
// to.Ptr("2"),
// to.Ptr("3")},
// }},
// Locations: []*string{
// to.Ptr("westus")},
// ResourceType: to.Ptr("virtualMachines"),
// Size: to.Ptr("A1"),
// Tier: to.Ptr("Standard"),
// }},
// }
}
}
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 the list of Microsoft.Compute SKUs available for your Subscription.
*
* @summary Gets the list of Microsoft.Compute SKUs available for your Subscription.
* x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/ListAvailableResourceSkusForARegion.json
*/
async function listsAllAvailableResourceSkUsForTheSpecifiedRegion() {
const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}";
const filter = "location eq 'westus'";
const options = { filter };
const credential = new DefaultAzureCredential();
const client = new ComputeManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.resourceSkus.list(options)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Compute.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Compute;
// Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/ListAvailableResourceSkusForARegion.json
// this example is just showing the usage of "ResourceSkus_List" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "{subscription-id}";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation and iterate over the result
string filter = "location eq 'westus'";
await foreach (ComputeResourceSku item in subscriptionResource.GetComputeResourceSkusAsync(filter: filter))
{
Console.WriteLine($"Succeeded: {item}");
}
Console.WriteLine($"Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
az vm list-skus -l westus
Click here to learn more about the Azure CLI command.
応答のサンプル
{
"value": [
{
"resourceType": "virtualMachines",
"locations": [
"westus"
],
"capabilities": [
{
"name": "MaxResourceVolumeMB",
"value": "20480"
},
{
"name": "OSVhdSizeMB",
"value": "1047552"
},
{
"name": "vCPUs",
"value": "1"
},
{
"name": "HyperVGenerations",
"value": "V1"
},
{
"name": "MemoryGB",
"value": "0.75"
},
{
"name": "MaxDataDiskCount",
"value": "1"
},
{
"name": "LowPriorityCapable",
"value": "False"
},
{
"name": "PremiumIO",
"value": "False"
},
{
"name": "vCPUsAvailable",
"value": "1"
},
{
"name": "ACUs",
"value": "50"
},
{
"name": "vCPUsPerCore",
"value": "1"
},
{
"name": "EphemeralOSDiskSupported",
"value": "False"
},
{
"name": "AcceleratedNetworkingEnabled",
"value": "False"
},
{
"name": "RdmaEnabled",
"value": "False"
},
{
"name": "MaxNetworkInterfaces",
"value": "2"
}
],
"locationInfo": [
{
"location": "westus",
"zones": [
"2",
"1"
],
"zoneDetails": [
{
"name": [
"2"
],
"capabilities": [
{
"name": "UltraSSDAvailable",
"value": "True"
}
]
}
]
}
],
"name": "Standard_A0",
"tier": "Standard",
"size": "A0",
"family": "standardA0_A7Family"
},
{
"resourceType": "virtualMachines",
"locations": [
"westus"
],
"capabilities": [
{
"name": "MaxResourceVolumeMB",
"value": "71680"
},
{
"name": "OSVhdSizeMB",
"value": "1047552"
},
{
"name": "vCPUs",
"value": "1"
},
{
"name": "HyperVGenerations",
"value": "V1"
},
{
"name": "MemoryGB",
"value": "1.75"
},
{
"name": "MaxDataDiskCount",
"value": "2"
},
{
"name": "LowPriorityCapable",
"value": "True"
},
{
"name": "PremiumIO",
"value": "False"
},
{
"name": "vCPUsAvailable",
"value": "1"
},
{
"name": "ACUs",
"value": "100"
},
{
"name": "vCPUsPerCore",
"value": "1"
},
{
"name": "EphemeralOSDiskSupported",
"value": "False"
},
{
"name": "AcceleratedNetworkingEnabled",
"value": "False"
},
{
"name": "RdmaEnabled",
"value": "False"
},
{
"name": "MaxNetworkInterfaces",
"value": "2"
}
],
"locationInfo": [
{
"location": "westus",
"zones": [
"1",
"2",
"3"
]
}
],
"name": "Standard_A1",
"tier": "Standard",
"size": "A1",
"family": "standardA0_A7Family"
}
],
"nextLink": null
}
要求のサンプル
GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/skus?api-version=2021-07-01&includeExtendedLocations=true
/**
* Samples for ResourceSkus List.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/
* ListAvailableResourceSkusWithExtendedLocations.json
*/
/**
* Sample code: Lists all available Resource SKUs with Extended Location information.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void listsAllAvailableResourceSKUsWithExtendedLocationInformation(
com.azure.resourcemanager.AzureResourceManager azure) {
azure.virtualMachines().manager().serviceClient().getResourceSkus().list(null, "true",
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/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c7b98b36e4023331545051284d8500adf98f02fe/specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/ListAvailableResourceSkusWithExtendedLocations.json
func ExampleResourceSKUsClient_NewListPager_listsAllAvailableResourceSkUsWithExtendedLocationInformation() {
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)
}
pager := clientFactory.NewResourceSKUsClient().NewListPager(&armcompute.ResourceSKUsClientListOptions{Filter: nil,
IncludeExtendedLocations: to.Ptr("true"),
})
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.ResourceSKUsResult = armcompute.ResourceSKUsResult{
// Value: []*armcompute.ResourceSKU{
// {
// Name: to.Ptr("Standard_A0"),
// Capabilities: []*armcompute.ResourceSKUCapabilities{
// {
// Name: to.Ptr("MaxResourceVolumeMB"),
// Value: to.Ptr("20480"),
// },
// {
// Name: to.Ptr("OSVhdSizeMB"),
// Value: to.Ptr("1047552"),
// },
// {
// Name: to.Ptr("vCPUs"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("HyperVGenerations"),
// Value: to.Ptr("V1"),
// },
// {
// Name: to.Ptr("MemoryGB"),
// Value: to.Ptr("0.75"),
// },
// {
// Name: to.Ptr("MaxDataDiskCount"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("LowPriorityCapable"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("PremiumIO"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("vCPUsAvailable"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("ACUs"),
// Value: to.Ptr("50"),
// },
// {
// Name: to.Ptr("vCPUsPerCore"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("EphemeralOSDiskSupported"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("AcceleratedNetworkingEnabled"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("RdmaEnabled"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("MaxNetworkInterfaces"),
// Value: to.Ptr("2"),
// }},
// Family: to.Ptr("standardA0_A7Family"),
// LocationInfo: []*armcompute.ResourceSKULocationInfo{
// {
// Location: to.Ptr("westus"),
// ZoneDetails: []*armcompute.ResourceSKUZoneDetails{
// {
// Name: []*string{
// to.Ptr("2")},
// Capabilities: []*armcompute.ResourceSKUCapabilities{
// {
// Name: to.Ptr("UltraSSDAvailable"),
// Value: to.Ptr("True"),
// }},
// }},
// Zones: []*string{
// to.Ptr("2"),
// to.Ptr("1")},
// }},
// Locations: []*string{
// to.Ptr("westus")},
// ResourceType: to.Ptr("virtualMachines"),
// Size: to.Ptr("A0"),
// Tier: to.Ptr("Standard"),
// },
// {
// Name: to.Ptr("Standard_A1"),
// Capabilities: []*armcompute.ResourceSKUCapabilities{
// {
// Name: to.Ptr("MaxResourceVolumeMB"),
// Value: to.Ptr("71680"),
// },
// {
// Name: to.Ptr("OSVhdSizeMB"),
// Value: to.Ptr("1047552"),
// },
// {
// Name: to.Ptr("vCPUs"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("HyperVGenerations"),
// Value: to.Ptr("V1"),
// },
// {
// Name: to.Ptr("MemoryGB"),
// Value: to.Ptr("1.75"),
// },
// {
// Name: to.Ptr("MaxDataDiskCount"),
// Value: to.Ptr("2"),
// },
// {
// Name: to.Ptr("LowPriorityCapable"),
// Value: to.Ptr("True"),
// },
// {
// Name: to.Ptr("PremiumIO"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("vCPUsAvailable"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("ACUs"),
// Value: to.Ptr("100"),
// },
// {
// Name: to.Ptr("vCPUsPerCore"),
// Value: to.Ptr("1"),
// },
// {
// Name: to.Ptr("EphemeralOSDiskSupported"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("AcceleratedNetworkingEnabled"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("RdmaEnabled"),
// Value: to.Ptr("False"),
// },
// {
// Name: to.Ptr("MaxNetworkInterfaces"),
// Value: to.Ptr("2"),
// }},
// Family: to.Ptr("standardA0_A7Family"),
// LocationInfo: []*armcompute.ResourceSKULocationInfo{
// {
// Location: to.Ptr("westus"),
// Zones: []*string{
// to.Ptr("1"),
// to.Ptr("2"),
// to.Ptr("3")},
// },
// {
// Type: to.Ptr(armcompute.ExtendedLocationTypeEdgeZone),
// ExtendedLocations: []*string{
// to.Ptr("Las Vegas"),
// to.Ptr("Seattle"),
// to.Ptr("Portland")},
// Location: to.Ptr("westus"),
// }},
// Locations: []*string{
// to.Ptr("westus")},
// ResourceType: to.Ptr("virtualMachines"),
// Size: to.Ptr("A1"),
// Tier: to.Ptr("Standard"),
// }},
// }
}
}
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 the list of Microsoft.Compute SKUs available for your Subscription.
*
* @summary Gets the list of Microsoft.Compute SKUs available for your Subscription.
* x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/ListAvailableResourceSkusWithExtendedLocations.json
*/
async function listsAllAvailableResourceSkUsWithExtendedLocationInformation() {
const subscriptionId = process.env["COMPUTE_SUBSCRIPTION_ID"] || "{subscription-id}";
const includeExtendedLocations = "true";
const options = { includeExtendedLocations };
const credential = new DefaultAzureCredential();
const client = new ComputeManagementClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.resourceSkus.list(options)) {
resArray.push(item);
}
console.log(resArray);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Compute.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Compute;
// Generated from example definition: specification/compute/resource-manager/Microsoft.Compute/Skus/stable/2021-07-01/examples/skus/ListAvailableResourceSkusWithExtendedLocations.json
// this example is just showing the usage of "ResourceSkus_List" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "{subscription-id}";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation and iterate over the result
string includeExtendedLocations = "true";
await foreach (ComputeResourceSku item in subscriptionResource.GetComputeResourceSkusAsync(includeExtendedLocations: includeExtendedLocations))
{
Console.WriteLine($"Succeeded: {item}");
}
Console.WriteLine($"Succeeded");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
応答のサンプル
{
"value": [
{
"resourceType": "virtualMachines",
"locations": [
"westus"
],
"capabilities": [
{
"name": "MaxResourceVolumeMB",
"value": "20480"
},
{
"name": "OSVhdSizeMB",
"value": "1047552"
},
{
"name": "vCPUs",
"value": "1"
},
{
"name": "HyperVGenerations",
"value": "V1"
},
{
"name": "MemoryGB",
"value": "0.75"
},
{
"name": "MaxDataDiskCount",
"value": "1"
},
{
"name": "LowPriorityCapable",
"value": "False"
},
{
"name": "PremiumIO",
"value": "False"
},
{
"name": "vCPUsAvailable",
"value": "1"
},
{
"name": "ACUs",
"value": "50"
},
{
"name": "vCPUsPerCore",
"value": "1"
},
{
"name": "EphemeralOSDiskSupported",
"value": "False"
},
{
"name": "AcceleratedNetworkingEnabled",
"value": "False"
},
{
"name": "RdmaEnabled",
"value": "False"
},
{
"name": "MaxNetworkInterfaces",
"value": "2"
}
],
"locationInfo": [
{
"location": "westus",
"zones": [
"2",
"1"
],
"zoneDetails": [
{
"name": [
"2"
],
"capabilities": [
{
"name": "UltraSSDAvailable",
"value": "True"
}
]
}
]
}
],
"name": "Standard_A0",
"tier": "Standard",
"size": "A0",
"family": "standardA0_A7Family"
},
{
"resourceType": "virtualMachines",
"locations": [
"westus"
],
"capabilities": [
{
"name": "MaxResourceVolumeMB",
"value": "71680"
},
{
"name": "OSVhdSizeMB",
"value": "1047552"
},
{
"name": "vCPUs",
"value": "1"
},
{
"name": "HyperVGenerations",
"value": "V1"
},
{
"name": "MemoryGB",
"value": "1.75"
},
{
"name": "MaxDataDiskCount",
"value": "2"
},
{
"name": "LowPriorityCapable",
"value": "True"
},
{
"name": "PremiumIO",
"value": "False"
},
{
"name": "vCPUsAvailable",
"value": "1"
},
{
"name": "ACUs",
"value": "100"
},
{
"name": "vCPUsPerCore",
"value": "1"
},
{
"name": "EphemeralOSDiskSupported",
"value": "False"
},
{
"name": "AcceleratedNetworkingEnabled",
"value": "False"
},
{
"name": "RdmaEnabled",
"value": "False"
},
{
"name": "MaxNetworkInterfaces",
"value": "2"
}
],
"locationInfo": [
{
"location": "westus",
"zones": [
"1",
"2",
"3"
]
},
{
"location": "westus",
"extendedLocations": [
"Las Vegas",
"Seattle",
"Portland"
],
"type": "EdgeZone"
}
],
"name": "Standard_A1",
"tier": "Standard",
"size": "A1",
"family": "standardA0_A7Family"
}
],
"nextLink": null
}
定義
ExtendedLocationType
拡張場所の型。
ResourceSku
使用可能なコンピューティング SKU について説明します。
名前 |
型 |
説明 |
apiVersions
|
string[]
|
この SKU をサポートする API バージョン。
|
capabilities
|
ResourceSkuCapabilities[]
|
機能を記述する名前の値のペア。
|
capacity
|
ResourceSkuCapacity
|
スケール セット内の仮想マシンの数を指定します。
|
costs
|
ResourceSkuCosts[]
|
価格情報を取得するためのメタデータ。
|
family
|
string
|
この特定の SKU のファミリ。
|
kind
|
string
|
この SKU でサポートされているリソースの種類。
|
locationInfo
|
ResourceSkuLocationInfo[]
|
SKU が使用可能な場所の場所と可用性ゾーンの一覧。
|
locations
|
string[]
|
SKU が使用可能な場所のセット。
|
name
|
string
|
SKU の名前。
|
resourceType
|
string
|
SKU が適用されるリソースの種類。
|
restrictions
|
ResourceSkuRestrictions[]
|
SKU を使用できないための制限。 制限がない場合、これは空です。
|
size
|
string
|
SKU のサイズ。
|
tier
|
string
|
スケール セット内の仮想マシンの層を指定します。
有効値は次のとおりです。
Standard
Basic
|
ResourceSkuCapabilities
SKU 機能オブジェクトについて説明します。
名前 |
型 |
説明 |
name
|
string
|
機能を記述するための不変。
|
value
|
string
|
特徴量が数量で測定される場合は不変です。
|
ResourceSkuCapacity
SKU のスケーリング情報について説明します。
ResourceSkuCapacityScaleType
SKU に適用できるスケールの種類。
名前 |
型 |
説明 |
Automatic
|
string
|
|
Manual
|
string
|
|
None
|
string
|
|
ResourceSkuCosts
価格情報を取得するためのメタデータについて説明します。
名前 |
型 |
説明 |
extendedUnit
|
string
|
拡張単位を表示するインバリアント。
|
meterID
|
string
|
コマースから価格を照会するために使用されます。
|
quantity
|
integer
|
基準従量制課金コストを拡張するには、乗数が必要です。
|
ResourceSkuLocationInfo
使用可能なコンピューティング SKU の場所情報について説明します。
ResourceSkuRestrictionInfo
使用可能なコンピューティング SKU の制限情報について説明します。
名前 |
型 |
説明 |
locations
|
string[]
|
SKU が制限されている場所
|
zones
|
string[]
|
SKU が制限されている可用性ゾーンの一覧。
|
ResourceSkuRestrictions
SKU のスケーリング情報について説明します。
ResourceSkuRestrictionsReasonCode
制限の理由。
名前 |
型 |
説明 |
NotAvailableForSubscription
|
string
|
|
QuotaId
|
string
|
|
ResourceSkuRestrictionsType
制限の種類。
名前 |
型 |
説明 |
Location
|
string
|
|
Zone
|
string
|
|
ResourceSkusResult
Resource Skus の一覧表示操作応答。
名前 |
型 |
説明 |
nextLink
|
string
|
Resource Sku の次のページをフェッチする URI。 この URI で ListNext() を呼び出して、Resource Sku の次のページをフェッチします
|
value
|
ResourceSku[]
|
サブスクリプションで使用できる SKU の一覧。
|
ResourceSkuZoneDetails
SKU のゾーン機能について説明します。
名前 |
型 |
説明 |
capabilities
|
ResourceSkuCapabilities[]
|
指定したゾーンの一覧の SKU で使用できる機能の一覧。
|
name
|
string[]
|
指定した機能で SKU が使用できるゾーンのセット。
|