integration/resources/templates/single/basic_api_with_mode_update.yaml (24 lines of code) (raw):
Resources:
MyApi:
Type: AWS::Serverless::Api
Properties:
StageName: MyNewStageName
Mode: overwrite
TestFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: python3.11
AutoPublishAlias: live
InlineCode: |
def handler(event, context):
print("Hello, world!")
Events:
Put:
Type: Api
Properties:
Path: /put
Method: put
RestApiId: !Ref MyApi
Metadata:
SamTransformTest: true