ps/Modules/Cole.PowerShell.Developer/Public/Get-CachePathEC2Instance.ps1

21 lines
499 B
PowerShell
Raw Normal View History

2023-05-30 22:51:22 -07:00
function Get-CachePathEC2Instance {
<#
.SYNOPSIS
Get the path for the cached EC2Instance data
.PARAMETER ProfileName
A valid ProfileName
#>
[CmdletBinding()]
[OutputType([object[]])]
param(
[Parameter(Mandatory = $true)]
[string]$ProfileName
)
Assert-ValidAWSProfileName -ProfileName $ProfileName
$ProfileName = $ProfileName.Replace("temp-","").ToLower()
$cacheFile = Get-CacheFile -Name "EC2Instances.$ProfileName.json"
return $cacheFile
}