使用 Open API 規格產生用戶端 - AWS AppConfig

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

使用 Open API 規格產生用戶端

您可以針對「開啟」使用下列YAML規格,SDK使用「開放API產生器」這類工具API來建立。您可以更新此規格,以包含「應用程式」、「環境」或「組態」的硬式編碼值。您也可以新增其他路徑 (如果您有多個組態類型),並包含組態結構描述,以便為您SDK的用戶端產生模型組態特定的類型模型。如需有關「開啟」API (也稱為 Swagger) 的詳細資訊,請參閱「開啟 API」規格。

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