HttpApiDefinition - AWS Serverless Application Model

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

HttpApiDefinition

Dokumen OpenAPI yang menentukan API.

Sintaks

Untuk mendeklarasikan entitas ini dalam template AWS Serverless Application Model (AWS SAM) Anda, gunakan sintaks berikut.

YAML

Bucket: String Key: String Version: String

Properti

Bucket

Nama bucket Amazon S3 tempat file OpenAPI disimpan.

Tipe: String

Wajib: Ya

AWS CloudFormation kompatibilitas: Properti ini diteruskan langsung ke Bucket properti tipe AWS::ApiGatewayV2::Api BodyS3Location data.

Key

Kunci Amazon S3 dari file OpenAPI.

Tipe: String

Wajib: Ya

AWS CloudFormation kompatibilitas: Properti ini diteruskan langsung ke Key properti tipe AWS::ApiGatewayV2::Api BodyS3Location data.

Version

Untuk objek berversi, versi file OpenAPI.

Tipe: String

Wajib: Tidak

AWS CloudFormation kompatibilitas: Properti ini diteruskan langsung ke Version properti tipe AWS::ApiGatewayV2::Api BodyS3Location data.

Contoh

Contoh Uri Ketentuan

Contoh ketentuan API

YAML

DefinitionUri: Bucket: mybucket-name Key: mykey-name Version: 121212