Modules/BenchPress.Azure/Public/Confirm-ContainerApp.ps1 (39 lines of code) (raw):
# INLINE_SKIP
using module ./../Classes/ConfirmResult.psm1
. $PSScriptRoot/../Private/Connect-Account.ps1
# end INLINE_SKIP
function Confirm-ContainerApp {
<#
.SYNOPSIS
Confirms that a Container Application exists.
.DESCRIPTION
The Confirm-AzBPContainerApp cmdlet gets a Container Application using the specified Container Application and
Resource Group names.
.PARAMETER Name
The name of the Container Application.
.PARAMETER ResourceGroupName
The name of the Resource Group. The name is case insensitive.
.EXAMPLE
Confirm-AzBPContainerApp -Name "benchpresstest" -ResourceGroupName "rgbenchpresstest"
.INPUTS
System.String
.OUTPUTS
ConfirmResult
#>
[CmdletBinding()]
[OutputType([ConfirmResult])]
param (
[Parameter(Mandatory=$true)]
[string]$Name,
[Parameter(Mandatory=$true)]
[string]$ResourceGroupName
)
Begin {
$connectResults = Connect-Account
}
Process {
$resource = Get-AzContainerApp -ResourceGroupName $ResourceGroupName -Name $Name
[ConfirmResult]::new($resource, $connectResults.AuthenticationData)
}
End { }
}