function Get-NewRelicAccountDetails { <# .SYNOPSIS Returns the appropriate New Relic account (not Admin) API key and license key based on environment string #> [CmdletBinding()] Param( [Parameter(Mandatory = $true)] [Alias("Environment")] [string]$environmentKey ) $logLead = (Get-LogLeadName); $specificAccountDetails = @( # FI specific accounts. @{EnvironmentRegex = "(AWS Production( Entrust)? 5)|(AWS Staging Lane FT\w+)"; APIKey = "5362c58099d6a19871a07f66b1ec50e2c00f66b4b69260e"; LicenseKey = "4e8134a277da93644407dc53931f81d99b69260e"; }, @{EnvironmentRegex = "AWS Production( Entrust)? 9"; APIKey = "b84b09aabf2ebe0773009698205220e9d53063bf84d041f"; LicenseKey = "417a21abe2bd84ca46940efc9c93cf75584d041f"; }, @{EnvironmentRegex = "(AWS Production( Entrust)? 10)|(AWS Staging Lane OTSStg)"; APIKey = "3d0346ec856cc9b02b3b0fcc481afc989a4f9941b28a80d"; LicenseKey = "d2eb268d151e57550de821438c3d99131b28a80d"; }, @{EnvironmentRegex = "(AWS Production( Entrust)? 15)|(AWS Staging Lane MACUStg)"; APIKey = "fcb208ec98958282362c4e7879bfa38e4073c10c073cc2f"; LicenseKey = "77b3cae28080be6a5ebcb7d2f3efdde8d073cc2f"; }, # Internal special-purpose accounts. @{EnvironmentRegex = "^AWS Production 0$"; APIKey = "d34b1647dee7875568ebc4b7c97c37216c4c342b37bcce1"; LicenseKey = "b17e86388ca5c4a2c4777cd1b0e1e12a837bcce1"; } ) $defaultAccountDetails = @( # Legacy QA and Dev account. @{EnvironmentRegex = "((?