Step 1
You need to get the products' GUID with the following
om command line:
om -k -t pcf.myenv.mydomain.com -u admin -p myadminpassword curl \
-p "/api/v0/deployed/products" -x GET
Get the GUID value from the
guid section of the target product, which runs the target job to
unapply the target, VM extensions.
Step 2
You need to get the target job's GUID with the following
om command line. You need to specify the products' GUID, which you extracted at in Step 1:
om -k -t pcf.myenv.mydomain.com -u admin -p myadminpassword curl \
-p "/api/v0/staged/products/<Products' GUID from Step 1>/jobs" -x GET
Get the GUID value from
guid section of the target job.
Step 3
You need to extract the current resource config of the target job with the specifying GUIDs extracted at the previous steps, as shown below:
om -k -t pcf.myenv.mydomain -u admin -p myadminpassword curl \
-p "/api/v0/staged/products/<Products' GUID from Step 1>/jobs/<Target job's GUID from Step 2>/resource_config" \
-x GET
Then, you'll receive the following kind response:
{
"instance_type": {
"id": "automatic"
},
"instances": 2,
"additional_networks": [],
"internet_connected": false,
"elb_names": [
"alb:akta-ssh-tg"
],
"additional_vm_extensions": [
"ssh-lb-security-groups"
],
"swap_as_percent_of_memory_size": "automatic"
}
Step 4
Modify the response extracted during Step 3. Make it blank at the "
additional_vm_extensions" section and apply it in the following
om command line:
om -k -t pcf.myenv.mydomain.com -u admin -p myadminpassword curl \
-p "/api/v0/staged/products/<Products' GUID from Step 1>/jobs/<Target job's GUID from Step 2>/resource_config" -x PUT \
-H "Content-Type: application/json" \
-d '{
"instance_type": {
"id": "automatic"
},
"instances": 2,
"additional_networks": [],
"internet_connected": false,
"elb_names": [
"alb:akta-ssh-tg"
],
"additional_vm_extensions": [],
"swap_as_percent_of_memory_size": "automatic"
}'
As a result, you can now unapply the VM extensions from the target job.