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
echo"Error: You must provide either user_id and password OR secret_arn.">&2
112
+
usage
113
+
fi
103
114
#
104
115
# Check that the required commands are available.
105
116
forcmdin jq curl;do
@@ -115,4 +126,9 @@ if [ -z "$token" ]; then
115
126
echo"Error: Failed to obtain an access token. Exiting.">&2
116
127
exit 1
117
128
fi
118
-
run_curl POST "$token""https://api.workloads.netapp.com/accounts/${BLUEXP_ACCOUNT_ID}/fsx/v2/credentials/${CREDENTIALS_ID}/regions/${AWS_REGION}/file-systems/${FILESYSTEM_ID}/ontap-credentials""$tmpout""$tmperr"'{"user":"'${USER_ID}'","password":"'${PASSWORD}'","resetFsxAdminPassword":false}'
129
+
130
+
if [ -n"$SECRET_ARN" ];then
131
+
run_curl POST "$token""https://api.workloads.netapp.com/accounts/${BLUEXP_ACCOUNT_ID}/fsx/v2/credentials/${CREDENTIALS_ID}/regions/${AWS_REGION}/file-systems/${FILESYSTEM_ID}/ontap-credentials""$tmpout""$tmperr"'{"secret":"'${SECRET_ARN}'"}'
132
+
else
133
+
run_curl POST "$token""https://api.workloads.netapp.com/accounts/${BLUEXP_ACCOUNT_ID}/fsx/v2/credentials/${CREDENTIALS_ID}/regions/${AWS_REGION}/file-systems/${FILESYSTEM_ID}/ontap-credentials""$tmpout""$tmperr"'{"user":"'${USER_ID}'","password":"'${PASSWORD}'","resetFsxAdminPassword":false}'
0 commit comments