integration/resources/templates/combination/api_with_authorizers_max.yaml [1:98]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:
  MyApi:
    Type: AWS::Serverless::Api
    Properties:
      StageName: Prod
      Auth:
        DefaultAuthorizer: MyCognitoAuthorizer
        Authorizers:
          MyCognitoAuthorizer:
            UserPoolArn:
              - Fn::GetAtt: MyCognitoUserPool.Arn
              - Fn::GetAtt: MyCognitoUserPoolTwo.Arn
            Identity:
              Header: MyAuthorizationHeader
              ValidationExpression: myauthvalidationexpression

          MyLambdaTokenAuth:
            FunctionPayloadType: TOKEN
            FunctionArn:
              Fn::GetAtt: MyLambdaAuthFunction.Arn
            FunctionInvokeRole:
              Fn::GetAtt: LambdaAuthInvokeRole.Arn
            Identity:
              Header: MyCustomAuthHeader
              ValidationExpression: allow
              ReauthorizeEvery: 20

          MyLambdaRequestAuth:
            FunctionPayloadType: REQUEST
            FunctionArn:
              Fn::GetAtt: MyLambdaAuthFunction.Arn
            FunctionInvokeRole:
              Fn::GetAtt: LambdaAuthInvokeRole.Arn
            Identity:
              Headers:
                - authorizationHeader
              QueryStrings:
                - authorization
                - authorizationQueryString1
              ReauthorizeEvery: 0

  MyFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: index.handler
      Runtime: nodejs12.x
      InlineCode: |
        exports.handler = async (event, context, callback) => {
          return {
            statusCode: 200,
            body: 'Success'
          }
        }
      Events:
        None:
          Type: Api
          Properties:
            RestApiId:
              Ref: MyApi
            Method: get
            Path: /none
            Auth:
              Authorizer: NONE
        Cognito:
          Type: Api
          Properties:
            RestApiId:
              Ref: MyApi
            Method: get
            Path: /cognito
        LambdaToken:
          Type: Api
          Properties:
            RestApiId:
              Ref: MyApi
            Method: get
            Path: /lambda-token
            Auth:
              Authorizer: MyLambdaTokenAuth
        LambdaRequest:
          Type: Api
          Properties:
            RestApiId:
              Ref: MyApi
            Method: get
            Path: /lambda-request
            Auth:
              Authorizer: MyLambdaRequestAuth
        Iam:
          Type: Api
          Properties:
            RestApiId:
              Ref: MyApi
            Method: get
            Path: /iam
            Auth:
              Authorizer: AWS_IAM
              InvokeRole: CALLER_CREDENTIALS
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



integration/resources/templates/combination/api_with_authorizers_max_openapi.yaml [4:101]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Resources:
  MyApi:
    Type: AWS::Serverless::Api
    Properties:
      StageName: Prod
      Auth:
        DefaultAuthorizer: MyCognitoAuthorizer
        Authorizers:
          MyCognitoAuthorizer:
            UserPoolArn:
              - Fn::GetAtt: MyCognitoUserPool.Arn
              - Fn::GetAtt: MyCognitoUserPoolTwo.Arn
            Identity:
              Header: MyAuthorizationHeader
              ValidationExpression: myauthvalidationexpression

          MyLambdaTokenAuth:
            FunctionPayloadType: TOKEN
            FunctionArn:
              Fn::GetAtt: MyLambdaAuthFunction.Arn
            FunctionInvokeRole:
              Fn::GetAtt: LambdaAuthInvokeRole.Arn
            Identity:
              Header: MyCustomAuthHeader
              ValidationExpression: allow
              ReauthorizeEvery: 20

          MyLambdaRequestAuth:
            FunctionPayloadType: REQUEST
            FunctionArn:
              Fn::GetAtt: MyLambdaAuthFunction.Arn
            FunctionInvokeRole:
              Fn::GetAtt: LambdaAuthInvokeRole.Arn
            Identity:
              Headers:
                - authorizationHeader
              QueryStrings:
                - authorization
                - authorizationQueryString1
              ReauthorizeEvery: 0

  MyFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: index.handler
      Runtime: nodejs12.x
      InlineCode: |
        exports.handler = async (event, context, callback) => {
          return {
            statusCode: 200,
            body: 'Success'
          }
        }
      Events:
        None:
          Type: Api
          Properties:
            RestApiId:
              Ref: MyApi
            Method: get
            Path: /none
            Auth:
              Authorizer: NONE
        Cognito:
          Type: Api
          Properties:
            RestApiId:
              Ref: MyApi
            Method: get
            Path: /cognito
        LambdaToken:
          Type: Api
          Properties:
            RestApiId:
              Ref: MyApi
            Method: get
            Path: /lambda-token
            Auth:
              Authorizer: MyLambdaTokenAuth
        LambdaRequest:
          Type: Api
          Properties:
            RestApiId:
              Ref: MyApi
            Method: get
            Path: /lambda-request
            Auth:
              Authorizer: MyLambdaRequestAuth
        Iam:
          Type: Api
          Properties:
            RestApiId:
              Ref: MyApi
            Method: get
            Path: /iam
            Auth:
              Authorizer: AWS_IAM
              InvokeRole: CALLER_CREDENTIALS
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



