Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetRestorationOpts ¶
type GetRestorationOpts struct { // ID of the backup used to restore data CheckpointItemId string `json:"checkpoint_item_id" required:"true"` // Restoration target Target RestorableTarget `json:"target" required:"true"` }
type ResourceBackupCapOpts ¶
type ResourceBackupCapOpts struct { // ID of the resource (server, or EVS disk) to be checked // For details about how to obtain the server ID, see the Elastic Cloud Server API Reference. // For details about how to obtain the disk ID, see the Elastic Volume Service API Reference. ResourceId string `json:"resource_id" required:"true"` // Type of the resource to be checked, for example, OS::Nova::Server for an ECS ResourceType string `json:"resource_type" required:"true"` }
ResourceBackupCapOpts contains the options for querying whether resources can be backed up.
type ResourceCapability ¶
type ResourceCapability struct { // Whether backup or restoration is supported // true: yes // false: no Result bool `json:"result"` // Resource type // Possible values are OS::Nova::Server (ECS) and OS::Ironic::BareMetalServer (BMS). ResourceType string `json:"resource_type"` // Error code. If an error occurs, a value is returned. ErrorCode string `json:"error_code"` // Error message, which will be returned if the VM is associated with a backup policy. If an error occurs, a value is returned. ErrorMsg string `json:"error_msg"` // Resource ID ResourceId string `json:"resource_id"` }
func GetResBackupCapabilities ¶
func GetResBackupCapabilities(client *golangsdk.ServiceClient, opts []ResourceBackupCapOpts) ([]ResourceCapability, error)
GetResBackupCapabilities will query whether resources can be backed up based on the values in ResourceBackupCapOpts. To extract the ResourceCap object from the response, call the ExtractQueryResponse method on the QueryResult.
func GetResRestorationCapabilities ¶
func GetResRestorationCapabilities(client *golangsdk.ServiceClient, opts []GetRestorationOpts) ([]ResourceCapability, error)
GetResRestorationCapabilities check whether target resources can be restored.
type RestorableTarget ¶
type RestorableTarget struct { // ID of the resource to which the backup is restored ResourceId string `json:"resource_id" required:"true"` // Type of the target to which the backup is restored, for example, OS::Nova::Server for an ECS ResourceType string `json:"resource_type" required:"true"` // Disk mapping list for restoring an ECS. Enter the mapping between disks and backups based on the actual situation. Volumes []RestoreVolumeMapping `json:"volumes" required:"true"` }
type RestoreOpts ¶
type RestoreOpts struct { // Backup provider ID, which specifies whether the backup object is a server or disk. // This parameter has a fixed value. For CSBS, the value is fc4d5750-22e7-4798-8a46-f48f62c4c1da. ProviderId string `json:"provider_id"` // Backup record ID CheckpointId string `json:"checkpoint_id"` // Restoration target RestoreTarget string `json:"restore_target,omitempty"` // Restoration parameters Parameters RestoreParam `json:"parameters"` }
type RestoreParam ¶
type RestoreParam struct { // Backup ID CheckpointItemId string `json:"checkpoint_item_id"` // Whether to instantly power on the VM after restoration PowerOn bool `json:"power_on"` // Restoration target Targets RestoreTarget `json:"targets"` }
type RestoreResp ¶
type RestoreResp struct { // Restoration target RestoreTarget string `json:"restore_target"` // Status Status string `json:"status"` // Project ID ProviderId string `json:"provider_id"` // Resource status after the resource is restored, for example, available ResourcesStatus interface{} `json:"resources_status"` // Restoration parameters Parameters RestoreParam `json:"parameters"` // Backup record ID CheckpointId string `json:"checkpoint_id"` // Project ID ProjectId string `json:"project_id"` // Restoration ID Id string `json:"id"` // Cause of the resource restoration failure ResourcesReason interface{} `json:"resources_reason"` }
func CreateRestorationTask ¶
func CreateRestorationTask(client *golangsdk.ServiceClient, opts RestoreOpts) (*RestoreResp, error)
type RestoreTarget ¶
type RestoreTarget struct { // ID of the ECS to be restored ServerId string `json:"server_id"` // List of the mappings between disk backups and target disks Volumes []RestoreVolumeMapping `json:"volumes"` }
type RestoreVolumeMapping ¶
Click to show internal directories.
Click to hide internal directories.