Compute Cloud API, gRPC: FilesystemService
A set of methods for managing filesystems.
Call | Description |
---|---|
Get | Returns the specified filesystem. |
List | Lists filesystems in the specified folder. |
Create | Creates a filesystem in the specified folder. |
Update | Updates the specified filesystem. |
Delete | Deletes the specified filesystem. |
ListOperations | Lists operations for the specified filesystem. |
Calls FilesystemService
Get
Returns the specified filesystem.
To get the list of available filesystems, make a List request.
rpc Get (GetFilesystemRequest) returns (Filesystem)
GetFilesystemRequest
Field | Description |
---|---|
filesystem_id | string Required. ID of the filesystem to return. To get the filesystem ID, make a FilesystemService.List request. The maximum string length in characters is 50. |
Filesystem
Field | Description |
---|---|
id | string ID of the filesystem. Generated at creation time. |
folder_id | string ID of the folder that the filesystem belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp. |
name | string Name of the filesystem. The name is unique within the folder. |
description | string Description of the filesystem. |
labels | map<string,string> Filesystem labels as key:value pairs. For details about the concept, see documentation. |
type_id | string ID of the filesystem type. To get a list of available filesystem types, make a compute.v1.DiskTypeService.List request. |
zone_id | string ID of the availability zone where the filesystem resides. A filesystem can be attached only to instances residing in the same availability zone. |
size | int64 Size of the filesystem, specified in bytes. |
block_size | int64 Block size used for the filesystem, specified in bytes. |
status | enum Status Current status of the filesystem.
|
List
Lists filesystems in the specified folder.
rpc List (ListFilesystemsRequest) returns (ListFilesystemsResponse)
ListFilesystemsRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to list filesystems in. To get the folder ID, make a resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50. |
page_size | int64 The maximum number of results per page to return. If the number of available results is larger than page_size , the service returns a ListFilesystemsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. The maximum value is 1000. |
page_token | string Page token. To get the next page of results, set page_token to the ListFilesystemsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
filter | string A filter expression that filters resources listed in the response. The expression consists of one or more conditions united by AND operator: <condition1> [AND <condition2> [<...> AND <conditionN>]] . Each condition has the form <field> <operator> <value> , where:
" ) or single (' ) quotes. C-style escape sequences are supported (\" turns to " , \' to ' , \\ to backslash). The maximum string length in characters is 1000. |
order_by | string By which column the listing should be ordered and in which direction, format is "createdAt desc". "id asc" if omitted. The default sorting order is ascending The maximum string length in characters is 100. |
ListFilesystemsResponse
Field | Description |
---|---|
filesystems[] | Filesystem List of filesystems in the specified folder. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListFilesystemsRequest.page_size, use next_page_token as the value for the ListFilesystemsRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. |
Filesystem
Field | Description |
---|---|
id | string ID of the filesystem. Generated at creation time. |
folder_id | string ID of the folder that the filesystem belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp. |
name | string Name of the filesystem. The name is unique within the folder. |
description | string Description of the filesystem. |
labels | map<string,string> Filesystem labels as key:value pairs. For details about the concept, see documentation. |
type_id | string ID of the filesystem type. To get a list of available filesystem types, make a compute.v1.DiskTypeService.List request. |
zone_id | string ID of the availability zone where the filesystem resides. A filesystem can be attached only to instances residing in the same availability zone. |
size | int64 Size of the filesystem, specified in bytes. |
block_size | int64 Block size used for the filesystem, specified in bytes. |
status | enum Status Current status of the filesystem.
|
Create
Creates a filesystem in the specified folder.
rpc Create (CreateFilesystemRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CreateFilesystemMetadata
Operation.response:Filesystem
CreateFilesystemRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to create a filesystem in. To get the folder ID, make a resourcemanager.v1.FolderService.List request. The maximum string length in characters is 50. |
name | string Name of the filesystem. The name must be unique within the folder. Value must match the regular expression |[a-z]([-a-z0-9]{0,61}[a-z0-9])? . |
description | string Description of the filesystem. The maximum string length in characters is 256. |
labels | map<string,string> Filesystem labels as key:value pairs. For details about the concept, see documentation. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
type_id | string ID of the filesystem type. To get a list of available filesystem types, make a compute.v1.DiskTypeService.List request. The filesystem type cannot be updated after the filesystem creation. The maximum string length in characters is 50. |
zone_id | string Required. ID of the availability zone where the filesystem resides. To get a list of available zones, make a compute.v1.ZoneService.List request. A filesystem can be attached only to virtual machines residing in the same availability zone. The filesystem availability zone cannot be updated after the filesystem creation. The maximum string length in characters is 50. |
size | int64 Required. Size of the filesystem, specified in bytes. The size of the filesystem cannot be updated after the filesystem creation. |
block_size | int64 Block size used for the filesystem, specified in bytes. The block size cannot be updated after the filesystem creation. Default value: 4096. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
CreateFilesystemMetadata
Field | Description |
---|---|
filesystem_id | string ID of the filesystem that is being created. |
Filesystem
Field | Description |
---|---|
id | string ID of the filesystem. Generated at creation time. |
folder_id | string ID of the folder that the filesystem belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp. |
name | string Name of the filesystem. The name is unique within the folder. |
description | string Description of the filesystem. |
labels | map<string,string> Filesystem labels as key:value pairs. For details about the concept, see documentation. |
type_id | string ID of the filesystem type. To get a list of available filesystem types, make a compute.v1.DiskTypeService.List request. |
zone_id | string ID of the availability zone where the filesystem resides. A filesystem can be attached only to instances residing in the same availability zone. |
size | int64 Size of the filesystem, specified in bytes. |
block_size | int64 Block size used for the filesystem, specified in bytes. |
status | enum Status Current status of the filesystem.
|
Update
Updates the specified filesystem.
rpc Update (UpdateFilesystemRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateFilesystemMetadata
Operation.response:Filesystem
UpdateFilesystemRequest
Field | Description |
---|---|
filesystem_id | string Required. ID of the filesystem to update. To get the filesystem ID, make a FilesystemService.List request. The maximum string length in characters is 50. |
update_mask | google.protobuf.FieldMask Field mask that specifies which attributes of the filesystem should be updated. |
name | string New name of the filesystem. The name must be unique within the folder. Value must match the regular expression |[a-z]([-a-z0-9]{0,61}[a-z0-9])? . |
description | string New description of the filesystem. The maximum string length in characters is 256. |
labels | map<string,string> New filesystem labels as key:value pairs. For details about the concept, see documentation. Existing set of labels is completely replaced by the provided set, so if you just want to add or remove a label:
[-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
size | int64 Size of the filesystem, specified in bytes. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateFilesystemMetadata
Field | Description |
---|---|
filesystem_id | string ID of the filesystem that is being updated. |
Filesystem
Field | Description |
---|---|
id | string ID of the filesystem. Generated at creation time. |
folder_id | string ID of the folder that the filesystem belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp. |
name | string Name of the filesystem. The name is unique within the folder. |
description | string Description of the filesystem. |
labels | map<string,string> Filesystem labels as key:value pairs. For details about the concept, see documentation. |
type_id | string ID of the filesystem type. To get a list of available filesystem types, make a compute.v1.DiskTypeService.List request. |
zone_id | string ID of the availability zone where the filesystem resides. A filesystem can be attached only to instances residing in the same availability zone. |
size | int64 Size of the filesystem, specified in bytes. |
block_size | int64 Block size used for the filesystem, specified in bytes. |
status | enum Status Current status of the filesystem.
|
Delete
Deletes the specified filesystem.
Deleting a filesystem removes its data permanently and is irreversible.
It is not possible to delete a filesystem that is attached to an instance.
rpc Delete (DeleteFilesystemRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteFilesystemMetadata
Operation.response:google.protobuf.Empty
DeleteFilesystemRequest
Field | Description |
---|---|
filesystem_id | string Required. ID of the filesystem to delete. To get the filesystem ID, make a FilesystemService.List request. The maximum string length in characters is 50. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
DeleteFilesystemMetadata
Field | Description |
---|---|
filesystem_id | string ID of the filesystem that is being deleted. |
ListOperations
Lists operations for the specified filesystem.
rpc ListOperations (ListFilesystemOperationsRequest) returns (ListFilesystemOperationsResponse)
ListFilesystemOperationsRequest
Field | Description |
---|---|
filesystem_id | string Required. ID of the filesystem to list operations for. To get the filesystem ID, make a FilesystemService.List request. The maximum string length in characters is 50. |
page_size | int64 The maximum number of results per page to return. If the number of available results is larger than page_size , the service returns a ListFilesystemOperationsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. The maximum value is 1000. |
page_token | string Page token. To get the next page of results, set page_token to the ListFilesystemOperationsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
ListFilesystemOperationsResponse
Field | Description |
---|---|
operations[] | operation.Operation List of operations for the specified filesystem. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListFilesystemOperationsRequest.page_size, use next_page_token as the value for the ListFilesystemOperationsRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty |