-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPOSH_RS_API_BACKUP.PSM1
More file actions
65 lines (47 loc) · 1.56 KB
/
POSH_RS_API_BACKUP.PSM1
File metadata and controls
65 lines (47 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#List Agent(s)
function Get-RSBackupAgents{
param(
<# [Parameter()][string[]]$VolumeID,
[Parameter()][ValidateSet("SATA","SSD")][string]$VolumeType,
[Parameter()][ValidateRange(50,1024)][int]$MinSize,
[Parameter()][ValidateRange(50,1024)][int]$MaxSize,
[Parameter()][string]$name,
[Parameter()][string]$description,
[Parameter()][string]$SnapshotID,
[Parameter()][string]$SourceVolumeID,
[Parameter()][string]$ImageID#>
)
<#
$agents_temp = Invoke-RSAPICall -Method GET -product "cloudBackup" -URI "/user/agents"
$agents = @()
$activity = @()
$backups = @()
foreach ($agentID in $agents_temp.MachineAgentId) {
$agents += Invoke-RSAPICall -Method GET -product "cloudBackup" -URI "/agent/$agentID"
$Activity += Invoke-RSAPICall -Method GET -product "cloudBackup" -URI "/system/activity/$agentId"
}
#>
$product = "cloudBackup"
$apiResult="volumes"
$uri = "/volumes"
$method = "GET"
write-verbose "Listing CBS Volumes"
write-debug "Parameters:$($MyInvocation.BoundParameters | format-table -AutoSize | out-string)"
(Invoke-RSAPICall -product $product -Uri $uri -Method $method -body $body).($apiResult)
}
#Wakeup Agents
#Enable\Disable Agent
#Enable Backup Encryption
#Change Encryption Password
#Delete Agent
#Migrate Vault
#Update Agent Behavior
#Create Backup Config
#Update Backup Config
#List Backup Configurations
#Enable\Disable Backup Configurations
#Delete Backup Configuration
#Start\Stop a backup
#List Backup Activity
#List Completed Backups
#Get Backup Report