class RestApiOrigin
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.CloudFront.Origins.RestApiOrigin | 
|  Java | software.amazon.awscdk.services.cloudfront.origins.RestApiOrigin | 
|  Python | aws_cdk.aws_cloudfront_origins.RestApiOrigin | 
|  TypeScript (source) | @aws-cdk/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: RestApi, props?: RestApiOriginProps)
Parameters
- restApi RestApi 
- 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
