Skip to content

Latest commit

 

History

History
317 lines (188 loc) · 9.14 KB

File metadata and controls

317 lines (188 loc) · 9.14 KB

API Reference

Constructs

RedirectionSite

Initializers

import { RedirectionSite } from 'cdk-cloudfront-redirector'

new RedirectionSite(scope: Construct, id: string, props: RedirectionSiteProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props RedirectionSiteProps No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { RedirectionSite } from 'cdk-cloudfront-redirector'

RedirectionSite.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
cfDistributionUrl string No description.
url string No description.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


cfDistributionUrlRequired
public readonly cfDistributionUrl: string;
  • Type: string

urlRequired
public readonly url: string;
  • Type: string

Structs

CustomDomainProps

Initializer

import { CustomDomainProps } from 'cdk-cloudfront-redirector'

const customDomainProps: CustomDomainProps = { ... }

Properties

Name Type Description
domainName string Domain name to use for the redirector (used as the record set name).
hostedZone string | aws-cdk-lib.aws_route53.IHostedZone Hosted Zone to use for the redirector (used as the record set zone).

domainNameRequired
public readonly domainName: string;
  • Type: string

Domain name to use for the redirector (used as the record set name).


Example

"i.redir.net"
hostedZoneRequired
public readonly hostedZone: string | IHostedZone;
  • Type: string | aws-cdk-lib.aws_route53.IHostedZone

Hosted Zone to use for the redirector (used as the record set zone).


Example

"redir.net"@note[object Object]

CustomPath

Initializer

import { CustomPath } from 'cdk-cloudfront-redirector'

const customPath: CustomPath = { ... }

Properties

Name Type Description
destination string Destination URL for the custom redirection.
path string Path on the Redirector Distribution's URL Back-Half.

destinationRequired
public readonly destination: string;
  • Type: string

Destination URL for the custom redirection.


Example

"https://ssennett.net/"
pathRequired
public readonly path: string;
  • Type: string

Path on the Redirector Distribution's URL Back-Half.


Example

"/author"

RedirectionSiteProps

Initializer

import { RedirectionSiteProps } from 'cdk-cloudfront-redirector'

const redirectionSiteProps: RedirectionSiteProps = { ... }

Properties

Name Type Description
targetUrl string Destination URL for all redirections.
customDomain CustomDomainProps Custom Domain for the redirector to use (Optional).
pathRedirects CustomPath[] List of custom back-halves for specific redirections.

targetUrlRequired
public readonly targetUrl: string;
  • Type: string

Destination URL for all redirections.


Example

https://mysite.com/
customDomainOptional
public readonly customDomain: CustomDomainProps;

Custom Domain for the redirector to use (Optional).


pathRedirectsOptional
public readonly pathRedirects: CustomPath[];
  • Type: CustomPath[]
  • Default: No custom back-half redirections

List of custom back-halves for specific redirections.

Any non-matches will default back to the targetUrl.


Example

- [{ path: "/author", destination: "https://ssennett.net/" }