class RestApiOrigin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.CloudFront.Origins.RestApiOrigin |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudfrontorigins#RestApiOrigin |
Java | software.amazon.awscdk.services.cloudfront.origins.RestApiOrigin |
Python | aws_cdk.aws_cloudfront_origins.RestApiOrigin |
TypeScript (source) | aws-cdk-lib » aws_cloudfront_origins » RestApiOrigin |
Implements
IOrigin
Extends
Origin
An Origin for an API Gateway REST API.
Example
declare const api: apigateway.RestApi;
new cloudfront.Distribution(this, 'Distribution', {
defaultBehavior: { origin: new origins.RestApiOrigin(api) },
});
Initializer
new RestApiOrigin(restApi: RestApiBase, props?: RestApiOriginProps)
Parameters
- restApi
RestApi Base - props
RestApi Origin Props
Methods
| Name | Description |
|---|---|
| bind(scope, options) | Binds the origin to the associated Distribution. |
| protected render |
bind(scope, options)
public bind(scope: Construct, options: OriginBindOptions): OriginBindConfig
Parameters
- scope
Construct - options
OriginBind Options
Returns
Binds the origin to the associated Distribution.
Can be used to grant permissions, create dependent resources, etc.
protected renderCustomOriginConfig()
protected renderCustomOriginConfig(): CustomOriginConfigProperty
Returns

.NET
Go
Java
Python
TypeScript (