Activity Tracker Event Routing CLI
The IBM Cloud® command-line interface (CLI) provides extra capabilities for service offerings. This information describes how you can use the CLI to define and manage settings for your IBM Cloud® Activity Tracker Event Routing instance using the CLI.
Prerequisites
-
Install the IBM Cloud CLI.
-
Install the CLI by running the following command:
ibmcloud plugin install atracker
You're notified on the command line when updates to the IBM Cloud CLI and plug-ins are available. Be sure to keep your CLI up to date so that you can use the latest commands. You can view the current version of all installed plug-ins by running
ibmcloud plugin list.
ibmcloud atracker route create
Use this command to create an Activity Tracker Event Routing route that sends activity events from one or more locations to one or more targets. A route contains rules that define which events are sent to which targets.
ibmcloud atracker route create --name ROUTE_NAME [--force] ( --target-ids TARGETS [--locations REGIONS] | --rules RULES | --file RULES_DEFINITION_JSON_FILE ) [--output FORMAT]
Command options
--name ROUTE_NAME-
The name to be given to the route.
Do not include any personal identifying information (PII) in any resource names.
--target-ids TARGETS-
A comma-separated list of target IDs. All events are sent to all targets that are listed in the rule. You can include targets from other regions.
--locations REGIONS-
List of locations associated with the route. Specify
globalto include global events. To include all locations specify*. If you have multiple rules, along with a rule with a*location, then the other rules will route events to the specified targets with any events not matching any other rule routing the remaining events to the target specified by the rule with the*location. --rules RULES-
A JSON formatted rule definition enclosed in single quotes. For example:
--rules '[{"locations":["global"],"target_ids":["11111111-1111-1111-1111-111111111111"]},{"locations":["us-south","us-east"],"target_ids":["22222222-2222-2222-2222-222222222222","33333333-3333-3333-3333-333333333333"]}]' --file RULES_DEFINITION_JSON_FILE-
A JSON file containing the definition of the rules for route. The file needs to be formatted as follows:
[ { "locations": ["LOCATION1","LOCATION2"], "target_ids": ["TARGET_ID1","TARGET_ID2"] } ] --managed-by MANAGED_BY-
The owner of the route to be created. Valid values are
accountorenterprise. --force-
Runs the command without prompting you to confirm that you want to continue. This option is used only when the resulting route discards events.
--output FORMAT-
If
JSONis specified, the output is returned in JSON format. IfJSONis not specified, the output is returned in a tabular format. help|--help|-h-
List options available for the command.
Examples
Send events from all locations to two targets.
ibmcloud atracker route create --name ROUTE_NAME --target-ids 11111111-1111-1111-1111-111111111111,22222222-2222-2222-2222-222222222222 --locations "*"
Send events from the us-south location to a target.
ibmcloud atracker route create --name ROUTE_NAME --target-ids 11111111-1111-1111-1111-111111111111 --locations us-south
Use rules to create a route.
ibmcloud atracker route create --name ROUTE_NAME --rules '[{"locations":["global"],"target_ids":["11111111-1111-1111-1111-111111111111"]},{"locations":["us-south","us-east"],"target_ids":["11111111-1111-1111-1111-111111111111","22222222-2222-2222-2222-222222222222"]}]'
Use a rules definition JSON file to create a route.
ibmcloud atracker route create --name ROUTE_NAME --file RULES_DEFINITION_JSON_FILE
Create an enterprise route that sends events from the us-south location to an enterprise target.
ibmcloud atracker route create --name ROUTE_NAME --target-ids 33333333-3333-3333-3333-333333333333 --locations us-south --managed-by enterprise
ibmcloud atracker route update
Use this command to update an Activity Tracker Event Routing route. Any specified value that is different from when the route was originally created will be updated to the value specified in the command.
ibmcloud atracker route update --route ROUTE [--name ROUTE_NAME] [--force] ( [--target-ids TARGETS] [--locations REGIONS] | [--rules RULES] | [--file RULES_DEFINITION_JSON_FILE] ) [--output FORMAT]
Command options
--route ROUTE-
The existing name or ID of the route.
--name ROUTE_NAME-
The updated name to be given to the route (optional).
Do not include any personal identifying information (PII) in any resource names.
--target-ids TARGETS-
A comma-separated list of target IDs. All events are sent to all targets that are listed in the rule. You can include targets from other regions.
--locations REGIONS-
List of locations associated with the route. Specify
globalto include global events. To include all locations specify*. If you have multiple rules, along with a rule with a*location, then the other rules will route events to the specified targets with any events not matching any other rule routing the remaining events to the target specified by the rule with the*location. --rules RULES-
A JSON formatted rule definition enclosed in single quotes. For example:
--rules '[{"locations":["global"],"target_ids":["11111111-1111-1111-1111-111111111111"]},{"locations":["us-south","us-east"],"target_ids":["22222222-2222-2222-2222-222222222222","33333333-3333-3333-3333-333333333333"]}]' --file RULES_DEFINITION_JSON_FILE-
A JSON file containing the definition of the rules for route. The file needs to be formatted as follows:
[ { "locations": ["LOCATION1","LOCATION2"], "target_ids": ["TARGET_ID1","TARGET_ID2"] } ] --force-
Runs the command without prompting you to confirm that you want to continue. This option is used only when the resulting route discards events.
--output FORMAT-
If
JSONis specified, the output is returned in JSON format. IfJSONis not specified, the output is returned in a tabular format. help|--help|-h-
List options available for the command.
Examples
Update a route to send events from all locations to two targets.
ibmcloud atracker route update --route ROUTE --name ROUTE_NAME --target-ids 11111111-1111-1111-1111-111111111111,22222222-2222-2222-2222-222222222222 --locations "*"
Update a route to send events from the us-south location to a target.
ibmcloud atracker route update --route ROUTE --name ROUTE_NAME --target-ids 11111111-1111-1111-1111-111111111111 --locations us-south
Use rules to update a route.
ibmcloud atracker route update --route ROUTE --name ROUTE_NAME --rules '[{"locations":["global"],"target_ids":["11111111-1111-1111-1111-111111111111"]},{"locations":["us-south","us-east"],"target_ids":["11111111-1111-1111-1111-111111111111","22222222-2222-2222-2222-222222222222"]}]'
Use a rules definition JSON file to update a route.
ibmcloud atracker route update --route ROUTE --name ROUTE_NAME --file RULES_DEFINITION_JSON_FILE
ibmcloud atracker route rm
Use this command to delete an Activity Tracker Event Routing route. Events are no longer routed to the targets that are defined in the route.
ibmcloud atracker route rm --route ROUTE [--force]
Command options
--route ROUTE- The name or ID of the route to be deleted.
--force- Runs the command without prompting you to confirm that you want to continue.
help|--help|-h- List options available for the command.
Examples
Delete a route.
ibmcloud atracker route rm --route ROUTE
Delete a route without being prompted to confirm.
ibmcloud atracker route rm --route ROUTE --force
ibmcloud atracker route get
Use this command to get detailed information about an Activity Tracker Event Routing route, such as its rules, locations, and targets.
ibmcloud atracker route get --route ROUTE [--output FORMAT]
Command options
--route ROUTE- The name or ID of the route.
--output FORMAT- If
JSONis specified, the output is returned in JSON format. IfJSONis not specified, the output is returned in a tabular format. help|--help|-h- List options available for the command.
Examples
Get information about a route.
ibmcloud atracker route get --route ROUTE
Get information about a route in JSON format.
ibmcloud atracker route get --route ROUTE --output JSON
ibmcloud atracker route ls
Use this command to list all the configured routes for Activity Tracker Event Routing.
ibmcloud atracker route ls [--output FORMAT]
Command options
--output FORMAT- If
JSONis specified, the output is returned in JSON format. IfJSONis not specified, the output is returned in a tabular format. help|--help|-h- List options available for the command.
Examples
List all routes.
ibmcloud atracker route ls
List all routes in JSON format.
ibmcloud atracker route ls --output JSON
ibmcloud atracker target create
Use this command to create an Activity Tracker Event Routing target to be used to configure a destination for activity events. The options that you specify depend on the type of target that you create. Use the --type option to specify
the target type.
Create a IBM Cloud Object Storage target
Use this command to create a IBM Cloud Object Storage target to be used to configure a destination for activity events.
ibmcloud atracker target create --name TARGET_NAME --type TARGET_TYPE ( [--file COS_ENDPOINT_DEFINITION_JSON_FILE] | ( [--endpoint COS_ENDPOINT] [--bucket COS_BUCKET] [--target-crn COS_TARGET_CRN] ( [--api-key ( COS_API_KEY | @COS_API_KEY_FILE )] | [--service-to-service-enabled ( TRUE | FALSE )] ) ) ) [--region REGION] [--output FORMAT]
Command options
--region REGION|-r REGION-
Name of the region that determines the IBM Cloud Activity Tracker Event Routing API endpoint for the request, for example,
us-southoreu-gb. If not specified, the region logged into, or targeted, will be used. --name TARGET_NAME-
The name to be given to the target.
Do not include any personal identifying information (PII) in any resource names.
--type TARGET_TYPE-
Set the
TARGET_TYPEtocloud-object-storagefor a COS target. --file COS_ENDPOINT_DEFINITION_JSON_FILE-
A file containing an endpoint definition in the following format:
{ "endpoint": "ENDPOINT", "target_crn": "TARGET_CRN", "bucket": "BUCKET", "api_key": "API_KEY" } --endpoint COS_ENDPOINT-
The IBM Cloud Object Storage endpoint to be associated with the IBM Cloud Object Storage bucket.
--bucket COS_BUCKET-
The name of the IBM Cloud Object Storage bucket to be associated with the target.
--target-crn COS_TARGET_CRN-
The CRN of the IBM Cloud Object Storage instance.
--api-key COS_API_KEY|@COS_API_KEY_FILE-
Your API key value or a reference to the API Key file used to gain access. For example,
ibmcloud login --apikey $KEYFILE --service-to-service-enabled (TRUE | FALSE)-
Indicates if service-to-service authorization has been enabled for the bucket. Specify
TRUEif service-to-service authorization is enabled andFALSEif service-to-service authorization is not enabled. By default,service_to_service_enabledisFALSE. --output FORMAT-
The only supported format is JSON. If specified, the output is returned in JSON format. If
JSONis not specified, the output is returned in a tabular format. help|--help|-h-
List options available for the command.
Examples
Create a COS target by using an endpoint definition JSON file.
ibmcloud atracker target create --name TARGET_NAME --type cloud-object-storage --file COS_ENDPOINT_DEFINITION_JSON_FILE
Create a COS target that uses a customer-provided API key for authentication.
ibmcloud atracker target create --name TARGET_NAME --type cloud-object-storage --endpoint s3.private.us-east.cloud-object-storage.appdomain.cloud --target-crn "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" --bucket "COS_BUCKET" --api-key COS_API_KEY --service-to-service-enabled false
Create a COS target that uses service-to-service authentication.
ibmcloud atracker target create --name TARGET_NAME --type cloud-object-storage --endpoint s3.private.us-east.cloud-object-storage.appdomain.cloud --target-crn "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" --bucket "COS_BUCKET" --service-to-service-enabled true
Create an IBM® Event Streams for IBM Cloud® target
Use this command to create a IBM® Event Streams for IBM Cloud® target to be used to configure a destination for activity events.
ibmcloud atracker target create --name TARGET_NAME --type TARGET_TYPE ( [--file EVENTSTREAMS_ENDPOINT_DEFINITION_JSON_FILE] | ( [--target-crn EVENTSTREAMS_TARGET_CRN] [--brokers BROKER_LIST] [--topic TOPIC] ( [--api-key ( EVENTSTREAMS_API_KEY | @EVENTSTREAMS_API_KEY_FILE )] | [--service-to-service-enabled ( TRUE | FALSE )] ) ) ) [--region REGION] [--output FORMAT]
Command options
--region REGION|-r REGION-
Name of the region that determines the IBM Cloud Activity Tracker Event Routing API endpoint for the request, for example,
us-southoreu-gb. If not specified, the region logged into, or targeted, will be used. --name TARGET_NAME-
The name to be given to the target.
Do not include any personal identifying information (PII) in any resource names.
--type TARGET_TYPE-
Set the
TARGET_TYPEtoevent-streamsfor an Event Streams target. --file EVENTSTREAMS_ENDPOINT_DEFINITION_JSON_FILE-
A file containing an endpoint definition in the following format:
{ "target_crn": "TARGET_CRN", "brokers": ["broker-1:9093","broker-2:9093"], "topic": "my-topic", "api_key": "API_KEY" } --target-crn EVENTSTREAMS_TARGET_CRN-
The CRN of the IBM® Event Streams for IBM Cloud® instance. You can get the CRN from the service credentials.
--brokers BROKER_LIST-
The list of Event Streams brokers (endpoints). This is the value of the
kafka_brokers_saslin the service credentials. --topic TOPIC-
Event Streams topic name to where the events are sent. This is the name of the topic created for an Event Streams instance.
--api-key EVENTSTREAMS_API_KEY|@EVENTSTREAMS_API_KEY_FILE-
The password value found in the Event Streams service credential. This is the IAM API key.
--service-to-service-enabled (TRUE | FALSE)-
Determines if IBM Cloud Activity Tracker Event Routing has service to service authentication enabled. Set this option to
TRUEif service to service is enabled and do not supply an API key. --output FORMAT-
The only supported format is JSON. If specified, the output is returned in JSON format. If
JSONis not specified, the output is returned in a tabular format. help|--help|-h-
List options available for the command.
Examples
Create an Event Streams target that uses a customer-provided API key for authentication.
ibmcloud atracker target create --name TARGET_NAME --type event-streams --target-crn "crn:v1:bluemix:public:messagehub:eu-de:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" --brokers "broker-1.kafka.svc11.region.eventstreams.cloud.ibm.com:9093,broker-2.kafka.svc11.region.eventstreams.cloud.ibm.com:9093" --topic "TOPIC" --api-key EVENTSTREAMS_API_KEY --service-to-service-enabled false
Create an Event Streams target that uses service-to-service authentication.
ibmcloud atracker target create --name TARGET_NAME --type event-streams --target-crn "crn:v1:bluemix:public:messagehub:eu-de:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" --brokers "broker-1.kafka.svc11.region.eventstreams.cloud.ibm.com:9093,broker-2.kafka.svc11.region.eventstreams.cloud.ibm.com:9093" --topic "TOPIC" --service-to-service-enabled true
Create an IBM Cloud Logs target
Use this command to create an IBM Cloud Logs target to be used to configure a destination for activity events.
ibmcloud atracker target create --name TARGET_NAME --type TARGET_TYPE ( [--file CLOUDLOGS_ENDPOINT_DEFINITION_JSON_FILE] | ( [--target-crn CLOUDLOGS_TARGET_CRN] ) ) [--region REGION] [--output FORMAT]
Command options
--region REGION|-r REGION-
Name of the region that determines the IBM Cloud Activity Tracker Event Routing API endpoint for the request, for example,
us-southoreu-gb. If not specified, the region logged into, or targeted, will be used. --name TARGET_NAME-
The name to be given to the target.
Do not include any personal identifying information (PII) in any resource names.
--type TARGET_TYPE-
Set the
TARGET_TYPEtocloud-logsfor an IBM Cloud Logs target. --file CLOUDLOGS_ENDPOINT_DEFINITION_JSON_FILE-
A file containing an endpoint definition in the following format:
{ "target_crn": "TARGET_CRN" } --target-crn CLOUDLOGS_TARGET_CRN-
The CRN of the IBM Cloud Logs instance.
--managed-by MANAGED_BY-
The owner of the target to be created. Valid values are
accountorenterprise. --output FORMAT-
The only supported format is JSON. If specified, the output is returned in JSON format. If
JSONis not specified, the output is returned in a tabular format. help|--help|-h-
List options available for the command.
Examples
Create an IBM Cloud Logs target.
ibmcloud atracker target create --name TARGET_NAME --type cloud-logs --target-crn "crn:v1:bluemix:public:logs:eu-es:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::"
Create an IBM Cloud Logs target that is managed by the enterprise.
ibmcloud atracker target create --name TARGET_NAME --type cloud-logs --target-crn "crn:v1:bluemix:public:logs:eu-es:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" --managed-by enterprise
Create an IBM Cloud® App Configuration target
Use this command to create an IBM Cloud® App Configuration target to be used to configure a destination for activity events.
ibmcloud atracker target create --name TARGET_NAME --type TARGET_TYPE ( [--target-crn APPCONFIG_TARGET_CRN] ) [--region REGION] [--output FORMAT]
Command options
--region REGION|-r REGION-
Name of the region that determines the IBM Cloud Activity Tracker Event Routing API endpoint for the request, for example,
us-southoreu-gb. If not specified, the region logged into, or targeted, will be used. --name TARGET_NAME-
The name to be given to the target.
Do not include any personal identifying information (PII) in any resource names.
--type TARGET_TYPE-
Set the
TARGET_TYPEtoapp-configfor an IBM Cloud App Configuration target. --target-crn APPCONFIG_TARGET_CRN-
The CRN of the IBM Cloud App Configuration instance.
--managed-by MANAGED_BY-
The owner of the target to be created. Valid values are
accountorenterprise. --output FORMAT-
The only supported format is JSON. If specified, the output is returned in JSON format. If
JSONis not specified, the output is returned in a tabular format. help|--help|-h-
List options available for the command.
Examples
Create an IBM Cloud App Configuration target.
ibmcloud atracker target create --name TARGET_NAME --type app-config --target-crn "crn:v1:bluemix:public:apprapp:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::"
Create an IBM Cloud App Configuration target that is managed by the enterprise.
ibmcloud atracker target create --name TARGET_NAME --type app-config --target-crn "crn:v1:bluemix:public:apprapp:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" --managed-by enterprise
ibmcloud atracker target update
Use this command to update the properties of an Activity Tracker Event Routing target. Any specified value that is different from when the target was originally created will be updated to the value specified in the command. The options that you specify depend on the type of target that you update.
Update a IBM Cloud Object Storage target
Use this command to update a IBM Cloud Object Storage target.
ibmcloud atracker target update --target TARGET [--name TARGET_NAME] [ [--file COS_ENDPOINT_DEFINITION_JSON_FILE] | ( [--endpoint COS_ENDPOINT] [--bucket COS_BUCKET] [--target-crn COS_TARGET_CRN] ( [--api-key ( COS_API_KEY | @COS_API_KEY_FILE )] | [--service-to-service-enabled ( TRUE | FALSE )] ) ) ] [--output FORMAT]
Command options
--target TARGET-
The ID or current target name.
--name TARGET_NAME-
The name to be given to the target.
Do not include any personal identifying information (PII) in any resource names.
--file COS_ENDPOINT_DEFINITION_JSON_FILE-
A file containing an endpoint definition in the following format:
{ "endpoint": "ENDPOINT", "target_crn": "TARGET_CRN", "bucket": "BUCKET", "api_key": "API_KEY" }or for a scenario where service-to-service authentication is enabled:
{ "endpoint": "ENDPOINT", "target_crn": "TARGET_CRN", "bucket": "BUCKET", "service_to_service_enabled": true } --endpoint COS_ENDPOINT-
The IBM Cloud Object Storage endpoint to be associated with the IBM Cloud Object Storage bucket.
--bucket COS_BUCKET-
The name of the IBM Cloud Object Storage bucket to be associated with the target.
--target-crn COS_TARGET_CRN-
The CRN of the IBM Cloud Object Storage instance.
--api-key COS_API_KEY|@COS_API_KEY_FILE-
Your API key value or a reference to the API Key file used to gain access. For example,
ibmcloud login --apikey $KEYFILE --service-to-service-enabled (TRUE | FALSE)-
Indicates if service-to-service authorization has been enabled for the bucket. Specify
TRUEif service-to-service authorization is enabled andFALSEif service-to-service authorization is not enabled. By default, service-to-service authorization isFALSE. --output FORMAT-
The only supported format is JSON. If specified, the output is returned in JSON format. If
JSONis not specified, the output is returned in a tabular format. help|--help|-h-
List options available for the command.
Examples
Update a COS target by using an endpoint definition JSON file.
ibmcloud atracker target update --target TARGET --name TARGET_NAME --file COS_ENDPOINT_DEFINITION_JSON_FILE
Update a COS target that uses a customer-provided API key for authentication.
ibmcloud atracker target update --target TARGET --name TARGET_NAME --endpoint s3.private.us-east.cloud-object-storage.appdomain.cloud --target-crn "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" --bucket "COS_BUCKET" --api-key @COS_API_KEY_FILE --service-to-service-enabled false
Update a COS target that uses service-to-service authentication.
ibmcloud atracker target update --target TARGET --name TARGET_NAME --endpoint s3.private.us-east.cloud-object-storage.appdomain.cloud --target-crn "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" --bucket "COS_BUCKET" --service-to-service-enabled true
Update an IBM® Event Streams for IBM Cloud® target
Use this command to update an Event Streams target.
ibmcloud atracker target update --target TARGET [--name TARGET_NAME] [ [--file EVENTSTREAMS_ENDPOINT_DEFINITION_JSON_FILE] | ( [--brokers BROKER_LIST] [--target-crn EVENTSTREAMS_TARGET_CRN] [--topic TOPIC] ( [--api-key ( EVENTSTREAMS_API_KEY | @EVENTSTREAMS_API_KEY_FILE )] | [--service-to-service-enabled ( TRUE | FALSE )] ) ) ] [--output FORMAT]
Command options
--target TARGET-
The ID or current target name.
--name TARGET_NAME-
The name to be given to the target.
Do not include any personal identifying information (PII) in any resource names.
--file EVENTSTREAMS_ENDPOINT_DEFINITION_JSON_FILE-
A file containing an endpoint definition in the following format:
{ "target_crn": "TARGET_CRN", "brokers": ["broker-1:9093","broker-2:9093"], "topic": "my-topic", "api_key": "API_KEY" } --target-crn EVENTSTREAMS_TARGET_CRN-
The CRN of the IBM® Event Streams for IBM Cloud® instance. You can get the CRN from the service credentials.
--brokers BROKER_LIST-
The list of Event Streams brokers (endpoints). This is the value of the
kafka_brokers_saslin the service credentials. --topic TOPIC-
Event Streams topic name to where the events are sent. This is the name of the topic created for an Event Streams instance.
--api-key EVENTSTREAMS_API_KEY|@EVENTSTREAMS_API_KEY_FILE-
The password value found in the Event Streams service credential. This is the IAM API key.
--service-to-service-enabled (TRUE | FALSE)-
Determines if IBM Cloud Activity Tracker Event Routing has service to service authentication enabled. Set this option to
TRUEif service to service is enabled and do not supply an API key. --output FORMAT-
The only supported format is JSON. If specified, the output is returned in JSON format. If
JSONis not specified, the output is returned in a tabular format. help|--help|-h-
List options available for the command.
Examples
Update an Event Streams target that uses a customer-provided API key for authentication.
ibmcloud atracker target update --target TARGET --name TARGET_NAME --target-crn "crn:v1:bluemix:public:messagehub:eu-de:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" --brokers "broker-1.kafka.svc11.region.eventstreams.cloud.ibm.com:9093,broker-2.kafka.svc11.region.eventstreams.cloud.ibm.com:9093" --topic "TOPIC" --api-key EVENTSTREAMS_API_KEY --service-to-service-enabled false
Update an Event Streams target that uses service-to-service authentication.
ibmcloud atracker target update --target TARGET --name TARGET_NAME --target-crn "crn:v1:bluemix:public:messagehub:eu-de:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" --brokers "broker-1.kafka.svc11.region.eventstreams.cloud.ibm.com:9093,broker-2.kafka.svc11.region.eventstreams.cloud.ibm.com:9093" --topic "TOPIC" --service-to-service-enabled true
Update an IBM Cloud Logs target
Use this command to update an IBM Cloud Logs target.
ibmcloud atracker target update --target TARGET [--name TARGET_NAME] [ [--file CLOUDLOGS_ENDPOINT_DEFINITION_JSON_FILE] | ( [--target-crn CLOUDLOGS_TARGET_CRN] ) ] [--output FORMAT]
Command options
--target TARGET-
The ID or current target name.
--name TARGET_NAME-
The name to be given to the target.
Do not include any personal identifying information (PII) in any resource names.
--file CLOUDLOGS_ENDPOINT_DEFINITION_JSON_FILE-
A file containing an endpoint definition in the following format:
{ "target_crn": "TARGET_CRN" } --target-crn CLOUDLOGS_TARGET_CRN-
The CRN of the IBM Cloud Logs instance.
--output FORMAT-
The only supported format is JSON. If specified, the output is returned in JSON format. If
JSONis not specified, the output is returned in a tabular format. help|--help|-h-
List options available for the command.
Examples
Update an IBM Cloud Logs target.
ibmcloud atracker target update --target TARGET --name TARGET_NAME --target-crn "crn:v1:bluemix:public:logs:eu-es:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::"
Update an IBM Cloud® App Configuration target
Use this command to update an IBM Cloud® App Configuration target.
ibmcloud atracker target update --target TARGET [--name TARGET_NAME] [ [--target-crn APPCONFIG_TARGET_CRN] ] [--output FORMAT]
Command options
--target TARGET-
The ID or current target name.
--name TARGET_NAME-
The name to be given to the target.
Do not include any personal identifying information (PII) in any resource names.
--target-crn APPCONFIG_TARGET_CRN-
The CRN of the IBM Cloud App Configuration instance.
--output FORMAT-
The only supported format is JSON. If specified, the output is returned in JSON format. If
JSONis not specified, the output is returned in a tabular format. help|--help|-h-
List options available for the command.
Examples
Update an IBM Cloud App Configuration target.
ibmcloud atracker target update --target TARGET --name TARGET_NAME --target-crn "crn:v1:bluemix:public:apprapp:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::"
ibmcloud atracker target rm
Use this command to delete an Activity Tracker Event Routing target. Events are no longer sent to the deleted target.
ibmcloud atracker target rm --target TARGET [--force]
Command options
--target TARGET- The ID or name of the target.
--force- Runs the command without prompting you to confirm that you want to continue.
help|--help|-h- List options available for the command.
Examples
Delete a target.
ibmcloud atracker target rm --target TARGET
Delete a target without being prompted to confirm.
ibmcloud atracker target rm --target TARGET --force
ibmcloud atracker target validate
Use this command to validate an Activity Tracker Event Routing target with its destination service, such as IBM Cloud Object Storage. Validation confirms that the target is correctly configured.
ibmcloud atracker target validate --target TARGET [--region REGION] [--output FORMAT]
Command options
--target TARGET- The ID or name of the target.
--region REGION|-r REGION- Name of the region that determines the IBM Cloud Activity Tracker Event Routing API endpoint for the request, for example,
us-southoreu-gb. If not specified, the region logged into, or targeted, will be used. --output FORMAT- The only supported format is JSON. If specified, the output is returned in JSON format. If
JSONis not specified, the output is returned in a tabular format. help|--help|-h- List options available for the command.
Examples
Validate a target.
ibmcloud atracker target validate --target TARGET
Validate a target by using the Activity Tracker Event Routing API endpoint of a specific region.
ibmcloud atracker target validate --target TARGET --region us-south
ibmcloud atracker target get
Use this command to get detailed information about an Activity Tracker Event Routing target, such as its type and configuration.
ibmcloud atracker target get --target TARGET [--output FORMAT]
Command options
--target TARGET- The ID or name of the target.
--output FORMAT- The only supported format is JSON. If specified, the output is returned in JSON format. If
JSONis not specified, the output is returned in a tabular format. help|--help|-h- List options available for the command.
Examples
Get information about a target.
ibmcloud atracker target get --target TARGET
Get information about a target in JSON format.
ibmcloud atracker target get --target TARGET --output JSON
ibmcloud atracker target ls
Use this command to list the Activity Tracker Event Routing targets that are configured for your account in a region. A target is a destination to which activity events are sent.
ibmcloud atracker target ls [--output FORMAT]
Command options
--output FORMAT- The only supported format is JSON. If specified, the output is returned in JSON format. If
JSONis not specified, the output is returned in a tabular format. help|--help|-h- List options available for the command.
Examples
List all targets.
ibmcloud atracker target ls
List all targets in JSON format.
ibmcloud atracker target ls --output JSON
ibmcloud atracker setting get
Use this command to get the current Activity Tracker Event Routing settings for your account, such as the default targets, permitted target regions, and metadata regions.
ibmcloud atracker setting get [--output FORMAT]
Command options
--output FORMAT- If
JSONis specified, the output is returned in JSON format. IfJSONis not specified, the output is returned in a tabular format. help|--help|-h- List options available for the command.
Examples
Get the settings for your account.
ibmcloud atracker setting get
Get the settings for your account in JSON format.
ibmcloud atracker setting get --output JSON
ibmcloud atracker setting update
Use this command to modify current settings such as the default targets, permitted target regions, primary and secondary metadata regions in IBM Cloud Activity Tracker Event Routing. Any value that is different from when the target was originally created will be updated to the value specified in the command.
Before disabling a public endpoint (--private-api-endpoint-only TRUE), make sure your account has access to the private endpoint. You can do this by running the command bx account show. If VRF Enabled is
true and Service Endpoint Enabled is true then you have access to the private endpoint. If you do not have access to the private endpoint, you will be unable to re-enable the public endpoint since private
endpoint access is required to re-enable the public endpoint.
ibmcloud atracker setting update [--metadata-region-primary REGION] [--metadata-region-backup REGION] [--default-targets TARGET] [--permitted-target-regions REGIONS] [--private-api-endpoint-only ( TRUE | FALSE )] [--output FORMAT] [--force]
Command options
--default-targets TARGET- A comma-separated list of target IDs. If no routing rules cause events to be sent to other targets, these targets receive the events.
--permitted-target-regions REGIONS- A comma-separated list of regions that can be used to define a target. A maximum of two permitted target regions can be specified.
--metadata-region-primary REGION- The region where the metadata associated with route and target definitions is stored.
--metadata-region-backup REGION- The region where the metadata associated with route and target definitions is stored as a backup location.
--private-api-endpoint-only (TRUE | FALSE)- Specifies whether a private endpoint can be used. If
TRUE, only a private endpoint can be used. --force- Runs the command without prompting you to confirm that you want to continue.
--output FORMAT- If
JSONis specified, the output is returned in JSON format. IfJSONis not specified, the output is returned in a tabular format. help|--help|-h- List options available for the command.
Examples
Set the primary and backup metadata regions.
ibmcloud atracker setting update --metadata-region-primary us-south --metadata-region-backup us-east
Set the default targets.
ibmcloud atracker setting update --default-targets 11111111-1111-1111-1111-111111111111,22222222-2222-2222-2222-222222222222
Restrict the regions that can be used to define a target.
ibmcloud atracker setting update --permitted-target-regions us-south,us-east
ibmcloud atracker help
Alias: h
Use this command to display help for Activity Tracker Event Routing CLI commands.
ibmcloud atracker help [COMMAND]
Command options
COMMAND- The name of the command for which to display help. If not specified, help for all available Activity Tracker Event Routing commands is displayed.
help|--help|-h- List options available for the command.
Examples
Display help for all Activity Tracker Event Routing commands.
ibmcloud atracker help
ibmcloud atracker route help
Alias: h
Use this command to display help for ibmcloud atracker route subcommands.
ibmcloud atracker route help [COMMAND]
Command options
COMMAND- The name of the route subcommand for which to display help. If not specified, help for all available
ibmcloud atracker routesubcommands is displayed. help|--help|-h- List options available for the command.
Examples
Display help for all ibmcloud atracker route subcommands.
ibmcloud atracker route help
ibmcloud atracker setting help
Alias: h
Use this command to display help for ibmcloud atracker setting subcommands.
ibmcloud atracker setting help [COMMAND]
Command options
COMMAND- The name of the setting subcommand for which to display help. If not specified, help for all available
ibmcloud atracker settingsubcommands is displayed. help|--help|-h- List options available for the command.
Examples
Display help for all ibmcloud atracker setting subcommands.
ibmcloud atracker setting help
ibmcloud atracker target help
Alias: h
Use this command to display help for ibmcloud atracker target subcommands.
ibmcloud atracker target help [COMMAND]
Command options
COMMAND- The name of the target subcommand for which to display help. If not specified, help for all available
ibmcloud atracker targetsubcommands is displayed. help|--help|-h- List options available for the command.
Examples
Display help for all ibmcloud atracker target subcommands.
ibmcloud atracker target help