Compute Cloud API, gRPC: SnapshotScheduleService
A set of methods for managing snapshot schedules.
Call | Description |
---|---|
Get | Returns the specified snapshot schedule. |
List | Retrieves the list of snapshot schedules in the specified folder. |
Create | Creates a snapshot schedule in the specified folder. |
Update | Updates the specified snapshot schedule. |
Delete | Deletes the specified snapshot schedule. |
UpdateDisks | Updates the list of disks attached to the specified schedule. |
Disable | Disables the specified snapshot schedule. |
Enable | Enables the specified snapshot schedule. |
ListOperations | Lists operations for the specified snapshot schedule. |
ListSnapshots | Retrieves the list of snapshots created by the specified snapshot schedule. |
ListDisks | Retrieves the list of disks attached to the specified snapshot schedule. |
Calls SnapshotScheduleService
Get
Returns the specified snapshot schedule.
To get the list of available snapshot schedules, make a List request.
rpc Get (GetSnapshotScheduleRequest) returns (SnapshotSchedule)
GetSnapshotScheduleRequest
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule to return. To get a schedule ID, make a SnapshotScheduleService.List request. |
SnapshotSchedule
Field | Description |
---|---|
id | string ID of the snapshot schedule. |
folder_id | string ID of the folder that the snapshot schedule belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp. |
name | string Name of the snapshot schedule. The name is unique within the folder. |
description | string Description of the snapshot schedule. |
labels | map<string,string> Snapshot schedule labels as key:value pairs. |
status | enum Status Status of the snapshot schedule.
|
schedule_policy | SchedulePolicy Frequency settings of the snapshot schedule. |
retention_policy | oneof: retention_period or snapshot_count Retention policy of the snapshot schedule. |
retention_period | google.protobuf.Duration Retention period of the snapshot schedule. Once a snapshot created by the schedule reaches this age, it is automatically deleted. |
snapshot_count | int64 Retention count of the snapshot schedule. Once the number of snapshots created by the schedule exceeds this number, the oldest ones are automatically deleted. E.g. if the number is 5, the first snapshot is deleted after the sixth one is created, the second is deleted after the seventh one is created, and so on. |
snapshot_spec | SnapshotSpec Attributes of snapshots created by the snapshot schedule. |
SchedulePolicy
Field | Description |
---|---|
start_at | google.protobuf.Timestamp Timestamp for creating the first snapshot. |
expression | string Cron expression for the snapshot schedule (UTC+0). The expression must consist of five fields ( Minutes Hours Day-of-month Month Day-of-week ) or be one of nonstandard predefined expressions (e.g. @hourly ). For details about the format, see documentation |
SnapshotSpec
Field | Description |
---|---|
description | string Description of the created snapshot. |
labels | map<string,string> Snapshot labels as key:value pairs. |
List
Retrieves the list of snapshot schedules in the specified folder.
rpc List (ListSnapshotSchedulesRequest) returns (ListSnapshotSchedulesResponse)
ListSnapshotSchedulesRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to list snapshot schedules 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 ListSnapshotSchedulesResponse.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 ListSnapshotSchedulesResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
filter | string A filter expression that filters snapshot schedules listed in the response. The expression must specify:
name=my-schedule . The maximum string length in characters is 1000. |
order_by | string A sorting expression that sorts snapshot schedules listed in the response. The expression must specify the field name from SnapshotSchedule and asc ending or desc ending order, e.g. createdAt desc . Default value: id asc . The maximum string length in characters is 100. |
ListSnapshotSchedulesResponse
Field | Description |
---|---|
snapshot_schedules[] | SnapshotSchedule List of snapshot schedules 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 ListSnapshotSchedulesRequest.page_size, use next_page_token as the value for the ListSnapshotSchedulesRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. |
SnapshotSchedule
Field | Description |
---|---|
id | string ID of the snapshot schedule. |
folder_id | string ID of the folder that the snapshot schedule belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp. |
name | string Name of the snapshot schedule. The name is unique within the folder. |
description | string Description of the snapshot schedule. |
labels | map<string,string> Snapshot schedule labels as key:value pairs. |
status | enum Status Status of the snapshot schedule.
|
schedule_policy | SchedulePolicy Frequency settings of the snapshot schedule. |
retention_policy | oneof: retention_period or snapshot_count Retention policy of the snapshot schedule. |
retention_period | google.protobuf.Duration Retention period of the snapshot schedule. Once a snapshot created by the schedule reaches this age, it is automatically deleted. |
snapshot_count | int64 Retention count of the snapshot schedule. Once the number of snapshots created by the schedule exceeds this number, the oldest ones are automatically deleted. E.g. if the number is 5, the first snapshot is deleted after the sixth one is created, the second is deleted after the seventh one is created, and so on. |
snapshot_spec | SnapshotSpec Attributes of snapshots created by the snapshot schedule. |
SchedulePolicy
Field | Description |
---|---|
start_at | google.protobuf.Timestamp Timestamp for creating the first snapshot. |
expression | string Cron expression for the snapshot schedule (UTC+0). The expression must consist of five fields ( Minutes Hours Day-of-month Month Day-of-week ) or be one of nonstandard predefined expressions (e.g. @hourly ). For details about the format, see documentation |
SnapshotSpec
Field | Description |
---|---|
description | string Description of the created snapshot. |
labels | map<string,string> Snapshot labels as key:value pairs. |
Create
Creates a snapshot schedule in the specified folder.
rpc Create (CreateSnapshotScheduleRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CreateSnapshotScheduleMetadata
Operation.response:SnapshotSchedule
CreateSnapshotScheduleRequest
Field | Description |
---|---|
folder_id | string ID of the folder to create a snapshot schedule in. Snapshots are created in the same folder as the schedule, even if disks from other folders are attached to the schedule. To get a folder ID, make a resourcemanager.v1.FolderService.List request. |
name | string Name of the snapshot schedule. The name must be unique within the folder. |
description | string Description of the snapshot schedule. |
labels | map<string,string> Snapshot schedule labels as key:value pairs. |
schedule_policy | SchedulePolicy Frequency settings of the snapshot schedule. |
retention_policy | oneof: retention_period or snapshot_count Retention policy of the snapshot schedule. |
retention_period | google.protobuf.Duration Retention period of the snapshot schedule. Once a snapshot created by the schedule reaches this age, it is automatically deleted. |
snapshot_count | int64 Retention count of the snapshot schedule. Once the number of snapshots created by the schedule exceeds this number, the oldest ones are automatically deleted. E.g. if the number is 5, the first snapshot is deleted after the sixth one is created, the second is deleted after the seventh one is created, and so on. |
snapshot_spec | SnapshotSpec Attributes of snapshots created by the snapshot schedule. |
disk_ids[] | string List of IDs of the disks attached to the snapshot schedule. To get a disk ID, make a compute.v1.DiskService.List request. |
SchedulePolicy
Field | Description |
---|---|
start_at | google.protobuf.Timestamp Timestamp for creating the first snapshot. |
expression | string Cron expression for the snapshot schedule (UTC+0). The expression must consist of five fields ( Minutes Hours Day-of-month Month Day-of-week ) or be one of nonstandard predefined expressions (e.g. @hourly ). For details about the format, see documentation |
SnapshotSpec
Field | Description |
---|---|
description | string Description of the created snapshot. |
labels | map<string,string> Snapshot labels as key:value pairs. |
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. |
CreateSnapshotScheduleMetadata
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule that is being created. |
SnapshotSchedule
Field | Description |
---|---|
id | string ID of the snapshot schedule. |
folder_id | string ID of the folder that the snapshot schedule belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp. |
name | string Name of the snapshot schedule. The name is unique within the folder. |
description | string Description of the snapshot schedule. |
labels | map<string,string> Snapshot schedule labels as key:value pairs. |
status | enum Status Status of the snapshot schedule.
|
schedule_policy | SchedulePolicy Frequency settings of the snapshot schedule. |
retention_policy | oneof: retention_period or snapshot_count Retention policy of the snapshot schedule. |
retention_period | google.protobuf.Duration Retention period of the snapshot schedule. Once a snapshot created by the schedule reaches this age, it is automatically deleted. |
snapshot_count | int64 Retention count of the snapshot schedule. Once the number of snapshots created by the schedule exceeds this number, the oldest ones are automatically deleted. E.g. if the number is 5, the first snapshot is deleted after the sixth one is created, the second is deleted after the seventh one is created, and so on. |
snapshot_spec | SnapshotSpec Attributes of snapshots created by the snapshot schedule. |
Update
Updates the specified snapshot schedule.
The schedule is updated only after all snapshot creations and deletions triggered by the schedule are completed.
rpc Update (UpdateSnapshotScheduleRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateSnapshotScheduleMetadata
Operation.response:SnapshotSchedule
UpdateSnapshotScheduleRequest
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule to update. To get the snapshot schedule ID, make a SnapshotScheduleService.List request. |
update_mask | google.protobuf.FieldMask Field mask that specifies which attributes of the snapshot schedule should be updated. |
name | string New name for the snapshot schedule. The name must be unique within the folder. |
description | string New description of the snapshot schedule. |
labels | map<string,string> Snapshot schedule labels as key:value pairs. Existing set of labels is completely replaced by the provided set, so if you just want to add or remove a label:
|
schedule_policy | SchedulePolicy New frequency settings of the snapshot schedule. |
retention_policy | oneof: retention_period or snapshot_count New retention policy of the snapshot schedule. |
retention_period | google.protobuf.Duration Retention period of the snapshot schedule. Once a snapshot created by the schedule reaches this age, it is automatically deleted. |
snapshot_count | int64 Retention count of the snapshot schedule. Once the number of snapshots created by the schedule exceeds this number, the oldest ones are automatically deleted. E.g. if the number is 5, the first snapshot is deleted after the sixth one is created, the second is deleted after the seventh one is created, and so on. |
snapshot_spec | SnapshotSpec New attributes of snapshots created by the snapshot schedule. |
SchedulePolicy
Field | Description |
---|---|
start_at | google.protobuf.Timestamp Timestamp for creating the first snapshot. |
expression | string Cron expression for the snapshot schedule (UTC+0). The expression must consist of five fields ( Minutes Hours Day-of-month Month Day-of-week ) or be one of nonstandard predefined expressions (e.g. @hourly ). For details about the format, see documentation |
SnapshotSpec
Field | Description |
---|---|
description | string Description of the created snapshot. |
labels | map<string,string> Snapshot labels as key:value pairs. |
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. |
UpdateSnapshotScheduleMetadata
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule that is being updated. |
SnapshotSchedule
Field | Description |
---|---|
id | string ID of the snapshot schedule. |
folder_id | string ID of the folder that the snapshot schedule belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp. |
name | string Name of the snapshot schedule. The name is unique within the folder. |
description | string Description of the snapshot schedule. |
labels | map<string,string> Snapshot schedule labels as key:value pairs. |
status | enum Status Status of the snapshot schedule.
|
schedule_policy | SchedulePolicy Frequency settings of the snapshot schedule. |
retention_policy | oneof: retention_period or snapshot_count Retention policy of the snapshot schedule. |
retention_period | google.protobuf.Duration Retention period of the snapshot schedule. Once a snapshot created by the schedule reaches this age, it is automatically deleted. |
snapshot_count | int64 Retention count of the snapshot schedule. Once the number of snapshots created by the schedule exceeds this number, the oldest ones are automatically deleted. E.g. if the number is 5, the first snapshot is deleted after the sixth one is created, the second is deleted after the seventh one is created, and so on. |
snapshot_spec | SnapshotSpec Attributes of snapshots created by the snapshot schedule. |
Delete
Deletes the specified snapshot schedule.
Deleting a snapshot schedule removes its data permanently and is irreversible. However, deleting a schedule does not delete any snapshots created by the schedule. You must delete snapshots separately.
The schedule is deleted only after all snapshot creations and deletions triggered by the schedule are completed.
rpc Delete (DeleteSnapshotScheduleRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteSnapshotScheduleMetadata
Operation.response:google.protobuf.Empty
DeleteSnapshotScheduleRequest
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule to delete. To get a snapshot schedule ID, make a SnapshotScheduleService.List request. |
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. |
DeleteSnapshotScheduleMetadata
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule that is being deleted. |
UpdateDisks
Updates the list of disks attached to the specified schedule.
The schedule is updated only after all snapshot creations and deletions triggered by the schedule are completed.
rpc UpdateDisks (UpdateSnapshotScheduleDisksRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateSnapshotScheduleDisksMetadata
Operation.response:SnapshotSchedule
UpdateSnapshotScheduleDisksRequest
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule to update. To get a snapshot schedule ID, make a SnapshotScheduleService.List request. |
remove[] | string List of IDs of the disks to detach from the specified schedule. To get an ID of a disk attached to the schedule, make a SnapshotScheduleService.ListDisks request. |
add[] | string List of IDs of the disks to attach to the specified schedule. To get a disk ID, make a compute.v1.DiskService.List request. |
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. |
UpdateSnapshotScheduleDisksMetadata
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule that is being updated. |
SnapshotSchedule
Field | Description |
---|---|
id | string ID of the snapshot schedule. |
folder_id | string ID of the folder that the snapshot schedule belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp. |
name | string Name of the snapshot schedule. The name is unique within the folder. |
description | string Description of the snapshot schedule. |
labels | map<string,string> Snapshot schedule labels as key:value pairs. |
status | enum Status Status of the snapshot schedule.
|
schedule_policy | SchedulePolicy Frequency settings of the snapshot schedule. |
retention_policy | oneof: retention_period or snapshot_count Retention policy of the snapshot schedule. |
retention_period | google.protobuf.Duration Retention period of the snapshot schedule. Once a snapshot created by the schedule reaches this age, it is automatically deleted. |
snapshot_count | int64 Retention count of the snapshot schedule. Once the number of snapshots created by the schedule exceeds this number, the oldest ones are automatically deleted. E.g. if the number is 5, the first snapshot is deleted after the sixth one is created, the second is deleted after the seventh one is created, and so on. |
snapshot_spec | SnapshotSpec Attributes of snapshots created by the snapshot schedule. |
SchedulePolicy
Field | Description |
---|---|
start_at | google.protobuf.Timestamp Timestamp for creating the first snapshot. |
expression | string Cron expression for the snapshot schedule (UTC+0). The expression must consist of five fields ( Minutes Hours Day-of-month Month Day-of-week ) or be one of nonstandard predefined expressions (e.g. @hourly ). For details about the format, see documentation |
SnapshotSpec
Field | Description |
---|---|
description | string Description of the created snapshot. |
labels | map<string,string> Snapshot labels as key:value pairs. |
Disable
Disables the specified snapshot schedule.
The SnapshotSchedule.status is changed to INACTIVE
: the schedule is interrupted, snapshots won't be created or deleted.
The schedule is disabled only after all snapshot creations and deletions triggered by the schedule are completed.
rpc Disable (DisableSnapshotScheduleRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DisableSnapshotScheduleMetadata
Operation.response:SnapshotSchedule
DisableSnapshotScheduleRequest
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule to disable. To get a snapshot schedule ID, make a SnapshotScheduleService.List request. |
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. |
DisableSnapshotScheduleMetadata
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule that is being disabled. |
SnapshotSchedule
Field | Description |
---|---|
id | string ID of the snapshot schedule. |
folder_id | string ID of the folder that the snapshot schedule belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp. |
name | string Name of the snapshot schedule. The name is unique within the folder. |
description | string Description of the snapshot schedule. |
labels | map<string,string> Snapshot schedule labels as key:value pairs. |
status | enum Status Status of the snapshot schedule.
|
schedule_policy | SchedulePolicy Frequency settings of the snapshot schedule. |
retention_policy | oneof: retention_period or snapshot_count Retention policy of the snapshot schedule. |
retention_period | google.protobuf.Duration Retention period of the snapshot schedule. Once a snapshot created by the schedule reaches this age, it is automatically deleted. |
snapshot_count | int64 Retention count of the snapshot schedule. Once the number of snapshots created by the schedule exceeds this number, the oldest ones are automatically deleted. E.g. if the number is 5, the first snapshot is deleted after the sixth one is created, the second is deleted after the seventh one is created, and so on. |
snapshot_spec | SnapshotSpec Attributes of snapshots created by the snapshot schedule. |
SchedulePolicy
Field | Description |
---|---|
start_at | google.protobuf.Timestamp Timestamp for creating the first snapshot. |
expression | string Cron expression for the snapshot schedule (UTC+0). The expression must consist of five fields ( Minutes Hours Day-of-month Month Day-of-week ) or be one of nonstandard predefined expressions (e.g. @hourly ). For details about the format, see documentation |
SnapshotSpec
Field | Description |
---|---|
description | string Description of the created snapshot. |
labels | map<string,string> Snapshot labels as key:value pairs. |
Enable
Enables the specified snapshot schedule.
The SnapshotSchedule.status is changed to ACTIVE
: new disk snapshots will be created, old ones deleted (if SnapshotSchedule.retention_policy is specified).
rpc Enable (EnableSnapshotScheduleRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:EnableSnapshotScheduleMetadata
Operation.response:SnapshotSchedule
EnableSnapshotScheduleRequest
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule to enable. To get a snapshot schedule ID, make a SnapshotScheduleService.List request. |
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. |
EnableSnapshotScheduleMetadata
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule that is being enabled. |
SnapshotSchedule
Field | Description |
---|---|
id | string ID of the snapshot schedule. |
folder_id | string ID of the folder that the snapshot schedule belongs to. |
created_at | google.protobuf.Timestamp Creation timestamp. |
name | string Name of the snapshot schedule. The name is unique within the folder. |
description | string Description of the snapshot schedule. |
labels | map<string,string> Snapshot schedule labels as key:value pairs. |
status | enum Status Status of the snapshot schedule.
|
schedule_policy | SchedulePolicy Frequency settings of the snapshot schedule. |
retention_policy | oneof: retention_period or snapshot_count Retention policy of the snapshot schedule. |
retention_period | google.protobuf.Duration Retention period of the snapshot schedule. Once a snapshot created by the schedule reaches this age, it is automatically deleted. |
snapshot_count | int64 Retention count of the snapshot schedule. Once the number of snapshots created by the schedule exceeds this number, the oldest ones are automatically deleted. E.g. if the number is 5, the first snapshot is deleted after the sixth one is created, the second is deleted after the seventh one is created, and so on. |
snapshot_spec | SnapshotSpec Attributes of snapshots created by the snapshot schedule. |
SchedulePolicy
Field | Description |
---|---|
start_at | google.protobuf.Timestamp Timestamp for creating the first snapshot. |
expression | string Cron expression for the snapshot schedule (UTC+0). The expression must consist of five fields ( Minutes Hours Day-of-month Month Day-of-week ) or be one of nonstandard predefined expressions (e.g. @hourly ). For details about the format, see documentation |
SnapshotSpec
Field | Description |
---|---|
description | string Description of the created snapshot. |
labels | map<string,string> Snapshot labels as key:value pairs. |
ListOperations
Lists operations for the specified snapshot schedule.
rpc ListOperations (ListSnapshotScheduleOperationsRequest) returns (ListSnapshotScheduleOperationsResponse)
ListSnapshotScheduleOperationsRequest
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule to list operations for. To get a snapshot schedule ID, make a SnapshotScheduleService.List request. |
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 ListSnapshotScheduleOperationsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. |
page_token | string Page token. To get the next page of results, set page_token to the ListSnapshotScheduleOperationsResponse.next_page_token returned by a previous list request. |
ListSnapshotScheduleOperationsResponse
Field | Description |
---|---|
operations[] | operation.Operation List of operations for the specified snapshot schedule. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListSnapshotScheduleOperationsRequest.page_size, use next_page_token as the value for the ListSnapshotScheduleOperationsRequest.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 |
ListSnapshots
Retrieves the list of snapshots created by the specified snapshot schedule.
rpc ListSnapshots (ListSnapshotScheduleSnapshotsRequest) returns (ListSnapshotScheduleSnapshotsResponse)
ListSnapshotScheduleSnapshotsRequest
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule to list created snapshots for. To get a snapshot schedule ID, make a SnapshotScheduleService.List request. |
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 ListSnapshotScheduleOperationsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. |
page_token | string Page token. To get the next page of results, set page_token to the ListSnapshotScheduleOperationsResponse.next_page_token returned by a previous list request. |
ListSnapshotScheduleSnapshotsResponse
Field | Description |
---|---|
snapshots[] | Snapshot List of snapshots created by the specified snapshot schedule. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListSnapshotScheduleSnapshotsRequest.page_size, use next_page_token as the value for the ListSnapshotScheduleSnapshotsRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. |
Snapshot
Field | Description |
---|---|
id | string ID of the snapshot. |
folder_id | string ID of the folder that the snapshot belongs to. |
created_at | google.protobuf.Timestamp |
name | string Name of the snapshot. 1-63 characters long. |
description | string Description of the snapshot. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. Maximum of 64 per resource. |
storage_size | int64 Size of the snapshot, specified in bytes. |
disk_size | int64 Size of the disk when the snapshot was created, specified in bytes. |
product_ids[] | string License IDs that indicate which licenses are attached to this resource. License IDs are used to calculate additional charges for the use of the virtual machine. The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource. If you know the license IDs, specify them when you create the image. For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost. You can specify them in the compute.v1.ImageService.Create request. |
status | enum Status Current status of the snapshot.
|
source_disk_id | string ID of the source disk used to create this snapshot. |
ListDisks
Retrieves the list of disks attached to the specified snapshot schedule.
rpc ListDisks (ListSnapshotScheduleDisksRequest) returns (ListSnapshotScheduleDisksResponse)
ListSnapshotScheduleDisksRequest
Field | Description |
---|---|
snapshot_schedule_id | string ID of the snapshot schedule to list attached disks for. To get a snapshot schedule ID, make a SnapshotScheduleService.List request. |
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 ListSnapshotScheduleDisksResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. |
page_token | string Page token. To get the next page of results, set page_token to the ListSnapshotScheduleDisksResponse.next_page_token returned by a previous list request. |
ListSnapshotScheduleDisksResponse
Field | Description |
---|---|
disks[] | Disk List of disks attached to the specified snapshot schedule. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListSnapshotScheduleDisksRequest.page_size, use next_page_token as the value for the ListSnapshotScheduleDisksRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. |
Disk
Field | Description |
---|---|
id | string ID of the disk. |
folder_id | string ID of the folder that the disk belongs to. |
created_at | google.protobuf.Timestamp |
name | string Name of the disk. 1-63 characters long. |
description | string Description of the disk. 0-256 characters long. |
labels | map<string,string> Resource labels as key:value pairs. Maximum of 64 per resource. |
type_id | string ID of the disk type. |
zone_id | string ID of the availability zone where the disk resides. |
size | int64 Size of the disk, specified in bytes. |
block_size | int64 Block size of the disk, specified in bytes. |
product_ids[] | string License IDs that indicate which licenses are attached to this resource. License IDs are used to calculate additional charges for the use of the virtual machine. The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource. If you know the license IDs, specify them when you create the image. For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost. You can specify them in the compute.v1.ImageService.Create request. |
status | enum Status Current status of the disk.
|
source | oneof: source_image_id or source_snapshot_id |
source_image_id | string ID of the image that was used for disk creation. |
source_snapshot_id | string ID of the snapshot that was used for disk creation. |
instance_ids[] | string Array of instances to which the disk is attached. |
disk_placement_policy | DiskPlacementPolicy Placement policy configuration. |
DiskPlacementPolicy
Field | Description |
---|---|
placement_group_id | string Placement group ID. |
placement_group_partition | int64 |