Getting operation information

This page shows you how to get status information and other metadata about Filestore operations.

Before you begin

You can only get operation information using the gcloud CLI. To use the gcloud CLI, you must either install the gcloud CLI or use the Cloud Shell that's built into the Google Cloud console:

Go to the Google Cloud console

Getting information about all operations

You can get a list of Filestore operations by running the operations list command:

gcloud filestore operations list
    --[project=project-id] \
    --[zone=zone]

where:

  • project-id is the project ID of the Google Cloud project that contains the Filestore instance. You can skip this flag if the Filestore instance is in the gcloud default project. You can set the default project by running:

    gcloud config set project project-id
    
  • zone is the zone where the Filestore instance resides. Run the gcloud filestore zones list command to get a list of supported zones. You can skip this flag if the Filestore instance is in the gcloud default zone. You can set the default zone by running:

    gcloud config set filestore/zone zone
    

The command returns a response similar to the following:

OPERATION_NAME                                           LOCATION        TYPE    TARGET   STATUS  CREATE_TIME          DURATION
operation-1505929956434-559a2a41c217c-231e6a94-a4b6a803  us-central1-c   create  nfs1     DONE    2017-09-20T17:52:36  <1S
operation-1505931180862-559a2ed176d0d-a0d70ae0-35ef2e71  europe-west1-b  create  nfs2     DONE    2017-09-20T18:13:00  <1S

Getting information about a specific operation

You can get details of a specific Filestore operation by running the operations describe command:

gcloud filestore operations describe operation-name \
    --[project=project-id] \
    --[zone=zone]

where:

  • operation-name is the name of the Filestore operation. Use the operations list command to get a list of operation names.
  • project-id is the project ID of the Google Cloud project that contains the Filestore instance. You can skip this flag if the Filestore instance is in the gcloud default project. You can set the default project by running:

    gcloud config set project project-id
    
  • zone is the zone where the Filestore instance resides. Run the gcloud filestore zones list command to get a list of supported zones. You can skip this flag if the Filestore instance is in the gcloud default zone. You can set the default zone by running the config set filestore/zone command:

    gcloud config set filestore/zone zone
    

The command returns a response similar to the following:

done: true
metadata:
  '@type': type.googleapis.com/google.cloud.common.OperationMetadata
  apiVersion: v1beta1
  createTime: '2017-10-09T22:18:09.347400Z'
  endTime: '2017-10-09T22:20:04.392199183Z'
  target: projects/filestore-test/locations/us-central1-c/instances/filer3
  verb: delete
name: projects/filestore-test/locations/us-central1-c/operations/operation-1507587489330-55b2490c4f394-faece090-1c0e16db