getReturnRequests
(Optional) The getReturnRequests script retrieves information about cloud hosts that will be reclaimed by the cloud provider.
Calling convention
Windows:
getReturnRequests.bat -f input.jsonLinux®:
getReturnRequests.sh -f input.jsonInput
(Required) A JSON file containing an empty JSON object or the host template in the following
format:
{
"machines":[(optional)All hosts provisioned from the provider and known to HostFactory
{"name": "(mandatory)(string) Host name of the machine"}
]
}For
example:
{
"machines": [
{"name": "ip-16-0-1-130.ec2.internal"},
{"name": "ip-16-0-1-160.ec2.internal"},
{"name": "ip-16-0-1-22.ec2.internal"},
{"name": "ip-16-0-1-15.ec2.internal"}
]
}Output
A JSON file in the following
format:
{
"message": "Any additional message the caller should know"
"requests": [Note: Includes Spot instances and On-Demand instances returned from the management console.
{
"machine": "(mandatory)(string) Host name of the machine that must be returned",
"gracePeriod": "(mandatory)(numeric). Time remaining (in seconds) before this host will be reclaimed by the provider"
}]
}For
example:
{
"status" : "complete",
"message" : "Instances marked for termination retrieved successfully.",
"requests" : [ {
"gracePeriod" : 0,
"machine" : "ip-16-0-1-130.ec2.internal"
},
{
"gracePeriod" : 0,
"machine" : "ip-16-0-1-160.ec2.internal"
},
]
}