diff --git a/modules/ROOT/pages/_partials/agent-fabric.adoc b/modules/ROOT/pages/_partials/agent-fabric.adoc index 96c6cc56..df29cbe0 100644 --- a/modules/ROOT/pages/_partials/agent-fabric.adoc +++ b/modules/ROOT/pages/_partials/agent-fabric.adoc @@ -1,6 +1,6 @@ = CLI for Agent Fabric Plugin -Use these commands to author, publish, and deploy agent network projects. +Use these commands to author, publish, deploy, undeploy, and unpublish agent network projects. // tag::summary[] @@ -11,6 +11,8 @@ Use these commands to author, publish, and deploy agent network projects. |xref:anypoint-cli::agent-fabric.adoc#agent-network-project-create[agent-network:project:create] | Creates a new agent network project and generates the initial configuration files |xref:anypoint-cli::agent-fabric.adoc#agent-network-project-deploy[agent-network:project:deploy] | Deploys the agent network project to the target environment |xref:anypoint-cli::agent-fabric.adoc#agent-network-project-publish[agent-network:project:publish] | Publishes the agent network project to Anypoint Exchange +|xref:anypoint-cli::agent-fabric.adoc#agent-network-project-undeploy[agent-network:project:undeploy] | Undeploys the agent network project and removes all deployed runtime resources +|xref:anypoint-cli::agent-fabric.adoc#agent-network-project-unpublish[agent-network:project:unpublish] | Unpublishes the agent network project asset versions from Anypoint Exchange |xref:anypoint-cli::agent-fabric.adoc#agent-network-setup-gateways[agent-network:setup:gateways] | Sets up the gateways for the agent network |=== @@ -220,6 +222,104 @@ You can also set it with the `ANYPOINT_USERNAME` variable | `--username myuser&# $ anypoint-cli-agent-fabric-plugin agent-network project publish ---- +[[agent-network-project-undeploy]] +== agent-network:project:undeploy + +---- +> anypoint-cli-agent-fabric-plugin agent-network project undeploy [flags] +---- + +Undeploys the agent network project and removes all deployed runtime resources. +Resources are removed in reverse dependency order to ensure a clean state: agent graphs and Mule applications are removed first, followed by connections, API instances, and then external Exchange instances. + +This command requires: + +* The project must have been previously built using `agent-network project build`. +* The user must be authenticated and have valid organization access for the ID specified in `exchange.json`. +* A target environment must be active or specified via the `--environment` flag. + +In addition to the xref:anypoint-cli::index.adoc#default-options[default flags], this command accepts these flags: + +[%header,cols="30a,40a,30a"] +|=== +|Flag | Description | Example +|`--environment ` | Target environment ID or name | `--environment Sandbox` +|`--force` | Skip the interactive confirmation prompt + + Default: `false` | `--force` +|`--json` | Format output as JSON. Requires `--force` + + Default: `false` | `--json` +|`--organization ` | Target organization ID or name | `--organization MyOrg` +|`--path ` | Path to the agent network project directory + + Default: `.` | `--path ./my-agent-network` +|`--process-timeout ` | Total process timeout in milliseconds + + Default: `600000` | `--process-timeout 900000` +|`--request-timeout ` | Timeout per HTTP request in milliseconds + + Default: `60000` | `--request-timeout 120000` +|=== + +[[example-undeploy]] +=== Examples + +Undeploy with interactive confirmation: + +---- +$ anypoint-cli-agent-fabric-plugin agent-network project undeploy +---- + +Undeploy with JSON output for CI/CD pipelines: + +---- +$ anypoint-cli-agent-fabric-plugin agent-network project undeploy --force --json +---- + + +[[agent-network-project-unpublish]] +== agent-network:project:unpublish + +---- +> anypoint-cli-agent-fabric-plugin agent-network project unpublish [flags] +---- + +Unpublishes an agent network project. Removes agent network asset versions from Anypoint Exchange. +By default, the command performs a soft-delete, allowing assets to be recovered by support if necessary. Use the `--hard-delete` flag for permanent, irreversible removal. + +To prevent orphaned runtime references to deleted Exchange assets, run `agent-network project undeploy` before `unpublish`. + +This command requires: + +* The project must have been previously built using `agent-network project build`. +* The user must have valid organization access. + +In addition to the xref:anypoint-cli::index.adoc#default-options[default flags], this command accepts these flags: + +[%header,cols="30a,40a,30a"] +|=== +|Flag | Description | Example +|`--force` | Skip the interactive confirmation prompt + + Default: `false` | `--force` +|`--hard-delete` | Permanently delete assets from Exchange. Irreversible + + Default: `false` | `--hard-delete` +|`--json` | Format output as JSON. Requires `--force` + + Default: `false` | `--json` +|`--path ` | Path to the agent network project directory + + Default: `.` | `--path ./my-agent-network` +|=== + +[[example-unpublish]] +=== Examples + +Unpublish with soft-delete: + +---- +$ anypoint-cli-agent-fabric-plugin agent-network project unpublish +---- + +Unpublish with hard-delete (irreversible): + +---- +$ anypoint-cli-agent-fabric-plugin agent-network project unpublish --hard-delete --force +---- + [[agent-network-setup-gateways]] == agent-network:setup:gateways