File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,15 +11,9 @@ $ResourceGroup = $env:AZURE_RESOURCE_GROUP
1111# Validate required parameters
1212$MissingParams = @ ()
1313
14- if (-not $SubscriptionId ) {
15- $MissingParams += " subscription"
16- }
17- if (-not $Location ) {
18- $MissingParams += " location"
19- }
20- if (-not $ModelsParameter ) {
21- $MissingParams += " models-parameter"
22- }
14+ if (-not $SubscriptionId ) { $MissingParams += " SubscriptionId" }
15+ if (-not $Location ) { $MissingParams += " Location" }
16+ if (-not $ModelsParameter ) { $MissingParams += " ModelsParameter" }
2317
2418if ($MissingParams.Count -gt 0 ) {
2519 Write-Error " ❌ ERROR: Missing required parameters: $ ( $MissingParams -join ' , ' ) "
Original file line number Diff line number Diff line change @@ -6,15 +6,15 @@ MODELS_PARAMETER=""
66
77while [[ $# -gt 0 ]]; do
88 case " $1 " in
9- --subscription )
9+ --SubscriptionId )
1010 SUBSCRIPTION_ID=" $2 "
1111 shift 2
1212 ;;
13- --location )
13+ --Location )
1414 LOCATION=" $2 "
1515 shift 2
1616 ;;
17- --models-parameter )
17+ --ModelsParameter )
1818 MODELS_PARAMETER=" $2 "
1919 shift 2
2020 ;;
2727
2828# Validate required parameters
2929MISSING_PARAMS=()
30- [[ -z " $SUBSCRIPTION_ID " ]] && MISSING_PARAMS+=(" subscription " )
31- [[ -z " $LOCATION " ]] && MISSING_PARAMS+=(" location " )
32- [[ -z " $MODELS_PARAMETER " ]] && MISSING_PARAMS+=(" models-parameter " )
30+ [[ -z " $SUBSCRIPTION_ID " ]] && MISSING_PARAMS+=(" SubscriptionId " )
31+ [[ -z " $LOCATION " ]] && MISSING_PARAMS+=(" Location " )
32+ [[ -z " $MODELS_PARAMETER " ]] && MISSING_PARAMS+=(" ModelsParameter " )
3333
3434if [[ ${# MISSING_PARAMS[@]} -ne 0 ]]; then
3535 echo " ❌ ERROR: Missing required parameters: ${MISSING_PARAMS[*]} "
36- echo " Usage: $0 --subscription <SUBSCRIPTION_ID> --location <LOCATION> --models-parameter <MODELS_PARAMETER>"
36+ echo " Usage: $0 --SubscriptionId <SUBSCRIPTION_ID> --Location <LOCATION> --ModelsParameter <MODELS_PARAMETER>"
3737 exit 1
3838fi
3939
You can’t perform that action at this time.
0 commit comments