ApiDefinition - Amazon Serverless Application Model
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

ApiDefinition

An OpenAPI document defining the API.

Syntax

To declare this entity in your Amazon Serverless Application Model (Amazon SAM) template, use the following syntax.

YAML

Bucket: String Key: String Version: String

Properties

Bucket

The name of the Amazon S3 bucket where the OpenAPI file is stored.

Type: String

Required: Yes

Amazon CloudFormation compatibility: This property is passed directly to the Bucket property of the AWS::ApiGateway::RestApi S3Location data type.

Key

The Amazon S3 key of the OpenAPI file.

Type: String

Required: Yes

Amazon CloudFormation compatibility: This property is passed directly to the Key property of the AWS::ApiGateway::RestApi S3Location data type.

Version

For versioned objects, the version of the OpenAPI file.

Type: String

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the Version property of the AWS::ApiGateway::RestApi S3Location data type.

Examples

Definition Uri example

API Definition example

YAML

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