GLOBUS ENDPOINT IS-ACTIVATED
DESCRIPTION
Check if an endpoint is activated or requires activation.
If it requires activation, exits with status 1, otherwise exits with status 0.
If the endpoint is not activated, this command will output a link for web activation, or you can use 'globus endpoint activate' to activate the endpoint.
OPTIONS
-
--until
INTEGER
-
An integer number of seconds in the future. If the endpoint is activated, but will expire by then, exits with status 1
- --absolute-time
-
Treat the value of --until as a POSIX timestamp (seconds since Epoch), not a number of seconds into the future.
- -v, --verbose
-
Control level of output.
- -h, --help
-
Show this message and exit.
-
-F, --format
[unix|json|text]
-
Output format for stdout. Defaults to text.
-
--jmespath, --jq
TEXT
-
A JMESPath expression to apply to json output. Forces the format to be json processed by this expression.
-
--map-http-status
TEXT
-
Map HTTP statuses to any of these exit codes: 0,1,50-99. e.g. "404=50,403=51"
EXAMPLES
$ ep_id=ddb59aef-6d04-11e5-ba46-22000b92c6ec
$ globus endpoint is-activated $ep_id
Check globus endpoint is-activated as part of a script:
ep_id=ddb59aef-6d04-11e5-ba46-22000b92c6ec
globus endpoint is-activated $ep_id
if [ $? -ne 0 ]; then
echo "$ep_id is not activated! This script cannot run!"
exit 1
fi
# ... more stuff using $ep_id below ...
Use is-activated
to get and parse activation requirements, finding out the
expiration time, but only for endpoints which are activated. Uses '--jmespath'
to select fields, exit status to indicate that the endpoint is or is not
activated, and '--format=UNIX' to get nice, unix-friendly output.
ep_id=ddb59aef-6d04-11e5-ba46-22000b92c6ec
output="$(globus endpoint is-activated "$ep_id" \
--jmespath expires_in --format unix)"
if [ $? -eq 0 ]; then
if [ "$output" -eq "-1" ]; then
echo "$ep_id is activated forever. Activation never expires."
else
echo "$ep_id activation expires in $output seconds"
fi
else
echo "$ep_id not activated"
exit 1
fi