List subnets in a VCN, delete the first subnet, then delete the VCN itself.
1 workflow2 source APIs1 provider
View SpecView on GitHubCloud ComputingEnterprise CloudInfrastructure-as-a-ServiceOraclePlatform-as-a-ServiceComputeObject StorageIdentity and Access ManagementDatabaseKubernetesServerlessMonitoringEvent-DrivenArazzoWorkflows
arazzo: 1.0.1
info:
title: Oracle Cloud Teardown VCN Network
summary: List subnets in a VCN, delete the first subnet, then delete the VCN itself.
description: >-
Cleanly decommissions a virtual cloud network by removing dependent
resources first. The workflow reads the VCN, lists its subnets, deletes the
first subnet returned, and then deletes the VCN. Every step spells out its
request inline so the teardown flow can be read and executed without opening
the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: subnetsApi
url: ../openapi/oracle-cloud-subnets-api-openapi.yml
type: openapi
- name: vcnsApi
url: ../openapi/oracle-cloud-vcns-api-openapi.yml
type: openapi
workflows:
- workflowId: teardown-vcn-network
summary: Delete a VCN's subnet, then delete the VCN.
description: >-
Confirms the VCN, lists its subnets, deletes the first subnet, then deletes
the VCN to release the network.
inputs:
type: object
required:
- compartmentId
- vcnId
properties:
compartmentId:
type: string
description: The OCID of the compartment containing the VCN.
vcnId:
type: string
description: The OCID of the VCN to tear down.
steps:
- stepId: getVcn
description: Confirm the VCN exists before deleting dependent resources.
operationId: getVcn
parameters:
- name: vcnId
in: path
value: $inputs.vcnId
successCriteria:
- condition: $statusCode == 200
outputs:
vcnName: $response.body#/displayName
- stepId: listSubnets
description: List the subnets that belong to the VCN.
operationId: listSubnets
parameters:
- name: compartmentId
in: query
value: $inputs.compartmentId
- name: vcnId
in: query
value: $inputs.vcnId
successCriteria:
- condition: $statusCode == 200
outputs:
subnetId: $response.body#/0/id
- stepId: deleteSubnet
description: Delete the first subnet returned for the VCN.
operationId: deleteSubnet
parameters:
- name: subnetId
in: path
value: $steps.listSubnets.outputs.subnetId
successCriteria:
- condition: $statusCode == 204
- stepId: deleteVcn
description: Delete the now-empty VCN.
operationId: deleteVcn
parameters:
- name: vcnId
in: path
value: $inputs.vcnId
successCriteria:
- condition: $statusCode == 204
outputs:
deletedVcnId: $inputs.vcnId
deletedSubnetId: $steps.listSubnets.outputs.subnetId
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.