24 lines
642 B
PowerShell
24 lines
642 B
PowerShell
function Get-GpfsPolicy {
|
|
[CmdletBinding()]
|
|
param(
|
|
[Parameter(Mandatory, Position = 0)]
|
|
[string]$FilesystemName
|
|
)
|
|
|
|
Invoke-GpfsApiRequest -Method GET -Endpoint "filesystems/$FilesystemName/policies"
|
|
}
|
|
|
|
function Set-GpfsPolicy {
|
|
[CmdletBinding(SupportsShouldProcess)]
|
|
param(
|
|
[Parameter(Mandatory, Position = 0)]
|
|
[string]$FilesystemName,
|
|
|
|
[Parameter(Mandatory)]
|
|
[hashtable]$Settings
|
|
)
|
|
|
|
if ($PSCmdlet.ShouldProcess($FilesystemName, 'Apply policy')) {
|
|
Invoke-GpfsApiRequest -Method PUT -Endpoint "filesystems/$FilesystemName/policies" -Body $Settings
|
|
}
|
|
}
|