列出 Analysis Services 资源提供程序的合格 SKU。
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/skus?api-version=2017-08-01
URI 参数
名称 |
在 |
必需 |
类型 |
说明 |
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
|
模拟用户帐户
|
示例
List eligible SKUs for a new server
Sample Request
GET https://management.azure.com/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/providers/Microsoft.AnalysisServices/skus?api-version=2017-08-01
package armanalysisservices_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/analysisservices/armanalysisservices"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/analysisservices/resource-manager/Microsoft.AnalysisServices/stable/2017-08-01/examples/listSkusForNew.json
func ExampleServersClient_ListSKUsForNew() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armanalysisservices.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServersClient().ListSKUsForNew(ctx, 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.SKUEnumerationForNewResourceResult = armanalysisservices.SKUEnumerationForNewResourceResult{
// Value: []*armanalysisservices.ResourceSKU{
// {
// Name: to.Ptr("B1"),
// },
// {
// Name: to.Ptr("B2"),
// },
// {
// Name: to.Ptr("D1"),
// },
// {
// Name: to.Ptr("S0"),
// },
// {
// Name: to.Ptr("S1"),
// },
// {
// Name: to.Ptr("S2"),
// },
// {
// Name: to.Ptr("S3"),
// },
// {
// Name: to.Ptr("S4"),
// }},
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureAnalysisServices } = require("@azure/arm-analysisservices");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Lists eligible SKUs for Analysis Services resource provider.
*
* @summary Lists eligible SKUs for Analysis Services resource provider.
* x-ms-original-file: specification/analysisservices/resource-manager/Microsoft.AnalysisServices/stable/2017-08-01/examples/listSkusForNew.json
*/
async function listEligibleSkUsForANewServer() {
const subscriptionId = "613192d7-503f-477a-9cfe-4efc3ee2bd60";
const credential = new DefaultAzureCredential();
const client = new AzureAnalysisServices(credential, subscriptionId);
const result = await client.servers.listSkusForNew();
console.log(result);
}
listEligibleSkUsForANewServer().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Analysis;
using Azure.ResourceManager.Analysis.Models;
using Azure.ResourceManager.Resources;
// Generated from example definition: specification/analysisservices/resource-manager/Microsoft.AnalysisServices/stable/2017-08-01/examples/listSkusForNew.json
// this example is just showing the usage of "Servers_ListSkusForNew" 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 = "613192d7-503f-477a-9cfe-4efc3ee2bd60";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation and iterate over the result
await foreach (AnalysisResourceSku item in subscriptionResource.GetEligibleSkusAsync())
{
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
Sample Response
{
"value": [
{
"name": "B1"
},
{
"name": "B2"
},
{
"name": "D1"
},
{
"name": "S0"
},
{
"name": "S1"
},
{
"name": "S2"
},
{
"name": "S3"
},
{
"name": "S4"
}
]
}
定义
ErrorAdditionalInfo
资源管理错误附加信息。
名称 |
类型 |
说明 |
info
|
object
|
其他信息。
|
type
|
string
|
其他信息类型。
|
ErrorDetail
错误详细信息。
名称 |
类型 |
说明 |
additionalInfo
|
ErrorAdditionalInfo[]
|
错误附加信息。
|
code
|
string
|
错误代码。
|
details
|
ErrorDetail[]
|
错误详细信息。
|
httpStatusCode
|
integer
|
http 状态代码
|
message
|
string
|
错误消息。
|
subCode
|
integer
|
错误子代码
|
target
|
string
|
错误目标。
|
timeStamp
|
string
|
错误的时间戳。
|
ErrorResponse
描述错误响应的格式。
ResourceSku
表示 Analysis Services 资源的 SKU 名称和 Azure 定价层。
名称 |
类型 |
默认值 |
说明 |
capacity
|
integer
|
1
|
只读查询池中的实例数。
|
name
|
string
|
|
SKU 级别的名称。
|
tier
|
SkuTier
|
|
SKU 应用到的 Azure 定价层的名称。
|
SkuEnumerationForNewResourceResult
一个 对象,表示枚举新资源的 SKU。
SkuTier
SKU 应用到的 Azure 定价层的名称。
名称 |
类型 |
说明 |
Basic
|
string
|
|
Development
|
string
|
|
Standard
|
string
|
|