Akamai PowerShell Module: add-PropertyHostnames error

26 Views Asked by At

I am working with the Akamai PowerShell module to add a hostname to a property.

I use this command:

add-PropertyHostnames -NewHostnames $myHostNames -PropertyName myProperty.com -PropertyVersion 1  -ContractID xxxx -groupid yyyyyy

I get this error:

Title: Unable to interpret JSON
Detail: Your input could not be interpreted as the expected JSON format.

I think the problem is the format of $myHostNames. I've tried:

$myHostNames = @('akamaiascode-dev.com')
$myHostNames = 'akamaiascode-dev.com'
$myHostNames = '{ "cnameFrom":"akamaiascode-dev.com" }'

This is the documentation for this command: https://techdocs.akamai.com/powershell/reference/add-propertyhostnames

This is the github repo for this command: https://github.com/akamai/akamaipowershell/blob/master/property/Add-PropertyHostnames.ps1

This is the documentation for the API that gets called by the command: https://techdocs.akamai.com/property-mgr/reference/patch-property-version-hostnames

0

There are 0 best solutions below