x-amazon-apigateway-integrations Objekt - Amazon API 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 OpenAPI-Definition definieren und die Integrationen für mehrere Routen wiederverwenden. Wird nur für HTTP-APIs unterstützt.

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

x-amazon-apigateway-integrations Beispiel

Im folgenden Beispiel wird eine HTTP-API erstellt, die zwei Integrationen definiert und die Integrationen über referenzier $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" } } } }