AWSTemplateFormatVersion: '2010-09-09'
Description: A template to test for implicit API condition handling.
Conditions:
  MyCondition:
    Fn::Equals:
    - true
    - false
  Cond:
    Fn::Equals:
    - true
    - false
  Cond1:
    Fn::Equals:
    - true
    - false
  Cond2:
    Fn::Equals:
    - true
    - false
  Cond3:
    Fn::Equals:
    - true
    - false
  Cond4:
    Fn::Equals:
    - true
    - true
  Cond5:
    Fn::Equals:
    - true
    - false
  Cond6:
    Fn::Equals:
    - true
    - true
  Cond7:
    Fn::Equals:
    - true
    - false
  Cond8:
    Fn::Equals:
    - true
    - true
  Cond9:
    Fn::Equals:
    - true
    - false

Resources:
  hello:
    Type: AWS::Serverless::Function
    Condition: MyCondition
    Properties:
      Handler: index.handler
      Runtime: nodejs18.x
      MemorySize: 128
      Timeout: 3
      InlineCode: |
        exports.handler = async () => ‘Hello World!'
      Events:
        ApiEvent:
          Type: Api
          Properties:
            Path: /sub
            Method: get
  helloworld:
    Type: AWS::Serverless::Function
    Condition: Cond
    Properties:
      Handler: index.handler
      Runtime: nodejs18.x
      MemorySize: 128
      Timeout: 3
      InlineCode: |
        exports.handler = async () => ‘Hello World!'
      Events:
        ApiEvent:
          Type: Api
          Properties:
            Path: /sub
            Method: post
  helloworld1:
    Type: AWS::Serverless::Function
    Condition: Cond1
    Properties:
      Handler: index.handler
      Runtime: nodejs18.x
      MemorySize: 128
      Timeout: 3
      InlineCode: |
        exports.handler = async () => ‘Hello World!'
      Events:
        ApiEvent:
          Type: Api
          Properties:
            Path: /sub1
            Method: post
  helloworld2:
    Type: AWS::Serverless::Function
    Condition: Cond2
    Properties:
      Handler: index.handler
      Runtime: nodejs18.x
      MemorySize: 128
      Timeout: 3
      InlineCode: |
        exports.handler = async () => ‘Hello World!'
      Events:
        ApiEvent:
          Type: Api
          Properties:
            Path: /sub2
            Method: post
  helloworld3:
    Type: AWS::Serverless::Function
    Condition: Cond3
    Properties:
      Handler: index.handler
      Runtime: nodejs18.x
      MemorySize: 128
      Timeout: 3
      InlineCode: |
        exports.handler = async () => ‘Hello World!'
      Events:
        ApiEvent:
          Type: Api
          Properties:
            Path: /sub3
            Method: post
  helloworld4:
    Type: AWS::Serverless::Function
    Condition: Cond4
    Properties:
      Handler: index.handler
      Runtime: nodejs18.x
      MemorySize: 128
      Timeout: 3
      InlineCode: |
        exports.handler = async () => ‘Hello World!'
      Events:
        ApiEvent:
          Type: Api
          Properties:
            Path: /sub4
            Method: post
  helloworld5:
    Type: AWS::Serverless::Function
    Condition: Cond5
    Properties:
      Handler: index.handler
      Runtime: nodejs18.x
      MemorySize: 128
      Timeout: 3
      InlineCode: |
        exports.handler = async () => ‘Hello World!'
      Events:
        ApiEvent:
          Type: Api
          Properties:
            Path: /sub5
            Method: post
  helloworld6:
    Type: AWS::Serverless::Function
    Condition: Cond6
    Properties:
      Handler: index.handler
      Runtime: nodejs18.x
      MemorySize: 128
      Timeout: 3
      InlineCode: |
        exports.handler = async () => ‘Hello World!'
      Events:
        ApiEvent:
          Type: Api
          Properties:
            Path: /sub6
            Method: post
  helloworld7:
    Type: AWS::Serverless::Function
    Condition: Cond7
    Properties:
      Handler: index.handler
      Runtime: nodejs18.x
      MemorySize: 128
      Timeout: 3
      InlineCode: |
        exports.handler = async () => ‘Hello World!'
      Events:
        ApiEvent:
          Type: Api
          Properties:
            Path: /sub7
            Method: post
  helloworld8:
    Type: AWS::Serverless::Function
    Condition: Cond8
    Properties:
      Handler: index.handler
      Runtime: nodejs18.x
      MemorySize: 128
      Timeout: 3
      InlineCode: |
        exports.handler = async () => ‘Hello World!'
      Events:
        ApiEvent:
          Type: Api
          Properties:
            Path: /sub8
            Method: post
  helloworld9:
    Type: AWS::Serverless::Function
    Condition: Cond9
    Properties:
      Handler: index.handler
      Runtime: nodejs18.x
      MemorySize: 128
      Timeout: 3
      InlineCode: |
        exports.handler = async () => ‘Hello World!'
      Events:
        ApiEvent:
          Type: Api
          Properties:
            Path: /sub9
            Method: post
Metadata:
  SamTransformTest: true
