Following error received when updating an existing Content Library to associate the OVF Security Policy:
A specified parameter was not correct:Invalid security policy id: ''1: ########-####-####-####-############'' is not a valid UUID.VMware vCenter Server
Workaround
VCENTER="<vCenter_FQDN>" #(i.e. vcenter.domain.local)VCENTER_USER="<vCenter_Username>" #(i.e. [email protected])VCENTER_PW="<vCenter_Password>"
SESSION_ID=$(curl -k -s -X POST -u "${VCENTER_USER}:${VCENTER_PW}" "https://${VCENTER}/api/session" -H 'Accept: application/json' | tr -d '\"')
curl -k -X GET -H "vmware-api-session-id: ${SESSION_ID}" https://${VCENTER}/api/content/security-policies -H 'Accept: application/json' | jq
curl -k -X GET -H "vmware-api-session-id: ${SESSION_ID}" https://${VCENTER}/api/content/library -H 'Accept: application/json' | jq
curl -k -X GET -H "vmware-api-session-id: ${SESSION_ID}" https://${VCENTER}/api/content/library/<LibraryID> -H 'Accept: application/json' | jq
curl -k -X PATCH -H "Content-Type: application/json" -H "vmware-api-session-id: ${SESSION_ID}" https://${VCENTER}/api/content/library/<LibraryID> \
-d '{"security_policy_id": "<SecurityPolicyID>"}'
To use the API calls you can reference our documentation: Content Library APIs