You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run_curl GET "$token""https://api.workloads.netapp.com/accounts/${BLUEXP_ACCOUNT_ID}/links/v1/links?filter=type%20eq%20%27lambda%27&include=associatedTargets,state,features"$tmpout$tmperr
112
-
if jq -r '.items[] | "\(.name);\(.id);\(.state.status);\(.region);\(.vpcId);\(.cloudResourceId | split(":") | .[6]);\(.associatedTargets.items)"'$tmpout>$tmpout22>$tmperr;then
112
+
if jq -r '.items[] | if(.cloudResourceId == null) then "\(.name);\(.id);\(.state.status);\(.region);\(.vpcId);N/A;\(.associatedTargets.items)" else "\(.name);\(.id);\(.state.status);\(.region);\(.vpcId);\(.cloudResourceId | split(":") | .[6]);\(.associatedTargets.items)" end'$tmpout>$tmpout22>$tmperr;then
113
113
:
114
114
else
115
115
echo"Failed to parse the response from the API.">&2
@@ -121,7 +121,7 @@ fi
121
121
nextToken=$(jq -r '.nextToken'$tmpout)
122
122
while [ "$nextToken"!="null" ];do
123
123
run_curl GET "$token""https://api.workloads.netapp.com/accounts/${BLUEXP_ACCOUNT_ID}/links/v1/links?filter=type%20eq%20%27lambda%27&include=associatedTargets,state,features"$tmpout$tmperr
124
-
if jq -r '.items[] | "\(.name);\(.id);\(.state.status);\(.state.status);\(.region);\(.vpcId);\(.cloudResourceId | split(":") | .[6]);\(.associatedTargets.items)"'$tmpout>$tmpout22>$tmperr;then
124
+
if jq -r '.items[] | if(.cloudResourceId == null) then "\(.name);\(.id);\(.state.status);\(.region);\(.vpcId);N/A;\(.associatedTargets.items)" else "\(.name);\(.id);\(.state.status);\(.region);\(.vpcId);\(.cloudResourceId | split(":") | .[6]);\(.associatedTargets.items)" end'$tmpout>$tmpout22>$tmperr;then
125
125
:
126
126
else
127
127
echo"Failed to parse the response from the API.">&2
0 commit comments