From the version 7.75, curl supports the aws signature v4.
OSC.ReadAccessKeys example:
curl -XPOST \
-H "X-Osc-Date: `TZ=GMT date "+%Y%m%dT%H%M%SZ"`" \
-H "Authorization: Basic `echo -n "MYLOGIN:MYPASSWORD" | base64`" \
https://api.eu-west-2.outscale.com/api/v1/ReadAccessKeys
ICU.ReadConsumptionAccount example:
curl --aws-sigv4 "aws" \
-u "MYACCESSKEY:MYSECRETKEY" \
-H "Content-Type: application/x-amz-json-1.1" \
-H "x-amz-target:TinaIcuService.ReadConsumptionAccount" \
-H "x-amz-date: `TZ=GMT date "+%Y%m%dT%H%M%SZ"`" \
-d "@payload_read_consumption_account.json" \
https://icu.eu-west-2.outscale.com
You will need a configuration file auth.conf
with your Access and Secret keys.
oscKey=MYACCESSKEY
oscSecret=MYSECRETKEY
./curl_7.68_osc_icu.sh ReadConsumptionAccount payload_read_consumption_account.json | jq
./curl_7.75_osc_fcu.sh DescribeInstances query_describe_instance.txt | xmllint --format -
./curl_7.75_osc_icu.sh ReadConsumptionAccount payload_read_consumption_account.json | jq