transformId: AWS::Serverless-2016-10-31 AWSTemplateFormatVersion: '2010-09-09' Resources: AuthFunction: Type: AWS::Serverless::Function Properties: InlineCode: '' Handler: index Runtime: python3.9 AccessingPartyAPI: Type: AWS::Serverless::Api Properties: EndpointConfiguration: REGIONAL StageName: demo Auth: DefaultAuthorizer: CustomAuthorizer Authorizers: CustomAuthorizer: FunctionPayloadType: TOKEN FunctionArn: Fn::GetAtt: - AuthFunction - Arn AddDefaultAuthorizerToCorsPreflight: false DefinitionBody: paths: /path: put: responses: '201': content: application/json: schema: $ref: abcd x-amazon-apigateway-integration: contentHandling: CONVERT_TO_TEXT responses: default: statusCode: '200' uri: Fn::Sub: foobar httpMethod: POST passthroughBehavior: when_no_match type: aws_proxy requestBody: content: application/json: schema: required: - readoutId - status type: object security: # each item should be a dict - CustomAuthorizer openapi: 3.0.3 components: securitySchemes: CustomAuthorizer: in: header type: apiKey name: Authorization AccessingPartyAPIFunction: Type: AWS::Serverless::Function Properties: InlineCode: '' Handler: index Runtime: python3.9 Events: PutReservation: Type: Api Properties: Path: /path RestApiId: Ref: AccessingPartyAPI Method: put