---
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: An AWS Serverless Application.
Parameters:
  Environment:
    Type: "String"
  HiddenParam:
    Type: "String"
    NoEcho: true
    Default: "Secret"
Globals:
  Function:
    Runtime: "dotnet6"
Resources:
  Get:
    Type: AWS::Serverless::Function
    Properties:
      Handler: ServerlessWithYamlFunction::ServerlessWithYamlFunction.Functions::Get
      CodeUri: ''
      MemorySize: 256
      Timeout: 30
      Policies:
      - AWSLambdaBasicExecutionRole
      Events:
        PutResource:
          Type: Api
          Properties:
            Path: "/"
            Method: GET

Outputs:
  ApiURL:
    Description: API endpoint URL for Prod environment
    Value:
      Fn::Sub: https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/
