<p>I'm trying to update the domain contacts for a couple of 100 domains using AWS cli with the shorthand syntax.</p>
<p>This works fine for .com domains:</p>
<pre><code>    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' 
</code></pre>
<p>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</p>
<p>Something like this:</p>
<pre><code>  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}] 
</code></pre>
<p>More info here <a href="https://docs.aws.amazon.com/cli/latest/reference/route53domains/update-domain-contact.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/cli/latest/reference/route53domains/update-domain-contact.html</a></p>
<p>Where am I going wrong ?</p>

CC BY-SA 4.0
2023-04-17T07:25:25.303Z
Same here. Did you find a solution? The 'invalid json' error is not very helpful...
binOr
CC BY-SA 4.0
2023-04-17T07:44:50.417Z
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
<aws-cli>
aws cli shorthand json syntax
Sean C
# aws cli shorthand json syntax

(Asked by: username_0 on 2022-10-13)

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 ?

**Tags:** aws-cli

> **Comments:**
> **username_1**: Same here. Did you find a solution? The 'invalid json' error is not very helpful...  
> **username_1**: 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"           }         ]  

---

## 0 answers

