x-amazon-apigateway-integrations Objekt - APIAmazon-Gateway

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

x-amazon-apigateway-integrations Objekt

Definiert eine Sammlung von Integrationen. Sie können Integrationen im Komponentenbereich Ihrer API Open-Definition definieren und die Integrationen für mehrere Routen wiederverwenden. Wird nur unterstützt für. HTTP APIs

Name der Eigenschaft Typ Beschreibung
integration x-amazon-apigateway-integration Objekt Eine Sammlung von Integrationsobjekten.

x-amazon-apigateway-integrations Beispiel

Das folgende Beispiel erstellt eine HTTPAPI, die zwei Integrationen definiert, und referenziert die Integrationen mithilfe von. $ref": "#/components/x-amazon-apigateway-integrations/integration-name

{ "openapi": "3.0.1", "info": { "title": "Integrations", "description": "An API that reuses integrations", "version": "1.0" }, "servers": [ { "url": "https://example.com/{basePath}", "description": "The production API server", "variables": { "basePath": { "default": "example/path" } } }], "paths": { "/": { "get": { "x-amazon-apigateway-integration": { "$ref": "#/components/x-amazon-apigateway-integrations/integration1" } } }, "/pets": { "get": { "x-amazon-apigateway-integration": { "$ref": "#/components/x-amazon-apigateway-integrations/integration1" } } }, "/checkout": { "get": { "x-amazon-apigateway-integration": { "$ref": "#/components/x-amazon-apigateway-integrations/integration2" } } } }, "components": { "x-amazon-apigateway-integrations": { "integration1": { "type": "aws_proxy", "httpMethod": "POST", "uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:123456789012:function:my-function/invocations", "passthroughBehavior": "when_no_templates", "payloadFormatVersion": "1.0" }, "integration2": { "type": "aws_proxy", "httpMethod": "POST", "uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:123456789012:function:example-function/invocations", "passthroughBehavior": "when_no_templates", "payloadFormatVersion" : "1.0" } } } }