问题
this is how im setting up the entry
cat << EOF > /tmp/route53-healthcheck.json
{
"IPAddress": "10.10.10.10",
"Port": 80,
"Type": "HTTP",
"ResourcePath": "/somefile.txt"
}
EOF
aws route53 create-health-check \
--caller-reference $(date +'%Y%m%dT%H%M%d') \
--health-check-config file:///tmp/route53-healthcheck.json > /tmp/route53-healthcheck.log
and when i see the route53
entry, its missing the name (the first entry is a manual entry and the second one is from the snippet above. Im referring to the red smudge.)
All the options listed in the docs are not relevant.
{
"IPAddress": "string",
"Port": integer,
"Type": "HTTP"|"HTTPS"|"HTTP_STR_MATCH"|"HTTPS_STR_MATCH"|"TCP"|"CALCULATED",
"ResourcePath": "string",
"FullyQualifiedDomainName": "string",
"SearchString": "string",
"RequestInterval": integer,
"FailureThreshold": integer,
"MeasureLatency": true|false,
"Inverted": true|false,
"HealthThreshold": integer,
"ChildHealthChecks": ["string", ...]
}
Any ideas if there is another way to set the name of that in another way ?
Solution
aws route53 change-tags-for-resource --resource-type healthcheck --resource-id 41633bb1-4adc-4357-983f-767191ff3248 --add-tags Key=Name,Value="new-name"
Some mistakes i made:
- my aws version was old. On ubuntu, i had to
apt-get remove awscli
and then install the latest version from pip withpip install awscli
. Then the executable can be found in~/.local/bin/aws
- When i changed the name, i had to force reload the webpage instead of just refresh it with the aws icon (think
Ctrl+Shift+R
).
回答1:
You need to use the change-tags-for-resource CLI option to set a tag on a resource[1].
Example:
aws route53 change-tags-for-resource --resource-type healthcheck --resource-id <healthcheck guid> --add-tags Key=Name;Value=Value
- http://docs.aws.amazon.com/cli/latest/reference/route53/change-tags-for-resource.html
来源:https://stackoverflow.com/questions/34630269/unable-to-set-name-for-route53-healthcheck-entry