class S3ApiDefinition
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.APIGateway.S3ApiDefinition | 
|  Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#S3ApiDefinition | 
|  Java | software.amazon.awscdk.services.apigateway.S3ApiDefinition | 
|  Python | aws_cdk.aws_apigateway.S3ApiDefinition | 
|  TypeScript (source) | aws-cdk-lib»aws_apigateway»S3ApiDefinition | 
Extends
Api
OpenAPI specification from an S3 archive.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigateway as apigateway } from 'aws-cdk-lib';
import { aws_s3 as s3 } from 'aws-cdk-lib';
declare const bucketRef: s3.IBucketRef;
const s3ApiDefinition = new apigateway.S3ApiDefinition(bucketRef, 'key', /* all optional props */ 'objectVersion');
Initializer
new S3ApiDefinition(bucket: IBucketRef, key: string, objectVersion?: string)
Parameters
- bucket IBucketRef 
- key string
- objectVersion string
Methods
| Name | Description | 
|---|---|
| bind(_scope) | Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun. | 
| bind | Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it. | 
bind(_scope)
public bind(_scope: Construct): ApiDefinitionConfig
Parameters
- _scope Construct
Returns
Called when the specification is initialized to allow this object to bind to the stack, add resources and have fun.
bindAfterCreate(_scope, _restApi)  
public bindAfterCreate(_scope: Construct, _restApi: IRestApiRef): void
Parameters
- _scope Construct
- _restApi IRestApi Ref 
Called after the CFN RestApi resource has been created to allow the Api Definition to bind to it.
Specifically it's required to allow assets to add metadata for tooling like SAM CLI to be able to find their origins.
