Essa chamada da API REST não retorna nenhuma resposta. Para mais informações sobre
como verificar o status de cancelamento da operação de exportação, consulte
Verificar o status cancelado.
Verificar o status "Cancelado"
Use os comandos da API REST ou gcloud para verificar o status de uma operação de exportação
cancelada.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-04 UTC."],[[["\u003cp\u003eThis guide details the process for canceling an ongoing export operation for CSV and SQL dump files within AlloyDB.\u003c/p\u003e\n"],["\u003cp\u003eTo cancel an export, you must first obtain the specific \u003ccode\u003eOPERATION_ID\u003c/code\u003e from either the initial export process or by making an \u003ccode\u003eoperations.list\u003c/code\u003e call.\u003c/p\u003e\n"],["\u003cp\u003eYou can cancel an export operation by utilizing either the \u003ccode\u003egcloud alloydb operations cancel\u003c/code\u003e command or by making a POST request to the provided REST API endpoint.\u003c/p\u003e\n"],["\u003cp\u003eAfter cancellation you can check the status of the operation with the \u003ccode\u003egcloud alloydb operations describe\u003c/code\u003e command or a \u003ccode\u003eGET\u003c/code\u003e request to the respective REST API endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe REST API call to cancel the operation does not return a response, and instead, the status of the canceled operation must be checked through the specific means outlined.\u003c/p\u003e\n"]]],[],null,["# Cancel an export operation\n\nThis page describes how to cancel an export operation for CSV files and SQL\ndump files.\n\nBefore you begin\n----------------\n\nTo cancel the export of data, find the ID of the export operation that you want\nto cancel. To find the ID, do one of the following:\n\n- Follow the instructions in [Export a SQL file](/alloydb/docs/export-sql-file).\n The operation ID is returned in the `name` field of the response.\n\n- Make an\n [`operations.list`](/sdk/gcloud/reference/alloydb/operations/list)\n call on the AlloyDB cluster.\n\nCancel the export operation\n---------------------------\n\nYou can use `gcloud` or REST API commands to cancel an export operation. \n\n### gcloud\n\nUse the [`gcloud alloydb operations cancel`](/sdk/gcloud/reference/alloydb/operations/cancel)\ncommand to cancel the operation: \n\n gcloud alloydb operations cancel \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e --region=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e\n\nReplace \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e with the ID of the operation. For more information, see\n[Before you begin](#begin).\n\n### REST v1\n\nUse the following HTTP method and URL: \n\n```\nPOST https://alloydb.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/operations/OPERATION_ID:cancel\n```\n\nFor more information, see [`cancel`](/alloydb/docs/reference/rest/v1/projects.locations.operations/cancel).\n\nBefore you use any of the request data, make the following replacements:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region in which the AlloyDB cluster is deployed.\n- \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e: the ID of the export operation. For more information, see [Before you begin](#begin).\n\nTo send your request, expand one of the following options:\n\n#### curl (Linux, macOS, or Cloud Shell)\n\n| The following command assumes that you signed into the gcloud CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login), or by using [Cloud Shell](/shell/docs), which automatically signs you into the gcloud CLI. You can check the active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\nExecute the following command: \n\n```\n curl -X POST \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d @request.json \\\n POST https://alloydb.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/operations/OPERATION_ID:cancel\n \n```\n\n#### PowerShell (Windows)\n\n| The following command assumes that you signed into the gcloud CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login). You can check the active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\nExecute the following command: \n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method POST `\n -Headers $headers `\n -ContentType: \"application/json; charset=utf-8\" `\n -InFile request.json `\n -Uri \"POST https://alloydb.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/operations/OPERATION_ID:cancel\" | Select-Object -Expand Content\n```\n\nYou receive a JSON response similar to the following:\n\nThis REST API call doesn't return any response. For more information about\nchecking the cancellation status of the export operation, see\n[Check the canceled status](#check-canceled-status).\n\nCheck the canceled status\n-------------------------\n\nYou can use `gcloud` or REST API commands to check the status of a canceled\nexport operation. \n\n### gcloud\n\nUse the [`gcloud alloydb operations describe`](/sdk/gcloud/reference/alloydb/operations/describe)\ncommand to check the status of the canceled operation. \n\n gcloud alloydb operations describe \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e --region=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e\n\nReplace the `OPERATION_ID` variable with the ID of the canceled operation.\nFor more information, see [Before you begin](#begin).\n\n### REST v1\n\nRun the following: \n\n```\nGET https://alloydb.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/operations/OPERATION_ID:describe\n```\n\nFor more information, see [`get`](/alloydb/docs/reference/rest/v1/projects.locations.operations/get).\n\nBefore you use any of the request data, make the following replacements:\n\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the region in which the AlloyDB cluster is deployed.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID.\n- \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e: the ID of the export operation. For more information, see [Before you begin](#begin).\n\nTo send your request, expand one of these options:\n\n#### *curl (Linux, macOS, or Cloud Shell)*\n\n| The following command assumes that you signed into the gcloud CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login), or by using [Cloud Shell](/shell/docs), which automatically signs you into the gcloud CLI. You can check the active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\nExecute the following command: \n\n```\n curl -X GET \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n https://alloydb.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/operations/OPERATION_ID:describe\n \n```\n\n#### *PowerShell (Windows)*\n\n| The following command assumes that you signed into the gcloud CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login). You can check the active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\nExecute the following command: \n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method GET `\n -Headers $headers `\n -Uri \"https://alloydb.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/operations/OPERATION_ID:describe\n```\n\nYou receive a JSON response similar to the following:\n\n\u003cbr /\u003e\n\n\nIf successful, the response body contains an instance of\n[Operation](/alloydb/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation).\n\n\u003cbr /\u003e\n\nWhat's next\n-----------\n\n- Learn how to [export a CSV file](/alloydb/docs/export-csv-file).\n- Learn how to [export a SQL dump file](/alloydb/docs/export-sql-file)."]]