删除配额、计划、套餐和订阅Delete quotas, plans, offers, and subscriptions
本文介绍如何删除不再需要的配额、计划、套餐和订阅。This article describes how to delete quotas, plans, offers, and subscriptions that you no longer need. 一般原则是只能删除不使用的项。As a general principle, you can delete only what isn't in use. 例如，只能删除没有附属订阅的套餐。For example, deleting an offer is only possible if there are no subscriptions that belong to that offer.
订阅对此一般原则例外：可以删除包含资源的订阅；资源将随着订阅一起删除。Subscriptions are the exception to this general principle: you can delete subscriptions that contain resources and the resources will be deleted along with the subscription.
如果要删除配额，则必须重新完成使用该配额的所有计划和套餐。If you want to delete a quota, you must work back through any plans and offers that use that quota. 从套餐开始，确保其没有订阅，删除每个套餐，然后删除使用该配额的计划，依此类推。Starting with the offers, ensure they have no subscriptions, delete each offer, then delete the plans that use the quota, and so on.
删除订阅Delete a subscription
若要删除某个订阅，请依次选择“所有服务”和“用户订阅”，显示系统上所有订阅的列表。**** ****To delete a subscription, select All services, then User subscriptions, to display a list of all subscriptions on the system. 如果你正在处理某个套餐，则也可以从此处选择“订阅”****。If you're working on an offer, you can also select Subscriptions from there.
可以从此列表中删除订阅，或者使用 PowerShell 编写脚本来删除所有订阅。You can delete subscriptions from this list, or you can use PowerShell to write a script that deletes all subscriptions for you. 这些命令记录在“订阅 - 删除”参考中。These commands are documented in the Subscriptions - Delete reference.
删除某个订阅也会删除其包含的所有数据和资源。Deleting a subscription also deletes any data and resources it contains.
删除套餐Delete an offer
若要删除某个套餐，请在管理员门户中依次转到“所有服务”、“套餐”。**** ****To delete an offer, in the administrator portal, go to All services, then Offers. 选择要删除的套餐，然后选择“删除”。****Select the offer you want to delete, then select Delete.
只能删除未被任何订阅使用的套餐。You can only delete an offer when there are no subscriptions using it. 如果订阅基于套餐存在，则“删除”选项会不可用****。If subscriptions exist based on the offer, the Delete option isn't available. 对于这种情况，请参阅删除订阅部分。In this case, see the Delete a subscription section.
删除计划Delete a plan
若要删除某个计划，请在管理员门户中依次转到“所有服务”、“计划”。**** ****To delete a plan, in the administrator portal go to All services, then Plans. 选择要删除的计划，然后选择“删除”。****Select the plan you want to delete, then select Delete.
只能删除未被任何套餐或订阅使用的计划。You can only delete a plan when there are no offers or subscriptions using it. 如果有套餐使用了该计划，删除该计划将会失败，并且会收到错误消息。If there are offers that use the plan, delete the plan, allow it to fail, and you'll receive an error message. 可以选择“父套餐”显示正在使用该计划的套餐列表。****You can select Parent offers to display a list of offers that use the plan. 有关删除套餐的详细信息，请参阅删除套餐。For more information about deleting offers, see Delete an offer.
即使计划不是套餐的一部分，这些计划也可能已作为附加计划直接添加到订阅。Plans might have been added directly to a subscription as add-on plans, even if they're not part of the offer. 在此情况下，必须先从使用这些附加计划的订阅中删除这些附加计划，然后才能删除该计划。In this case, they must be removed from the subscriptions that use them before the plan can be deleted.
此外，如果某个计划是订阅中给定资源的唯一源，则无法从该订阅中删除该计划。Also, a plan can't be removed from a subscription if it's the only source of a given resource for that subscription. 例如，如果计划 A 已添加到订阅 1，并且它是向订阅提供网络配额的唯一计划，则无法从该订阅中删除该计划。For example, if Plan A has been added to Subscription 1, and it's the only plan providing a network quota to the subscription, it can't be removed from the subscription. 因此也就无法删除该计划。Therefore, it can't be deleted.
编辑和删除配额Edit and delete a quota
可以使用管理员门户查看和编辑现有配额：选择“区域管理”，选择相关的资源提供程序，然后选择“配额”**** ****。You can view and edit existing quotas using the administrator portal: select Region Management, then select the relevant resource provider, and then select Quotas. 也可以删除特定资源提供程序的配额。You can also delete quotas for certain resource providers.
或者，可以使用以下 REST API 删除某些配额：You can also delete some quotas using these REST APIs:
如果当前有任何计划正在使用某个配额，则无法删除该配额。You can't delete a quota if there are any current plans that use it. 必须先删除引用该配额的计划。You must first delete the plan that references the quota.