title: How to enable ApiKeyRequired for an Api Method?
body: <p>I want to use the standard API Keys feature of API Gateway. If I use standard cloudformation this is possible by setting the property ApiKeyRequired to true for a method. How can I do this with SAM? </p>
  
  <p>I tried using swagger but that does not seem to work: </p>
  
  <pre><code>    swagger: "2.0"
      info:
        title: !Ref AWS::StackName
  
      paths:
        "/machines/{resourceid}":
          get:
            parameters: 
              - name: resourceid 
                in: path 
                type: string 
                required: true 
            x-amazon-apigateway-integration:
              httpMethod: POST
              type: aws_proxy
              uri: !Sub arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyLambda.Arn}/invocations
              responses: {}
            security:
              - authorizer: []
  
      securityDefinitions:
        authorizer:
          type: apiKey
          name: Authorization
          in: header
  </code></pre>
  
  <p>Any suggestions? </p>