1

I'm trying to update the domain contacts for a couple of 100 domains using AWS cli with the shorthand syntax.

This works fine for .com domains:

    aws route53domains update-domain-contact --domain-name my domain.co.uk --admin-contact FirstName=Joe,LastName=Bloggs,ContactType=COMPANY,OrganizationName='MyOrg',AddressLine1='MyAddress1',AddressLine2='MyAddress2',City='MyCity',CountryCode=GB,ZipCode='MyPostCode' 

However for .co.uk domains you need to specify the UK_CONTACT_TYPE in the ExtraParams and I can't figure out what the correct syntax should be

Something like this:

  aws route53domains update-domain-contact --domain-name my domain.co.uk --admin-contact FirstName=Joe,LastName=Bloggs,ContactType=COMPANY,OrganizationName='MyOrg',AddressLine1='MyAddress1',AddressLine2='MyAddress2',City='MyCity',CountryCode=GB,ZipCode='MyPostCode', ExtraParams=[{Name=UK_CONTACT_TYPE,Value=LTD}] 

More info here https://docs.aws.amazon.com/cli/latest/reference/route53domains/update-domain-contact.html

Where am I going wrong ?

Sean C
  • 11
  • 3
  • Same here. Did you find a solution? The 'invalid json' error is not very helpful... – binOr Apr 17 '23 at 07:25
  • I got it working by using the --debug option. There I was getting a hint on where the syntax error in the json was (missing quote).

    aws route53domains update-domain-contact --debug --region us-east-1 --cli-input-json "$json"

    Also, I added the following ExtraParams to the registrant, admin and tech contact:

        "ExtraParams": [
          {
            "Name": "UK_CONTACT_TYPE",
            "Value": "value"
          },
          {
            "Name": "UK_COMPANY_NUMBER",
            "Value": "value"
          }
        ]
    
    – binOr Apr 17 '23 at 07:44

0 Answers0