class HttpOrigin
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CloudFront.Origins.HttpOrigin |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudfrontorigins#HttpOrigin |
Java | software.amazon.awscdk.services.cloudfront.origins.HttpOrigin |
Python | aws_cdk.aws_cloudfront_origins.HttpOrigin |
TypeScript (source) | aws-cdk-lib » aws_cloudfront_origins » HttpOrigin |
Implements
IOrigin
Extends
Origin
An Origin for an HTTP server or S3 bucket configured for website hosting.
Example
// Validating signed URLs or signed cookies with Trusted Key Groups
// public key in PEM format
declare const publicKey: string;
const pubKey = new cloudfront.PublicKey(this, 'MyPubKey', {
encodedKey: publicKey,
});
const keyGroup = new cloudfront.KeyGroup(this, 'MyKeyGroup', {
items: [
pubKey,
],
});
new cloudfront.Distribution(this, 'Dist', {
defaultBehavior: {
origin: new origins.HttpOrigin('www.example.com'),
trustedKeyGroups: [
keyGroup,
],
},
});
Initializer
new HttpOrigin(domainName: string, props?: HttpOriginProps)
Parameters
- domainName
string
- props
Http
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.
CustomOriginConfig()
protected renderprotected renderCustomOriginConfig(): CustomOriginConfigProperty
Returns