Cloud Backup API, gRPC: ResourceService
A set of methods for managing backup resources: Compute Cloud instances.
Call | Description |
---|---|
List | List resources: Compute Cloud instances. |
Get | Get specific Compute Cloud instance. |
Delete | Delete specific Compute Cloud instance from Cloud Backup. |
ListTasks | List tasks of resources. |
ListDirectory | ListDirectory returns all subdirectories found in requested directory identified by the id. |
CreateDirectory | CreateDirectory creates new directory by requested path. |
ListOperations | ListOperations return all operations in backup service for given instance |
Calls ResourceService
List
List resources: Compute Cloud instances.
rpc List (ListResourcesRequest) returns (ListResourcesResponse)
ListResourcesRequest
Field | Description |
---|---|
folder_id | string Required. Folder ID. The maximum string length in characters is 50. |
page_size | int64 Number of results per page. The maximum value is 1000. |
page_token | string Token for the results page. The maximum string length in characters is 100. |
ListResourcesResponse
Field | Description |
---|---|
resources[] | Resource Set of resource parameters. |
next_page_token | string Token for the next results page. |
Resource
Field | Description |
---|---|
compute_instance_id | string Compute Cloud instance ID. |
created_at | google.protobuf.Timestamp |
updated_at | google.protobuf.Timestamp |
online | bool If this field is true, it means that instance is online. |
enabled | bool If this field is true, it means that backup is enabled to instance. |
status | enum Status
|
status_details | string If status value is one of OTHER or FAILED , detailed info might be stored here. |
status_progress | int64 In case status is one of BACKUPING or RECOVERING , progress value might be found here. |
last_backup_time | google.protobuf.Timestamp |
next_backup_time | google.protobuf.Timestamp |
resource_id | string Resource ID is used to identify Compute Cloud instance in backup service. |
is_active | bool Status is_active shows whether current Compute Cloud instance controls Cloud Backup resource. If status is_active is false it means Compute Cloud instance is not able to manipulate Cloud Backup resource. |
Get
Get specific Compute Cloud instance.
rpc Get (GetResourceRequest) returns (GetResourceResponse)
GetResourceRequest
Field | Description |
---|---|
compute_instance_id | string Required. Compute Cloud instance ID. The maximum string length in characters is 50. |
GetResourceResponse
Field | Description |
---|---|
resource | Resource Set of resource parameters. |
Resource
Field | Description |
---|---|
compute_instance_id | string Compute Cloud instance ID. |
created_at | google.protobuf.Timestamp |
updated_at | google.protobuf.Timestamp |
online | bool If this field is true, it means that instance is online. |
enabled | bool If this field is true, it means that backup is enabled to instance. |
status | enum Status
|
status_details | string If status value is one of OTHER or FAILED , detailed info might be stored here. |
status_progress | int64 In case status is one of BACKUPING or RECOVERING , progress value might be found here. |
last_backup_time | google.protobuf.Timestamp |
next_backup_time | google.protobuf.Timestamp |
resource_id | string Resource ID is used to identify Compute Cloud instance in backup service. |
is_active | bool Status is_active shows whether current Compute Cloud instance controls Cloud Backup resource. If status is_active is false it means Compute Cloud instance is not able to manipulate Cloud Backup resource. |
Delete
Delete specific Compute Cloud instance from Cloud Backup. It does not delete instance from Cloud Compute service.
rpc Delete (DeleteResourceRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteResourceMetadata
Operation.response:google.protobuf.Empty
DeleteResourceRequest
Field | Description |
---|---|
compute_instance_id | string Required. Compute Cloud instance ID. The maximum string length in characters is 50. |
resource_id | string Required. Resource ID is used to identify Compute Cloud instance in backup service. |
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. |
DeleteResourceMetadata
Field | Description |
---|---|
compute_instance_id | string Compute Cloud instance ID. |
ListTasks
List tasks of resources.
rpc ListTasks (ListTasksRequest) returns (ListTasksResponse)
ListTasksRequest
Field | Description |
---|---|
compute_instance_id | string Required. Compute Cloud instance ID. The maximum string length in characters is 50. |
page_size | int64 Number of results per page. The maximum value is 1000. |
page_token | string Token for the results page. The maximum string length in characters is 100. |
ListTasksResponse
Field | Description |
---|---|
tasks[] | Task Set of tasks parameters. |
next_page_token | string Token for the next results page. |
Task
Field | Description |
---|---|
id | int64 Task ID. |
cancellable | bool Shows whether the task is cancellable. Note: task cancellation is not supported yet. |
policy_id | string Policy ID. |
type | enum Type Type of the task. |
progress | Progress Task progress. |
status | enum Status Task status. |
enqueued_at | google.protobuf.Timestamp |
started_at | google.protobuf.Timestamp |
updated_at | google.protobuf.Timestamp |
completed_at | google.protobuf.Timestamp |
compute_instance_id | string Compute Cloud instance ID. |
result_code | enum Code Task result code. |
Progress
Field | Description |
---|---|
current | int64 |
total | int64 |
ListDirectory
ListDirectory returns all subdirectories found in requested directory identified by the id.
rpc ListDirectory (ListDirectoryRequest) returns (ListDirectoryResponse)
ListDirectoryRequest
Field | Description |
---|---|
folder_id | string Required. Folder ID. The maximum string length in characters is 50. |
compute_instance_id | string Required. Compute Cloud instance ID. |
path | string Path to list items in. |
ListDirectoryResponse
Field | Description |
---|---|
items[] | FilesystemItem |
FilesystemItem
Field | Description |
---|---|
name | string Item name. |
type | enum Type Might be Volume, Directory of File. |
file_type | enum Type Might be Directory or File. |
size | int64 |
CreateDirectory
CreateDirectory creates new directory by requested path.
rpc CreateDirectory (CreateDirectoryRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CreateDirectoryMetadata
Operation.response:google.protobuf.Empty
CreateDirectoryRequest
Field | Description |
---|---|
folder_id | string Required. Folder ID. The maximum string length in characters is 50. |
compute_instance_id | string Required. Compute Cloud instance ID. |
path | string Required. Path to create directory in. |
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. |
CreateDirectoryMetadata
Field | Description |
---|---|
compute_instance_id | string Compute Cloud instance ID. |
path | string Path to create directory metadata in. |
ListOperations
ListOperations return all operations in backup service for given instance
rpc ListOperations (ListResourceOperationsRequest) returns (ListResourceOperationsResponse)
ListResourceOperationsRequest
Field | Description |
---|---|
compute_instance_id | string Required. Compute Cloud instance ID. The maximum string length in characters is 50. |
page_size | int64 Number of results per page. The maximum value is 1000. |
page_token | string Token for the results page. The maximum string length in characters is 100. |
ListResourceOperationsResponse
Field | Description |
---|---|
operations[] | operation.Operation List of operations for the specified instance. |
next_page_token | string Token for the next results page. |
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 |