EndpointConfiguration Struct
The endpoint configuration of a REST API, including VPCs and endpoint types.
EndpointConfiguration is a property of the AWS::ApiGateway::RestApi resource.
Example
ts
declare const someEndpoint: ec2.IVpcEndpoint;
const api = new apigateway.RestApi(this, 'api', {
endpointConfiguration: {
types: [ apigateway.EndpointType.PRIVATE ],
vpcEndpoints: [ someEndpoint ]
}
});
python
# some_endpoint: ec2.IVpcEndpoint
api = apigateway.RestApi(self, "api",
endpoint_configuration=apigateway.EndpointConfiguration(
types=[apigateway.EndpointType.PRIVATE],
vpc_endpoints=[some_endpoint]
)
)
java
IVpcEndpoint someEndpoint;
RestApi api = RestApi.Builder.create(this, "api")
.endpointConfiguration(EndpointConfiguration.builder()
.types(List.of(EndpointType.PRIVATE))
.vpcEndpoints(List.of(someEndpoint))
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
IVpcEndpoint someEndpoint;
var api = new RestApi(this, "api", new RestApiProps {
EndpointConfiguration = new EndpointConfiguration {
Types = new [] { EndpointType.PRIVATE },
VpcEndpoints = new [] { someEndpoint }
}
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var someEndpoint IVpcEndpoint
api := apigateway.NewRestApi(this, jsii.String("api"), &RestApiProps{
EndpointConfiguration: &EndpointConfiguration{
Types: []EndpointType{
apigateway.EndpointType_PRIVATE,
},
VpcEndpoints: []IVpcEndpoint{
someEndpoint,
},
},
})
Properties
ipAddressTypeoptionalIpAddressTypeip_address_typeoptionalIpAddressTypeipAddressTypeoptionalIpAddressTypeIpAddressTypeoptionalIpAddressTypeIpAddressTypeoptionalIpAddressType#The IP address types that can invoke the API.
Default: undefined - AWS default is DUAL_STACK for private API, IPV4 for all other APIs.
typesEndpointType[]typestyping.List[EndpointType]typesList<EndpointType>TypesEndpointType[]Types*[]EndpointType= EndpointType.EDGErequired#A list of endpoint types of an API or its custom domain name.
vpcEndpointsoptionalIVpcEndpoint[]vpc_endpointsoptionaltyping.List[IVpcEndpoint]vpcEndpointsoptionalList<IVpcEndpoint>VpcEndpointsoptionalIVpcEndpoint[]VpcEndpointsoptional*[]IVpcEndpoint#A list of VPC Endpoints against which to create Route53 ALIASes.
Default: no ALIASes are created for the endpoint.