A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/sql/docs/postgres/import-export/cancel-import-export below:

Cancel the import and export of data | Cloud SQL for PostgreSQL

This page describes how to cancel the import and export of data into Cloud SQL instances. This data is contained in either SQL dump files or CSV files.

gcloud Use the gcloud sql operations cancel command to cancel the operation.
gcloud sql operations cancel operation-ID
Replace the operation-ID variable with the ID of the operation. For more information, see Before you begin. REST v1

Before using any of the request data, make the following replacements:

HTTP method and URL:

POST https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID/cancel

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell) Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login , or by using Cloud Shell, which automatically logs you into the gcloud CLI . You can check the currently active account by running gcloud auth list.

Execute the following command:

curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d "" \
"https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID/cancel"
PowerShell (Windows) Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login . You can check the currently active account by running gcloud auth list.

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `


-Method POST `
-Headers $headers `
-Uri "https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID/cancel" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

Response
{}
This REST API call doesn't return any response. For more information about checking the cancellation status of the import or export operation, see Check the cancelled status. REST v1beta4

Before using any of the request data, make the following replacements:

HTTP method and URL:

POST https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID/cancel

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell) Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login , or by using Cloud Shell, which automatically logs you into the gcloud CLI . You can check the currently active account by running gcloud auth list.

Execute the following command:

curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d "" \
"https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID/cancel"
PowerShell (Windows) Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login . You can check the currently active account by running gcloud auth list.

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `


-Method POST `
-Headers $headers `
-Uri "https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID/cancel" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

Response
{}
This REST API call doesn't return any response. For more information about checking the cancellation status of the import or export operation, see Check the cancelled status.

You can use gcloud or REST API commands to check the status of a cancelled import or export operation.

gcloud Use the gcloud sql operations describe command to check the status of the cancelled operation.
gcloud sql operations describe operation-ID
Replace the operation-ID variable with the ID of the cancelled operation. For more information, see
Before you begin. REST v1

Before using any of the request data, make the following replacements:

HTTP method and URL:

GET https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell) Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login , or by using Cloud Shell, which automatically logs you into the gcloud CLI . You can check the currently active account by running gcloud auth list.

Execute the following command:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID"
PowerShell (Windows) Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login . You can check the currently active account by running gcloud auth list.

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `


-Method GET `
-Headers $headers `
-Uri "https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

Response
{
  "kind": "sql#operation",
"targetLink": "https://sqladmin.googleapis.com/v1/projects/project-ID",
  "status": "DONE",
  "user": "user@example.com",
  "insertTime": "2022-11-08T22:12:58.199Z",
  "startTime": "2022-11-08T22:13:04.798Z",
  "endTime": "2022-11-08T22:13:45.862Z",
  "error": {
    "kind": "sql#operationErrors",
    "errors": [
      {
        "kind": "sql#operationError",
        "code": "CANCEL_SUCCESSFUL",
        "message": "Operation successfully cancelled"
      }
    ]
  },
  "operationType": "EXPORT",
  "exportContext": {
    "uri": "gs://replica-bucket/source-database.sql",
    "kind": "sql#exportContext",
    "sqlExportOptions": {
      "schemaOnly": false,
      "mysqlExportOptions": {
        "masterData": 0
      }
    },
    "fileType": "SQL"
  },
  "name": "operation-ID",
  "targetId": "cloud-sql-instance-display-name",
  "selfLink": "https://sqladmin.googleapis.com/v1/projects/project-ID/operations/operation-ID",
  "targetProject": "project-ID",
  "instanceUid": "cloud-sql-instance-ID"
}

REST v1beta4

Before using any of the request data, make the following replacements:

HTTP method and URL:

GET https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell) Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login , or by using Cloud Shell, which automatically logs you into the gcloud CLI . You can check the currently active account by running gcloud auth list.

Execute the following command:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID"
PowerShell (Windows) Note: The following command assumes that you have logged in to the gcloud CLI with your user account by running gcloud init or gcloud auth login . You can check the currently active account by running gcloud auth list.

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `


-Method GET `
-Headers $headers `
-Uri "https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

Response
{
  "kind": "sql#operation",
"targetLink": "https://sqladmin.googleapis.com/v1beta4/projects/project-ID",
  "status": "DONE",
  "user": "user@example.com",
  "insertTime": "2022-11-08T22:12:58.199Z",
  "startTime": "2022-11-08T22:13:04.798Z",
  "endTime": "2022-11-08T22:13:45.862Z",
  "error": {
    "kind": "sql#operationErrors",
    "errors": [
      {
        "kind": "sql#operationError",
        "code": "CANCEL_SUCCESSFUL",
        "message": "Operation successfully cancelled"
      }
    ]
  },
  "operationType": "EXPORT",
  "exportContext": {
    "uri": "gs://replica-bucket/source-database.sql",
    "kind": "sql#exportContext",
    "sqlExportOptions": {
      "schemaOnly": false,
      "mysqlExportOptions": {
        "masterData": 0
      }
    },
    "fileType": "SQL"
  },
  "name": "operation-ID",
  "targetId": "cloud-sql-instance-display-name",
  "selfLink": "https://sqladmin.googleapis.com/v1beta4/projects/project-ID/operations/operation-ID",
  "targetProject": "project-ID",
  "instanceUid": "cloud-sql-instance-ID"
}


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4