### Example ew-config File Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md This is an example of how to structure the `~/.akamai-cli/ew-config` file to set default properties for the EdgeWorkers CLI. ```bash [default] edgeworkerName=testEW groupId=12345 versionId=1-0-2 ``` -------------------------------- ### Install Akamai CLI on macOS Source: https://github.com/akamai/cli-edgeworkers/blob/master/README.md Use Homebrew to install the Akamai CLI on macOS if you do not already have it. ```bash brew install akamai ``` -------------------------------- ### Install EdgeWorkers CLI Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Use this command to install the latest EdgeWorkers CLI package, which includes EdgeKV functionality, if it's not already installed. ```bash akamai install edgeworkers ``` -------------------------------- ### Get Initialization Status Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Checks the current initialization status of the EdgeKV database. ```APIDOC ## Get Initialization Status ### Description Check the initialization status of the EdgeKV database ### Usage `akamai edgekv show status` ### Options #### Optional - **-h, --help** (boolean) - Display information on how to use this EdgeKV command ``` -------------------------------- ### Install and Update Akamai EdgeWorkers CLI Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Use these commands to install or update the EdgeWorkers CLI via the Akamai CLI package manager. Verify the installation with the version command. ```bash akamai install edgeworkers ``` ```bash akamai update edgeworkers ``` ```bash akamai edgeworkers --version ``` -------------------------------- ### Get Specific EdgeKV Default Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Retrieve the value of a specific EdgeKV configuration default, such as the namespace. Use `akamai edgekv config get `. ```bash akamai edgekv config get namespace ``` -------------------------------- ### Get a Default Value from Config File Section Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Retrieves a specific default property value from a config file section. ```bash akamai config get ``` -------------------------------- ### Configure Default EdgeWorkers CLI Options Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Persist default option values to `~/.akamai-cli/ew-config` to avoid repetitive argument passing. This includes setting individual properties, saving multiple properties at once, listing all stored properties, getting a single property, and removing a property. ```bash akamai edgeworkers config set groupId 12345 ``` ```bash akamai edgeworkers config set network STAGING ``` ```bash akamai edgeworkers config set versionId 1.0.0 ``` ```bash akamai edgeworkers config save -p "groupId=12345 network=STAGING versionId=1.0.0" ``` ```bash akamai edgeworkers config list ``` ```bash akamai edgeworkers config get groupId ``` ```bash akamai edgeworkers config unset groupId ``` ```bash mkdir -p ~/.akamai-cli cat > ~/.akamai-cli/ew-config << 'EOF' [default] groupId=12345 network=STAGING versionId=1.0.0 EOF ``` -------------------------------- ### Get Specific EdgeWorker Revision Details Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Retrieve detailed information for a specific EdgeWorker revision. ```bash # Get details for a specific revision akamai edgeworkers get-revision 12345 3-10 ``` -------------------------------- ### Get EdgeWorker Reports Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Access execution summary and performance reports for EdgeWorkers. Supports filtering by date, status, event handlers, revisions, and network. ```bash # List all available report types akamai edgeworkers get reports ``` ```bash # Get a report for the last 24 hours (startDate is required) akamai edgeworkers get report 1 12345 \ --startDate 2024-01-14T00:00:00Z \ --endDate 2024-01-15T00:00:00Z ``` ```bash # Filter by execution status (comma-separated) akamai edgeworkers get report 1 12345 \ --startDate 2024-01-14T00:00:00Z \ --status success,runtimeError,timeoutError ``` ```bash # Filter by specific event handlers akamai edgeworkers get report 1 12345 \ --startDate 2024-01-14T00:00:00Z \ --ev onClientRequest,onClientResponse ``` ```bash # Filter by revision IDs and network akamai edgeworkers get report 1 12345 \ --startDate 2024-01-14T00:00:00Z \ --revisionIds 3-10,3-11 \ --network PRODUCTION ``` ```bash # List active customers for a partner EdgeWorker akamai edgeworkers get active-customers 12345 ``` -------------------------------- ### Get Revision details of an EdgeWorker Source: https://github.com/akamai/cli-edgeworkers/blob/master/README.md View details for a specific revision of a composite bundle. ```APIDOC ## Get Revision details of an EdgeWorker ### Description View details for a specific revision of a composite bundle. ### Usage `akamai edgeworkers get-revision-bom [options] ` ### Options - `-h, --help`: output usage information - `--activeVersions`: Limit results to show only active versions - `--currentlyPinnedRevisions`: Shows additional information about the revision that's currently pinned ### Arguments - **edgeworker-identifier** (integer) - Required - A unique integer handle to an EdgeWorkers instance - **revision-identifier** (integer) - Required - Revision identifier ``` -------------------------------- ### Get EdgeWorker Status Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Retrieve the status of a specific EdgeWorker activation by ID. Use the --jsonout flag for JSON formatted output. ```bash akamai edgeworkers status 12345 --activationId 67890 ``` ```bash akamai edgeworkers --jsonout status 12345 --network STAGING ``` -------------------------------- ### EdgeKV Global Options and Initialization Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Demonstrates global flags for `akamai edgekv` commands, including custom edgerc/section, JSON output, and custom timeouts. Also shows basic initialization and status check for EdgeKV. ```bash akamai edgekv [options] ``` ```bash akamai edgekv --edgerc ~/.edgerc --section staging initialize ``` ```bash akamai edgekv --jsonout list ns staging ``` ```bash akamai edgekv --timeout 60 write text staging my-ns my-group my-key '{"value":"data"}' ``` ```bash akamai edgekv initialize ``` ```bash akamai edgekv init \ --dataAccessPolicy "restrictDataAccess=true,allowNamespacePolicyOverride=false" ``` ```bash akamai edgekv show status ``` -------------------------------- ### List All EdgeKV Config Defaults Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Display all currently configured default settings for EdgeKV. This helps in understanding the current CLI environment. ```bash akamai edgekv config list ``` -------------------------------- ### Initialize EdgeKV Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Initializes the EdgeKV database, provisions the default namespace, and creates a dedicated CP code for usage tracking. This is a mandatory first step before performing other EdgeKV operations. ```APIDOC ## Initialize EdgeKV ### Description Initialize the EdgeKV database. This action is only required once to initialize your EdgeKV database and provision the *default* EdgeKV namespace on Akamai's staging and production environments. It also creates a new, dedicated CP code used to track your EdgeKV usage. Before you can perform any other EdgeKV operations you must successfully complete this step. The `EdgeKV Database Data Access Policy - Manage` role is required to initialize an EdgeKV database. ### Usage `akamai edgekv initialize` ### Options #### Optional - **-h, --help** (boolean) - Display information on how to use this EdgeKV command - **--dataAccessPolicy** (string) - Set the data access policy. `restrictDataAccess`: If set to true, the database can only access data from Akamai's Enhanced TLS network. If set to false, the database can access data from both Akamai's Enhanced TLS and Standard TLS networks. If you set this option to false your account needs to have `EdgeDB::Standard_TLS_Support` entitlement. `allowNamespacePolicyOverride`: If set to true, the database data access policy can be overridden when the namespace is created. If set to false, data access policy overrides are not accepted. ``` -------------------------------- ### Create EdgeKV Access Token Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Use this command to create an access token for authorizing access to the EdgeKV database. Specify save path, overwrite behavior, environment permissions, expiration, and namespace access. If --save_path is omitted, the token is displayed. ```bash akamai edgekv create token --save_path= --overwrite --staging={allow|deny} --production={allow|deny} --expiry= --ewids={all| --namespace=+permissions,+permissions ``` ```bash edgekv create token token1 --save_path=/Documents/hellomgmt.tgz --overwrite --staging=allow --production=deny --ewids=all --namespace=default+rwd,marketing+r --expiry=2020-12-30 ``` -------------------------------- ### Save Multiple EdgeKV Defaults Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Configure multiple EdgeKV default settings at once, such as namespace, retention period, and geolocation. Use the `-p` flag followed by key-value pairs. ```bash akamai edgekv config save -p "namespace=my-namespace retention=90 geoLocation=US" ``` -------------------------------- ### List All Default Values in Config File Section Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Retrieves all default properties within a specified section of the config file. Defaults to the 'default' section if none is specified. ```bash akamai config list ``` -------------------------------- ### Create Namespace Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Creates a new namespace within the EdgeKV environment. ```APIDOC ## Create Namespace ### Description Create a namespace ### Usage `akamai edgekv create ns ` ### Options #### Optional - **-h, --help** (boolean) - Display information on how to use this EdgeKV command. - **--retention** (integer) - Required. Retention period of the namespace in days. (0 means indefinite retention). - **--groupId** (integer) - Required. Group identifier. Set it to 0 to allow all groups in your account to access the namespace. If you want to restrict the namespace to a specific group, enter the group id. This value MUST be the same for both the staging and production instances of a namespace. - **--geoLocation** (string) - Specifies the persistent storage location for data when creating a namespace on the production network. The value defaults to `US` on the `STAGING` and `PRODUCTION` networks. - **--dataAccessPolicy** (string) - Override the database data access policy. `restrictDataAccess`: If set to true, the database can only access data from Akamai's Enhanced TLS network. If set to false, the database can access data from both Akamai's Enhanced TLS and Standard TLS networks. The database data access policy `allowNamespacePolicyOverride` needs to be set to true to override the data access policy. ### Arguments #### Required - **environment** (string) - The Akamai environment on which to create this namespace, either “staging” or “production” - **namespace** (string) - Namespace identifier. Can only include alphanumeric (0-9, a-z, A-Z), underscore (_), and dash (-) characters. Must be between 1 and 32 characters long. Cannot be "default". ### Important Notes 1. The namespace identifier can only include alphanumeric (0-9, a-z, A-Z), underscore (_), and (-) dash characters. 2. The namespace identifier can be between 1 and 32 characters in length. 3. You cannot use the word "default" as the namespace identifier. The “default” namespace is already created during initialization. 4. Specifying "0" retention means indefinite retention. 5. A non-zero retention cannot be less than 1 day or more than 3650 days. ``` -------------------------------- ### List EdgeKV Access Tokens Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Lists all access tokens the user has permission to download. Use --include-expired to retrieve both expired and valid tokens. ```bash akamai edgekv list tokens ``` -------------------------------- ### Create EdgeKV Token with Specific Permissions Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Create a token for accessing EdgeKV namespaces with specified permissions for staging and production environments. Use `--ewids` to target specific EdgeWorkers and `--namespace` to define access rights. ```bash akamai edgekv create token my-token \ --staging allow \ --production allow \ --ewids "12345,67890" \ --expiry 2025-12-31 \ --namespace "my-namespace+rwd,analytics-ns+r" ``` -------------------------------- ### Create Staging-Only EdgeKV Token Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Create a token that only allows staging access. This is useful for development and testing phases. ```bash akamai edgekv create tkn staging-token \ --staging allow \ --production deny \ --ewids all \ --expiry 2025-06-30 \ --namespace "my-namespace+rw" ``` -------------------------------- ### Build-time Docker Image Workaround Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Apply this command during Docker image build to resolve 'Error: Cannot find module' issues with the EdgeKV CLI. ```bash RUN `akamai install edgeworkers && cd $AKAMAI_CLI_HOME/.akamai-cli/src/cli-edgeworkers/ && npm run build` ``` -------------------------------- ### EdgeKV Namespace Management Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Commands for managing EdgeKV namespaces, including creation with retention periods and geo-location, listing with details and sorting, showing specific namespaces, and modifying retention periods. ```bash akamai edgekv create ns staging my-namespace --retention 90 ``` ```bash akamai edgekv create ns production my-namespace \ --retention 365 \ --geoLocation EU \ --groupId 54321 ``` ```bash akamai edgekv create ns staging my-namespace \ --retention 90 \ --dataAccessPolicy "restrictDataAccess=true" ``` ```bash akamai edgekv list ns staging ``` ```bash akamai edgekv list ns staging --details --order-by retention --desc ``` ```bash akamai edgekv show ns staging my-namespace ``` ```bash akamai edgekv modify ns staging my-namespace --retention 180 ``` -------------------------------- ### Upload EdgeWorker Code Bundle Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Create a new version by uploading a pre-built `.tgz` bundle or a working directory. The CLI validates the bundle and checks for duplicate checksums. ```bash akamai edgeworkers upload 12345 --bundle ./my-edgeworker.tgz ``` ```bash akamai edgeworkers create-version 12345 --codeDir ./src/my-edgeworker/ ``` -------------------------------- ### List Access Tokens Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Lists all access tokens that the user has permission to download. This command can also include expired tokens. ```APIDOC ## List Access Tokens ### Description List of all tokens the user has permission to download. ### Usage `akamai edgekv list tokens` ### Options - **-h, --help** - Optional - Display information on how to use this EdgeKV command. - **--include-expired** - Optional - Retrieves both expired and valid tokens. ``` -------------------------------- ### List Groups in Namespace Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Lists data groups for a given namespace in an Akamai environment. Returns up to 10,000 groups; if more exist, a random subset is returned. ```bash akamai edgekv list groups production default ``` -------------------------------- ### List EdgeWorker Contracts and Resource Tiers Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Utilities to discover available contracts and resource tiers for registering EdgeWorkers. Includes listing contracts, resource tiers for a contract, tiers associated with an EdgeWorker, and properties using an EdgeWorker. ```bash akamai edgeworkers list-contracts ``` ```bash akamai edgeworkers list-restiers --contractId C-1AB2CD3 ``` ```bash akamai edgeworkers show-restier 12345 ``` ```bash akamai edgeworkers list-properties 12345 ``` ```bash akamai edgeworkers lp 12345 --activeOnly ``` ```bash akamai edgeworkers list-properties 12345 --details ``` ```bash akamai edgeworkers list-limits ``` -------------------------------- ### Download EdgeKV Access Token Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Retrieves an EdgeKV access token. You can specify a save path to store the token file or omit it to display the token value. The --overwrite option can be used with --save_path to replace an existing token file. ```bash akamai edgekv download token --save_path= --overwrite ``` -------------------------------- ### List All EdgeKV Auth Groups Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Retrieve a list of all available EdgeKV authentication groups. This command is used for managing access control policies. ```bash akamai edgekv list auth-groups ``` -------------------------------- ### Runtime Docker Workaround Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Execute this command within a running Docker container to fix 'Error: Cannot find module' issues with the EdgeKV CLI. ```bash cd ~/.akamai-cli/src/cli-edgeworkers/ && npm install --unsafe-perm ``` -------------------------------- ### List Specific EdgeKV Auth Groups by ID Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Fetch details for specific EdgeKV auth groups using their IDs. Use the `--groupIds` flag to specify which groups to list. ```bash akamai edgekv list auth-groups --groupIds "54321,99999" ``` -------------------------------- ### Bulk Save Default Properties in Config File Section Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Saves default values in bulk for a config file section. Invalid items are skipped. ```bash akamai config save --properties "key1=value1 key2=value2" ``` -------------------------------- ### List EdgeKV Auth Groups with EdgeWorker Details Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Include detailed information about associated EdgeWorker groups when listing auth groups. Use `--include_ew_groups` for comprehensive details. ```bash akamai edgekv list auth-groups --include_ew_groups ``` -------------------------------- ### List EdgeKV Tokens Including Expired Source: https://context7.com/akamai/cli-edgeworkers/llms.txt View all EdgeKV tokens, including those that have passed their expiry date. Use `--include-expired` to see all tokens. ```bash akamai edgekv list tokens --include-expired ``` -------------------------------- ### Set Default Config Property Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Use the 'config set' command to establish default values for command options. These defaults are stored in the `~/.akamai-cli/ew-config` file. ```bash akamai edgeworkers config set ``` -------------------------------- ### Download EdgeWorker Version Bundle Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Download the `.tgz` bundle for a specific EdgeWorker version. The `download-version` command can be used interchangeably with `download`. Specify `--downloadPath` to save to a custom location. ```bash akamai edgeworkers download 12345 1.0.1 ``` ```bash akamai edgeworkers download-version 12345 1.0.1 --downloadPath /tmp/bundles/ ``` -------------------------------- ### Download EdgeKV Token to Bundle Path Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Download a specific EdgeKV token and save it to a designated path within your code bundle. This is useful for managing credentials alongside your EdgeWorker code. ```bash akamai edgekv download token my-token --save_path ./src/my-edgeworker/ ``` -------------------------------- ### Create an Access Token Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Creates a new access token for authorizing access to the EdgeKV database. Tokens can be configured with specific permissions for staging and production environments, and can be restricted to certain EdgeWorker IDs and namespaces. ```APIDOC ## Create an Access Token ### Description Create an access token to use within the EdgeWorkers code bundle to authorize access to the EdgeKV database. ### Usage `akamai edgekv create token --save_path= --overwrite --staging={allow|deny} --production={allow|deny} --expiry= --ewids={all| --namespace=+permissions,+permissions` ### Example ` edgekv create token token1 --save_path=/Documents/hellomgmt.tgz --overwrite --staging=allow --production=deny --ewids=all --namespace=default+rwd,marketing+r --expiry=2020-12-30` ### Parameters #### Arguments - **tokenName** (string) - Required - token name. The token name can only include alphanumeric (0-9, a-z, A-Z), underscore (_), and (-) dash characters. The token name can be between 1 and 32 characters in length. #### Options - **--save_path** (string) - Optional - Path specifying where to save the edgekv_tokens.js token file. If a path is not provided the token value is displayed and must be securely stored manually. - **-o, --overwrite** - Optional - Overwrites the value of an existing token with the same name in the edgekv_tokens.js file. - **--staging** (string) - Required - Acceptable value: 'allow', 'deny'. Specifies whether the token will be allowed or denied in the staging environment. - **--production** (string) - Required - Acceptable value: 'allow', 'deny'. Specifies whether the token will be allowed or denied in the production environment. - **--ewids** (string) - Required - Acceptable value: 'all', or a comma-separated list of up to 8 EdgeWorker IDs. Restricts token usage to the specified EdgeWorker IDs. - **--namespace** (string) - Required - Value: A comma-separated list of up to 20 namespace identifier and permission combinations. Permissions can be 'r' (read), 'w' (write), 'd' (delete). Example: "myNamespace1+rwd,myNamespace2+rw". - **--expiry** (string) - Optional - Expiration date of the token in ISO 8601 format (yyyy-mm-dd). Must be at least 1 day in the future and no more than 6 months from the current date. - **-h, --help** - Optional - Display information on how to use this EdgeKV command. ``` -------------------------------- ### Set Default EdgeKV Namespace Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Configure the default EdgeKV namespace for subsequent CLI commands. Use `akamai edgekv config set namespace `. ```bash akamai edgekv config set namespace my-namespace ``` -------------------------------- ### EdgeKV Item CRUD Operations Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Perform Create, Read, Update, and Delete operations on EdgeKV items within a namespace and group. Supports writing JSON, reading from sandbox environments, deleting items, and listing items or groups with pagination. ```bash akamai edgekv write text staging my-namespace my-group user-123 '{"name":"Alice","role":"admin"}' ``` ```bash akamai edgekv write text staging my-namespace my-group user-123 '{"name":"Alice"}' \ --sandboxId my-sandbox-id ``` ```bash akamai edgekv read item staging my-namespace my-group user-123 ``` ```bash akamai edgekv read item staging my-namespace my-group user-123 --sandboxId my-sandbox-id ``` ```bash akamai edgekv delete item staging my-namespace my-group user-123 ``` ```bash akamai edgekv list items staging my-namespace my-group ``` ```bash akamai edgekv list items staging my-namespace my-group --maxItems 50 ``` ```bash akamai edgekv list groups staging my-namespace ``` -------------------------------- ### List Permission Groups Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Lists permission groups with EdgeKV access. Can filter by group ID or include EdgeWorkers groups. ```bash edegkv list auth-groups --groupId gid1,gid2 --include_ew_groups ``` -------------------------------- ### Global Options for Akamai EdgeWorkers CLI Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Control authentication, output format, and behavior using global flags with `akamai edgeworkers` commands. These options can be used with any `akamai edgeworkers` command. ```bash akamai edgeworkers --edgerc ~/.edgerc --section production list-ids ``` ```bash akamai edgeworkers --jsonout list-ids ``` ```bash akamai edgeworkers --json /tmp/output.json list-ids ``` ```bash akamai edgeworkers --debug list-ids ``` ```bash akamai edgeworkers --timeout 30 activate 12345 staging 1.0.0 ``` -------------------------------- ### Download EdgeWorker Revision Bundle Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Download the combined code bundle including all dependencies for a specific revision. The `dr` alias can be used for brevity. Use `--downloadPath` to specify a custom save location. ```bash akamai edgeworkers download-revision 12345 3-10 ``` ```bash akamai edgeworkers dr 12345 3-10 --downloadPath /tmp/revisions/ ``` -------------------------------- ### Retrieve Access Token Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Retrieves an EdgeKV access token. The token can be saved to a file or displayed directly. ```APIDOC ## Retrieve Access Token ### Description Retrieve an EdgeKV access token. ### Usage `akamai edgekv download token --save_path= --overwrite` ### Arguments - **tokenName** (string) - Required - The name of the token to retrieve. ### Options - **--save_path** (string) - Optional - Path specifying where to save the edgekv_tokens.js token file. If a path is not provided the token value is displayed and must be securely stored manually. - **-o, --overwrite** - Optional - Overwrites the value of an existing token with the same name in the edgekv_tokens.js file. - **-h, --help** - Optional - Display information on how to use this EdgeKV command. ``` -------------------------------- ### View EdgeWorker Revision Bill of Materials (BOM) Source: https://context7.com/akamai/cli-edgeworkers/llms.txt View the Bill of Materials for a composite EdgeWorker revision. Supports including active version information. ```bash # View the Bill of Materials (BOM) for a composite revision akamai edgeworkers get-revision-bom 12345 3-10 ``` ```bash # BOM with active version info akamai edgeworkers gb 12345 3-10 --activeVersions --currentlyPinnedRevisions ``` -------------------------------- ### List EdgeWorker Revision Activations Source: https://context7.com/akamai/cli-edgeworkers/llms.txt List revision-level activation records for an EdgeWorker. Supports filtering by version and network, and JSON output. ```bash # List all revision activations akamai edgeworkers list-revision-activations 12345 ``` ```bash # Filter by version and network akamai edgeworkers lra 12345 --versionId 1.0.1 --network PRODUCTION ``` ```bash # JSON output akamai edgeworkers --jsonout lra 12345 ``` -------------------------------- ### List EdgeWorker Versions Source: https://context7.com/akamai/cli-edgeworkers/llms.txt View all uploaded versions for a given EdgeWorker ID. The `lv` alias can be used for brevity. Use `--jsonout` for automation. ```bash akamai edgeworkers list-versions 12345 ``` ```bash akamai edgeworkers lv 12345 1.0.1 ``` ```bash akamai edgeworkers --jsonout list-versions 12345 ``` -------------------------------- ### Compare EdgeWorker Revisions Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Compare dependency differences between two specified EdgeWorker revisions. ```bash # Compare dependency differences between two revisions akamai edgeworkers compare-revisions 12345 3-10 3-11 ``` -------------------------------- ### Overwrite Existing EdgeKV Token in Bundle Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Update an existing EdgeKV token within a code bundle. Use the `--overwrite` flag to replace the current token. ```bash akamai edgekv create token my-token \ --staging allow --production allow --ewids all \ --expiry 2026-01-01 --namespace "my-namespace+rwd" \ --save_path ./src/my-edgeworker/ --overwrite ``` -------------------------------- ### List EdgeWorker Revisions Source: https://context7.com/akamai/cli-edgeworkers/llms.txt List all revisions for an EdgeWorker. Supports filtering by network, version, and pinning status. ```bash # List all revisions for an EdgeWorker akamai edgeworkers list-revisions 12345 ``` ```bash # Filter revisions by network and version akamai edgeworkers lr 12345 --network STAGING --versionId 1.0.1 ``` ```bash # Show only currently pinned revisions akamai edgeworkers list-revisions 12345 --currentlyPinned ``` -------------------------------- ### Modify EdgeKV Database Data Access Policy Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Adjust the database-level data access policy for EdgeKV. Use `--dataAccessPolicy` to configure settings like `restrictDataAccess` and `allowNamespacePolicyOverride`. ```bash akamai edgekv modify db \ --dataAccessPolicy "restrictDataAccess=false,allowNamespacePolicyOverride=true" ``` -------------------------------- ### Set/Update a Default Value in Config File Section Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Sets or updates a specific default property value within a config file section. ```bash akamai config set ``` -------------------------------- ### Remove EdgeKV Default Configuration Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Unset a specific EdgeKV configuration default, like the sandbox ID. Use `akamai edgekv config unset `. ```bash akamai edgekv config unset sandboxId ``` -------------------------------- ### Register a New EdgeWorker ID Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Create a new EdgeWorker identifier. Use the `register` or `create-id` command. Interactive prompts assist with contract and resource tier selection if `--resourceTierId` is not provided. JSON output is supported. ```bash akamai edgeworkers register 54321 "My EdgeWorker" ``` ```bash akamai edgeworkers create-id 54321 "My EdgeWorker" --resourceTierId 200 ``` ```bash akamai edgeworkers --jsonout register 54321 "My EdgeWorker" --resourceTierId 200 ``` -------------------------------- ### Set Default EdgeKV Sandbox ID Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Set the default sandbox ID for EdgeKV operations. This is configured using `akamai edgekv config set sandboxId `. ```bash akamai edgekv config set sandboxId my-sandbox-id ``` -------------------------------- ### Uninstall and Reinstall EdgeWorkers CLI Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md If updating the EdgeWorkers CLI fails, uninstall it first to resolve 'Package directory already exists' errors, then reinstall. ```bash akamai uninstall edgeworkers ``` ```bash akamai install edgeworkers ``` -------------------------------- ### Modify Auth Group for EdgeKV Namespace Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Change the authentication group associated with a specific EdgeKV namespace. This command allows for dynamic access control adjustments. ```bash akamai edgekv modify auth-group my-namespace 99999 ``` -------------------------------- ### Configure Default EdgeWorkers Properties Source: https://github.com/akamai/cli-edgeworkers/blob/master/README.md Set default properties for EdgeWorkers CLI commands by creating a config file or using the 'config set' command. ```bash [default] edgeworkerName=testEW groupId=12345 versionId=1-0-2 ``` ```bash akamai edgeworkers config set ``` -------------------------------- ### Check EdgeWorker Activation Status Source: https://context7.com/akamai/cli-edgeworkers/llms.txt List activation records for an EdgeWorker, with optional filters. The `status` and `list-activations` commands can be used interchangeably. Filter by version ID or network, and show only currently active versions. ```bash akamai edgeworkers status 12345 ``` ```bash akamai edgeworkers list-activations 12345 --versionId 1.0.1 ``` ```bash akamai edgeworkers status 12345 --activeOnNetwork --network PRODUCTION ``` -------------------------------- ### List EdgeWorkers Permission Groups Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Retrieve EdgeWorkers access capabilities per Luna Access Control Group. Use `list-groups` or `lg` to determine the correct `groupId` for registering new EdgeWorkers. JSON output is available for automation. ```bash akamai edgeworkers list-groups ``` ```bash akamai edgeworkers lg 54321 ``` ```bash akamai edgeworkers --jsonout list-groups ``` -------------------------------- ### Activate EdgeWorker Version Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Activate an EdgeWorker version on STAGING or PRODUCTION networks. The `av` alias can be used for brevity. By default, the initial revision is auto-pinned on production activation. Set `--auto-pin false` to disable this. ```bash akamai edgeworkers activate 12345 staging 1.0.1 ``` ```bash akamai edgeworkers av 12345 production 1.0.1 ``` ```bash akamai edgeworkers activate 12345 staging 1.0.1 --auto-pin false ``` -------------------------------- ### Set EdgeWorker Log Level Override (Production) Source: https://github.com/akamai/cli-edgeworkers/blob/master/README.md Sets a temporary log level override for a specific EdgeWorker on the production network. The override expires after a specified duration. Ensure the EdgeWorker identifier, network, and level are correct. ```bash ./akamai-edgeworkers log-level set 654321 production info --expires 1h ``` -------------------------------- ### Refresh EdgeKV Access Token Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Refreshes an existing EdgeKV Enhanced Token Workflow access token. Requires the token name. ```bash akamai edgekv refresh token ``` -------------------------------- ### Refresh EdgeKV Token Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Extend the expiry date or update permissions of an existing EdgeKV token. This command helps in maintaining active access without creating a new token. ```bash akamai edgekv refresh token my-token ``` -------------------------------- ### List EdgeWorker IDs Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Enumerate all registered EdgeWorker identifiers using `list-ids` or `li`. Results can be filtered by group or resource tier, or by partner status. Details for a specific EdgeWorker ID can also be retrieved. ```bash akamai edgeworkers list-ids ``` ```bash akamai edgeworkers li --groupId 54321 ``` ```bash akamai edgeworkers li --resourceTierId 200 ``` ```bash akamai edgeworkers list-ids 12345 ``` ```bash akamai edgeworkers li --isPartner true ``` -------------------------------- ### List Revision activations of an EdgeWorker Source: https://github.com/akamai/cli-edgeworkers/blob/master/README.md List Revision Activation status of a given EdgeWorker ID. You may not provide both the Version and the Activation identifiers. Network must be either STAGING or PRODUCTION. ```APIDOC ## List Revision activations of an EdgeWorker ### Description List Revision Activation status of a given EdgeWorker ID. ### Usage `akamai edgeworkers list-revision-activations [options] ` ### Options - `-h, --help`: output usage information - `--versionId `: Version Identifier - `--activationId `: Activation Identifier - `--network `: Limits the results to versions that were activated on a specific network (STAGING or PRODUCTION) ### Arguments - **edgeworker-identifier** (integer) - Required - A unique integer handle to an EdgeWorkers instance ### Key Details 1. You may not provide both the Version and the Activation identifiers. 2. Network must be either STAGING or PRODUCTION. Capitalization will be normalized to uppercase. ``` -------------------------------- ### Generate Secret Key for EdgeWorkers Debugging Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Generates a random 32-byte hex secret key for use with `PMUSER_EW_DEBUG_KEY` or for generating auth tokens. Supports JSON output. ```bash akamai edgeworkers generate-secret ``` ```bash akamai edgeworkers --jsonout generate-secret ``` -------------------------------- ### Set EdgeWorker Log Level Override (Staging with Timestamp) Source: https://github.com/akamai/cli-edgeworkers/blob/master/README.md Sets a temporary log level override for a specific EdgeWorker on the staging network, expiring at a precise date and time. The `--expires` option supports natural language and standard timestamps, referencing the chrono package for details. Ensure the EdgeWorker identifier, network, and level are correct. ```bash ./akamai-edgeworkers log-level set 654321 staging trace --expires "2024-08-13T15:00+02:00" ``` -------------------------------- ### Clone EdgeWorker Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Clone an existing EdgeWorker to a different resource tier, optionally changing its group and name. ```bash # Clone EdgeWorker 12345 to resource tier 300 akamai edgeworkers clone 12345 300 ``` ```bash # Clone with a new name and target group akamai edgeworkers clone 12345 300 --ewName "Cloned EdgeWorker" --groupId 99999 ``` -------------------------------- ### Generate Debug Authentication Token for EdgeWorkers Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Generates a short-lived JWT for `Akamai-EW-Trace` headers to enable detailed EdgeWorker debug response headers. Supports specifying expiry time and output format. ```bash akamai edgeworkers create-auth-token example.com ``` ```bash akamai edgeworkers auth example.com --expiry 60 ``` ```bash akamai edgeworkers auth example.com --format curl ``` ```bash TOKEN=$(akamai edgeworkers auth example.com --expiry 30 | grep "Akamai-EW-Trace:" | head -1) curl -H "$TOKEN" https://example.com/path ``` -------------------------------- ### Save EdgeKV Token Directly into Code Bundle Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Embed an EdgeKV token directly into your EdgeWorker code bundle for co-location of credentials and code. Use `--save_path` to specify the location within the bundle. ```bash akamai edgekv create token my-token \ --staging allow \ --production allow \ --ewids all \ --expiry 2025-12-31 \ --namespace "my-namespace+rwd" \ --save_path ./src/my-edgeworker/ ``` -------------------------------- ### Unset a Default Value in Config File Section Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Removes a specific default property value from a config file section. ```bash akamai config unset ``` -------------------------------- ### Update EdgeWorkers CLI Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Use this command to update to the latest EdgeWorkers CLI package, ensuring you have the most recent EdgeKV features. ```bash akamai update edgeworkers ``` -------------------------------- ### Modify Permission Group Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Modifies the permission group associated with a namespace. ```bash edgekv modify auth-group ``` -------------------------------- ### Manage EdgeWorker Log Level Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Dynamically control the logging verbosity for an EdgeWorker on a specific network. Supports setting levels with expiry times and Datastream 2 IDs. ```bash # Set log level to DEBUG on staging (never expires) akamai edgeworkers log-level set 12345 staging debug ``` ```bash # Set log level with an expiry time (natural language supported) akamai edgeworkers log-level set 12345 production info --expires "+2h" akamai edgeworkers log-level set 12345 staging warn --expires "Next Saturday" akamai edgeworkers log-level set 12345 production error --expires "2024-06-01T00:00:00Z" ``` ```bash # Set log level with a Datastream 2 ID akamai edgeworkers log-level set 12345 staging trace --ds2Id 98765 ``` ```bash # Get current log level for an EdgeWorker akamai edgeworkers log-level get 12345 ``` ```bash # Get a specific logging configuration by ID akamai edgeworkers log-level get 12345 abc-logging-id-123 ``` -------------------------------- ### Re-activate EdgeWorker Revision Source: https://context7.com/akamai/cli-edgeworkers/llms.txt Re-activate a specific EdgeWorker revision, optionally adding a note. ```bash # Re-activate a specific revision akamai edgeworkers activate-revision 12345 3-10 --note "Rolling back due to regression" ``` -------------------------------- ### Modify Database Data Access Policy Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Modifies the EdgeKV database data access policy. This change only affects namespaces created after the policy is applied. ```APIDOC ## Modify Database Data Access Policy ### Description Modify the EdgeKV database data access policy. This option does not change the data access policy for existing namespaces. It only applies to namespaces created after you successfully apply this option. The `EdgeKV Database Data Access Policy - Manage` role is required to modify the database data access policy. ### Usage `akamai edgekv modify db --dataAccessPolicy ` ### Example `akamai edgekv modify db --dataAccessPolicy='restrictDataAccess=true,allowNamespacePolicyOverride=false'` ### Options #### Optional - **-h, --help** (boolean) - Display information on how to use this EdgeKV command - **--dataAccessPolicy** (string) - Required. Set the data access policy. `restrictDataAccess`: If set to true, the database can only access data from Akamai's Enhanced TLS network. If set to false, the database can access data from both Akamai's Enhanced TLS and Standard TLS networks. If you set this option to false your account needs to have `EdgeDB::Standard_TLS_Support` entitlement. `allowNamespacePolicyOverride`: If set to true, the database data access policy can be overridden when the namespace is created. If set to false, data access policy overrides are not accepted. ``` -------------------------------- ### Refresh Access Token Source: https://github.com/akamai/cli-edgeworkers/blob/master/docs/edgekv_cli.md Refreshes an existing EdgeKV Enhanced Token Workflow access token. ```APIDOC ## Refresh Access Token ### Description Refreshes an EdgeKV Enhanced Token Workflow access token. ### Usage `akamai edgekv refresh token ` ### Arguments - **tokenName** (string) - Required - The name of the token to refresh. ```