title: Updateing aws apigateway binaryMediaTypes
body: <p>I'm attempting to configure and update the binary support options of an AWS API Gateway. I can do this through the web UI without issue, but I would like to script this. </p>
  
  <p>Using the CLI Command Reference pages:
  <a href="http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-rest-api.html" rel="nofollow noreferrer">http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-rest-api.html</a>
  <a href="http://docs.aws.amazon.com/cli/latest/reference/apigateway/update-rest-api.html" rel="nofollow noreferrer">http://docs.aws.amazon.com/cli/latest/reference/apigateway/update-rest-api.html</a></p>
  
  <p>Able to issue a get-rest-api command just fine:</p>
  
  <pre><code>C:\&gt; aws apigateway get-rest-api --rest-api-id [ID]
  
  {
    "id": "[ID]",
      "createdDate": 1490723884,
      "name": "testbinarymediatypes"
  }
  </code></pre>
  
  <p>But when attempting to update the binaryMediaTypes:</p>
  
  <pre><code>PS C:\&gt; aws apigateway update-rest-api --rest-api-id [ID] --patch-operations op=add,path=binaryMediaTypes,value='image/jpg'
  </code></pre>
  
  <blockquote>
    <p>An error occurred (BadRequestException) when calling the UpdateRestApi
    operation: Invalid patch path binaryMediaTypes</p>
  </blockquote>
  
  <p>Can this be done or am I stuck manually adding the types in the web UI every time?</p>