通過中に問題が発生しました
request_parameters = {"method.request.header.User":"context.authorizer.User"}
HttpIntegationへ:
httpintegration = _apigw.HttpIntegration(url_auth + '/logout', proxy=True, options=request_parameters({"integration.request.header.User":"$context.authorizer.User"}))
私が得た:
TypeError: 'dict'オブジェクトは呼び出し可能ではありませんサブプロセスはエラー1で終了しました使用:cdkpython。
以下のPythonの例を参照してください。IntegrationOptionsクラスを使用する必要があると思います。
CDKとそのドキュメントは信頼性が低く、多くの欠陥がある使用可能な例は実際にはありません。CDKは一般的な使用レベルではないのではないかと思います。
cdk_api_method: aws_apigateway.Method = cdk_api_resource.add_method(
http_method=str.upper(verb),
integration=aws_apigateway.HttpIntegration(
url=url,
http_method=str.upper(verb),
proxy=True,
options=aws_apigateway.IntegrationOptions(
request_parameters=method_parameter_set['integration_request_parameters']
if 'integration_request_parameters' in method_parameter_set else None
)
)
)
"integration_request_parameters": {
"integration.request.header.{}".format(HTTP_HEADER_X_VALIDATION_CLIENT_NAME): "'{}'".format(HTTP_HEADER_X_VALIDATION_CLIENT_VALUE)
},
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加