Delete an SFTP server

This document shows how to delete an SFTP server.

Before you begin

Required roles

To get the permission that you need to delete an SFTP server, ask your administrator to grant you the Cloud FTP Admin (roles/ftp.admin) IAM role on your project. For more information about granting roles, see Manage access to projects, folders, and organizations.

This predefined role contains the ftp.servers.delete permission, which is required to delete an SFTP server.

You might also be able to get this permission with custom roles or other predefined roles.

Delete a server

gcloud

To delete an SFTP server, run the gcloud alpha storage ftp servers delete command.

Before using any of the command data below, make the following replacements:

  • SERVER_ID: the SFTP server ID.
  • LOCATION_ID: the location of the server, such as us-west1.

Execute the following command:

Linux, macOS, or Cloud Shell

gcloud alpha storage ftp servers delete SERVER_ID --location=LOCATION_ID

Windows (PowerShell)

gcloud alpha storage ftp servers delete SERVER_ID --location=LOCATION_ID

Windows (cmd.exe)

gcloud alpha storage ftp servers delete SERVER_ID --location=LOCATION_ID
It takes about 10 minutes for the server to be deleted.

REST

To delete an SFTP server, use the servers.delete method.

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

  • PROJECT_ID: the Google Cloud project ID.
  • LOCATION_ID: the location of the server, such as us-west1.
  • SERVER_ID: the SFTP server ID.

HTTP method and URL:

DELETE https://ftp.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/servers/SERVER_ID

To send your request, expand one of these options:

The response identifies a long-running operation. It takes about 10 minutes for the server to be deleted.