Microsoft Azure · Arazzo Workflow

Microsoft Azure List Providers and Resources

Version 1.0.0

Confirm a subscription is enabled, list its resource providers, then list its resources.

1 workflow 1 source API 1 provider
View Spec View on GitHub API ManagementCloudCloud ComputingEnterpriseInfrastructure as a ServicePlatform as a ServiceT1ArazzoWorkflows

Provider

microsoft-azure

Workflows

list-providers-and-resources
Enumerate a subscription's resource providers and its provisioned resources.
Confirms the subscription is enabled, lists its resource providers, then lists all resources in the subscription.
3 steps inputs: accessToken, apiVersion, subscriptionId outputs: providers, resources
1
getSubscription
Subscriptions_Get
Get the subscription and branch: only enumerate when it reports Enabled, otherwise end the flow.
2
listProviders
Providers_List
List the resource providers registered for the subscription, expanding resource types so available services are visible.
3
listResources
Resources_List
List every resource in the subscription alongside the provider picture.

Source API Descriptions

Arazzo Workflow Specification

microsoft-azure-list-providers-and-resources-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Microsoft Azure List Providers and Resources
  summary: Confirm a subscription is enabled, list its resource providers, then list its resources.
  description: >-
    A capability-and-inventory discovery flow. The workflow gets the subscription
    to confirm it is Enabled, lists the resource providers registered against it
    so a caller can see which Azure services are available, and then lists the
    resources currently provisioned. It is useful for tooling that needs both the
    provider registration picture and the live resource inventory in one pass.
    Every step spells out its request inline so the flow can be read and executed
    without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: azureResourceManager
  url: ../openapi/azure-resource-manager-openapi.yml
  type: openapi
workflows:
- workflowId: list-providers-and-resources
  summary: Enumerate a subscription's resource providers and its provisioned resources.
  description: >-
    Confirms the subscription is enabled, lists its resource providers, then
    lists all resources in the subscription.
  inputs:
    type: object
    required:
    - accessToken
    - subscriptionId
    properties:
      accessToken:
        type: string
        description: An Azure Resource Manager OAuth2 bearer access token.
      subscriptionId:
        type: string
        description: The ID of the target subscription.
      apiVersion:
        type: string
        description: The Azure Resource Manager API version.
        default: '2024-03-01'
  steps:
  - stepId: getSubscription
    description: >-
      Get the subscription and branch: only enumerate when it reports Enabled,
      otherwise end the flow.
    operationId: Subscriptions_Get
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: api-version
      in: query
      value: $inputs.apiVersion
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      state: $response.body#/state
    onSuccess:
    - name: subscriptionEnabled
      type: goto
      stepId: listProviders
      criteria:
      - context: $response.body
        condition: $.state == "Enabled"
        type: jsonpath
    - name: subscriptionNotEnabled
      type: end
      criteria:
      - context: $response.body
        condition: $.state != "Enabled"
        type: jsonpath
  - stepId: listProviders
    description: >-
      List the resource providers registered for the subscription, expanding
      resource types so available services are visible.
    operationId: Providers_List
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: api-version
      in: query
      value: $inputs.apiVersion
    - name: $expand
      in: query
      value: resourceTypes/aliases
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      providers: $response.body#/value
  - stepId: listResources
    description: List every resource in the subscription alongside the provider picture.
    operationId: Resources_List
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: api-version
      in: query
      value: $inputs.apiVersion
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      resources: $response.body#/value
  outputs:
    providers: $steps.listProviders.outputs.providers
    resources: $steps.listResources.outputs.resources