arazzo: 1.0.1 info: title: Google Cloud Platform Walk Resource Hierarchy summary: Find an organization, list its folders, then list the projects directly under it. description: >- Discovers the top of a resource hierarchy. The workflow searches for an organization by domain, lists the folders that are direct children of that organization, and lists the projects that are direct children of the same organization, giving a one-pass view of the first hierarchy level. 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: cloudResourceManagerApi url: ../openapi/cloud-resource-manager-openapi.yml type: openapi workflows: - workflowId: walk-resource-hierarchy summary: Resolve an organization and enumerate its child folders and projects. description: >- Searches for an organization by query, then lists its child folders and projects. inputs: type: object required: - query properties: query: type: string description: Organization search query, e.g. domain:example.com. steps: - stepId: findOrganization description: >- Search for the organization and capture the first matching organization resource name. operationId: cloudresourcemanager.organizations.search parameters: - name: query in: query value: $inputs.query - name: pageSize in: query value: 1 successCriteria: - condition: $statusCode == 200 outputs: organizationName: $response.body#/organizations/0/name - stepId: listFolders description: >- List the folders that are direct children of the resolved organization. operationId: cloudresourcemanager.folders.list parameters: - name: parent in: query value: $steps.findOrganization.outputs.organizationName successCriteria: - condition: $statusCode == 200 outputs: folders: $response.body#/folders - stepId: listProjects description: >- List the projects that are direct children of the resolved organization. operationId: cloudresourcemanager.projects.list parameters: - name: parent in: query value: $steps.findOrganization.outputs.organizationName successCriteria: - condition: $statusCode == 200 outputs: projects: $response.body#/projects outputs: organizationName: $steps.findOrganization.outputs.organizationName folders: $steps.listFolders.outputs.folders projects: $steps.listProjects.outputs.projects