MCPcopy Index your code
hub / github.com/zappa/Zappa / get_api_url

Method get_api_url

zappa/core.py:2912–2921  ·  view source on GitHub ↗

Given a lambda_name and stage_name, return a valid API URL.

(self, lambda_name, stage_name, apigateway_version=DEFAULT_APIGATEWAY_VERSION)

Source from the content-addressed store, hash-verified

2910 return {}
2911
2912 def get_api_url(self, lambda_name, stage_name, apigateway_version=DEFAULT_APIGATEWAY_VERSION):
2913 """
2914 Given a lambda_name and stage_name, return a valid API URL.
2915 """
2916 api_id = self.get_api_id(lambda_name, apigateway_version=apigateway_version)
2917 if api_id:
2918 # For all versions, include the stage name in the URL
2919 return "https://{}.execute-api.{}.amazonaws.com/{}".format(api_id, self.boto_session.region_name, stage_name)
2920 else:
2921 return None
2922
2923 def get_websocket_url(self, lambda_name, stage_name="production"):
2924 """

Callers 9

test_get_api_urlMethod · 0.95
test_get_api_url_v1Method · 0.95
test_get_api_url_v2Method · 0.95
deployMethod · 0.80
updateMethod · 0.80
statusMethod · 0.80

Calls 1

get_api_idMethod · 0.95