Annulez le déploiement d'une révision de proxy d'API à partir de votre cluster, comme décrit dans les sections suivantes.
Notez que lorsque vous annulez le déploiement d'une révision :
Apigee ne permet pas d'effectuer un rollback de la révision vers la révision précédemment déployée.
Une fois le déploiement annulé, aucune révision du proxy d'API n'est déployée dans l'environnement.
L'annulation du déploiement d'un proxy d'API s'apparente à la suppression d'un proxy d'API, sauf que lorsque vous annulez le déploiement d'une révision, vous pouvez choisir de la modifier dans l'interface utilisateur et de la redéployer ultérieurement. Si vous supprimez le proxy d'API, il n'est plus possible de le modifier.
Nouvel éditeur de proxys
Pour annuler le déploiement d'un proxy d'API à l'aide de l'interface utilisateur :
Si vous utilisez la version classique de l'interface utilisateur d'Apigee : sélectionnez Développer > Proxys d'API, puis dans le volet Proxys, sélectionnez l'environnement du proxy.
Sélectionnez le proxy d'API dont vous souhaitez annuler le déploiement.
L'interface utilisateur affiche la vue Présentation du proxy d'API.
Passez la souris sur l'icône de la colonne État, puis sélectionnez Annuler le déploiement :
Éditeur de proxy classique
Pour annuler le déploiement d'un proxy d'API à l'aide de l'interface utilisateur :
L'interface utilisateur affiche une liste des proxys d'API actuels pour l'environnement sélectionné :
Sélectionnez le proxy d'API dont vous souhaitez annuler le déploiement.
L'interface utilisateur affiche la vue Présentation du proxy d'API.
Sur la ligne d'environnement souhaitée, développez la liste déroulante Révision, puis sélectionnez Annuler le déploiement :
L'interface utilisateur vous invite à confirmer la version dont vous souhaitez annuler le déploiement :
Cliquez sur Annuler le déploiement.
L'interface utilisateur met à jour l'état pour indiquer que le déploiement de la révision a immédiatement été annulé dans le cluster :
Notez, cependant, que le processus de déploiement peut prendre un certain temps (dans le modèle cohérence à terme). En effet, lorsque vous cliquez sur Annuler le déploiement, Apigee lance le processus d'annulation du déploiement de la révision sélectionnée depuis cet environnement dans le cluster.
Pour savoir comment vérifier l'état du proxy dont le déploiement a été annulé, consultez la section Afficher l'état du déploiement.
Vous pouvez également annuler le déploiement de la révision que vous êtes en train de modifier dans l'onglet Développer :
Cliquez sur la liste déroulante Déployer vers : env_name :
L'interface utilisateur affiche une liste d'environnements. Dans la colonne Révision, l'interface utilisateur indique la révision actuellement déployée (ou &emdash; s'il n'y en a pas) et affiche les boutons Deployrevision (Déployer) et Undeploy (Annuler le déploiement).
Cliquez sur le bouton Annuler le déploiement pour l'environnement souhaité.
L'interface utilisateur vous invite à confirmer la version dont vous souhaitez annuler le déploiement :
Cliquez sur le bouton Annuler le déploiement.
L'interface utilisateur met à jour l'état pour indiquer que le déploiement de la révision a été annulé immédiatement. Toutefois, le processus de déploiement peut prendre un certain temps (dans le modèle cohérence à terme). Lorsque vous cliquez sur Annuler le déploiement, Apigee commence à annuler le déploiement de la révision sélectionnée de l'environnement.
API Apigee
Pour annuler le déploiement d'un proxy d'API, utilisez l'appel d'API suivant :
Les sections suivantes fournissent des exemples d'utilisation des commandes CLI gcloud alpha apigee pour annuler le déploiement des révisions du proxy d'API et valider l'annulation du déploiement.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThis page explains how to undeploy API proxy revisions in Apigee and Apigee hybrid environments, which is similar to deleting an API proxy but allows for future editing and redeployment.\u003c/p\u003e\n"],["\u003cp\u003eUndeploying a revision means no revisions of the API proxy will be deployed in the environment, and Apigee does not roll the revision back to a previous version.\u003c/p\u003e\n"],["\u003cp\u003eThe undeployment process can be initiated through the Apigee UI's new or classic Proxy Editor, as well as via the Apigee API using a \u003ccode\u003ecurl\u003c/code\u003e command or the \u003ccode\u003egcloud\u003c/code\u003e CLI.\u003c/p\u003e\n"],["\u003cp\u003eAfter initiating the undeploy process, Apigee begins the process of removing the revision from the environment, but it may take some time to complete due to the eventually consistent model.\u003c/p\u003e\n"],["\u003cp\u003eYou can validate the success of the undeployment by checking the deployment status in the Apigee UI or by using the \u003ccode\u003egcloud\u003c/code\u003e CLI to list deployments and confirm that no revisions are present.\u003c/p\u003e\n"]]],[],null,["# Undeploying an API proxy\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\n| **Note:** To undeploy API proxies in environments enabled for [archive deployments](/apigee/docs/api-platform/fundamentals/environments-overview#deployment-types), see [Deploying and managing\n| archives in an Apigee environment](/apigee/docs/api-platform/deploy/manage-archive-deployments).\n\nUndeploy an API proxy revision from your cluster as described in the following sections.\n\nNote that when you undeploy a revision:\n\n- Apigee does not roll the revision back to the previously deployed revision.\n- After undeploying, no revisions of the API proxy are deployed in the environment.\n\nUndeploying an API proxy is similar to [deleting an API proxy](/apigee/docs/api-platform/develop/ui-delete-proxy), except\nthat when you undeploy a revision you can choose to edit it in the UI and later re-deploy it. If you\n*delete* the API proxy, it is no longer available to edit. \n\n### Apigee in Cloud console\n\nTo undeploy an API proxy using the UI:\n\n1. In the Google Cloud console, go to the **Proxy Development \\\u003e API Proxies** page.\n\n [Go to API Proxies](https://console.cloud.google.com/apigee/proxies)\n2. Select the API proxy that you want to undeploy.\n The UI displays the API proxy's **Overview** view.\n\n3. In the **Deployments** section, click **Undeploy**.\n\n4. In the **Undeploy** dialog, click **Confirm**.\n\n### Classic UI\n\nTo undeploy an API proxy using the UI:\n\n1. Sign in to the [Apigee UI](https://apigee.google.com).\n2. Select **Develop \\\u003e API Proxies** .\n\n The UI displays a list of current API proxies for the selected environment:\n\n3. Select the API proxy that you want to undeploy.\n\n The UI displays the API proxy's **Overview** view.\n4. In the desired environment row, expand the **Revision** drop-down list and select **Undeploy** :\n\n The UI prompts you to confirm the version you want to undeploy:\n\n5. Click **Undeploy** .\n\n The UI updates the status to show that the revision was undeployed from the cluster\n immediately:\n\n Note, though, that the undeployment process can take some time (in the *eventually\n consistent* model). In fact, when you click **Undeploy** , Apigee *begins*\n the process of undeploying the selected revision from that environment in the cluster.\n\n For information on how to check the status of the undeployed proxy, see\n [Viewing deployment status](/apigee/docs/api-platform/deploy/ui-deploy-overview#viewing-deployment-status).\n\nAlternatively, you can undeploy the current revision that you are editing in the\n**Develop** tab:\n\n1. Click the **Deploy to: *env_name*** drop-down list:\n\n The UI displays a list of environments. In the **Revision** column, the UI lists\n the currently deployed revision (or **---** if none), and prompts you with **Deploy\n \u003cvar translate=\"no\"\u003erevision\u003c/var\u003e** and **Undeploy** buttons.\n2. Click the **Undeploy** button for the desired environment.\n\n The UI prompts you to confirm the version you want to undeploy:\n\n3. Click the **Undeploy** button.\n\n The UI updates the status to show that the revision was undeployed immediately. However,\n the undeployment process can take some time (in the *eventually consistent* model). When you\n click **Undeploy**, Apigee begins the process of undeploying the selected\n revision from that environment.\n\n### Apigee API\n\nTo undeploy an API proxy, use the following API call: \n\n```\ncurl \"https://apigee.googleapis.com/v1/organizations/$ORG/environments/$ENV/apis/$API/revisions/$REV/deployments\" \\\n -X DELETE \\\n -H \"Authorization: Bearer $TOKEN\"\n```\n\nWhere `$TOKEN` is set to your OAuth 2.0 access token, as described in\n[Obtaining an OAuth 2.0 access token](/apigee/docs/api-platform/get-started/api-get-started#oauth20). For information about the `curl` options used in this example, see\n[Using curl](/apigee/docs/api-platform/get-started/api-get-started#curl). For a description of environment variables you can use, see\n[Setting\nenvironment variables for Apigee API requests](/apigee/docs/api-platform/get-started/api-get-started#api-environment-variables).\n\nThe following provides an example of the response output (an empty response): \n\n```\n{}\n```\n\nFor more information, see the [Undeploy API proxy revision API](/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.apis.revisions.deployments/undeploy).\n\n### gcloud\n\n\nThe following sections provide examples of using `gcloud alpha apigee` CLI commands to\nundeploy API proxy revisions and validate the undeployment.\n\n- [Undeploying an API proxy revision using the gcloud CLI](#undeploy-api-revision-cli)\n- [Validating the undeployment of an API proxy revision using the gcloud CLI](#validate-undeployment-cli)\n\n\nFor more information and a description of the environment variables used in the examples,\nsee [Getting started using gcloud with Apigee](/apigee/docs/api-platform/get-started/gcloud-get-started).\n\n#### Undeploying an API proxy revision using the gcloud CLI\n\n\nTo undeploy an API proxy revision, use the following gcloud command: \n\n```\ngcloud alpha apigee apis undeploy $REV --api=$API --environment=$ENV\n```\n\n\nThe following provides an example of the response: \n\n```\nUsing Apigee organization `my-org`\n```\n\n#### Validating the undeployment of an API proxy revision using the gcloud CLI\n\n\nTo validate that the API proxy revision has been undeployed from the environment, use the following gcloud command: \n\n```\ngcloud alpha apigee deployments list --api=$API --environment=$ENV\n```\n\n\nThe following provides an example of the response: \n\n```\nUsing Apigee organization `my-org`\nListed 0 items.\n```\n\n\nFor more information, see [List deployments CLI](/sdk/gcloud/reference/alpha/apigee/deployments/list)."]]