Closed rahul8172q closed 1 year ago
Any help here ??
Hi there,
Sorry for the long delay. You can do that with the cli as well, although there is a learning curve. The best way is to create a app using the UI and once you're satisfy you can dump it as a JSON file, example:
$ akamai eaa app app://mD_Pw1XASpyVJc2JwgICTg > ~/eaa_app_datascience_v3.json
From there you can modify the JSON file with the option you like (new CNAME, app name etc...) with the command akamai eaa app - create
it will read the new app definition as JSON from stdin.
$ cat mynewapp.json | akamai eaa app - create
JSON file can contain some Jinja code if you like to use some variables, loop etc...
I provided some example in the 0.2.6 release notes: https://github.com/akamai/cli-eaa/releases/tag/0.2.6
You might need to repeat this process for different app type (web vs. rdp vs. client/tunnel).
I hope that helps
Thanks a lot for your help. I get you point . I am new to this so need a bit more help.
I created the app from UI. Now I need to build a template and fix the connector, Access and Advanced settings . This one I will use to create an app. and Secondly. I want to use the same template to add or modify host and ports of the app.
As I said, I created the app and exported this onto json. Can you help me with what can I do next from below:
$ cat mynewapp.json.j2 | akamai eaa app - create -- I ran the same, haven't. hanged anything but got an error.
(venv) rmisra@C02DDKNMMD6M AkamaiOPEN-edgegrid-python % cat mynewapp.json.j2 | akamai eaa -v app - create
cat: mynewapp.json.j2: No such file or directory
2021-10-14 16:39:46,979 root I Initialized with base_url https://akab-vjvrxfqmio6nvhsu-pcl6upso5meugshk.luna.akamaiapis.net/crux/v1/
2021-10-14 16:39:46,980 root E cli-eaa general exception
Traceback (most recent call last):
File "/Users/rmisra/.akamai-cli/src/cli-eaa/bin/akamai-eaa", line 185, in
Please bear with me, I am a novice on this stuff.
Let's follow up by email it will be easier. I had some idea about putting together some dedicated documentation around this topic, you give me a good opportunity here.
W.r.t the error, the cat mynewapp.json.j2
returns an error (very first line, easy to miss)
cat: mynewapp.json.j2: No such file or directory
Then cli-eaa try to read the input and find nothing, I will add a basic test to have a better error message/handling.
Solved over email.
I am new to API stuff. I am trying to create an automated call to create an Applicaiton with some set parameters and just pass Name , connector and destination seperately while making the call.
I saw with POSTMAN, there is a way bit cna anyone help with CLI, is tere any options.