你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Savings Plan Order Alias - Create

创建储蓄计划。 详细了解 https://go.microsoft.com/fwlink/?linkid=2215851 所需的权限

PUT https://management.azure.com/providers/Microsoft.BillingBenefits/savingsPlanOrderAliases/{savingsPlanOrderAliasName}?api-version=2022-11-01

URI 参数

名称 必需 类型 说明
savingsPlanOrderAliasName
path True

string

pattern: ^[a-zA-Z0-9_\-\.]+$

保存计划订单别名的名称

api-version
query True

string

服务要使用的 API 版本

请求正文

名称 必需 类型 说明
sku True

Sku

节省计划 SKU

kind

string

资源提供程序类型

properties.appliedScopeProperties

AppliedScopeProperties

特定于应用的范围类型的属性。 如果不适用,则不需要。

properties.appliedScopeType

AppliedScopeType

应用的作用域的类型。

properties.billingPlan

BillingPlan

表示 ISO 8601 格式的计费计划。 仅适用于每月计费计划。

properties.billingScopeId

string

购买权益将收取费用的订阅

properties.commitment

Commitment

承诺实现权益。

properties.displayName

string

显示名称

properties.renew

boolean

将此项设置为 true 将在到期日期时间自动购买新权益。

properties.term

Term

以 ISO 8601 格式表示权益术语。

响应

名称 类型 说明
200 OK

SavingsPlanOrderAliasModel

已创建资源。

201 Created

SavingsPlanOrderAliasModel

正在处理请求。

标头

  • Azure-AsyncOperation: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

描述作失败的原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

SavingsPlanOrderAliasCreate
SavingsPlanOrderAliasCreateSingleScope

SavingsPlanOrderAliasCreate

示例请求

PUT https://management.azure.com/providers/Microsoft.BillingBenefits/savingsPlanOrderAliases/spAlias123?api-version=2022-11-01

{
  "sku": {
    "name": "Compute_Savings_Plan"
  },
  "properties": {
    "billingScopeId": "/subscriptions/30000000-0000-0000-0000-000000000000",
    "term": "P3Y",
    "appliedScopeType": "Shared",
    "appliedScopeProperties": null,
    "displayName": "Compute_SavingsPlan_10-28-2022_16-38",
    "billingPlan": "P1M",
    "commitment": {
      "grain": "Hourly",
      "currencyCode": "USD",
      "amount": 0.001
    }
  }
}

示例响应

Azure-AsyncOperation: https://management.azure.com/Microsoft.BillingBenefits/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2021-07-01-privatepreview
Retry-After: 5
{
  "id": "/providers/microsoft.billingbenefits/savingsPlanOrderAliases/SavingsPlan_1667000324595",
  "name": "SavingsPlan_1667000324595",
  "type": "Microsoft.BillingBenefits/savingsPlanOrderAliases",
  "kind": null,
  "sku": {
    "name": "Compute_Savings_Plan"
  },
  "properties": {
    "savingsPlanOrderId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/30000000-0000-0000-0000-000000000023",
    "billingScopeId": "/subscriptions/30000000-0000-0000-0000-000000000000",
    "billingPlan": "P1M",
    "appliedScopeProperties": null,
    "commitment": {
      "grain": "Hourly",
      "currencyCode": "USD",
      "amount": 0.001
    },
    "appliedScopeType": "Shared",
    "displayName": "Compute_SavingsPlan_10-28-2022_16-38",
    "provisioningState": "Created",
    "term": "P3Y"
  }
}
{
  "id": "/providers/microsoft.billingbenefits/savingsPlanOrderAliases/SavingsPlan_1667000324595",
  "name": "SavingsPlan_1667000324595",
  "type": "Microsoft.BillingBenefits/savingsPlanOrderAliases",
  "kind": null,
  "sku": {
    "name": "Compute_Savings_Plan"
  },
  "properties": {
    "savingsPlanOrderId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/30000000-0000-0000-0000-000000000023",
    "billingScopeId": "/subscriptions/30000000-0000-0000-0000-000000000000",
    "billingPlan": "P1M",
    "appliedScopeProperties": null,
    "commitment": {
      "grain": "Hourly",
      "currencyCode": "USD",
      "amount": 0.001
    },
    "appliedScopeType": "Shared",
    "displayName": "Compute_SavingsPlan_10-28-2022_16-38",
    "provisioningState": "Created",
    "term": "P3Y"
  }
}

SavingsPlanOrderAliasCreateSingleScope

示例请求

PUT https://management.azure.com/providers/Microsoft.BillingBenefits/savingsPlanOrderAliases/spAlias123?api-version=2022-11-01

{
  "sku": {
    "name": "Compute_Savings_Plan"
  },
  "properties": {
    "billingScopeId": "/providers/Microsoft.Billing/billingAccounts/1234567/billingSubscriptions/30000000-0000-0000-0000-000000000000",
    "appliedScopeType": "Single",
    "appliedScopeProperties": {
      "subscriptionId": "/subscriptions/30000000-0000-0000-0000-000000000000"
    },
    "term": "P3Y",
    "displayName": "Compute_SavingsPlan_10-28-2022_16-38",
    "billingPlan": "P1M",
    "commitment": {
      "grain": "Hourly",
      "currencyCode": "USD",
      "amount": 0.001
    }
  }
}

示例响应

