구독에 사용할 수 있는 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 매개 변수
Name |
In(다음 안에) |
필수 |
형식 |
Description |
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 Flow
형식:
oauth2
Flow:
implicit
권한 부여 URL:
https://login.microsoftonline.com/common/oauth2/authorize
범위
Name |
Description |
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
확장된 위치의 형식입니다.
Name |
형식 |
Description |
EdgeZone
|
string
|
|
ResourceSku
사용 가능한 컴퓨팅 SKU에 대해 설명합니다.
Name |
형식 |
Description |
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
기본
|
ResourceSkuCapabilities
SKU 기능 개체에 대해 설명합니다.
Name |
형식 |
Description |
name
|
string
|
기능을 설명하는 고정입니다.
|
value
|
string
|
기능이 수량으로 측정되는 경우 고정입니다.
|
ResourceSkuCapacity
SKU의 크기 조정 정보를 설명합니다.
Name |
형식 |
Description |
default
|
integer
|
기본 용량입니다.
|
maximum
|
integer
|
설정할 수 있는 최대 용량입니다.
|
minimum
|
integer
|
최소 용량입니다.
|
scaleType
|
ResourceSkuCapacityScaleType
|
sku에 적용할 수 있는 배율 형식입니다.
|
ResourceSkuCapacityScaleType
sku에 적용할 수 있는 배율 형식입니다.
Name |
형식 |
Description |
Automatic
|
string
|
|
Manual
|
string
|
|
None
|
string
|
|
ResourceSkuCosts
가격 정보를 검색하기 위한 메타데이터를 설명합니다.
Name |
형식 |
Description |
extendedUnit
|
string
|
확장 단위를 표시할 고정입니다.
|
meterID
|
string
|
상거래에서 가격을 쿼리하는 데 사용됩니다.
|
quantity
|
integer
|
기본 요금제 비용을 확장하려면 승수가 필요합니다.
|
ResourceSkuLocationInfo
사용 가능한 컴퓨팅 SKU 위치 정보를 설명합니다.
Name |
형식 |
Description |
extendedLocations
|
string[]
|
확장된 위치의 이름입니다.
|
location
|
string
|
SKU의 위치
|
type
|
ExtendedLocationType
|
확장된 위치의 형식입니다.
|
zoneDetails
|
ResourceSkuZoneDetails[]
|
특정 영역의 SKU에서 사용할 수 있는 기능에 대한 세부 정보입니다.
|
zones
|
string[]
|
SKU가 지원되는 가용성 영역 목록입니다.
|
ResourceSkuRestrictionInfo
사용 가능한 컴퓨팅 SKU 제한 정보를 설명합니다.
Name |
형식 |
Description |
locations
|
string[]
|
SKU가 제한된 위치
|
zones
|
string[]
|
SKU가 제한된 가용성 영역 목록입니다.
|
ResourceSkuRestrictions
SKU의 크기 조정 정보를 설명합니다.
ResourceSkuRestrictionsReasonCode
제한 이유입니다.
Name |
형식 |
Description |
NotAvailableForSubscription
|
string
|
|
QuotaId
|
string
|
|
ResourceSkuRestrictionsType
제한 유형입니다.
Name |
형식 |
Description |
Location
|
string
|
|
Zone
|
string
|
|
ResourceSkusResult
리소스 SKU 나열 작업 응답입니다.
Name |
형식 |
Description |
nextLink
|
string
|
리소스 SKU의 다음 페이지를 가져올 URI입니다. 이 URI를 사용하여 ListNext()를 호출하여 리소스 SKU의 다음 페이지를 가져옵니다.
|
value
|
ResourceSku[]
|
구독에 사용할 수 있는 SKU 목록입니다.
|
ResourceSkuZoneDetails
SKU의 영역 기능에 대해 설명합니다.
Name |
형식 |
Description |
capabilities
|
ResourceSkuCapabilities[]
|
지정된 영역 목록에서 SKU에 사용할 수 있는 기능 목록입니다.
|
name
|
string[]
|
지정된 기능을 사용하여 SKU를 사용할 수 있는 영역 집합입니다.
|