Api/SettingsApi.ps1
# # Cloud Governance Api # Contact: support@avepoint.com # <# .SYNOPSIS get group/teams dynamic membership rules .DESCRIPTION No description available. .PARAMETER Tenantid No description available. .PARAMETER ReturnType Select the return type (optional): text/plain, application/json .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS InlineResponse200 #> function Get-DynamicMembershipRuleItems { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${Tenantid}, [String] [ValidateSet("text/plain", "application/json")] $ReturnType, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-DynamicMembershipRuleItems' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-Configuration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('text/plain', 'application/json') if ($ReturnType) { # use the return type (MIME) provided by the user $LocalVarAccepts = @($ReturnType) } $LocalVarUri = '/settings/office365/groups/dynamicmembershiprule/{tenantid}' if (!$Tenantid) { throw "Error! The required parameter `Tenantid` missing when calling getDynamicMembershipRuleItems." } $LocalVarUri = $LocalVarUri.replace('{tenantid}', $Tenantid) if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["clientSecret"]) { $LocalVarHeaderParameters['clientSecret'] = $Configuration["ApiKey"]["clientSecret"] Write-Verbose ("Using API key 'clientSecret' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["userPrincipalName"]) { $LocalVarHeaderParameters['userPrincipalName'] = $Configuration["ApiKey"]["userPrincipalName"] Write-Verbose ("Using API key 'userPrincipalName' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "InlineResponse200" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS get my personal settings .DESCRIPTION No description available. .PARAMETER ReturnType Select the return type (optional): text/plain, application/json .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS PersonalSettings #> function Get-MyPersonalSettings { [CmdletBinding()] Param ( [String] [ValidateSet("text/plain", "application/json")] $ReturnType, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-MyPersonalSettings' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-Configuration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('text/plain', 'application/json') if ($ReturnType) { # use the return type (MIME) provided by the user $LocalVarAccepts = @($ReturnType) } $LocalVarUri = '/settings/my' if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["clientSecret"]) { $LocalVarHeaderParameters['clientSecret'] = $Configuration["ApiKey"]["clientSecret"] Write-Verbose ("Using API key 'clientSecret' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["userPrincipalName"]) { $LocalVarHeaderParameters['userPrincipalName'] = $Configuration["ApiKey"]["userPrincipalName"] Write-Verbose ("Using API key 'userPrincipalName' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "PersonalSettings" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS get permission levels .DESCRIPTION No description available. .PARAMETER ReturnType Select the return type (optional): text/plain, application/json .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS PermissionLevel[] #> function Get-ACGPermissionLevels { [CmdletBinding()] Param ( [String] [ValidateSet("text/plain", "application/json")] $ReturnType, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-ACGPermissionLevels' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-Configuration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('text/plain', 'application/json') if ($ReturnType) { # use the return type (MIME) provided by the user $LocalVarAccepts = @($ReturnType) } $LocalVarUri = '/settings/office365/permissionlevels' if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["clientSecret"]) { $LocalVarHeaderParameters['clientSecret'] = $Configuration["ApiKey"]["clientSecret"] Write-Verbose ("Using API key 'clientSecret' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["userPrincipalName"]) { $LocalVarHeaderParameters['userPrincipalName'] = $Configuration["ApiKey"]["userPrincipalName"] Write-Verbose ("Using API key 'userPrincipalName' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "PermissionLevel[]" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } |