class InlineApiDefinition
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.APIGateway.InlineApiDefinition | 
|  Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#InlineApiDefinition | 
|  Java | software.amazon.awscdk.services.apigateway.InlineApiDefinition | 
|  Python | aws_cdk.aws_apigateway.InlineApiDefinition | 
|  TypeScript (source) | aws-cdk-lib»aws_apigateway»InlineApiDefinition | 
Extends
Api
OpenAPI specification from an inline JSON object.
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';
declare const definition: any;
const inlineApiDefinition = new apigateway.InlineApiDefinition(definition);
Initializer
new InlineApiDefinition(definition: any)
Parameters
- definition any
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.
