You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HelpMessage = "Path to store log collection in")][System.IO.DirectoryInfo]$Path
13243
+
HelpMessage = "Path to store recovery package")][System.IO.DirectoryInfo]$Path
13240
13244
)
13241
13245
13242
13246
Begin {
@@ -13287,35 +13291,57 @@ function Global:Get-SgwRecoveryPackage {
13287
13291
13288
13292
## regions ##
13289
13293
13294
+
# complete as of API 2.2
13295
+
13290
13296
<#
13291
13297
.SYNOPSIS
13292
13298
Lists configured regions
13293
13299
.DESCRIPTION
13294
13300
Lists configured regions
13301
+
.PARAMETER Server
13302
+
StorageGRID Webscale Management Server object. If not specified, global CurrentSgwServer object will be used.
13303
+
.PARAMETER ProfileName
13304
+
StorageGRID Profile to use for connection.
13295
13305
#>
13296
13306
function Global:Get-SgwRegions {
13297
13307
[CmdletBinding()]
13298
13308
13299
13309
PARAM (
13300
13310
[parameter(Mandatory = $False,
13301
13311
Position = 0,
13302
-
HelpMessage = "StorageGRID Webscale Management Server object. If not specified, global CurrentSgwServer object will be used.")][PSCustomObject]$Server
13312
+
HelpMessage = "StorageGRID Webscale Management Server object. If not specified, global CurrentSgwServer object will be used.")][PSCustomObject]$Server,
13313
+
[parameter(Mandatory = $False,
13314
+
Position = 1,
13315
+
HelpMessage = "StorageGRID Profile to use for connection.")][Alias("Profile")][String]$ProfileName
13303
13316
)
13304
13317
13305
13318
Begin {
13319
+
if (!$ProfileName -and !$Server -and !$CurrentSgwServer.Name) {
Throw "No StorageGRID Webscale Management Server management server found. Please run Connect-SgwServer to continue."
13311
13335
}
13312
-
if ($Server.AccountId) {
13313
-
Throw "Operation not supported when connected as tenant. Use Connect-SgwServer without the AccountId parameter to connect as grid administrator and then rerun this command."
13314
-
}
13315
13336
}
13316
13337
13317
13338
Process {
13318
-
$Uri = $Server.BaseURI + "/grid/regions"
13339
+
if ($Server.AccountId) {
13340
+
$Uri = $Server.BaseURI + "/org/regions"
13341
+
}
13342
+
else {
13343
+
$Uri = $Server.BaseURI + "/grid/regions"
13344
+
}
13319
13345
$Method = "GET"
13320
13346
13321
13347
try {
@@ -13335,6 +13361,12 @@ function Global:Get-SgwRegions {
13335
13361
Change the regions used by the grid
13336
13362
.DESCRIPTION
13337
13363
Change the regions used by the grid
13364
+
.PARAMETER Server
13365
+
StorageGRID Webscale Management Server object. If not specified, global CurrentSgwServer object will be used.
13366
+
.PARAMETER ProfileName
13367
+
StorageGRID Profile to use for connection.
13368
+
.PARAMETER Regions
13369
+
List of regions. A region can only include letters, numbers, and hyphens.
13338
13370
#>
13339
13371
function Global:Update-SgwRegions {
13340
13372
[CmdletBinding()]
@@ -13345,10 +13377,24 @@ function Global:Update-SgwRegions {
13345
13377
HelpMessage = "StorageGRID Webscale Management Server object. If not specified, global CurrentSgwServer object will be used.")][PSCustomObject]$Server,
13346
13378
[parameter(Mandatory = $False,
13347
13379
Position = 1,
13348
-
HelpMessage = "Regions.")][String[]]$Regions
13380
+
HelpMessage = "StorageGRID Profile to use for connection.")][Alias("Profile")][String]$ProfileName,
13381
+
[parameter(Mandatory = $False,
13382
+
Position = 2,
13383
+
HelpMessage = "List of regions. A region can only include letters, numbers, and hyphens.")][String[]]$Regions
13349
13384
)
13350
13385
13351
13386
Begin {
13387
+
if (!$ProfileName -and !$Server -and !$CurrentSgwServer.Name) {
0 commit comments