Api/LEEnvironmentApi.ps1
# # Login Enterprise # v7.0-preview [API Console (Swagger)](/publicApi/swagger/index.html?urls.primaryName=Login%20Enterprise%20API%20v7-preview), [Documentation (ReDoc)](/publicApi/v7-preview/docs/index.html) v6.0 [API Console (Swagger)](/publicApi/swagger/index.html?urls.primaryName=Login%20Enterprise%20API%20v6), [Documentation (ReDoc)](/publicApi/v6/docs/index.html) v5.0 [API Console (Swagger)](/publicApi/swagger/index.html?urls.primaryName=Login%20Enterprise%20API%20v5), [Documentation (ReDoc)](/publicApi/v5/docs/index.html) v4.0 [API Console (Swagger)](/publicApi/swagger/index.html?urls.primaryName=Login%20Enterprise%20API%20v4), [Documentation (ReDoc)](/publicApi/v4/docs/index.html) <br><b>API v7 (preview) – Introduced in Login Enterprise v5.0 and subject to breaking changes when API v7 becomes generally available.</b></br> <br><b>API v6 – is the recommended version to use. It is the actively developed version starting with Login Enterprise v4.10.</b></br> <br><b>API v5 – is currently supported but unmaintained as of v4.10.</b></br> <br><b>API v4 – is deprecated starting with v4.10. Will be removed in Q3 2023.</b></br> The Login Enterprise Public API provides documentation and Swagger per version within the product. For additional information please refer to the [documentation](https://support.loginvsi.com/hc/en-us/articles/360009534760) on our website. # Version: 7.0-preview # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS Add tests to an environment .DESCRIPTION No description available. .PARAMETER EnvironmentId Environment id .PARAMETER RequestBody Test Key list .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS None #> function Add-LEEnvironmentToTests { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${EnvironmentId}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String[]] ${RequestBody}, [Switch] $WithHttpInfo ) Process { 'Calling method: Add-LEEnvironmentToTests' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-LEConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/v7-preview/environments/{environmentId}/tests' if (!$EnvironmentId) { throw "Error! The required parameter `EnvironmentId` missing when calling addEnvironmentToTests." } $LocalVarUri = $LocalVarUri.replace('{environmentId}', [System.Web.HTTPUtility]::UrlEncode($EnvironmentId)) if (!$RequestBody) { throw "Error! The required parameter `RequestBody` missing when calling addEnvironmentToTests." } $LocalVarBodyParameter = ,$RequestBody | ConvertTo-Json -Depth 100 if ($Configuration["ApiKeyPrefix"] -and $Configuration["ApiKeyPrefix"]["Authorization"]) { $apiKeyPrefix = $Configuration["ApiKeyPrefix"]["Authorization"] } else { $apiKeyPrefix = "" } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["Authorization"]) { $LocalVarHeaderParameters['Authorization'] = $apiKeyPrefix + $Configuration["ApiKey"]["Authorization"] Write-Verbose ("Using API key 'Authorization' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-LEApiClient -Method 'PUT' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Create environment .DESCRIPTION No description available. .PARAMETER EnvironmentData Environment data .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS ObjectId #> function New-LEEnvironment { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${EnvironmentData}, [Switch] $WithHttpInfo ) Process { 'Calling method: New-LEEnvironment' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-LEConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/v7-preview/environments' if (!$EnvironmentData) { throw "Error! The required parameter `EnvironmentData` missing when calling createEnvironment." } $LocalVarBodyParameter = $EnvironmentData | ConvertTo-Json -Depth 100 if ($Configuration["ApiKeyPrefix"] -and $Configuration["ApiKeyPrefix"]["Authorization"]) { $apiKeyPrefix = $Configuration["ApiKeyPrefix"]["Authorization"] } else { $apiKeyPrefix = "" } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["Authorization"]) { $LocalVarHeaderParameters['Authorization'] = $apiKeyPrefix + $Configuration["ApiKey"]["Authorization"] Write-Verbose ("Using API key 'Authorization' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-LEApiClient -Method 'POST' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "ObjectId" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Delete environment .DESCRIPTION No description available. .PARAMETER EnvironmentId Environment id .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS None #> function Invoke-LEDeleteEnvironment { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${EnvironmentId}, [Switch] $WithHttpInfo ) Process { 'Calling method: Invoke-LEDeleteEnvironment' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-LEConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/v7-preview/environments/{environmentId}' if (!$EnvironmentId) { throw "Error! The required parameter `EnvironmentId` missing when calling deleteEnvironment." } $LocalVarUri = $LocalVarUri.replace('{environmentId}', [System.Web.HTTPUtility]::UrlEncode($EnvironmentId)) if ($Configuration["ApiKeyPrefix"] -and $Configuration["ApiKeyPrefix"]["Authorization"]) { $apiKeyPrefix = $Configuration["ApiKeyPrefix"]["Authorization"] } else { $apiKeyPrefix = "" } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["Authorization"]) { $LocalVarHeaderParameters['Authorization'] = $apiKeyPrefix + $Configuration["ApiKey"]["Authorization"] Write-Verbose ("Using API key 'Authorization' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-LEApiClient -Method 'DELETE' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get environment by id .DESCRIPTION No description available. .PARAMETER EnvironmentId Environment id .PARAMETER Include Include options .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS Environment #> function Get-LEEnvironmentById { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${EnvironmentId}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject[]] ${Include}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-LEEnvironmentById' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-LEConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/v7-preview/environments/{environmentId}' if (!$EnvironmentId) { throw "Error! The required parameter `EnvironmentId` missing when calling getEnvironmentById." } $LocalVarUri = $LocalVarUri.replace('{environmentId}', [System.Web.HTTPUtility]::UrlEncode($EnvironmentId)) if ($Include) { $LocalVarQueryParameters['include'] = $Include } if ($Configuration["ApiKeyPrefix"] -and $Configuration["ApiKeyPrefix"]["Authorization"]) { $apiKeyPrefix = $Configuration["ApiKeyPrefix"]["Authorization"] } else { $apiKeyPrefix = "" } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["Authorization"]) { $LocalVarHeaderParameters['Authorization'] = $apiKeyPrefix + $Configuration["ApiKey"]["Authorization"] Write-Verbose ("Using API key 'Authorization' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-LEApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "Environment" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get cost history for a given environment .DESCRIPTION No description available. .PARAMETER EnvironmentId Environment id .PARAMETER From Include EnvironmentCost where Timestamp is greater than the specified date-time (optional) .PARAMETER To Include EnvironmentCost where Timestamp is less than the specified date-time (optional) .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS EnvironmentCostSnapshot[] #> function Get-LEEnvironmentCostHistory { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${EnvironmentId}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[System.DateTime]] ${From}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[System.DateTime]] ${To}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-LEEnvironmentCostHistory' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-LEConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/v7-preview/environments/{environmentId}/cost/history' if (!$EnvironmentId) { throw "Error! The required parameter `EnvironmentId` missing when calling getEnvironmentCostHistory." } $LocalVarUri = $LocalVarUri.replace('{environmentId}', [System.Web.HTTPUtility]::UrlEncode($EnvironmentId)) $LocalVarQueryParameters['from'] = $From $LocalVarQueryParameters['to'] = $To if ($Configuration["ApiKeyPrefix"] -and $Configuration["ApiKeyPrefix"]["Authorization"]) { $apiKeyPrefix = $Configuration["ApiKeyPrefix"]["Authorization"] } else { $apiKeyPrefix = "" } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["Authorization"]) { $LocalVarHeaderParameters['Authorization'] = $apiKeyPrefix + $Configuration["ApiKey"]["Authorization"] Write-Verbose ("Using API key 'Authorization' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-LEApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "EnvironmentCostSnapshot[]" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get a list of environments .DESCRIPTION No description available. .PARAMETER OrderBy Sort Key .PARAMETER Direction Sort direction .PARAMETER Count Number of records to return .PARAMETER Filter Filter the query by a subtext or keyword in the environment's name or description .PARAMETER Offset Start offset .PARAMETER IncludeTotalCount Include total number of records .PARAMETER Include Include options .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS EnvironmentResultSet #> function Get-LEEnvironments { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${OrderBy}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${Direction}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Int32] ${Count}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Filter}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Offset}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Boolean]] ${IncludeTotalCount}, [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject[]] ${Include}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-LEEnvironments' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-LEConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/v7-preview/environments' if ($Filter) { $LocalVarQueryParameters['filter'] = $Filter } if (!$OrderBy) { throw "Error! The required parameter `OrderBy` missing when calling getEnvironments." } $LocalVarQueryParameters['orderBy'] = $OrderBy if (!$Direction) { throw "Error! The required parameter `Direction` missing when calling getEnvironments." } $LocalVarQueryParameters['direction'] = $Direction if (!$Count) { throw "Error! The required parameter `Count` missing when calling getEnvironments." } $LocalVarQueryParameters['count'] = $Count if ($Offset) { $LocalVarQueryParameters['offset'] = $Offset } if ($IncludeTotalCount) { $LocalVarQueryParameters['includeTotalCount'] = $IncludeTotalCount } if ($Include) { $LocalVarQueryParameters['include'] = $Include } if ($Configuration["ApiKeyPrefix"] -and $Configuration["ApiKeyPrefix"]["Authorization"]) { $apiKeyPrefix = $Configuration["ApiKeyPrefix"]["Authorization"] } else { $apiKeyPrefix = "" } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["Authorization"]) { $LocalVarHeaderParameters['Authorization'] = $apiKeyPrefix + $Configuration["ApiKey"]["Authorization"] Write-Verbose ("Using API key 'Authorization' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-LEApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "EnvironmentResultSet" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get tests by environment id .DESCRIPTION No description available. .PARAMETER Type Test type (Only continuous and load test types are supported) .PARAMETER OrderBy Sort Key .PARAMETER Direction Sort direction .PARAMETER Count Number of records to return .PARAMETER EnvironmentId A test's environment id. Empty when fetching tests without an assigned environment .PARAMETER Filter Filter the tests .PARAMETER Offset Start offset .PARAMETER IncludeTotalCount Include total number of records .PARAMETER Include Include options .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS EnvironmentResultSet #> function Get-LETestsByEnvironmentKey { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${Type}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${OrderBy}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${Direction}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [Int32] ${Count}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${EnvironmentId}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Filter}, [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Offset}, [Parameter(Position = 7, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Boolean]] ${IncludeTotalCount}, [Parameter(Position = 8, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject[]] ${Include}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-LETestsByEnvironmentKey' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-LEConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/v7-preview/environments/tests' $LocalVarQueryParameters['environmentId'] = $EnvironmentId if (!$Type) { throw "Error! The required parameter `Type` missing when calling getTestsByEnvironmentKey." } $LocalVarQueryParameters['type'] = $Type if ($Filter) { $LocalVarQueryParameters['filter'] = $Filter } if (!$OrderBy) { throw "Error! The required parameter `OrderBy` missing when calling getTestsByEnvironmentKey." } $LocalVarQueryParameters['orderBy'] = $OrderBy if (!$Direction) { throw "Error! The required parameter `Direction` missing when calling getTestsByEnvironmentKey." } $LocalVarQueryParameters['direction'] = $Direction if (!$Count) { throw "Error! The required parameter `Count` missing when calling getTestsByEnvironmentKey." } $LocalVarQueryParameters['count'] = $Count if ($Offset) { $LocalVarQueryParameters['offset'] = $Offset } if ($IncludeTotalCount) { $LocalVarQueryParameters['includeTotalCount'] = $IncludeTotalCount } if ($Include) { $LocalVarQueryParameters['include'] = $Include } if ($Configuration["ApiKeyPrefix"] -and $Configuration["ApiKeyPrefix"]["Authorization"]) { $apiKeyPrefix = $Configuration["ApiKeyPrefix"]["Authorization"] } else { $apiKeyPrefix = "" } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["Authorization"]) { $LocalVarHeaderParameters['Authorization'] = $apiKeyPrefix + $Configuration["ApiKey"]["Authorization"] Write-Verbose ("Using API key 'Authorization' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-LEApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "EnvironmentResultSet" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Delete tests from environment .DESCRIPTION No description available. .PARAMETER EnvironmentId Environment id .PARAMETER RequestBody Test key list .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS None #> function Remove-LEEnvironmentFromTests { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${EnvironmentId}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String[]] ${RequestBody}, [Switch] $WithHttpInfo ) Process { 'Calling method: Remove-LEEnvironmentFromTests' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-LEConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/v7-preview/environments/{environmentId}/tests' if (!$EnvironmentId) { throw "Error! The required parameter `EnvironmentId` missing when calling removeEnvironmentFromTests." } $LocalVarUri = $LocalVarUri.replace('{environmentId}', [System.Web.HTTPUtility]::UrlEncode($EnvironmentId)) if (!$RequestBody) { throw "Error! The required parameter `RequestBody` missing when calling removeEnvironmentFromTests." } $LocalVarBodyParameter = ,$RequestBody | ConvertTo-Json -Depth 100 if ($Configuration["ApiKeyPrefix"] -and $Configuration["ApiKeyPrefix"]["Authorization"]) { $apiKeyPrefix = $Configuration["ApiKeyPrefix"]["Authorization"] } else { $apiKeyPrefix = "" } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["Authorization"]) { $LocalVarHeaderParameters['Authorization'] = $apiKeyPrefix + $Configuration["ApiKey"]["Authorization"] Write-Verbose ("Using API key 'Authorization' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-LEApiClient -Method 'DELETE' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Update environment .DESCRIPTION No description available. .PARAMETER EnvironmentId Environment id .PARAMETER EnvironmentData Environment data .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS UpdateFromProviderResult #> function Update-LEEnvironment { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${EnvironmentId}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${EnvironmentData}, [Switch] $WithHttpInfo ) Process { 'Calling method: Update-LEEnvironment' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-LEConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/v7-preview/environments/{environmentId}' if (!$EnvironmentId) { throw "Error! The required parameter `EnvironmentId` missing when calling updateEnvironment." } $LocalVarUri = $LocalVarUri.replace('{environmentId}', [System.Web.HTTPUtility]::UrlEncode($EnvironmentId)) if (!$EnvironmentData) { throw "Error! The required parameter `EnvironmentData` missing when calling updateEnvironment." } $LocalVarBodyParameter = $EnvironmentData | ConvertTo-Json -Depth 100 if ($Configuration["ApiKeyPrefix"] -and $Configuration["ApiKeyPrefix"]["Authorization"]) { $apiKeyPrefix = $Configuration["ApiKeyPrefix"]["Authorization"] } else { $apiKeyPrefix = "" } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["Authorization"]) { $LocalVarHeaderParameters['Authorization'] = $apiKeyPrefix + $Configuration["ApiKey"]["Authorization"] Write-Verbose ("Using API key 'Authorization' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-LEApiClient -Method 'PUT' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "UpdateFromProviderResult" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } |