Update a sandbox with the CLI
Make changes to your sandbox.
This step assumes you are modifying an existing sandbox.
Before you begin
Once you have created a sandbox you can update it with the CLI. Use the
updatecommand to make the sandbox clonable, change the sandbox name, or modify the request hostnames for the sandbox.
Note: A request hostname is the hostname that the sandbox responds to when you enter it in your browser. For example, if you have a property configuration for www.example.com, you can create a sandbox based on that property but change the request hostname in your development environment to localhost or a series of other hostnames you want to use for testing.
Use this command:
update [options]Note: The update command will execute against the currently active sandbox. Run the
sandbox showcommand to see details for the current sandbox. If you want to update a different sandbox, include
[sandbox-identifier]in the command line.
Include the syntax for the modification you want to apply.
Update sandbox options Syntax Description -r, --rules <file> Rule tree associated with the property. -c, --clonable <boolean> Indicates whether sandbox can be replicated by other developers. -C, --cpcode <cpcode> CP code for sandbox. Unique identifier used for billing and reporting. -n, --name <string> Name of sandbox. -H, --requesthostnames <string> Comma-delimited list of request hostnames within the sandbox. --recipe <path> Path to JSON file that includes customizable sandbox templates. -h, --help Display usage information.
These code snippets are examples of options for updating a sandbox:
- Update the rule tree within a
sandbox.You can Use Property Manager to edit rules and quickly create JSON syntax for the logic you want to
test. For this example, the rule tree is in a file called
akamai sandbox update --rules ~/<path-to-rules>/example.json
- Update the request hostnames within a sandbox to a hostname you want to
use in your development
akamai sandbox update --requesthostnames localhost,dev.example.com
- Update the sandbox to make it
akamai sandbox update --clonable true
Review the Sandbox CLI READ ME for a complete list of commands and usage.