Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
a3498881-aa5d-4
Participant

[Solved] add installation targets to policy

Hello CP users,

I am in the process of testing the API and can't seem to find the command to add a newly created cluster to a policy's installation targets. I was able to blow away all targets for a policy and replacing it with a single gateway using the following:

 

 

 

mgmt_cli set package name "MyPolicyName" installation-targets "MyFWCluster"

 

 

 

 

Obviously the above is not what I want. 😛 The API documentation makes reference to the "add" parameter but I get an error about pairs (key and value).

https://sc1.checkpoint.com/documents/latest/APIs/index.html?#cli/set-package~v1.6.1%20 

Here's what I see when using the add entry:

 

 

 

# mgmt_cli set package name "MyPolicyName" installation-targets add "MyFWCluster" -s id.txt --format json
Error: The parameters of set-package command should be provided in pairs (key and value). You have provided an odd number of parameters which suggests that you are probably missing a parameter.

 

 

 

API version = 1.6.1 R80.40 GA Take 102

 

Any help would be greatly appreciated. Thanks in advance everyone.

 

 

***UPDATE***

Beat the community to the solution. Trial and error lead me to find the solution.

mgmt_cli set package name "MyPolicyName" installation-targets.add "MyFWCluster" -s id.txt --format json

 

0 Kudos
0 Replies

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events