Bases: Integration
You can integrate an API method with an HTTP endpoint using the HTTP proxy integration or the HTTP custom integration,.
With the proxy integration, the setup is simple. You only need to set the HTTP method and the HTTP endpoint URI, according to the backend requirements, if you are not concerned with content encoding or caching.
With the custom integration, the setup is more involved. In addition to the proxy integration setup steps, you need to specify how the incoming request data is mapped to the integration request and how the resulting integration response data is mapped to the method response.
infused
Example:
# auth_fn: lambda.Function # books: apigateway.Resource auth = apigateway.RequestAuthorizer(self, "booksAuthorizer", handler=auth_fn, identity_sources=[apigateway.IdentitySource.header("Authorization")] ) books.add_method("GET", apigateway.HttpIntegration("http://amazon.com"), authorizer=auth )
url (str
)
http_method (Optional
[str
]) â HTTP method to use when invoking the backend URL. Default: GET
options (Union
[IntegrationOptions
, Dict
[str
, Any
], None
]) â Integration options, such as request/resopnse mapping, content handling, etc. Default: defaults based on IntegrationOptions
defaults
proxy (Optional
[bool
]) â Determines whether to use proxy integration or custom integration. Default: true
Methods
Can be overridden by subclasses to allow the integration to interact with the method being integrated, access the REST API object, method ARNs, etc.
_method (Method
)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4