title: Setting up CloudWatch dimensions for APIGateway methods in CloudFormation
body: <p>I have an api say <code>apifortest</code> which has at 10 methods under different paths. Those methods are <code>GET</code>, <code>PUT</code> and <code>POST</code>. What I want to do is create a CloudWatch monitor for these. </p>
  
  <p>I was looking at documentation here</p>
  
  <p><a href="http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/api-gateway-metrics-dimensions.html" rel="noreferrer">http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/api-gateway-metrics-dimensions.html</a></p>
  
  <p>This is what I had earlier</p>
  
  <pre><code>TestApiCloudWatch:
      Type: "AWS::CloudWatch::Alarm"
      Properties:
          ActionsEnabled: "True"
          AlarmName: "ApiGateway-TestAPI-5XXError-SEV2"
          ComparisonOperator: !FindInMap [APIGatewayCloudWatchMappings, 5XXError-SEV2, ComparisonOperator]
          Dimensions:
              -
                  Name: "ApiName"
                  Value: "APIForTest"
              -
                  Name: "Stage"
                  Value: "Prod"
          EvaluationPeriods: !FindInMap [APIGatewayCloudWatchMappings, 5XXError-SEV2, EvaluationPeriods]
          MetricName: !FindInMap [APIGatewayCloudWatchMappings, 5XXError-SEV2, MetricName]
          Namespace: "AWS/ApiGateway"
          Period: !FindInMap [APIGatewayCloudWatchMappings, 5XXError-SEV2, Period]
          Statistic: !FindInMap [APIGatewayCloudWatchMappings, 5XXError-SEV2, Statistic]
          Threshold: !FindInMap [APIGatewayCloudWatchMappings, 5XXError-SEV2, Threshold]
  </code></pre>
  
  <p>But this alarm is being set <strong>At API Level</strong>. I want to setup at method level. The documetion does states that we can do so, but it doesn't have any example. </p>
  
  <p>Any help would be appreciated.</p>