---
outputs:
    {% if swagger_template %}
    RestApiId:
        Description:
            Api Gateway API ID
        Value:
            Ref: ApiGateway

    ApiKey:
        Description:
            Name of the API Key associated to stage {{_env.stage}}
        Value:
            Ref: ApiKey
    {% endif %}

    {% for f in meta_functions %}
    {{f.name}}LambdaFunctionArn:
        Description: The ARN of the {{f.name}} lambda function
        Value:
            "Fn::GetAtt":
                - {{f.name}}
                - Arn
    {% endfor %}

    ApiUrl:
        Description: URL of your API endpoint
        Value:
            "Fn::Join":
                - ''
                - - 'https://'
                  - Ref:
                      {% if swagger_template %}
                      ApiGateway
                      {% else %}
                      ServerlessRestApi
                      {% endif %}
                  - '.execute-api.'
                  - Ref:
                      "AWS::Region"
                  - '.amazonaws.com/Prod'
