### Example: Create New Pipeline Using Product Template (Ion) Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Example of creating a new pipeline based on the Ion product (SPM), specifying contract, group, product IDs, pipeline name, and environment names. ```bash akamai pipeline new-pipeline -c 1-23ABC -g 12345 -d SPM -p MyPipeline123 qa prod ``` -------------------------------- ### Example: Create New Pipeline Using Property Template Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Example of creating a new pipeline based on an existing property, specifying the pipeline name, property identifier, and environment names. ```bash akamai pipeline new-pipeline -p MyPipeline123 -e www.example.com qa prod ``` -------------------------------- ### Install Node.js LTS Version Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Use NVM to install and use the Long Term Support (LTS) version of Node.js. Ensure Node.js is installed before proceeding with Akamai CLI setup. ```bash nvm install --lts ``` ```bash nvm use --lts ``` -------------------------------- ### Install Akamai Property Manager CLI Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Install the Property Manager CLI using the Akamai CLI tool. This command assumes the Akamai CLI is already installed and configured. ```bash akamai install property-manager ``` -------------------------------- ### Set Environment-Specific Variable Values in Variables.json (QA) Source: https://github.com/akamai/cli-property-manager/wiki/Promotional-Deployment-CLI-FAQ.rdoc Configure the 'cachestore' variable for the QA environment in its specific Variables.json file. This example sets it to 'NO_STORE'. ```json { "cpCode": null, "originHostname": "www.example.com", "cachestore" "NO_STORE" } ``` -------------------------------- ### Forward Rewrite Cloudlet Behavior Example Source: https://github.com/akamai/cli-property-manager/blob/master/README.md This is an example of the Forward Rewrite Cloudlet behavior configuration. It shows the basic structure with an 'enabled' field. ```json { "name": "forwardRewrite", "options": { "enabled": true, "cloudletPolicy": { "id": 12345, "name": "some policy name" } } } ``` -------------------------------- ### Set Environment-Specific Variable Values in Variables.json (Dev) Source: https://github.com/akamai/cli-property-manager/wiki/Promotional-Deployment-CLI-FAQ.rdoc Configure the 'cachestore' variable for the development environment in its specific Variables.json file. This example sets it to 'Cache'. ```json { "cpCode": null, "originHostname": "www.example.com", "cachestore" "Cache" } ``` -------------------------------- ### Project.setupPropertyTemplate Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Sets up templates and variable definitions based on a conversion instruction file. Each product requires its own set of rules. ```APIDOC ## project.setupPropertyTemplate() ### Description Sets up templates and variable definitions based on a conversion instruction file. Each product needs its own set of rules. ### Method Instance method of Project ### Response #### Success Response (Promise) - Resolves when templates and variable definitions are set up. ``` -------------------------------- ### Project.createProjectFolders Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Sets up pipeline and environment folders for the project. ```APIDOC ## project.createProjectFolders(productId, contractId, groupId, environmentNames) ### Description Sets up pipeline and environment folders for the project. ### Method Instance method of Project ### Parameters #### Path Parameters - **productId** (any) - Description not provided. - **contractId** (any) - Description not provided. - **groupId** (any) - Description not provided. - **environmentNames** (any) - Description not provided. ### Request Example ```json { "productId": "12345", "contractId": "ABCDE", "groupId": "group-1", "environmentNames": ["staging", "production"] } ``` ### Response #### Success Response - Description not provided. ``` -------------------------------- ### Project.createProjectSettings Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Sets up the projectInfo.json file for the project. ```APIDOC ## project.createProjectSettings() ### Description Sets up the projectInfo.json file. ### Method Instance method of Project ### Response #### Success Response - Description not provided. ``` -------------------------------- ### createDevOps~getOrCreate(name, createFunction) Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Gets or creates a named component within the DevOps factory. This might be redundant if PAPI is cached. ```APIDOC ## createDevOps~getOrCreate(name, createFunction) ### Description Gets or creates a named component within the DevOps factory. This might be redundant if PAPI is cached. ### Method Inner method of [createDevOps](#createDevOps) ### Parameters #### Path Parameters - **name** - Description not available - **createFunction** - Description not available ``` -------------------------------- ### Project.new Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Initializes a new Project instance, representing the data model for the pipeline responsible for storage operations. ```APIDOC ## new Project(projectName, dependencies) ### Description Initializes a new Project instance. ### Method Constructor for the Project class. ### Parameters #### Path Parameters - **projectName** (any) - Description not provided. - **dependencies** (object) - Optional. Includes mandatory DevOps instance, elClass, and utilsClass. ### Request Example ```json { "projectName": "my-project", "dependencies": { "elClass": "some-el-class", "utilsClass": "some-utils-class" } } ``` ### Response #### Success Response - A new Project instance. ``` -------------------------------- ### Property Manager CLI General Help Source: https://github.com/akamai/cli-property-manager/blob/master/docs/cli_pm_commands_help.md Displays general help information for the Property Manager CLI, including usage syntax, available options, and a list of commands. ```bash Usage: akamai property-manager [options] [command] Property Manager CLI. Run these commands from the project directory that contains your local properties. Options: -V, --version output the version number -f, --format Select output format for commands, either 'table', the default, or 'json'. -s, --section
The section of the .edgerc file containing the user profile, or client ID, to use for the command. If not set, uses the 'default' settings in the .edgerc file. -v, --verbose Show detailed log information for the command. --edgerc Optional. Enter the location of the .edgerc file used for credentials. If option not set, uses the edgerc.config file in the project directory. Otherwise, uses the .edgerc file in your home directory. --workspace Optional. Enter the directory containing all property and project files. If option not set, uses the value of the AKAMAI_PROJECT_HOME environment variable. Otherwise, uses the current working directory as the workspace. -a, --accountSwitchKey Optional. If you have multiple accounts, enter the account switch key you want to use when running commands. You can use the Identity Management API to retrieve the key: https://developer.akamai.com/api/core_features/identity_management/v2.html#getaccountswitchkeys. -h, --help output usage information Commands: activate|atv [options] Activate the latest version of a property. By default, this command also executes the merge and save commands. activate-version [options] Activate a specific version of a property. Activates latest if no version specified. check-activation-status|cs [options] Check the activation status of a property. create-cpcode [options] Create a new CP code. deactivate|datv [options] Deactivates a property. Checks if the property is active and then deactivates it. delete [options] Permanently deletes a property. You have to deactivate the property on both networks first. help help command hostname-update|hu [options] Updates hostnames assigned to this property. import|i [options] Import an existing property from Property Manager. list-contracts|lc List contracts available based on the current user credentials and setup. list-cpcodes|lcp [options] List CP codes available based on the current user credentials and setup. list-edgehostnames|leh [options] List edge hostnames available based on the contract ID and group ID provided. Use the list commands to retrieve the required IDs. May return a long list of hostnames. list-groups|lg List groups available based on the current user credentials (clientId). list-products|lp [options] List products available based on the current user credentials and contract ID. list-properties|lpr [options] List properties available based on the current user credentials and setup. list-property-hostnames|lph [options] List hostnames assigned to this property. list-property-rule-format|lprf [options] List the current rule format for the property. list-property-variables|lpv [options] List the property's variables. list-rule-formats|lrf Display the list of available rule formats. merge|m [options] Merge all property configuration files, or snippets, into a property rule tree file in JSON format. You can find the file in the property's dist folder. By default, this command also calls the Property Manager API to validate the rule tree generated. new-property|np [options] Create a new property using the attributes provided. Use the list commands to retrieve the required IDs. property-update [options] Create a new version of a property. Copy the rules from a file stream, using –-file, or from a different property, using --srcprop. save|sv [options] Saves the rule tree and hostnames for the selected property. This command calls the Property Manager API to validate the rule tree, and creates edge hostnames if needed. search|s Search for a property by name. Be sure to enter the exact name as wildcards aren't supported. ``` -------------------------------- ### Show Pipeline Status Source: https://github.com/akamai/cli-property-manager/blob/master/docs/pipeline_commands_help.md Lists the status of each environment within the selected pipeline. Use this to get an overview of the pipeline's current state. ```bash Usage: akamai pipeline list-status|lstat [options] Show status of the pipeline. Options: -p, --pipeline Pipeline name. -h, --help output usage information © 2017-2020 Akamai Technologies, Inc. All rights reserved Visit http://github.com/akamai/cli-property-manager for more documentation ``` -------------------------------- ### Show Property Rule Tree Source: https://github.com/akamai/cli-property-manager/blob/master/docs/cli_pm_commands_help.md Download and display a property's rule tree for a selected environment. Optionally specify a property name, version, and output file. ```bash Usage: akamai property-manager show-ruletree|sr [options] Shows the rule tree for the selected environment. Options: -p, --property Property name. Optional if a default property was set using the set-default command. --propver Optional. Enter a property version. Uses latest version if not specified. --file Optional. Enter a filename to save the command output to. The output is in JSON format. -h, --help output usage information © 2017-2020 Akamai Technologies, Inc. All rights reserved Visit http://github.com/akamai/cli-property-manager for more documentation ``` -------------------------------- ### Environment Constructor Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Initializes a new Environment object. ```APIDOC ## new Environment(envName, dependencies) ### Description Represents an environment in a devops pipeline. ### Parameters #### Path Parameters - **envName** (string) - Name of environment - **dependencies** (object) - project, getPapi, getTemplate, getMerger are mandatory and envInfo optional ``` -------------------------------- ### Pipeline Folder Structure Overview Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Illustrates the typical folder and file structure created for a new pipeline, including directories for environments, templates, and configuration files. ```text pipeline_name/ projectInfo.json /cache /dist /environments variableDefinitions.json /environment1_name envInfo.json hostnames.json variables.json ... /environment2_name envInfo.json hostnames.json variables.json ... /templates main.json compression.json ... static.json ``` -------------------------------- ### Check Pipeline Promotion Status Source: https://github.com/akamai/cli-property-manager/blob/master/docs/pipeline_commands_help.md Checks the activation status of a promotion that has been started for a selected environment. If the underlying property activation is complete, the environment is considered promoted. ```bash Usage: akamai pipeline check-promotion-status|cs [options] For the selected environment, check the activation status. If the underlying property activation is complete, the environment is considered promoted. Options: -p, --pipeline Pipeline name. Optional if default pipeline was set using the set-default command. -w, --wait-for-activate Prevents you from entering more commands until promotion is complete. May take several minutes. -h, --help output usage information © 2017-2020 Akamai Technologies, Inc. All rights reserved Visit http://github.com/akamai/cli-property-manager for more documentation ``` -------------------------------- ### createDevOps~getProject(projectName, expectExists) Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Creates and returns a Project instance. Throws an error if expectExists is true and the project does not exist. ```APIDOC ## createDevOps~getProject(projectName, expectExists) ### Description Creates and returns a Project instance. Throws an error if expectExists is true and the project does not exist. ### Method Inner method of [createDevOps](#createDevOps) ### Parameters #### Path Parameters - **projectName** (string) - Description not available - **expectExists** (boolean) - Optional - Defaults to true ``` -------------------------------- ### Create New Pipeline Using Product Template Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Command to create a new pipeline using a specific product as a template. Requires contract, group, and product IDs, along with the desired pipeline name and environment names. ```bash akamai pipeline new-pipeline -c -g -d -p ``` -------------------------------- ### List Available Contracts Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Verify your OPEN API permissions by listing the contracts you have access to. This command helps confirm that the CLI is set up correctly for Property Manager operations. ```bash akamai property-manager list-contracts ``` -------------------------------- ### prepareEdgeGridConfig(devopsSettings, dependencies) Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Prepares the EdgeGrid configuration based on provided DevOps settings and dependencies. ```APIDOC ## prepareEdgeGridConfig(devopsSettings, dependencies) ### Description Prepares the EdgeGrid configuration based on provided DevOps settings and dependencies. ### Method Global function ### Parameters #### Path Parameters - **devopsSettings** - Description not available - **dependencies** - Description not available ``` -------------------------------- ### Create New Pipeline Source: https://github.com/akamai/cli-property-manager/blob/master/docs/pipeline_commands_help.md Use this command to create a new pipeline for distributing properties across environments. You must provide a pipeline name, environment names, and contract/group/product IDs. Existing properties can be used as blueprints. ```bash Usage: akamai pipeline new-pipeline|np [options] Create a new pipeline with provided attributes. You need a name for the pipeline, one or more environment names, and IDs for contract, group, and product. Separate each environment name with a space. Use the list commands to retrieve these IDs. This command creates one property for each environment. Options: -c, --contractId Enter the contract ID to use. If used with the -e option, the CLI takes the contract value from the template property. -d, --productId Enter the product ID to use. Optional if using -e with a property ID or name. -e, --propertyId Optional. Use an existing property as the blueprint for new pipeline properties. Enter a property ID or an exact property name. The CLI looks up the group ID, contract ID, and product ID of the existing property and uses that information to create properties for the pipeline. -g, --groupIds Enter the group IDs for the environments. Optional if using -e with a property ID or name. Provide one group ID if all environments are in the same group. If each environment needs to be in its own group, add a separate -g option for each environment and in the order the environments are listed in. (default: []) -n, --propver Add only if using a property as a template. Enter the version of the existing property to use as the blueprint. The CLI uses latest version if omitted. -p, --pipeline Pipeline name --associate-property-name Use an existing property with the new pipeline. When using, make sure your entry matches the property name exactly. --custom-property-name Give the existing property a custom name used only with the pipeline. --dry-run Add only if using a property as a template. Displays the JSON generated by the current command as currently written. --insecure Makes all new environment properties HTTP, not secure HTTPS. --retry Use if the command failed during execution. Tries to continue where the command left off. --secure Makes new pipeline and all environment properties use secure HTTPS. --variable-mode If creating a pipeline from an existing property, choose how your new pipeline will pull in variables from that property. Allowed values are ${printAllowedModes()}. -h, --help output usage information © 2017-2020 Akamai Technologies, Inc. All rights reserved Visit http://github.com/akamai/cli-property-manager for more documentation ``` -------------------------------- ### environment.promote Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Promotes the environment to the Akamai network by activating the underlying property. This operation is asynchronous. ```APIDOC ## environment.promote(network, emails) ### Description Promote environment to Akamai network by activating the underlying property. ### Parameters #### Path Parameters - **network** (string) - Required - The target network, must be exactly "STAGING" or "PRODUCTION". - **emails** (list) - Required - A list of email addresses to notify. ### Returns - `Promise<{envInfo: *, pending: {network: *, activationId: Number}}>` - A promise that resolves with environment information and pending activation details. ``` -------------------------------- ### Akamai Pipeline CLI Usage Source: https://github.com/akamai/cli-property-manager/blob/master/docs/pipeline_commands_help.md Displays the general usage and available options for the Akamai Pipeline CLI. Use this to understand the command structure and global options. ```bash Usage: akamai pipeline [options] [command] Akamai Pipeline. Run these commands from the directory that contains all of your pipelines. Options: -V, --version output the version number -f, --format Select output format for commands, either 'table', the default, or 'json'. -s, --section
The section of the .edgerc file that contains the user profile, or client ID, to use for the command. If not set, uses the `default` settings in the .edgerc file. -v, --verbose Show detailed log information for the command. --edgerc Optional. Enter the location of the edgerc.config file used for credentials. If not set, uses the .edgerc file in the project directory if present. Otherwise, uses the .edgerc file in your home directory. --workspace Optional. Enter the directory containing all property and project files. If not set, uses the value of the AKAMAI_PROJECT_HOME environment variable if present.Otherwise, uses the current working directory as the workspace. -a, --accountSwitchKey Optional. Enter the account switch key you want to use when running commands. Using this option overwrites the default account. You can use the Identity Management API to retrieve keys: https://developer.akamai.com/api/core_features/identity_management/v2.html#getaccountswitchke -h, --help output usage information Commands: change-ruleformat|crf [options] [environments...] Change the property rule format used by a pipeline or an environment. Enter a space-separated list of environments after the pipeline name to update a subset of environments. check-promotion-status|cs [options] For the selected environment, check the activation status. If the underlying property activation is complete, the environment is considered promoted. help help command list-contracts|lc List contracts available based on current user credentials and setup. list-cpcodes|lcp [options] List CP codes available based on the current user credentials and setup. list-edgehostnames|leh [options] List edge hostnames available based on the contract ID and group ID provided. Use the list commands to retrieve the required IDs. May return a long list of hostnames. list-groups|lg List groups available based on the current user credentials and setup. list-products|lp [options] List products available based on contract ID, client ID, and the current user credentials and setup. list-properties|lpr [options] List properties available based on the current user credentials and setup. list-property-hostnames|lph [options] List hostnames assigned to this property. list-property-rule-format|lprf [options] List the current rule format for the property. list-property-variables|lpv [options] List the property's variables. list-rule-formats|lrf Display the list of available rule formats. list-status|lstat [options] Show status of the pipeline. merge|m [options] Merge the pipeline property's template JSON and variable values into a rule tree file. The system stores the resulting JSON file in the pipeline's /dist folder. new-pipeline|np [options] Create a new pipeline with provided attributes. You need a name for the pipeline, one or more environment names, and IDs for contract, group, and product. Separate each environment name with a space. Use the list commands to retrieve these IDs. This command creates one property for each environment. promote|pm [options] Promote, or activate, an environment. By default, this command also executes the merge and save commands. save|sv [options] Save rule tree and hostnames for the environment you select. This command calls PAPI to validate the rule tree, and creates edge hostnames if needed. search|s Search for a property by name. Be sure to enter the exact name as wildcards aren't supported. set-default|sd [options] Set the default pipeline and the default section of the .edgerc file to use. ``` -------------------------------- ### Save and Validate Property Configuration Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Save your configuration changes, validate the configuration, and create a new property version. This is a crucial step before promoting changes. ```bash akamai pipeline save -p ``` -------------------------------- ### Environment.promote Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Promotes the environment to a specified network with optional email notifications. ```APIDOC ## environment.promote(network, emails) ### Description Promotes the environment to a specified network. ### Method instance method of Environment ### Parameters #### Path Parameters - **network** (any) - The network to promote to. - **emails** (any) - Optional list of emails for notifications. ### Returns - `Promise<{envInfo: *, pending: {network: *, activationId: Number}}>` - A promise that resolves with environment info and pending promotion details. ``` -------------------------------- ### Environment.loadTemplateConverterRules Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Retrieves product-specific converter rules to convert PAPI ruletree into template and variable definitions. ```APIDOC ## environment.loadTemplateConverterRules() ### Description Retrieve product specific converter rule to convert PAPI ruletree into template and variable defs. ### Method instance method of Environment ### Returns - `*` - Product specific converter rules. ``` -------------------------------- ### List Product IDs for Pipeline Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Run this command to retrieve a list of product IDs, which are necessary when creating a pipeline based on a specific product. The IDs returned depend on your user permissions. ```bash akamai pipeline list-products -c ``` -------------------------------- ### Create New Property with Akamai CLI Source: https://github.com/akamai/cli-property-manager/blob/master/docs/cli_pm_commands_help.md Use this command to create a new property. You can specify contract, product, and group IDs, or use an existing property as a blueprint. Optional flags allow for dry runs, insecure HTTP, retries, secure HTTPS, variable mode configuration, and disabling local directory creation. ```bash akamai property-manager new-property|np [options] ``` -------------------------------- ### List Pipeline Products Source: https://github.com/akamai/cli-property-manager/blob/master/docs/pipeline_commands_help.md Lists available products based on your client ID and a selected contract ID. This command requires a contract ID to filter the available products. ```bash Usage: akamai pipeline list-products|lp [options] List products available based on contract ID, client ID, and the current user credentials and setup. Options: -c, --contractId Contract ID. A contract has a fixed term of service during which specified Akamai products and modules are active. -h, --help output usage information © 2017-2020 Akamai Technologies, Inc. All rights reserved Visit http://github.com/akamai/cli-property-manager for more documentation ``` -------------------------------- ### Create New Pipeline Using Property Template Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Command to create a new pipeline using an existing property as a template. Requires the pipeline name, property ID or name, and environment names. Ensure custom user variables are handled. ```bash akamai pipeline new-pipeline -p -e ``` -------------------------------- ### Show Default Settings Source: https://github.com/akamai/cli-property-manager/blob/master/docs/cli_pm_commands_help.md Displays the current default settings for the workspace, including the default property and default section name, as stored in the snippetSettings.json file. ```bash Usage: akamai property-manager show-defaults|sf [options] Displays the current default settings for this workspace. Options: -h, --help output usage information © 2017-2020 Akamai Technologies, Inc. All rights reserved Visit http://github.com/akamai/cli-property-manager for more documentation ``` -------------------------------- ### Environment.checkPromotions Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Checks the status of environment promotions. ```APIDOC ## environment.checkPromotions() ### Description Checks the status of environment promotions. ### Method instance method of Environment ### Returns - `Promise<{}>` - A promise that resolves with promotion status information. ``` -------------------------------- ### Show Pipeline Defaults Source: https://github.com/akamai/cli-property-manager/blob/master/docs/pipeline_commands_help.md Displays the current default pipeline and section settings for the workspace. This command reads configuration from the devopsSettings.json file. ```bash Usage: akamai pipeline show-defaults|sf [options] Displays the current default settings for this workspace. Options: -h, --help output usage information © 2017-2020 Akamai Technologies, Inc. All rights reserved Visit http://github.com/akamai/cli-property-manager for more documentation ``` -------------------------------- ### Environment.save Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Saves the current environment configuration. ```APIDOC ## environment.save() ### Description Saves the current environment configuration. ### Method instance method of Environment ### Returns - `Promise` - A promise that resolves when the save is complete. ``` -------------------------------- ### environment.getHostnames Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Retrieves the list of hostnames configured for the environment. ```APIDOC ## environment.getHostnames() ### Description Return environment specific hostnames. ### Returns - `*` - Environment specific hostnames. ``` -------------------------------- ### environment.save Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Saves the environment-specific rule tree and hostnames. This operation first runs a merge. ```APIDOC ## environment.save() ### Description Save environment specific rule tree + hostnames. Runs merge first. ### Returns - `Promise` - A promise that resolves when the save operation is complete. ``` -------------------------------- ### Environment.createTemplate Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Creates a template based on the rule tree and variable values. ```APIDOC ## Environment.createTemplate(ruleTree, isNewProperty, variableValuesOnly) ### Description Creates a template. ### Method instance method of Environment ### Parameters #### Path Parameters - **ruleTree** (any) - The rule tree to use for creating the template. - **isNewProperty** (any) - Indicates if this is for a new property. - **variableValuesOnly** (any) - Specifies whether to only include variable values. ``` -------------------------------- ### Promote Pipeline Environment Source: https://github.com/akamai/cli-property-manager/blob/master/docs/pipeline_commands_help.md Activates, or promotes, a property within a specific environment. By default, this command also executes merge and save commands. Use this to deploy your property changes to a target environment. ```bash Usage: akamai pipeline promote|pm [options] Promote, or activate, an environment. By default, this command also executes the merge and save commands. Options: -e, --emails Optional. A comma-separated list of email addresses. If not used, sends updates to any default emails set using the set-default command. -p, --pipeline Pipeline name. Optional if default pipeline was set using the set-default command. -m, --message Enter a message describing changes made to the environment. --note Alias of --message. Enter a message describing changes made to the environment. -n, --network Network, either 'production' or 'staging'. You can shorten 'production' to 'prod' or 'p' and 'staging' to 'stage' or 's'. -w, --wait-for-activate Prevents you from entering more commands until promotion is complete. May take several minutes. --force Deprecated. Out-of-sequence activations are now allowed by default. -h, --help output usage information © 2017-2020 Akamai Technologies, Inc. All rights reserved Visit http://github.com/akamai/cli-property-manager for more documentation ``` -------------------------------- ### Environment.create Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Creates the property associated with this environment using PAPI. ```APIDOC ## environment.create(isInRetryMode) ### Description Creates the property associated with this environment using PAPI and stores the information in $DEVOPS_PROJECT_HOME///envInfo.json. ### Method instance method of Environment ### Parameters #### Path Parameters - **isInRetryMode** (boolean) - true if in retry mode. ``` -------------------------------- ### Project.getStatus Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Retrieves the project status, including project and environment details. ```APIDOC ## project.getStatus() ### Description Gets the project status by retrieving project and environment details. ### Method Instance method of Project ### Response #### Success Response - **Project and environment details** (object) - Contains the status information. ``` -------------------------------- ### Show Default Account for Akamai CLI (Shortcut) Source: https://github.com/akamai/cli-property-manager/blob/master/README.md This is a shortcut command to check the currently configured default account for Akamai CLI. ```bash akamai pl sf ``` -------------------------------- ### Project.exists Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Checks if the project exists on the filesystem. ```APIDOC ## project.exists() ### Description Checks if the project exists on the filesystem. ### Method Instance method of Project ### Response #### Success Response (boolean) - **true** if the project exists, **false** otherwise. ``` -------------------------------- ### OpenClient Class Methods Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Handles Akamai OPEN API requests using Edgegrid authentication. ```APIDOC ## openClient.prepare(method, path, body, headers) ### Description Prepares a request before sending it. ### Method instance method of OpenClient ### Parameters #### Path Parameters - **method** (string) - Description not provided - **path** (string) - Description not provided - **body** (any) - Description not provided - **headers** (Object) - Description not provided ### Response #### Success Response (200) - **example** (Object) - Description not provided ``` ```APIDOC ## openClient.request(method, path, body, headers, callback) ### Description Makes a REST request to the Akamai API. ### Method instance method of OpenClient ### Parameters #### Path Parameters - **method** (string) - Description not provided - **path** (string) - Description not provided - **body** (any) - Description not provided - **headers** (Object) - Description not provided - **callback** (any) - Description not provided ### Response #### Success Response (200) - **Promise** (Promise) - Description not provided ``` ```APIDOC ## openClient.requestRetry(method, path, body, headers, callback) ### Description Makes a REST request with retry logic. Considerations for retry conditions are noted. ### Method instance method of OpenClient ### Parameters #### Path Parameters - **method** (string) - Description not provided - **path** (string) - Description not provided - **body** (any) - Description not provided - **headers** (Object) - Description not provided - **callback** (any) - Description not provided ### Response #### Success Response (200) - **Promise<*>** (Promise) - Description not provided ``` -------------------------------- ### environment.loadPropertyData Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Loads the property rule tree data from the dist folder. ```APIDOC ## environment.loadPropertyData() ### Description Load ruletree from dist folder. ### Returns - `object` - The loaded property data object. ``` -------------------------------- ### devOps.promote Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Promotes an environment of a project to a specified network. It also takes an array of email addresses for notification. ```APIDOC ## devOps.promote(projectName, environmentName, network, emails) ### Description Promote environment of a project ### Method instance method ### Parameters #### Path Parameters - **projectName** (String) - Description not provided - **environmentName** (String) - Description not provided - **network** (String) - "STAGING" or "PRODUCTION" - **emails** (Array) - Description not provided ``` -------------------------------- ### Activate Property Environment Source: https://github.com/akamai/cli-property-manager/blob/master/docs/cli_pm_commands_help.md Activates the latest version of a property. By default, this command also executes merge and save commands. Use -w to wait for activation to complete. ```bash akamai property-manager activate|atv [options] ``` -------------------------------- ### Environment.merge Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Merges environment configurations. ```APIDOC ## environment.merge() ### Description Merges environment configurations. ### Method instance method of Environment ### Returns - `Promise` - A promise that resolves when the merge is complete. ``` -------------------------------- ### Promote Property Changes to a Network Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Promote saved changes to a specified Akamai network (STAGING or PROD). This command merges template and variables files, saves changes to Property Manager, and activates the property version. Notification emails can be sent using the -e flag. ```bash akamai pipeline promote -p -n -e ``` ```bash akamai pipeline promote -p MyPipeline123 -n STAGING -e jsmith@example.com qa ``` -------------------------------- ### Import Existing Property Source: https://github.com/akamai/cli-property-manager/blob/master/docs/cli_pm_commands_help.md Use this command to import an existing property from Property Manager into your local environment. The `--dry-run` option verifies syntax before execution. You can control variable import behavior with `--variable-mode`. ```bash Usage: akamai property-manager import|i [options] Import an existing property from Property Manager. Options: -p, --property Property name. Optional if default property was set using the set-default command. --dry-run Verify the result of your command syntax before running it. Displays the JSON generated by the command as currently written. --variable-mode Choose how to pull in variables. Allowed values are 'no-var' and 'user-var-value'. By default, variables aren't imported (no-var). -h, --help output usage information © 2017-2020 Akamai Technologies, Inc. All rights reserved Visit http://github.com/akamai/cli-property-manager for more documentation ``` -------------------------------- ### environment.storeHostnames Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Stores the provided list of hostnames into the hostnames.json file for the environment. ```APIDOC ## environment.storeHostnames(hostnames) ### Description Store hostnames into hostnames.json file. ### Parameters #### Path Parameters - **hostnames** - Required - The list of hostnames to store. ``` -------------------------------- ### Include New Snippet in Main Configuration Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Reference a new or existing snippet within the `children` array of the main configuration's default rule. Use the `#include:` directive followed by the snippet's filename. ```json "rules": { "name": "default", "children": [ "#include:Cache_extensions.json", "#include:Catalog.json", "#include:Furniture.json", "#include:Clothing.json", ], "Behaviors": [ … … ], } ``` -------------------------------- ### devOps.checkPromotions Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Checks the status of an environment promotion by examining the underlying pending activation. ```APIDOC ## devOps.checkPromotions(projectName, envionmentName) ### Description Check status of promotion of environment by checking a underlying pending activation. ### Method instance method ### Parameters #### Path Parameters - **projectName** (String) - Description not provided - **envionmentName** (String) - Description not provided ``` -------------------------------- ### Environment.getRuleTree Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Loads the rule tree for this environment property from the PAPI backend. ```APIDOC ## environment.getRuleTree() ### Description Loads the rule tree for this environment property from PAPI backend. ### Method instance method of Environment ### Returns - `Promise<*> ` - A promise that resolves with the rule tree. ``` -------------------------------- ### environment.checkPromotions Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Checks for any pending promotions and updates their status if the underlying activation has become active. This operation is asynchronous. ```APIDOC ## environment.checkPromotions() ### Description Check for any pending promotions and if underlying activation became active change status. ### Returns - `Promise<{}>` - A promise that resolves with the status of pending promotions. ``` -------------------------------- ### Environment.storeHostnames Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Stores the provided hostnames for the environment. ```APIDOC ## environment.storeHostnames(hostnames) ### Description Stores the provided hostnames for the environment. ### Method instance method of Environment ### Parameters #### Path Parameters - **hostnames** (any) - The hostnames to store. ``` -------------------------------- ### List Available Edge Hostnames Command Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Use this command to retrieve a list of existing edge hostnames available for reuse within your pipeline. Replace `` and `` with your specific contract and group IDs. ```bash akamai property-manager list-edgehostnames -c -g ``` -------------------------------- ### Hostnames Configuration in JSON Source: https://github.com/akamai/cli-property-manager/blob/master/README.md JSON structure for defining hostnames within an environment. Used to specify edge hostnames, CNAMEs, and manage hostname creation. ```json { "hostnames.json": "Contains a list of hostname objects for this environment.\nIf the edgeHostnameId is null, the CLI creates edge hostnames for you. If you want to use an existing edge hostname, set both the cnameTo and edgeHostnameId values accordingly. " } ``` -------------------------------- ### Environment.getHostnames Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Retrieves the hostnames for the environment. ```APIDOC ## environment.getHostnames() ### Description Gets the hostnames for the environment. ### Method instance method of Environment ### Returns - `*` - The hostnames for the environment. ``` -------------------------------- ### Define Environment Variable Attributes in VariableDefinitions.json Source: https://github.com/akamai/cli-property-manager/wiki/Promotional-Deployment-CLI-FAQ.rdoc Add new attributes like 'cachestore' to your VariableDefinitions.json file to define them as parameters for your environments. Set their type and a default value. ```json { "definitions": { "cpCode": { "type": "cpCode", "default": 585931 }, "originHostname": { "type": "hostname", "default": null }, "cachestore": { "type": "cachestore", "default": "null" } } ``` -------------------------------- ### environment.createTemplate Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Creates a template from a given rule tree. This method can be used to initialize new property configurations or to generate reusable template structures. ```APIDOC ## environment.createTemplate(ruleTree, isNewProperty, variableValuesOnly) ### Description Create template from ruleTree. ### Parameters #### Path Parameters - **ruleTree** (object) - Required - The rule tree object to create the template from. - **isNewProperty** (boolean) - Optional - Defaults to true. Indicates if this template is for a new property. - **variableValuesOnly** (boolean) - Optional - Defaults to false. If true, only variable values are included, not their definitions. ``` -------------------------------- ### Project.getPropertyInfo Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Retrieves information about a specific property version. ```APIDOC ## project.getPropertyInfo(propertyId, version) ### Description Retrieves information about a specific property. ### Method Instance method of Project ### Parameters #### Path Parameters - **propertyId** (any) - Description not provided. - **version** (any) - Description not provided. ### Request Example ```json { "propertyId": "prop_12345", "version": 1 } ``` ### Response #### Success Response - **Property Information** (any) - Details about the property. ``` -------------------------------- ### Save Pipeline Environment Source: https://github.com/akamai/cli-property-manager/blob/master/docs/pipeline_commands_help.md Saves the rule tree and hostnames for a selected environment. This command validates the rule tree with PAPI and creates edge hostnames if necessary. Use this to persist your property configuration. ```bash Usage: akamai pipeline save|sv [options] Save rule tree and hostnames for the environment you select. This command calls PAPI to validate the rule tree, and creates edge hostnames if needed. Options: -p, --pipeline Pipeline name. Optional if a default pipeline was set using the set-default command. -h, --help output usage information © 2017-2020 Akamai Technologies, Inc. All rights reserved Visit http://github.com/akamai/cli-property-manager for more documentation ``` -------------------------------- ### devOps.getEnvironment Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Creates an Environment instance. This method is part of the DevOps class. ```APIDOC ## devOps.getEnvironment(projectName, environmentName) ### Description Create Environment instance. ### Method instance method ### Parameters #### Path Parameters - **projectName** (string) - Description not provided - **environmentName** (string) - Description not provided ``` -------------------------------- ### List Pipeline Contracts Source: https://github.com/akamai/cli-property-manager/blob/master/docs/pipeline_commands_help.md Lists available contracts based on your client ID and current user credentials. Use this command to retrieve contract IDs for subsequent operations. ```bash Usage: akamai pipeline list-contracts|lc [options] List contracts available based on current user credentials and setup. Options: -h, --help output usage information © 2017-2020 Akamai Technologies, Inc. All rights reserved Visit http://github.com/akamai/cli-property-manager for more documentation ``` -------------------------------- ### Configure Multiple Edge Hostnames Source: https://github.com/akamai/cli-property-manager/blob/master/README.md Use this JSON structure to define multiple edge hostnames for your pipeline environments. Ensure the `cnameTo` value uses the correct domain suffix based on the edge hostname type. ```json [ { "cnameFrom": "www.example.com", "cnameTo": "www.example.edgesuite.net", "cnameType": "EDGE_HOSTNAME", "edgeHostnameId": 343477 }, { "cnameFrom": "www.example-1.com", "cnameTo": "www.example-1.edgekey.net", "certEnrollmentId": "12356666", "cnameType": "EDGE_HOSTNAME", "edgeHostnameId": 224488 } ] ``` -------------------------------- ### Environment.loadPropertyData Source: https://github.com/akamai/cli-property-manager/blob/master/docs/api.md Loads property data for the environment. ```APIDOC ## environment.loadPropertyData() ### Description Loads property data for the environment. ### Method instance method of Environment ### Returns - `object` - The loaded property data. ```