CLI Menu

Command Line Interface (CLI) CLI QuickStart GuideCommand Line Interface (CLI) ExamplesUsing the CLI with High Assurance Resources

NAME

globus endpoint is-activated - Check if an endpoint is activated

SYNOPSIS

globus endpoint is-activated ['OPTIONS'] 'ENDPOINT_ID'

DESCRIPTION

The globus endpoint is-activated command checks if an endpoint is already activated or requires activation to be used. If the endpoint is not activated a link will be given for web activation, or you can use globus endpoint activate to activate the endpoint.

OPTIONS

--map-http-status 'TEXT'

Map non success HTTP response codes to exit codes other than 1. e.g. "--map-http-satus 403=0,404=0" would exit with 0 even if a 403 or 404 http error code was received. Valid exit codes are 0,1,50-99.

-F, --format '[json|text]'

Set the output format for stdout. Defaults to "text".

--jq, --jmespath 'EXPR'

Supply a JMESPath expression to apply to json output. Takes precedence over any specified '--format' and forces the format to be json processed by this expression.

A full specification of the JMESPath language for querying JSON structures may be found at https://jmespath.org/

-h, --help

Show help text for this command.

-v, --verbose

Control the level of output.

Use -v or --verbose to show warnings and any additional text output.

Use -vv to add informative logging.

Use -vvv to add debug logging and full stack on any errors. (equivalent to -v --debug)

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

EXIT STATUS

0 if the endpoint is activated.

1 if the endpoint is not activated, unless --map-http-status has been used to change exit behavior on http error codes.

2 if the command was used improperly.

© 2010- The University of Chicago Legal