ApiDefinitionConfig Struct
Post-Binding Configuration for a CDK construct.
| Source | aws-apigateway/lib/api-definition.ts |
|---|
Example
ts
// 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 inlineDefinition: any;
const apiDefinitionConfig: apigateway.ApiDefinitionConfig = {
inlineDefinition: inlineDefinition,
s3Location: {
bucket: 'bucket',
key: 'key',
// the properties below are optional
version: 'version',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigateway as apigateway
# inline_definition: Any
api_definition_config = apigateway.ApiDefinitionConfig(
inline_definition=inline_definition,
s3_location=apigateway.ApiDefinitionS3Location(
bucket="bucket",
key="key",
# the properties below are optional
version="version"
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigateway.*;
Object inlineDefinition;
ApiDefinitionConfig apiDefinitionConfig = ApiDefinitionConfig.builder()
.inlineDefinition(inlineDefinition)
.s3Location(ApiDefinitionS3Location.builder()
.bucket("bucket")
.key("key")
// the properties below are optional
.version("version")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGateway;
var inlineDefinition;
var apiDefinitionConfig = new ApiDefinitionConfig {
InlineDefinition = inlineDefinition,
S3Location = new ApiDefinitionS3Location {
Bucket = "bucket",
Key = "key",
// the properties below are optional
Version = "version"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var inlineDefinition interface{}
apiDefinitionConfig := &ApiDefinitionConfig{
InlineDefinition: inlineDefinition,
S3Location: &ApiDefinitionS3Location{
Bucket: jsii.String("bucket"),
Key: jsii.String("key"),
// the properties below are optional
Version: jsii.String("version"),
},
}
Properties
inlineDefinitionoptionalanyinline_definitionoptionalAnyinlineDefinitionoptionalObjectInlineDefinitionoptionalobjectInlineDefinitionoptionalinterface{} #Inline specification (mutually exclusive with `s3Location`).
Default: API definition is not defined inline
s3LocationoptionalApiDefinitionS3Locations3_locationoptionalApiDefinitionS3Locations3LocationoptionalApiDefinitionS3LocationS3LocationoptionalApiDefinitionS3LocationS3LocationoptionalApiDefinitionS3Location #The location of the specification in S3 (mutually exclusive with `inlineDefinition`).
Default: API definition is not an S3 location