Azure-AsyncOperation: https://management.azure.com/Microsoft.BillingBenefits/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2021-07-01-privatepreview
Retry-After: 5
{
  "id": "/providers/microsoft.billingbenefits/savingsPlanOrderAliases/SavingsPlan_1667000324595",
  "name": "SavingsPlan_1667000324595",
  "type": "Microsoft.BillingBenefits/savingsPlanOrderAliases",
  "kind": null,
  "sku": {
    "name": "Compute_Savings_Plan"
  },
  "properties": {
    "savingsPlanOrderId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/30000000-0000-0000-0000-000000000023",
    "billingPlan": "P1M",
    "billingScopeId": "/providers/Microsoft.Billing/billingAccounts/1234567/billingSubscriptions/30000000-0000-0000-0000-000000000000",
    "appliedScopeType": "Single",
    "appliedScopeProperties": {
      "subscriptionId": "/subscriptions/30000000-0000-0000-0000-000000000000"
    },
    "commitment": {
      "grain": "Hourly",
      "currencyCode": "USD",
      "amount": 0.001
    },
    "displayName": "Compute_SavingsPlan_10-28-2022_16-38",
    "provisioningState": "Created",
    "term": "P3Y"
  }
}
{
  "id": "/providers/microsoft.billingbenefits/savingsPlanOrderAliases/SavingsPlan_1667000324595",
  "name": "SavingsPlan_1667000324595",
  "type": "Microsoft.BillingBenefits/savingsPlanOrderAliases",
  "kind": null,
  "sku": {
    "name": "Compute_Savings_Plan"
  },
  "properties": {
    "savingsPlanOrderId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/30000000-0000-0000-0000-000000000023",
    "billingPlan": "P1M",
    "billingScopeId": "/providers/Microsoft.Billing/billingAccounts/1234567/billingSubscriptions/30000000-0000-0000-0000-000000000000",
    "appliedScopeType": "Single",
    "appliedScopeProperties": {
      "subscriptionId": "/subscriptions/30000000-0000-0000-0000-000000000000"
    },
    "commitment": {
      "grain": "Hourly",
      "currencyCode": "USD",
      "amount": 0.001
    },
    "displayName": "Compute_SavingsPlan_10-28-2022_16-38",
    "provisioningState": "Created",
    "term": "P3Y"
  }
}

定义

名称 说明
AppliedScopeProperties

特定于应用的范围类型的属性。 如果不适用,则不需要。

AppliedScopeType

应用的作用域的类型。

BillingPlan

表示 ISO 8601 格式的计费计划。 仅适用于每月计费计划。

Commitment

承诺实现权益。

CommitmentGrain

承诺粒度。

createdByType

创建资源的标识的类型。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

ProvisioningState

预配状态

SavingsPlanOrderAliasModel

保存计划订单别名

Sku

要为此资源应用的 SKU

systemData

与创建和上次修改资源相关的元数据。

Term

以 ISO 8601 格式表示权益术语。

AppliedScopeProperties

特定于应用的范围类型的属性。 如果不适用,则不需要。

名称 类型 说明
displayName

string

显示名称

managementGroupId

string

必须应用权益的管理组的完全限定标识符。

resourceGroupId

string

资源组的完全限定标识符。

subscriptionId

string

订阅的完全限定标识符。

tenantId

string

应用权益的租户 ID。

AppliedScopeType

应用的作用域的类型。

说明
ManagementGroup
Shared
Single

BillingPlan

表示 ISO 8601 格式的计费计划。 仅适用于每月计费计划。

说明
P1M

Commitment

承诺实现权益。

名称 类型 说明
amount

number (double)

currencyCode

string

此购买记录使用的货币的 ISO 4217 3 字母货币代码。

grain

CommitmentGrain

承诺粒度。

CommitmentGrain

承诺粒度。

说明
Hourly

createdByType

创建资源的标识的类型。

说明
Application
Key
ManagedIdentity
User

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

ProvisioningState

预配状态

说明
Cancelled
ConfirmedBilling
Created
Creating
Expired
Failed
PendingBilling
Succeeded

SavingsPlanOrderAliasModel

保存计划订单别名

名称 类型 默认值 说明
id

string

资源的完全限定资源 ID。 Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

kind

string

资源提供程序类型

name

string

资源的名称

properties.appliedScopeProperties

AppliedScopeProperties

特定于应用的范围类型的属性。 如果不适用,则不需要。

properties.appliedScopeType

AppliedScopeType

应用的作用域的类型。

properties.billingPlan

BillingPlan

表示 ISO 8601 格式的计费计划。 仅适用于每月计费计划。

properties.billingScopeId

string

购买权益将收取费用的订阅

properties.commitment

Commitment

承诺实现权益。

properties.displayName

string

显示名称

properties.provisioningState

ProvisioningState

预配状态

properties.renew

boolean

False

将此项设置为 true 将在到期日期时间自动购买新权益。

properties.savingsPlanOrderId

string

创建的储蓄计划的标识符

properties.term

Term

以 ISO 8601 格式表示权益术语。

sku

Sku

节省计划 SKU

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

type

string

资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

Sku

要为此资源应用的 SKU

名称 类型 说明
name

string

要应用的 SKU 的名称

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。

Term

以 ISO 8601 格式表示权益术语。

说明
P1Y
P3Y
P5Y