是否有REST API来获取订阅中的所有潜在资源? [英] Is there a REST API to get all the potential resources in a subscription?

查看:59
本文介绍了是否有REST API来获取订阅中的所有潜在资源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经知道存在的API,https://docs.microsoft.com/en-us/rest/api/resources/resources/list#code-try-0

I already know of the API that exists, https://docs.microsoft.com/en-us/rest/api/resources/resources/list#code-try-0

返回给定订阅的所有当前资源。但是,我想知道是否有一个API也能获得订阅的所有潜在资源?我看了,但找不到任何东西。谢谢!

which returns all the current resources given a subscription. However, I was wondering if there was an API that would also get all the potential resources given a subscription? I looked but could not find anything for that. Thanks!

推荐答案

您能详细说明"潜在资源"吗?

Could you elaborate on "potential resources"?

首先猜测,是否尚未创建(部署)资源。如果是这种情况,我相信您可以使用以下API来获取您需要的内容。

First guess, was resources yet to be created (being deployed). If that is the case, I believe you can use the following APIs to fetch what you need.


  1. 通过调用  部署 - 订阅范围列表 API,查询参数"
  1. Get all deployments by calling the Deployments - List At Subscription Scope API with query parameter `


filter = provisioningState
eq'Creating'`
  • 通过调用  部署
    操作 - 订阅范围列表
    API
  • 解析响应获取正在创建的资源的详细信息
  • filter=provisioningState eq 'Creating'`
  • Loop through the deployments and get deployment operations by calling the Deployment Operations - List At Subscription Scope API
  • Parse the response to get the details of resources being created
  • 如果我猜错了,请告诉我。

    Please let me know if I've guessed incorrectly.


    这篇关于是否有REST API来获取订阅中的所有潜在资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