class RestApiOrigin
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudFront.Origins.RestApiOrigin |
![]() | software.amazon.awscdk.services.cloudfront.origins.RestApiOrigin |
![]() | aws_cdk.aws_cloudfront_origins.RestApiOrigin |
![]() | @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
Rest
Api - props
Rest
Api 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
Origin
Bind 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