与 OpenAPI 集成 - Amazon AppConfig
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

与 OpenAPI 集成

您可以使用以下 OpenAPI 的 YAML 规范,通过 OpenAPI 生成器等工具创建 SDK。您可以更新此规范以包含“应用程序”、“环境”或“配置”的硬编码值。还可以添加其他路径(如果有多个配置类型)并包含配置架构,以便为 SDK 客户端生成特定于配置的类型化模型。有关 OpenAPI(也称为 Swagger)的详细信息,请参阅 OpenAPI 规范

openapi: 3.0.0 info: version: 1.0.0 title: AppConfig Agent Lambda extension API description: An API model for the AppConfig Agent Lambda extension. servers: - url: https://localhost:{port}/ variables: port: default: '2772' paths: /applications/{Application}/environments/{Environment}/configurations/{Configuration}: get: operationId: getConfiguration tags: - configuration parameters: - in: path name: Application description: The application for the configuration to get. Specify either the application name or the application ID. required: true schema: type: string - in: path name: Environment description: The environment for the configuration to get. Specify either the environment name or the environment ID. required: true schema: type: string - in: path name: Configuration description: The configuration to get. Specify either the configuration name or the configuration ID. required: true schema: type: string responses: 200: headers: ConfigurationVersion: schema: type: string content: application/octet-stream: schema: type: string format: binary description: successful config retrieval 400: description: BadRequestException content: application/text: schema: $ref: '#/components/schemas/Error' 404: description: ResourceNotFoundException content: application/text: schema: $ref: '#/components/schemas/Error' 500: description: InternalServerException content: application/text: schema: $ref: '#/components/schemas/Error' 502: description: BadGatewayException content: application/text: schema: $ref: '#/components/schemas/Error' 504: description: GatewayTimeoutException content: application/text: schema: $ref: '#/components/schemas/Error' components: schemas: Error: type: string description: The response error