Apigee · Arazzo Workflow

Apigee Tear Down an Environment

Version 1.0.0

List deployments, undeploy a proxy revision from the environment, then delete the environment.

1 workflow 1 source API 1 provider
View Spec View on GitHub Advanced API SecurityAgentic AIAnalyticsAPI GatewayAPI GovernanceAPI HubAPI ManagementDeveloper PortalEnterpriseGenerative AIHybridIntegrationsMicroservicesMCPModel Context ProtocolMonetizationArazzoWorkflows

Provider

apigee

Workflows

teardown-environment
Clear an environment of a deployed revision and delete it.
Lists deployments, undeploys the supplied proxy revision from the environment, and deletes the environment.
3 steps inputs: apiId, environmentId, organizationId, revisionId outputs: deployments, operationName, undeployedRevision
1
listDeployments
listOrganizationDeployments
List organization deployments to inspect what is currently running before tearing the environment down.
2
undeployRevision
undeployApiProxyRevision
Undeploy the proxy revision from the environment so the environment is free of deployments.
3
deleteEnvironment
deleteEnvironment
Delete the now-empty environment, which returns a long-running operation while teardown completes.

Source API Descriptions

Arazzo Workflow Specification

apigee-environment-teardown-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Apigee Tear Down an Environment
  summary: List deployments, undeploy a proxy revision from the environment, then delete the environment.
  description: >-
    The environment decommission flow. The workflow lists organization
    deployments to inspect what is currently running, undeploys a specified
    proxy revision from the environment to clear it, and then deletes the
    environment. Environments must be free of deployed proxies before they can
    be deleted, so the undeploy step is a prerequisite. 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: apigeeApiManagement
  url: ../openapi/apigee-api-management-openapi.yml
  type: openapi
workflows:
- workflowId: teardown-environment
  summary: Clear an environment of a deployed revision and delete it.
  description: >-
    Lists deployments, undeploys the supplied proxy revision from the
    environment, and deletes the environment.
  inputs:
    type: object
    required:
    - organizationId
    - environmentId
    - apiId
    - revisionId
    properties:
      organizationId:
        type: string
        description: The Apigee organization owning the environment.
      environmentId:
        type: string
        description: The environment to tear down.
      apiId:
        type: string
        description: The proxy whose revision must be undeployed first.
      revisionId:
        type: string
        description: The deployed revision to undeploy.
  steps:
  - stepId: listDeployments
    description: >-
      List organization deployments to inspect what is currently running before
      tearing the environment down.
    operationId: listOrganizationDeployments
    parameters:
    - name: organizationId
      in: path
      value: $inputs.organizationId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deployments: $response.body#/deployments
  - stepId: undeployRevision
    description: >-
      Undeploy the proxy revision from the environment so the environment is
      free of deployments.
    operationId: undeployApiProxyRevision
    parameters:
    - name: organizationId
      in: path
      value: $inputs.organizationId
    - name: environmentId
      in: path
      value: $inputs.environmentId
    - name: apiId
      in: path
      value: $inputs.apiId
    - name: revisionId
      in: path
      value: $inputs.revisionId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      undeployedRevision: $response.body#/revision
  - stepId: deleteEnvironment
    description: >-
      Delete the now-empty environment, which returns a long-running operation
      while teardown completes.
    operationId: deleteEnvironment
    parameters:
    - name: organizationId
      in: path
      value: $inputs.organizationId
    - name: environmentId
      in: path
      value: $inputs.environmentId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      operationName: $response.body#/name
  outputs:
    deployments: $steps.listDeployments.outputs.deployments
    undeployedRevision: $steps.undeployRevision.outputs.undeployedRevision
    operationName: $steps.deleteEnvironment.outputs.operationName