backups

package
v0.5.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupInstance

func BackupInstance(client *golangsdk.ServiceClient, instancesId string, opts BackupInstanceOpts) (string, error)

func DeleteBackupFile

func DeleteBackupFile(client *golangsdk.ServiceClient, instancesId string, backupId string) (err error)

func RestoreInstance

func RestoreInstance(client *golangsdk.ServiceClient, instancesId string, opts RestoreInstanceOpts) (string, error)

Types

type BackupInstanceOpts

type BackupInstanceOpts struct {
	// Description of DCS instance backup.
	Remark string `json:"remark,omitempty"`
}

type BackupRecordResponse

type BackupRecordResponse struct {
	// ID of the backup record
	BackupId string `json:"backup_id"`
	// Time segment in which DCS instance backup was performed
	Period string `json:"period"`
	// Name of the backup record
	BackupName string `json:"backup_name"`
	// DCS instance ID
	InstanceId string `json:"instance_id"`
	// Size of the backup file. Unit: byte.
	Size int64 `json:"size"`
	// Backup type. Options:
	// manual: manual backup
	// auto: automatic backup
	BackupType string `json:"backup_type"`
	// Time at which the backup task is created
	CreatedAt string `json:"created_at"`
	// Time at which DCS instance backup is completed
	UpdatedAt string `json:"updated_at"`
	// Backup progress
	Progress string `json:"progress"`
	// Error code returned if DCS instance backup fails.
	ErrorCode string `json:"error_code"`
	// Description of DCS instance backup
	Remark string `json:"remark"`
	// Backup status. Options:
	// waiting: DCS instance restoration is waiting to begin.
	// backuping: DCS instance backup is in progress.
	// succeed: DCS instance backup succeeded.
	// failed: DCS instance backup failed.
	// expired: The backup file expires.
	// deleted: The backup file has been deleted manually.
	Status string `json:"status"`
	// An indicator of whether restoration is supported. Options: TRUE or FALSE.
	IsSupportRestore string `json:"is_support_restore"`
	// Time at which the backup starts.
	ExecutionAt string `json:"execution_at"`
	// Backup format.
	BackupFormat string `json:"backup_format"`
}

type InstanceRestoreInfo

type InstanceRestoreInfo struct {
	// ID of the backup record
	BackupId string `json:"backup_id"`
	// ID of the restoration record
	RestoreId string `json:"restore_id"`
	// Name of the backup record
	BackupName string `json:"backup_name"`
	// Time at which DCS instance restoration completed
	UpdatedAt string `json:"updated_at"`
	// Description of DCS instance restoration
	RestoreRemark string `json:"restore_remark"`
	// Time at which the restoration task is created
	CreatedAt string `json:"created_at"`
	// Restoration progress
	Progress string `json:"progress"`
	// Error code returned if DCS instance restoration fails.
	ErrorCode string `json:"error_code"`
	// Name of the restoration record
	RestoreName string `json:"restore_name"`
	// Description of DCS instance backup
	BackupRemark string `json:"backup_remark"`
	// Restoration status
	// waiting: DCS instance restoration is waiting to begin.
	// restoring: DCS instance restoration is in progress.
	// succeed: DCS instance restoration succeeded.
	// failed: DCS instance restoration failed.
	Status string `json:"status"`
	// Source instance ID.
	SourceInstanceID string `json:"sourceInstanceID"`
	// Source instance name.
	SourceInstanceName string `json:"sourceInstanceName"`
}

type ListBackupOpts

type ListBackupOpts struct {
	// Start sequence number of the backup record that is to be queried. By default, this parameter is set to 1.
	Start int32 `q:"start"`
	// Start time of the period to be queried. Format: yyyyMMddHHmmss, for example, 20170718235959.
	BeginTime string `q:"begin_time"`
	// End time of the period to be queried. Format: yyyyMMddHHmmss, for example, 20170718235959.
	EndTime string `q:"end_time"`
	// Number of backup records displayed on each page. The minimum value of this parameter is 1.
	// If this parameter is not set, 10 backup records are displayed on each page by default.
	Limit int32 `q:"limit"`
}

type ListBackupRecordsResponse

type ListBackupRecordsResponse struct {
	// Number of obtained backup records.
	TotalNum int `json:"total_num"`
	// Array of the backup records. For details about backup_record_response,
	BackupRecordResponse []BackupRecordResponse `json:"backup_record_response"`
}

func ListBackupRecords

func ListBackupRecords(client *golangsdk.ServiceClient, instancesId string, opts ListBackupOpts) (*ListBackupRecordsResponse, error)

type ListRestoreRecordsResponse

type ListRestoreRecordsResponse struct {
	// Array of the restoration records.
	RestoreRecordResponse []InstanceRestoreInfo `json:"restore_record_response"`
	// Number of obtained backup records.
	TotalNum int `json:"total_num"`
}

func ListRestoreRecords

func ListRestoreRecords(client *golangsdk.ServiceClient, instancesId string, opts ListBackupOpts) (*ListRestoreRecordsResponse, error)

type RestoreInstanceOpts

type RestoreInstanceOpts struct {
	// ID of the backup record
	BackupId string `json:"backup_id"`
	// Description of DCS instance restoration
	Remark string `json:"remark,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL