amazon cloudformation – How do I configure an AWS API Gateway with AWS Java Lambda using AWS SAM including POST caching and disabling logging

ExampleFunction:
  Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
  Properties:
    CodeUri: path/to/libs/example.jar
    Handler: com.example.Example::handleRequest
    VpcConfig:
      SecurityGroupIds:
        - sg-abc
      SubnetIds:
       - subnet-1234
       - subnet-1235
       - subnet-1236
    Runtime: java11
    MemorySize: 1024
    Events:
      Example:
        Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
        Properties:
          Path: /example
          Method: post
          RestApiId:
            Ref: ExampleApi

ExampleApi:
  Type: AWS::Serverless::Api
  Properties:
    Description: Example Private API with cache and logging disabled
    StageName: prod
    CacheClusterSize: '0.5'
    CacheClusterEnabled: true
    MethodSettings:
      - CachingEnabled: true
        CacheDataEncrypted: true
        CacheTtlInSeconds: 3600
        LoggingLevel: 'Off'
        HttpMethod: '*'
        ResourcePath: '/*'
        MetricsEnabled: true
      - CachingEnabled: true
        CacheDataEncrypted: true
        CacheTtlInSeconds: 3600
        LoggingLevel: 'Off'
        HttpMethod: 'POST'
        # For encoding see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apitgateway-stage-methodsetting.html#cfn-apigateway-stage-methodsetting-resourcepath
        ResourcePath: '/~1example'
        MetricsEnabled: true
        ThrottlingRateLimit: 1000
        ThrottlingBurstLimit: 500
    Auth:
      ResourcePolicy:
          CustomStatements: [
            {
              "Effect": "Allow",
              "Principal": "*",
              "Action": "execute-api:Invoke",
              "Resource": "execute-api:/*"
            }
          ]
    EndpointConfiguration:
      Type: PRIVATE