Api/EmailsApi.ps1
# # Cloud Governance Api # No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # Version: 1.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS get email templates by email template type .DESCRIPTION No description available. .PARAMETER Type No description available. .OUTPUTS GuidModel[] #> function Get-EmailTemplate { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${Type} ) Process { 'Calling method: Get-EmailTemplate' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter $Configuration = Get-Configuration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('text/plain', 'application/json', 'text/json') $LocalVarUri = '/emails/{type}' if (!$Type) { throw "Error! The required parameter `Type` missing when calling getEmailTemplate." } $LocalVarUri = $LocalVarUri.replace('{type}', $Type) if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["ClientId"]) { $LocalVarHeaderParameters['ClientId'] = $Configuration["ApiKey"]["ClientId"] } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["ClientSecret"]) { $LocalVarHeaderParameters['ClientSecret'] = $Configuration["ApiKey"]["ClientSecret"] } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["UserPrincipalName"]) { $LocalVarHeaderParameters['UserPrincipalName'] = $Configuration["ApiKey"]["UserPrincipalName"] } $LocalVarResult = Invoke-ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "GuidModel[]" return $LocalVarResult["Response"] } } |